qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] Xen queue
@ 2022-01-27 15:42 Anthony PERARD via
  2022-01-28 14:03 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Anthony PERARD via @ 2022-01-27 15:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Anthony PERARD

The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3:

  Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging (2022-01-26 10:59:50 +0000)

are available in the Git repository at:

  https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20220127

for you to fetch changes up to a021a2dd8b790437d27db95774969349632f856a:

  xen-mapcache: Avoid entry->lock overflow (2022-01-27 15:14:21 +0000)

----------------------------------------------------------------
Xen patches

- bug fixes for mapcache and ioreq handling

----------------------------------------------------------------
Jason Andryuk (1):
      xen-hvm: Allow disabling buffer_io_timer

Ross Lagerwall (1):
      xen-mapcache: Avoid entry->lock overflow

 hw/i386/xen/xen-hvm.c      | 6 ++++--
 hw/i386/xen/xen-mapcache.c | 8 +++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PULL 0/2] Xen queue
  2022-01-27 15:42 [PULL 0/2] Xen queue Anthony PERARD via
@ 2022-01-28 14:03 ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2022-01-28 14:03 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: qemu-devel

On Thu, 27 Jan 2022 at 15:43, Anthony PERARD <anthony.perard@citrix.com> wrote:
>
> The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3:
>
>   Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging (2022-01-26 10:59:50 +0000)
>
> are available in the Git repository at:
>
>   https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20220127
>
> for you to fetch changes up to a021a2dd8b790437d27db95774969349632f856a:
>
>   xen-mapcache: Avoid entry->lock overflow (2022-01-27 15:14:21 +0000)
>
> ----------------------------------------------------------------
> Xen patches
>
> - bug fixes for mapcache and ioreq handling
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/7.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 0/2] xen queue
@ 2022-07-05 13:45 Anthony PERARD via
  2022-07-06  1:48 ` Richard Henderson
  0 siblings, 1 reply; 10+ messages in thread
From: Anthony PERARD via @ 2022-07-05 13:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony PERARD

The following changes since commit 19361471b59441cd6f2aa22d4fbee7a6e9e76586:

  Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging (2022-07-05 16:30:52 +0530)

are available in the Git repository at:

  https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20220705

for you to fetch changes up to c0e86b7624cb9d6db03e0d48cf82659e5b89a6a6:

  xen/pass-through: don't create needless register group (2022-07-05 14:19:48 +0100)

----------------------------------------------------------------
Xen patches

- Xen PCI passthrough fixes

----------------------------------------------------------------
Chuck Zmudzinski (2):
      xen/pass-through: merge emulated bits correctly
      xen/pass-through: don't create needless register group

 hw/xen/xen_pt_config_init.c | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PULL 0/2] xen queue
  2022-07-05 13:45 Anthony PERARD via
@ 2022-07-06  1:48 ` Richard Henderson
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2022-07-06  1:48 UTC (permalink / raw)
  To: Anthony PERARD, qemu-devel

On 7/5/22 19:15, Anthony PERARD via wrote:
> The following changes since commit 19361471b59441cd6f2aa22d4fbee7a6e9e76586:
> 
>    Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging (2022-07-05 16:30:52 +0530)
> 
> are available in the Git repository at:
> 
>    https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20220705
> 
> for you to fetch changes up to c0e86b7624cb9d6db03e0d48cf82659e5b89a6a6:
> 
>    xen/pass-through: don't create needless register group (2022-07-05 14:19:48 +0100)
> 
> ----------------------------------------------------------------
> Xen patches
> 
> - Xen PCI passthrough fixes

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~


> 
> ----------------------------------------------------------------
> Chuck Zmudzinski (2):
>        xen/pass-through: merge emulated bits correctly
>        xen/pass-through: don't create needless register group
> 
>   hw/xen/xen_pt_config_init.c | 25 +++++++++++++++----------
>   1 file changed, 15 insertions(+), 10 deletions(-)
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 0/2] xen queue
@ 2023-03-06 14:00 Anthony PERARD via
  2023-03-07 12:41 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Anthony PERARD via @ 2023-03-06 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony PERARD

The following changes since commit 2946e1af2704bf6584f57d4e3aec49d1d5f3ecc0:

  configure: Disable thread-safety warnings on macOS (2023-03-04 14:03:46 +0000)

are available in the Git repository at:

  https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230306

for you to fetch changes up to 3856734d80fbf46683e4080117ed961f5ab1300b:

  hw/xen/xen_pt: fix uninitialized variable (2023-03-06 11:27:37 +0000)

----------------------------------------------------------------
Xen queue:

- fix for graphic passthrough with 'xenfv' machine
- fix uninitialized variable

----------------------------------------------------------------
Chuck Zmudzinski (1):
      xen/pt: reserve PCI slot 2 for Intel igd-passthru

Marek Marczykowski-Górecki (1):
      hw/xen/xen_pt: fix uninitialized variable

 hw/i386/pc_piix.c           |  1 +
 hw/xen/xen_pt.c             | 64 +++++++++++++++++++++++++++++++++++++--------
 hw/xen/xen_pt.h             | 20 ++++++++++++++
 hw/xen/xen_pt_config_init.c |  2 +-
 hw/xen/xen_pt_stub.c        |  4 +++
 5 files changed, 79 insertions(+), 12 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PULL 0/2] xen queue
  2023-03-06 14:00 Anthony PERARD via
@ 2023-03-07 12:41 ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2023-03-07 12:41 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: qemu-devel

On Mon, 6 Mar 2023 at 14:03, Anthony PERARD via <qemu-devel@nongnu.org> wrote:
>
> The following changes since commit 2946e1af2704bf6584f57d4e3aec49d1d5f3ecc0:
>
>   configure: Disable thread-safety warnings on macOS (2023-03-04 14:03:46 +0000)
>
> are available in the Git repository at:
>
>   https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230306
>
> for you to fetch changes up to 3856734d80fbf46683e4080117ed961f5ab1300b:
>
>   hw/xen/xen_pt: fix uninitialized variable (2023-03-06 11:27:37 +0000)
>
> ----------------------------------------------------------------
> Xen queue:
>
> - fix for graphic passthrough with 'xenfv' machine
> - fix uninitialized variable
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 0/2] xen queue
@ 2023-03-24 14:56 Anthony PERARD via
  2023-03-24 14:56 ` [PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode Anthony PERARD via
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Anthony PERARD via @ 2023-03-24 14:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Anthony PERARD

The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12:

  Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +0000)

are available in the Git repository at:

  https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230324

for you to fetch changes up to 670d8c6ebf7a2c425575bbd6fbaeb27d21edd6c6:

  hw/xenpv: Initialize Xen backend operations (2023-03-24 14:52:14 +0000)

----------------------------------------------------------------
Xen queue

- fix guest creation when -xen-domid-restrict is used.
- fix Xen PV guest creation.

----------------------------------------------------------------
David Woodhouse (2):
      accel/xen: Fix DM state change notification in dm_restrict mode
      hw/xenpv: Initialize Xen backend operations

 accel/xen/xen-all.c       | 27 ++++++++++-----------------
 hw/xenpv/xen_machine_pv.c |  2 ++
 2 files changed, 12 insertions(+), 17 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode
  2023-03-24 14:56 [PULL 0/2] xen queue Anthony PERARD via
@ 2023-03-24 14:56 ` Anthony PERARD via
  2023-03-24 14:56 ` [PULL 2/2] hw/xenpv: Initialize Xen backend operations Anthony PERARD via
  2023-03-25 16:28 ` [PULL 0/2] xen queue Peter Maydell
  2 siblings, 0 replies; 10+ messages in thread
From: Anthony PERARD via @ 2023-03-24 14:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, David Woodhouse, Anthony PERARD

From: David Woodhouse <dwmw@amazon.co.uk>

When dm_restrict is set, QEMU isn't permitted to update the XenStore node
to indicate its running status. Previously, the xs_write() call would fail
but the failure was ignored.

However, in refactoring to allow for emulated XenStore operations, a new
call to xs_open() was added. That one didn't fail gracefully, causing a
fatal error when running in dm_restrict mode.

Partially revert the offending patch, removing the additional call to
xs_open() because the global 'xenstore' variable is still available; it
just needs to be used with qemu_xen_xs_write() now instead of directly
with the xs_write() libxenstore function.

Also make the whole thing conditional on !xen_domid_restrict. There's no
point even registering the state change handler to attempt to update the
XenStore node when we know it's destined to fail.

Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to internal emulation")
Reported-by: Jason Andryuk <jandryuk@gmail.com>
Co-developed-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Message-Id: <1f141995bb61af32c2867ef5559e253f39b0949c.camel@infradead.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 accel/xen/xen-all.c | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index 00221e23c5..5ff0cb8bd9 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -32,28 +32,13 @@ xendevicemodel_handle *xen_dmod;
 
 static void xenstore_record_dm_state(const char *state)
 {
-    struct xs_handle *xs;
     char path[50];
 
-    /* We now have everything we need to set the xenstore entry. */
-    xs = xs_open(0);
-    if (xs == NULL) {
-        fprintf(stderr, "Could not contact XenStore\n");
-        exit(1);
-    }
-
     snprintf(path, sizeof (path), "device-model/%u/state", xen_domid);
-    /*
-     * This call may fail when running restricted so don't make it fatal in
-     * that case. Toolstacks should instead use QMP to listen for state changes.
-     */
-    if (!xs_write(xs, XBT_NULL, path, state, strlen(state)) &&
-            !xen_domid_restrict) {
+    if (!qemu_xen_xs_write(xenstore, XBT_NULL, path, state, strlen(state))) {
         error_report("error recording dm state");
         exit(1);
     }
-
-    xs_close(xs);
 }
 
 
@@ -111,7 +96,15 @@ static int xen_init(MachineState *ms)
         xc_interface_close(xen_xc);
         return -1;
     }
-    qemu_add_vm_change_state_handler(xen_change_state_handler, NULL);
+
+    /*
+     * The XenStore write would fail when running restricted so don't attempt
+     * it in that case. Toolstacks should instead use QMP to listen for state
+     * changes.
+     */
+    if (!xen_domid_restrict) {
+        qemu_add_vm_change_state_handler(xen_change_state_handler, NULL);
+    }
     /*
      * opt out of system RAM being allocated by generic code
      */
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 2/2] hw/xenpv: Initialize Xen backend operations
  2023-03-24 14:56 [PULL 0/2] xen queue Anthony PERARD via
  2023-03-24 14:56 ` [PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode Anthony PERARD via
@ 2023-03-24 14:56 ` Anthony PERARD via
  2023-03-25 16:28 ` [PULL 0/2] xen queue Peter Maydell
  2 siblings, 0 replies; 10+ messages in thread
From: Anthony PERARD via @ 2023-03-24 14:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, David Woodhouse, Anthony PERARD

From: David Woodhouse <dwmw@amazon.co.uk>

As the Xen backend operations were abstracted out into a function table to
allow for internally emulated Xen support, we missed the xen_init_pv()
code path which also needs to install the operations for the true Xen
libraries. Add the missing call to setup_xen_backend_ops().

Fixes: b6cacfea0b38 ("hw/xen: Add evtchn operations to allow redirection to internal emulation")
Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Tested-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <5dfb65342d4502c1ce2f890c97cff20bf25b3860.camel@infradead.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 hw/xenpv/xen_machine_pv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
index 2e759d0619..17cda5ec13 100644
--- a/hw/xenpv/xen_machine_pv.c
+++ b/hw/xenpv/xen_machine_pv.c
@@ -35,6 +35,8 @@ static void xen_init_pv(MachineState *machine)
     DriveInfo *dinfo;
     int i;
 
+    setup_xen_backend_ops();
+
     /* Initialize backend core & drivers */
     xen_be_init();
 
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PULL 0/2] xen queue
  2023-03-24 14:56 [PULL 0/2] xen queue Anthony PERARD via
  2023-03-24 14:56 ` [PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode Anthony PERARD via
  2023-03-24 14:56 ` [PULL 2/2] hw/xenpv: Initialize Xen backend operations Anthony PERARD via
@ 2023-03-25 16:28 ` Peter Maydell
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2023-03-25 16:28 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: qemu-devel

On Fri, 24 Mar 2023 at 14:56, Anthony PERARD <anthony.perard@citrix.com> wrote:
>
> The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12:
>
>   Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +0000)
>
> are available in the Git repository at:
>
>   https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230324
>
> for you to fetch changes up to 670d8c6ebf7a2c425575bbd6fbaeb27d21edd6c6:
>
>   hw/xenpv: Initialize Xen backend operations (2023-03-24 14:52:14 +0000)
>
> ----------------------------------------------------------------
> Xen queue
>
> - fix guest creation when -xen-domid-restrict is used.
> - fix Xen PV guest creation.
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-25 16:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 14:56 [PULL 0/2] xen queue Anthony PERARD via
2023-03-24 14:56 ` [PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode Anthony PERARD via
2023-03-24 14:56 ` [PULL 2/2] hw/xenpv: Initialize Xen backend operations Anthony PERARD via
2023-03-25 16:28 ` [PULL 0/2] xen queue Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2023-03-06 14:00 Anthony PERARD via
2023-03-07 12:41 ` Peter Maydell
2022-07-05 13:45 Anthony PERARD via
2022-07-06  1:48 ` Richard Henderson
2022-01-27 15:42 [PULL 0/2] Xen queue Anthony PERARD via
2022-01-28 14:03 ` Peter Maydell

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).