All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikram Garhwal <vikram.garhwal@amd.com>
To: Oleksandr Tyshchenko <olekstysh@gmail.com>, stefano.stabellini@amd.com
Cc: qemu-devel@nongnu.org,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Paul Durrant" <paul@xen.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 09/12] accel/xen/xen-all: export xenstore_record_dm_state
Date: Fri, 28 Oct 2022 22:36:47 -0700	[thread overview]
Message-ID: <2d7b110f-5d14-9067-bc3c-99951d4bdcdc@amd.com> (raw)
In-Reply-To: <CAPD2p-=gTqAevPi8-Tq_wkbd+PeVgnLLergmJVLh_eE2HumbGA@mail.gmail.com>

Hi Oleksandr,

On 10/28/22 1:26 PM, Oleksandr Tyshchenko wrote:
>
>
> On Thu, Oct 27, 2022 at 12:24 PM Alex Bennée <alex.bennee@linaro.org> 
> wrote:
>
> Hello all
>
>
>
>     Vikram Garhwal <vikram.garhwal@amd.com> writes:
>
>     > xenstore_record_dm_state() will also be used in aarch64 xenpv
>     machine.
>     >
>     > Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
>     > Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
>     > ---
>     >  accel/xen/xen-all.c  | 2 +-
>     >  include/hw/xen/xen.h | 2 ++
>     >  2 files changed, 3 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
>     > index 69aa7d018b..276625b78b 100644
>     > --- a/accel/xen/xen-all.c
>     > +++ b/accel/xen/xen-all.c
>     > @@ -100,7 +100,7 @@ void xenstore_store_pv_console_info(int i,
>     Chardev *chr)
>     >  }
>     >
>     >
>     > -static void xenstore_record_dm_state(struct xs_handle *xs,
>     const char *state)
>     > +void xenstore_record_dm_state(struct xs_handle *xs, const char
>     *state)
>     >  {
>     >      char path[50];
>     >
>     > diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
>     > index afdf9c436a..31e9538a5c 100644
>     > --- a/include/hw/xen/xen.h
>     > +++ b/include/hw/xen/xen.h
>     > @@ -9,6 +9,7 @@
>     >   */
>     >
>     >  #include "exec/cpu-common.h"
>     > +#include <xenstore.h>
>
>     This is breaking a bunch of the builds and generally we try and avoid
>     adding system includes in headers (apart from osdep.h) for this
>     reason.
>     In fact there is a comment just above to that fact.
>
>     I think you can just add struct xs_handle to typedefs.h (or maybe just
>     xen.h) and directly include xenstore.h in xen-all.c following the
>     usual
>     rules:
>
>     https://qemu.readthedocs.io/en/latest/devel/style.html#include-directives
>
>     It might be worth doing an audit to see what else is including xen.h
>     needlessly or should be using sysemu/xen.h.
>
>     >
>     >  /* xen-machine.c */
>     >  enum xen_mode {
>     > @@ -31,5 +32,6 @@ qemu_irq *xen_interrupt_controller_init(void);
>     >  void xenstore_store_pv_console_info(int i, Chardev *chr);
>     >
>     >  void xen_register_framebuffer(struct MemoryRegion *mr);
>     > +void xenstore_record_dm_state(struct xs_handle *xs, const char
>     *state);
>     >
>     >  #endif /* QEMU_HW_XEN_H */
>
>
>     -- 
>     Alex Bennée
>
>
>
> For considering:
> I think this patch and some other changes done in "[PATCH v1 10/12] 
> hw/arm: introduce xenpv machine" (the opening of Xen interfaces and 
> calling xenstore_record_dm_state() in hw/arm/xen_arm.c:xen_init_ioreq())
> could be avoided if we enable the Xen accelerator (either by passing 
> "-M xenpv,accel=xen" or by adding mc->default_machine_opts = 
> "accel=xen"; to hw/arm/xen_arm.c:xen_arm_machine_class_init() or by 
> some other method).
> These actions are already done in accel/xen/xen-all.c:xen_init(). 
> Please note, that I am not too familiar with that code, so there might 
> be nuances.
>
> Besides that, Xen accelerator will be needed for the xen-mapcache to 
> be in use (this is needed for mapping guest memory), there are a few 
> xen_enabled() checks spreading around that code to perform Xen 
> specific actions.
>
Unfortunately, I am not that familiar with xen as accelerator function. 
Let me check and get back to you.
> -- 
> Regards,
>
> Oleksandr Tyshchenko


  reply	other threads:[~2022-10-29  5:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-15  5:07 [PATCH v1 00/12] Introduce xenpv machine for arm architecture Vikram Garhwal
2022-10-15  5:07 ` [PATCH v1 01/12] hw/xen: Correct build config for xen_pt_stub Vikram Garhwal
2022-10-19 14:46   ` Paul Durrant
2022-10-26 19:01   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 02/12] hw/i386/xen/: move xen-mapcache.c to hw/xen/ Vikram Garhwal
2022-10-19 14:53   ` Paul Durrant
2022-12-01 20:25     ` Garhwal, Vikram
2022-10-15  5:07 ` [PATCH v1 03/12] hw/i386/xen: rearrange xen_hvm_init_pc Vikram Garhwal
2022-10-19 14:59   ` Paul Durrant
2022-10-15  5:07 ` [PATCH v1 04/12] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState Vikram Garhwal
2022-10-19 15:56   ` Paul Durrant
2022-10-19 16:00   ` Paul Durrant
2022-10-27  8:59   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 05/12] hw/i386/xen/xen-hvm: create arch_handle_ioreq and arch_xen_set_memory Vikram Garhwal
2022-10-19 16:09   ` Paul Durrant
2022-10-27  9:02   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 06/12] xen-hvm: move common functions to hw/xen/xen-hvm-common.c Vikram Garhwal
2022-10-16 18:07   ` Julien Grall
2022-10-19 16:16   ` Paul Durrant
2022-10-19 23:12     ` Garhwal, Vikram
2022-10-15  5:07 ` [PATCH v1 07/12] include/hw/xen/xen_common: return error from xen_create_ioreq_server Vikram Garhwal
2022-10-16 17:53   ` Julien Grall
2022-10-15  5:07 ` [PATCH v1 08/12] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure Vikram Garhwal
2022-10-27  8:46   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 09/12] accel/xen/xen-all: export xenstore_record_dm_state Vikram Garhwal
2022-10-19 16:20   ` Paul Durrant
2022-10-27  9:14   ` Alex Bennée
2022-10-28 20:26     ` Oleksandr Tyshchenko
2022-10-29  5:36       ` Vikram Garhwal [this message]
2022-10-29  5:22     ` Garhwal, Vikram
2022-11-01 11:29       ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 10/12] hw/arm: introduce xenpv machine Vikram Garhwal
2022-10-16 17:47   ` Julien Grall
2022-10-18  1:26     ` Stefano Stabellini
2022-10-18  8:24       ` Julien Grall
2022-10-19  0:15         ` Stefano Stabellini
2022-10-19  9:49           ` Julien Grall
2022-10-27  8:37     ` Alex Bennée
2022-12-02  3:24     ` Garhwal, Vikram
2022-12-02  9:53       ` Julien Grall
2022-10-27  8:02   ` Alex Bennée
2022-10-28 17:57     ` Julien Grall
2022-10-28 19:05       ` Oleksandr Tyshchenko
2022-10-27  8:40   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 11/12] meson.build: enable xenpv machine build for ARM Vikram Garhwal
2022-10-27  9:11   ` Alex Bennée
2022-10-15  5:07 ` [PATCH v1 12/12] meson.build: do not set have_xen_pci_passthrough for aarch64 targets Vikram Garhwal
2022-10-27  9:14   ` Alex Bennée
2022-10-27  8:26 ` [PATCH v1 00/12] Introduce xenpv machine for arm architecture Alex Bennée
2022-10-27  9:24 ` Alex Bennée

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=2d7b110f-5d14-9067-bc3c-99951d4bdcdc@amd.com \
    --to=vikram.garhwal@amd.com \
    --cc=alex.bennee@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=olekstysh@gmail.com \
    --cc=paul@xen.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.