[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 9f268f: hw/i386/xen/: move xen-mapcache.c to
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] 9f268f: hw/i386/xen/: move xen-mapcache.c to hw/xen/ |
Date: |
Tue, 02 May 2023 23:33:47 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 9f268f515689beb9f131aa3e1dcb2e3407d1720d
https://github.com/qemu/qemu/commit/9f268f515689beb9f131aa3e1dcb2e3407d1720d
Author: Vikram Garhwal <vikram.garhwal@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/i386/meson.build
M hw/i386/xen/meson.build
M hw/i386/xen/trace-events
R hw/i386/xen/xen-mapcache.c
M hw/xen/meson.build
M hw/xen/trace-events
A hw/xen/xen-mapcache.c
Log Message:
-----------
hw/i386/xen/: move xen-mapcache.c to hw/xen/
xen-mapcache.c contains common functions which can be used for enabling Xen on
aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it
accessible for both aarch64 and x86.
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: b5e35f8aa0d9341a73b55b96cca407fd54834b32
https://github.com/qemu/qemu/commit/b5e35f8aa0d9341a73b55b96cca407fd54834b32
Author: Vikram Garhwal <vikram.garhwal@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/i386/xen/xen-hvm.c
Log Message:
-----------
hw/i386/xen: rearrange xen_hvm_init_pc
In preparation to moving most of xen-hvm code to an arch-neutral location,
move non IOREQ references to:
- xen_get_vmport_regs_pfn
- xen_suspend_notifier
- xen_wakeup_notifier
- xen_ram_init
towards the end of the xen_hvm_init_pc() function.
This is done to keep the common ioreq functions in one place which will be
moved to new function in next patch in order to make it common to both x86 and
aarch64 machines.
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: 33f03334a1c03f4a7569335befbef2253051f302
https://github.com/qemu/qemu/commit/33f03334a1c03f4a7569335befbef2253051f302
Author: Stefano Stabellini <stefano.stabellini@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/i386/xen/xen-hvm.c
Log Message:
-----------
hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState
In preparation to moving most of xen-hvm code to an arch-neutral location, move:
- shared_vmport_page
- log_for_dirtybit
- dirty_bitmap
- suspend
- wakeup
out of XenIOState struct as these are only used on x86, especially the ones
related to dirty logging.
Updated XenIOState can be used for both aarch64 and x86.
Also, remove free_phys_offset as it was unused.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Commit: 6c323956e9154c8c36468f760dc314aaad7f4f3e
https://github.com/qemu/qemu/commit/6c323956e9154c8c36468f760dc314aaad7f4f3e
Author: Stefano Stabellini <stefano.stabellini@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/i386/xen/trace-events
M hw/i386/xen/xen-hvm.c
M hw/xen/meson.build
M hw/xen/trace-events
A hw/xen/xen-hvm-common.c
A include/hw/i386/xen_arch_hvm.h
A include/hw/xen/arch_hvm.h
A include/hw/xen/xen-hvm-common.h
Log Message:
-----------
xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common
This patch does following:
1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in
preparation for moving most of xen-hvm code to an arch-neutral location,
move the x86-specific portion of xen_set_memory to arch_xen_set_memory.
Also, move handle_vmport_ioreq to arch_handle_ioreq.
2. Pure code movement: move common functions to hw/xen/xen-hvm-common.c
Extract common functionalities from hw/i386/xen/xen-hvm.c and move them to
hw/xen/xen-hvm-common.c. These common functions are useful for creating
an IOREQ server.
xen_hvm_init_pc() contains the architecture independent code for creating
and mapping a IOREQ server, connecting memory and IO listeners, initializing
a xen bus and registering backends. Moved this common xen code to a new
function xen_register_ioreq() which can be used by both x86 and ARM
machines.
Following functions are moved to hw/xen/xen-hvm-common.c:
xen_vcpu_eport(), xen_vcpu_ioreq(), xen_ram_alloc(), xen_set_memory(),
xen_region_add(), xen_region_del(), xen_io_add(), xen_io_del(),
xen_device_realize(), xen_device_unrealize(),
cpu_get_ioreq_from_shared_memory(), cpu_get_ioreq(), do_inp(),
do_outp(), rw_phys_req_item(), read_phys_req_item(),
write_phys_req_item(), cpu_ioreq_pio(), cpu_ioreq_move(),
cpu_ioreq_config(), handle_ioreq(), handle_buffered_iopage(),
handle_buffered_io(), cpu_handle_ioreq(), xen_main_loop_prepare(),
xen_hvm_change_state_handler(), xen_exit_notifier(),
xen_map_ioreq_server(), destroy_hvm_domain() and
xen_shutdown_fatal_error()
3. Removed static type from below functions:
1. xen_region_add()
2. xen_region_del()
3. xen_io_add()
4. xen_io_del()
5. xen_device_realize()
6. xen_device_unrealize()
7. xen_hvm_change_state_handler()
8. cpu_ioreq_pio()
9. xen_exit_notifier()
4. Replace TARGET_PAGE_SIZE with XC_PAGE_SIZE to match the page side with Xen.
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: 57fb6e1f070d26d7aa6b6b1c88405eb7c528ffe1
https://github.com/qemu/qemu/commit/57fb6e1f070d26d7aa6b6b1c88405eb7c528ffe1
Author: Stefano Stabellini <stefano.stabellini@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M include/hw/xen/xen_native.h
Log Message:
-----------
include/hw/xen/xen_common: return error from xen_create_ioreq_server
This is done to prepare for enabling xenpv support for ARM architecture.
On ARM it is possible to have a functioning xenpv machine with only the
PV backends and no IOREQ server. If the IOREQ server creation fails,
continue to the PV backends initialization.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: a16ed49da10ad2176d86215436c3883b93945c06
https://github.com/qemu/qemu/commit/a16ed49da10ad2176d86215436c3883b93945c06
Author: Stefano Stabellini <stefano.stabellini@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/xen/xen-hvm-common.c
Log Message:
-----------
hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure
On ARM it is possible to have a functioning xenpv machine with only the
PV backends and no IOREQ server. If the IOREQ server creation fails continue
to the PV backends initialization.
Also, moved the IOREQ registration and mapping subroutine to new function
xen_do_ioreq_register().
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: 0dc73ab4e806d20276409aa0ff6f46747bb32562
https://github.com/qemu/qemu/commit/0dc73ab4e806d20276409aa0ff6f46747bb32562
Author: Vikram Garhwal <vikram.garhwal@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M hw/xen/xen-hvm-common.c
Log Message:
-----------
hw/xen/xen-hvm-common: Use g_new and error_report
Replace g_malloc with g_new and perror with error_report.
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Paul Durrant <paul@xen.org>
Commit: 91dbf7a2d3b898d6cc719c0fbf5af7bdb0bac69b
https://github.com/qemu/qemu/commit/91dbf7a2d3b898d6cc719c0fbf5af7bdb0bac69b
Author: Stefano Stabellini <stefano.stabellini@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M meson.build
Log Message:
-----------
meson.build: do not set have_xen_pci_passthrough for aarch64 targets
have_xen_pci_passthrough is only used for Xen x86 VMs.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Commit: 1820d83ed95f38c406ad40d65df2a28daea59596
https://github.com/qemu/qemu/commit/1820d83ed95f38c406ad40d65df2a28daea59596
Author: Vikram Garhwal <vikram.garhwal@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
A docs/system/arm/xenpvh.rst
M docs/system/target-arm.rst
M hw/arm/meson.build
A hw/arm/xen_arm.c
A include/hw/arm/xen_arch_hvm.h
M include/hw/xen/arch_hvm.h
Log Message:
-----------
hw/arm: introduce xenpvh machine
Add a new machine xenpvh which creates a IOREQ server to register/connect with
Xen Hypervisor.
Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a
TPM emulator and connects to swtpm running on host machine via chardev socket
and support TPM functionalities for a guest domain.
Extra command line for aarch64 xenpvh QEMU to connect to swtpm:
-chardev socket,id=chrtpm,path=/tmp/myvtpm2/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-machine tpm-base-addr=0x0c000000 \
swtpm implements a TPM software emulator(TPM 1.2 & TPM 2) built on libtpms and
provides access to TPM functionality over socket, chardev and CUSE interface.
Github repo: https://github.com/stefanberger/swtpm
Example for starting swtpm on host machine:
mkdir /tmp/vtpm2
swtpm socket --tpmstate dir=/tmp/vtpm2 \
--ctrl type=unixio,path=/tmp/vtpm2/swtpm-sock &
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Commit: bc618c54318cbc2fcb9decf9d4c193cc336a0dbc
https://github.com/qemu/qemu/commit/bc618c54318cbc2fcb9decf9d4c193cc336a0dbc
Author: Vikram Garhwal <vikram.garhwal@amd.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M meson.build
Log Message:
-----------
meson.build: enable xenpv machine build for ARM
Add CONFIG_XEN for aarch64 device to support build for ARM targets.
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Commit: 5fcde5f923237ee4986bb81eac76d4b2036fefc3
https://github.com/qemu/qemu/commit/5fcde5f923237ee4986bb81eac76d4b2036fefc3
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2023-05-03 (Wed, 03 May 2023)
Changed paths:
A docs/system/arm/xenpvh.rst
M docs/system/target-arm.rst
M hw/arm/meson.build
A hw/arm/xen_arm.c
M hw/i386/meson.build
M hw/i386/xen/meson.build
M hw/i386/xen/trace-events
M hw/i386/xen/xen-hvm.c
R hw/i386/xen/xen-mapcache.c
M hw/xen/meson.build
M hw/xen/trace-events
A hw/xen/xen-hvm-common.c
A hw/xen/xen-mapcache.c
A include/hw/arm/xen_arch_hvm.h
A include/hw/i386/xen_arch_hvm.h
A include/hw/xen/arch_hvm.h
A include/hw/xen/xen-hvm-common.h
M include/hw/xen/xen_native.h
M meson.build
Log Message:
-----------
Merge tag 'xenpvh3-tag' of https://gitlab.com/sstabellini/qemu into staging
xenpvh3-tag
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEE0E4zq6UfZ7oH0wrqiU+PSHDhrpAFAmRRpX8ACgkQiU+PSHDh
# rpDONBAAlE+B1tVuDlVja5Q11Vw6iTnb+T65uTXPdRY4ucUVw3K4gF05JO3SanA7
# eHRT0/1FqCW5iOA1zNKKfvTzjETvYahOmVnTPVQxo8bbpcuB7rDPy/3swhZY6s9P
# P07Zdj6a7zLdsBsbax2c6Xwh++aprX94IfLtHTLa/v8S0/IXE3+CABIMsUruY2hE
# EOFHM5w9FYoXCfvPnwQFDEWzgAYut0sFtdXcfH6/ATY7QliHecu7Nn4pND6dQvbr
# gxYi229yS52fmW4uH+LiFLjhs90tt5hX0+xcskzVkwgZKjs7Ylu1j68OSSU5JexW
# 21was3cPe16D5LXmS66Q6JeA3dZfDQX0rX1RLOihvo3PrHL7OFU19OkBIUXg/9AD
# WB1bpkMoJgFMC7TZqfkYx22y9YeLN5oxBHWolfxnT7T9eHP5E3E242p/HQRT/cGx
# I03iG9Ze3j9IJ5oB/j+9hoHZD4CEStxQl9arzKbvnao3+xR9YiHkn+zO+0Z6Jddb
# i3o8Wa/Y/rDilU7IwQ/b++HsqMzFKdD/u+uEA4cOFUCL/SCNFgPhfzJj/30BRHmR
# bKSZnuhOV57aDPak8R8QOT9+ZmGpzgT1i/UByyRwxAUzHHL/aru8Pxa0rBuFVXVx
# n0qxkfGrK9O+azBQzMjJXhDSYmYuxTz2Q1tQuAnu4vSgJk3zYUM=
# =AQVI
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 03 May 2023 01:06:23 AM BST
# gpg: using RSA key D04E33ABA51F67BA07D30AEA894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <sstabellini@kernel.org>"
[unknown]
# gpg: aka "Stefano Stabellini
<stefano.stabellini@eu.citrix.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90
* tag 'xenpvh3-tag' of https://gitlab.com/sstabellini/qemu:
meson.build: enable xenpv machine build for ARM
hw/arm: introduce xenpvh machine
meson.build: do not set have_xen_pci_passthrough for aarch64 targets
hw/xen/xen-hvm-common: Use g_new and error_report
hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure
include/hw/xen/xen_common: return error from xen_create_ioreq_server
xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common
hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState
hw/i386/xen: rearrange xen_hvm_init_pc
hw/i386/xen/: move xen-mapcache.c to hw/xen/
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/4ebc33f3f3b6...5fcde5f92323
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 9f268f: hw/i386/xen/: move xen-mapcache.c to hw/xen/,
Richard Henderson <=