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

RE: [PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Fri, 17 Jun 2022 09:39:22 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=8BvXRVqzRMxnScxiVlkOgMiqilzZG79r3Y5G4m344iE=; b=CJEJGY3P/q+Trb0Ef5TaJA+2l4UibZv64QQ8uDd0S1S3W0XfOc/h6BrqS/bSuDJl9CwbfMkxx57XqgyNvQtsJRVvP92Wd7xypC+HvwjkJvBxeysAQUGfDXAbQxOWqKzgZPQEoA4a2oC9VMMBgISuTl+EP49/7PbiKbZasOaf2XAouWTEVISSt/aXXV2myte2wuKKEGDcclo1sodY1jYVGAoCsz1BnSvzsmsOdGt1AISfn+RTLqBNlQ5NlVizl+JXbJEH7GyetRBtCxwdguXVMmHLXsYkLK6ZEoBgPAWRZt/iztVRC1MYh3gNYd5zx2at9BEC3yzTsE+xqvTbZYTBJw==
  • 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=8BvXRVqzRMxnScxiVlkOgMiqilzZG79r3Y5G4m344iE=; b=dPGppfWO/C5PYLQc0fDtcQrOvsr4XRCz/iZGBTUnkKUmrHxuxjKJlgvMursMJbxG8xojWaC2XxPUDVzUsUtToFR3Pv38+bCtZ2RTJBAzDVu5RjNMRsf3YxXIyjNFmJbs9fj+gg4tIuAlavIKHXIN0ap3LlrhhS+AjXjCxIMEXCAfosVaIPhRyvLxEL2F3WRNZ7ws9vq7RMfMM/vjFwwmIkuZMc9/MSnVpKoYTtKa0sJU53AN4mcPsogKc1QASZXEuh7Av68qs2SygmE8hEKEXpjxXZGF0bmPHFKPFaAVBKAY8ce8gouFI8X82JInMuQ+UJzdjQzk854VdNo5sKbFHw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=jkgCm7KmaltYUPrfRCOr476n5xsGrFU+C9TyZmaTnEJFHdWxkpEEova7qwnXAowXJKwIO6Br7fPurJ3YL0ypvjHZpT6dEh6GCzCglHHR/gSSV4bqJ6Ty2blCPGKJNUuJ24vABZ/LaDS0l1+U8hsZKt/OjYP7/ZcqlU2+720SMuRdMUvLzvfsJhDyZTyTFdwbvblYCijctQyTnkHuEitRgu5n1eYLcGLjdPZ4oE/T8Pog32CNCJQ6IWhS5qmabtoHTsvGQoPx9SPNG0aprAdg9hx7Ln4YqqcjN/HPNDE5LB34VUayjHu9+iwlYVcMRaPJ/48dVDZlJGPrd4hEMk0hKQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Si0P3w4EDcZkLSJi85cLeHSHzKqg1omrPuDV4xL38PnTHlUekU+tPUH8snB2DwnxP5i9m2uGhY+04Ts88AUimYo1KxBTC60T8yO8LdtpwTVsaUK4wkm6cIETo0WGwlNkWeGgAK8i+Sgzbj4h+ymUPsrcHJa0QT0SFCBDunwCz6ZTEVdL1b1A+F4tMt0LSQ6DDQ/9KasNDangpmjPQkqdL4wGhG6uYqVqm7xUkAiTsfTT4tfF9C5eNkReN5t9BsxfC73wFWwqoZiNQHhNBINAR94x8JVp5vP4NBCqlPpqm3FToBWZdrUEpMqZMsi7K7FzFdodkmmbKmOKZ47mMjy3QQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 17 Jun 2022 09:39:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYac1fSwyDVJqZLUSNuimuDmM9e60jOyEAgACwTiCAAEQEAIAvUw8A
  • Thread-topic: [PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io

Hi Jan

Sorry about the late reply, got sidetracked a few weeks.

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Wednesday, May 18, 2022 2:36 PM
> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> Cc: Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Bertrand Marquis
> <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxx>;
> Wei Liu <wl@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 2/8] xen/arm: allocate static shared memory to the
> default owner dom_io
> 
> On 18.05.2022 05:14, Penny Zheng wrote:
> > Hi Jan
> >
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: Wednesday, May 18, 2022 12:01 AM
> >> To: Penny Zheng <Penny.Zheng@xxxxxxx>
> >> Cc: Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini
> >> <sstabellini@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Bertrand
> >> Marquis <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
> >> <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper
> >> <andrew.cooper3@xxxxxxxxxx>; George Dunlap
> >> <george.dunlap@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>;
> >> xen-devel@xxxxxxxxxxxxxxxxxxxx
> >> Subject: Re: [PATCH v4 2/8] xen/arm: allocate static shared memory to
> >> the default owner dom_io
> >>
> >> On 17.05.2022 11:05, Penny Zheng wrote:
> >>> --- a/xen/common/domain.c
> >>> +++ b/xen/common/domain.c
> >>> @@ -780,6 +780,11 @@ void __init setup_system_domains(void)
> >>>       * This domain owns I/O pages that are within the range of the
> page_info
> >>>       * array. Mappings occur at the priv of the caller.
> >>>       * Quarantined PCI devices will be associated with this domain.
> >>> +     *
> >>> +     * DOMID_IO could also be used for mapping memory when no explicit
> >>> +     * domain is specified.
> >>> +     * For instance, DOMID_IO is the owner of memory pre-shared among
> >>> +     * multiple domains at boot time, when no explicit owner is 
> >>> specified.
> >>>       */
> >>>      dom_io = domain_create(DOMID_IO, NULL, 0);
> >>>      if ( IS_ERR(dom_io) )
> >>
> >> I'm sorry: The comment change is definitely better now than it was,
> >> but it is still written in a way requiring further knowledge to
> >> understand what it talks about. Without further context, "when no
> >> explicit domain is specified" only raises questions. I would have
> >> tried to make a suggestion, but I can't really figure what it is that you 
> >> want
> to get across here.
> >
> > How about I only retain the "For instance, xxx" and make it more in details.
> > "
> > DOMID_IO is also the default owner of memory pre-shared among multiple
> > domains at boot time, when no explicit owner is specified with "owner"
> > property in static shared memory device node. See section
> > docs/misc/arm/device-tree/booting.txt: Static Shared Memory for more
> details.
> > "
> 
> This reads quite a bit better. Yet I continue to be puzzled about the apparent
> conflict of "pre-shared" and "no explicit owner": How can memory be (pre-
> )shared when the owner isn't known? Shouldn't all memory have an owner?
> Or alternatively if this sharing model doesn't require ownership, shouldn't 
> all
> shared memory be owned by DomIO? In any event, to leave such details out of
> here, perhaps the comment could consist of just the first part of what you
> wrote, ending at where the first comma is?
> 

We have a short discussion about the memory ownership on my design link(
https://lore.kernel.org/all/a50d9fde-1d06-7cda-2779-9eea9e1c0134@xxxxxxx/T/)
, we have user cases for both scenario.

Ok, I will modify the comment and only keep
"
DOMID_IO is also the default owner of memory pre-shared among multiple
domains at boot time.
"
 
> Jan


 


Rackspace

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