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

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 23 Nov 2023 00:07:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aeBgurwzJIVKzksG+i2JHwRalCI7Eg7CX0LOmESiZ3o=; b=MZHZ6ji4bzjAXa/qxJegnVgS7h7xflOuDv4cSxlFUOSfGmtY/cOaV3GvCTgD2AoLP0c4pEBaXJv/kX9LRydUgWNzYEws1m62dvp93cW9BoEcM5bZxws4pShFmBcaLcNmQz07VHQm/ynOBgd5cyJmBMU5psF4kJceTL7o6Xb1qxUQl7AoaayhT2Jkpokn7r6Akk0oDB/P1dxvOVAkwEmth/l2jEyRnrjutlzHgWOho7acw0EyJvrArpsoMeP6Jj6BoJTickiI5wnDvEekjf+Js59R126/aTTKb49BqreQcfOU8rsdPzVfidCwT0NSS17T96poShytjZ6k8TO4vZ+8RQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ki+U89V9lBuAtgGNS0PyrMm+5kiw/9ol/U+NXsrvTgG482gsA6aAQKMXJfhzyaazocZPQMc+IFQOQuffDpmBzHDtTpmydbYrOpIO4/DER6v5USce/NXgYsVdi0xWJRUBy0sIBC0hd9l+2blnM119pV/GPvAQnGyJaNk5NF/yBAePEL7kW1z3Hh/tDquJtQjo29p1K6Tx9pEw0HMbWPUztDJDQB3+MD4Ab3ZO8RK+7PdmoBGa9oU77VZPm5PgefUs1oXc1k68y4gx/WdAnojm78ewMh5eL22KHOMJh0X7shDXloq5ZAX61qcTfN1HDusYrlQRVhv7b+nFbsWK72kfQA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "open list:X86 Xen CPUs" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 23 Nov 2023 00:07:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaHMeIsCU+MAEGAkSnPoa9ThBNz7CGlGOAgABYsYCAAAmAgIAAAakAgAAAyoCAAAJ4gIAABwqAgAAFCoA=
  • Thread-topic: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

Hi,

Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> writes:

> Hi Stefano,
>
> Stefano Stabellini <sstabellini@xxxxxxxxxx> writes:
>
>> On Wed, 22 Nov 2023, David Woodhouse wrote:
>>> On Wed, 2023-11-22 at 15:09 -0800, Stefano Stabellini wrote:
>>> > On Wed, 22 Nov 2023, David Woodhouse wrote:
>>> > > On Wed, 2023-11-22 at 14:29 -0800, Stefano Stabellini wrote:
>>> > > > On Wed, 22 Nov 2023, Paul Durrant wrote:
>>> > > > > On 21/11/2023 22:10, Volodymyr Babchuk wrote:
>>> > > > > > From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>>> > > > > > 
>>> > > > > > Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to
>>> > > > > > inherit the owner of the directory.
>>> > > > > 
>>> > > > > Ah... so that's why the previous patch is there.
>>> > > > > 
>>> > > > > This is not the right way to fix it. The QEMU Xen support is 
>>> > > > > *assuming* that
>>> > > > > QEMU is either running in, or emulating, dom0. In the emulation 
>>> > > > > case this is
>>> > > > > probably fine, but the 'real Xen' case it should be using the 
>>> > > > > correct domid
>>> > > > > for node creation. I guess this could either be supplied on the 
>>> > > > > command line
>>> > > > > or discerned by reading the local domain 'domid' node.
>>> > > > 
>>> > > > yes, it should be passed as command line option to QEMU
>>> > > 
>>> > > I'm not sure I like the idea of a command line option for something
>>> > > which QEMU could discover for itself.
>>> > 
>>> > That's fine too. I meant to say "yes, as far as I know the toolstack
>>> > passes the domid to QEMU as a command line option today".
>>> 
>>> The -xen-domid argument on the QEMU command line today is the *guest*
>>> domain ID, not the domain ID in which QEMU itself is running.
>>> 
>>> Or were you thinking of something different?
>>
>> Ops, you are right and I understand your comment better now. The backend
>> domid is not on the command line but it should be discoverable (on
>> xenstore if I remember right).
>
> Yes, it is just "~/domid". I'll add a function that reads it.

Just a quick question to QEMU folks: is it better to add a global
variable where we will store own Domain ID or it will be okay to read
domid from Xenstore every time we need it?

If global variable variant is better, what is proffered place to define
this variable? system/globals.c ?

-- 
WBR, Volodymyr


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.