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

Re: [PATCH v2 2/9] xen/arm: allocate static shared memory to the default owner dom_io


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 6 May 2022 12:13:05 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=4yn/mjopIcsdwKCI+lQ+IMj95fSkjNZVLS4gd1rMHn0=; b=KOtukV/OKzJsV38kdNVA+EN8lVn8/GKQjhlIMcducHHhkqlJ/38gbj1tY7IOy/eUjip3V6SKXDWBUY4yG9hQ0l0CSl0bJ/k/4Q8gTSAH1QXa+gTl5Cdre3dW1XmdPTQGQ1WhDKmN6CSgDecf7Qa+angFpdB/1vpSoDXT4yQ2xXWsdcZtIUzwZRO+5GvoD+pHX1JdlySVdTYWeBPGAs+Bvd2TLmKOj3BMc7mQG3aH8+yFUBgsuIr/I3D+qnXTE/bK98d0e8PKiO9uRqg+Roh2cnZylOKryz+3QIoYxwvKvdXU70w2pzuZlHaeQ9aMf+N5ZLYm2oCZzVqyeAzpXVZt+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lwB5tFTHBfgR7CClXhM7sSvtukjUaBneU7FV6cY2is85f5HQzfrCLYQ6XON7SMe1B/8C/Y2N13peXWicpoOCUi/JzbduhxNbggJZhNbw/i/kyqpdm2L+sZOtml4pev6SsRvRaF/uKb9Elgo2ucm8lob4CPWQs7DcPtmWYKOkMVrml7RjmaRtvFQBO8au048IcQBv9XYm4B9Q9yqxZH6YuJhnyq5MOHsltxY4Sdn6fXuOR6ppcra7amzTWLLNP3TzrJ1YZufLRw+BXhWuWHIuuEIiBWhOLIhGIU+Oo2nKR3/PP90ub4rsMUY3U3Yc5lKIVqbSoGTo7dQKAzNM81kmSQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: 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
  • Delivery-date: Fri, 06 May 2022 10:13:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

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