All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Penny Zheng <Penny.Zheng@arm.com>
Cc: wei.chen@arm.com, Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>, Wei Liu <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/9] xen/arm: allocate static shared memory to the default owner dom_io
Date: Fri, 6 May 2022 12:13:05 +0200	[thread overview]
Message-ID: <387bcb63-f9a7-0032-bcd5-088b65b9c10d@suse.com> (raw)
In-Reply-To: <20220506072502.2177828-3-Penny.Zheng@arm.com>

On 06.05.2022 09:24, Penny Zheng wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -777,8 +777,22 @@ void __init setup_system_domains(void)
>  
>      /*
>       * Initialise our DOMID_IO domain.
> -     * This domain owns I/O pages that are within the range of the page_info
> -     * array. Mappings occur at the priv of the caller.

This information is effectively lost; I cannot spot a suitable replacement
in the new text.

> +     * DOMID_IO is used for mapping memory and MMIO regions when no explicit
> +     * Domain need to be specified.
> +     *
> +     * For instance, DOMID_IO is the owner of memory pre-shared among
> +     * multiple domains at boot time, when no explicit owner is specified.
> +     *
> +     * Also, DOMID_IO is used to restrict page-table updates to mapping I/O
> +     * memory. Although no Foreign Domain need to be specified to map I/O
> +     * pages, DOMID_IO is useful to ensure that no mappings to the OS's own
> +     * heap are accidentally installed. (e.g., in Linux this could cause
> +     * havoc as reference counts aren't adjusted on the I/O-mapping code
> +     * path). This only makes sense as HYPERVISOR_mmu_update()'s and
> +     * HYPERVISOR_update_va_mapping_otherdomain()'s "foreigndom" argument.
> +     * For HYPERVISOR_mmu_update() context it can be specified by any
> +     * calling domain, otherwise it's only permitted if the caller is
> +     * privileged.

Much of this looks to have been copied from the public header. I don't
see why you did this; if anything a reference there would suffice.

>       * Quarantined PCI devices will be associated with this domain.
>       */

I would also like to ask that you add the new purpose of this domain
_below_ all pre-existing ones, such that this also somewhat expressed
how things have evolved.

Jan



  reply	other threads:[~2022-05-06 10:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  7:24 [PATCH v2 0/9] static shared memory on dom0less system Penny Zheng
2022-05-06  7:24 ` [PATCH v2 1/9] xen/arm: introduce static shared memory Penny Zheng
2022-05-07  1:08   ` Stefano Stabellini
2022-05-07  6:43     ` Penny Zheng
2022-05-06  7:24 ` [PATCH v2 2/9] xen/arm: allocate static shared memory to the default owner dom_io Penny Zheng
2022-05-06 10:13   ` Jan Beulich [this message]
2022-05-07  1:08   ` Stefano Stabellini
2022-05-06  7:24 ` [PATCH v2 3/9] xen/arm: allocate static shared memory to a specific owner domain Penny Zheng
2022-05-07  1:08   ` Stefano Stabellini
2022-05-06  7:24 ` [PATCH v2 4/9] xen/arm: introduce put_page_nr and get_page_nr Penny Zheng
2022-05-07  1:08   ` Stefano Stabellini
2022-05-07  8:04     ` Penny Zheng
2022-05-09 19:10       ` Stefano Stabellini
2022-05-07  9:10   ` Julien Grall
2022-05-06  7:24 ` [PATCH v2 5/9] xen/arm: Add additional reference to owner domain when the owner is allocated Penny Zheng
2022-05-07  1:09   ` Stefano Stabellini
2022-05-06  7:24 ` [PATCH v2 6/9] xen/arm: add P2M type parameter in guest_physmap_add_pages Penny Zheng
2022-05-07  1:09   ` Stefano Stabellini
2022-05-07  9:00   ` Julien Grall
2022-05-07  9:20     ` Penny Zheng
2022-05-06  7:25 ` [PATCH v2 7/9] xen/arm: set up shared memory foreign mapping for borrower domain Penny Zheng
2022-05-07  1:09   ` Stefano Stabellini
2022-05-06  7:25 ` [PATCH v2 8/9] xen/arm: create shared memory nodes in guest device tree Penny Zheng
2022-05-07  1:09   ` Stefano Stabellini
2022-05-07 11:26     ` Julien Grall
2022-05-06  7:25 ` [PATCH v2 9/9] xen/arm: enable statically shared memory on Dom0 Penny Zheng
2022-05-07  1:09   ` Stefano Stabellini

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=387bcb63-f9a7-0032-bcd5-088b65b9c10d@suse.com \
    --to=jbeulich@suse.com \
    --cc=Penny.Zheng@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wei.chen@arm.com \
    --cc=wl@xen.org \
    --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.