qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <xadimgnik@gmail.com>
To: Vikram Garhwal <vikram.garhwal@amd.com>, qemu-devel@nongnu.org
Cc: xen-devel@lists.xenproject.org, stefano.stabellini@amd.com,
	alex.bennee@linaro.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <eduardo@habkost.net>
Subject: Re: [QEMU][PATCH v5 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common
Date: Wed, 1 Feb 2023 08:01:09 +0000	[thread overview]
Message-ID: <3c54b871-b14c-9fc1-fd80-1d01d506035c@xen.org> (raw)
In-Reply-To: <20230131225149.14764-5-vikram.garhwal@amd.com>

On 31/01/2023 22:51, Vikram Garhwal wrote:
> From: Stefano Stabellini <stefano.stabellini@amd.com>
> 
> 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>
> ---
>   hw/i386/xen/trace-events        |   14 -
>   hw/i386/xen/xen-hvm.c           | 1019 ++-----------------------------
>   hw/xen/meson.build              |    5 +-
>   hw/xen/trace-events             |   14 +
>   hw/xen/xen-hvm-common.c         |  874 ++++++++++++++++++++++++++
>   include/hw/i386/xen_arch_hvm.h  |   11 +
>   include/hw/xen/arch_hvm.h       |    3 +
>   include/hw/xen/xen-hvm-common.h |   98 +++
>   8 files changed, 1067 insertions(+), 971 deletions(-)
>   create mode 100644 hw/xen/xen-hvm-common.c
>   create mode 100644 include/hw/i386/xen_arch_hvm.h
>   create mode 100644 include/hw/xen/arch_hvm.h
>   create mode 100644 include/hw/xen/xen-hvm-common.h
> 

Reviewed-by: Paul Durrant <paul@xen.org>



  parent reply	other threads:[~2023-02-01  8:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 22:51 [QEMU][PATCH v5 00/10] Introduce xenpvh machine for arm architecture Vikram Garhwal
2023-01-31 22:51 ` [QEMU][PATCH v5 01/10] hw/i386/xen/: move xen-mapcache.c to hw/xen/ Vikram Garhwal
2023-02-01  7:54   ` Paul Durrant
2023-01-31 22:51 ` [QEMU][PATCH v5 02/10] hw/i386/xen: rearrange xen_hvm_init_pc Vikram Garhwal
2023-01-31 22:51 ` [QEMU][PATCH v5 03/10] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState Vikram Garhwal
2023-01-31 22:51 ` [QEMU][PATCH v5 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common Vikram Garhwal
2023-02-01  1:47   ` Stefano Stabellini
2023-02-01  8:01   ` Paul Durrant [this message]
2023-01-31 22:51 ` [QEMU][PATCH v5 05/10] include/hw/xen/xen_common: return error from xen_create_ioreq_server Vikram Garhwal
2023-02-01  8:08   ` Paul Durrant
2023-01-31 22:51 ` [QEMU][PATCH v5 06/10] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure Vikram Garhwal
2023-02-01  8:14   ` Paul Durrant
2023-01-31 22:51 ` [QEMU][PATCH v5 07/10] hw/xen/xen-hvm-common: Use g_new and error_report Vikram Garhwal
2023-02-01  8:15   ` Paul Durrant
2023-01-31 22:51 ` [QEMU][PATCH v5 08/10] meson.build: do not set have_xen_pci_passthrough for aarch64 targets Vikram Garhwal
2023-01-31 22:51 ` [QEMU][PATCH v5 09/10] hw/arm: introduce xenpvh machine Vikram Garhwal
2023-02-01  1:46   ` Stefano Stabellini
2023-02-01  8:30   ` Paul Durrant
2023-02-01 18:22     ` Vikram Garhwal
2023-02-02 14:31       ` Paul Durrant
2023-02-02 16:28         ` Stefano Stabellini
2023-01-31 22:51 ` [QEMU][PATCH v5 10/10] meson.build: enable xenpv machine build for ARM Vikram Garhwal
2023-02-07 10:13 ` [QEMU][PATCH v5 00/10] Introduce xenpvh machine for arm architecture David Woodhouse
2023-02-07 19:06   ` Garhwal, Vikram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c54b871-b14c-9fc1-fd80-1d01d506035c@xen.org \
    --to=xadimgnik@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@amd.com \
    --cc=vikram.garhwal@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).