qemu/hw/xen
Stefano Stabellini f17068c1c7 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>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2023-06-15 16:45:59 -07:00
..
Kconfig xen: add CONFIG_XEN_BUS and CONFIG_XEN_EMU options for Xen emulation 2023-03-01 08:22:49 +00:00
meson.build xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common 2023-06-15 16:45:59 -07:00
trace-events xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common 2023-06-15 16:45:59 -07:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xen-backend.c xen-bus: reduce scope of backend watch 2020-10-19 16:32:41 +01:00
xen-bus-helper.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-bus.c xen-block: fix segv on unrealize 2023-06-07 15:07:10 +01:00
xen-host-pci-device.c xen: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
xen-host-pci-device.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xen-hvm-common.c xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common 2023-06-15 16:45:59 -07:00
xen-legacy-backend.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen-mapcache.c hw/i386/xen/: move xen-mapcache.c to hw/xen/ 2023-06-15 16:45:58 -07:00
xen-operations.c xen: Drop support for Xen versions below 4.7.1 2023-06-07 15:07:10 +01:00
xen_devconfig.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen_pt.c pci: avoid accessing slot_reserved_mask directly outside of pci.c 2023-04-21 04:25:52 -04:00
xen_pt.h hw/xen: Rename xen_common.h to xen_native.h 2023-03-07 17:04:30 +00:00
xen_pt_config_init.c hw/xen: Rename xen_common.h to xen_native.h 2023-03-07 17:04:30 +00:00
xen_pt_graphics.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
xen_pt_load_rom.c pci: add romsize property 2021-02-05 08:52:58 -05:00
xen_pt_msi.c hw/xen: Rename xen_common.h to xen_native.h 2023-03-07 17:04:30 +00:00
xen_pt_stub.c xen/pt: reserve PCI slot 2 for Intel igd-passthru 2023-03-06 11:27:37 +00:00
xen_pvdev.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00