qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if devi


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...
Date: Wed, 22 Nov 2023 12:07:27 +0100
User-agent: Mozilla Thunderbird

Hi Volodymyr,

On 21/11/23 23:10, Volodymyr Babchuk wrote:
was created by QEMU

Please do not split lines between subject and content. Rewrite the
full line. Preferably restrict the subject to 72 chars. Otherwise
your patch isn't displayed correctly in git tools.

Thanks,

Phil.

Xen PV devices in QEMU can be created in two ways: either by QEMU
itself, if they were passed via command line, or by Xen toolstack. In
the latter case, QEMU scans XenStore entries and configures devices
accordingly.

In the second case we don't want QEMU to write/delete front-end
entries for two reasons: it might have no access to those entries if
it is running in un-privileged domain and it is just incorrect to
overwrite entries already provided by Xen toolstack, because toolstack
manages those nodes. For example, it might read backend- or frontend-
state to be sure that they are both disconnected and it is safe to
destroy a domain.

This patch checks presence of xendev->backend to check if Xen PV
device is acting as a backend (i.e. it was configured by Xen
toolstack) to decide if it should touch frontend entries in XenStore.
Also, when we need to remove XenStore entries during device teardown
only if they weren't created by Xen toolstack. If they were created by
toolstack, then it is toolstack's job to do proper clean-up.

Suggested-by: Paul Durrant <xadimgnik@gmail.com>
Suggested-by: David Woodhouse <dwmw@amazon.co.uk>
Co-Authored-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
  hw/block/xen-block.c  | 16 +++++++++-------
  hw/char/xen_console.c |  2 +-
  hw/net/xen_nic.c      | 18 ++++++++++--------
  hw/xen/xen-bus.c      | 14 +++++++++-----
  4 files changed, 29 insertions(+), 21 deletions(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]