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

Re: [PATCH v1 13/18] x86: generalize physmap logic


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 27 Jul 2022 14:33:50 +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=OH8u1EK+MWbdCTuijn8lnPbRejOugNUpmf0KVQdhE9k=; b=I2qE/nOzR9qBqj+CBP30JMcu5Rg0kE+W7VeTzBy0XOVAfOnbNs/oDjwR6McFBtAZPEB/k8mKhC4t7+Q5IrODZuhG1Ggt0EHvRoB5LoE7acMWhjCJHy55Xz1HCZim2vI6DDGFH9iu57lhUBaL9/5HB8vLPOCNHlcWH8dhXb8AWTgJMflqDtATIdPS7fkFpDCSE/r44AO1McebMB739flTZ+PZnzR4bgO6pQjqmPykmzTJjatgpBiOsokc0KAB3jxmDYKu1NxOA1VRFr9XztJ8K8oTqtRRic9aEGJqrO6FXQY7GAIAIwbjmk340sQ9GGSGC1SSsWZM+vxHJuPfF0hc7Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AHg57wS0xtWa7LB052MMoDhA/4RM7arqWEbW0cW5TxnxdVnEk1Dwjsy60AGqBF5AU6/c3nxYJOGJ7FobWwyWeuqHzwzX8SJ12/67HPAxy9jB7v4ottYSY15XalcrTXB4cdAiyJHihVX9WV93eQ2FPub/CG9mRfg5UDC6pPRd7WmWxqU7rDsRqw3NXvnjFwFU4u1qFjBLdayj/fqH0YOoXbuRJ4O/GIqjtvpyzT/ThtCDRYOelULGh15Iq/Yd0IMmRHXH5k9e2H7cuITgfz6TqnfMWRKlLDdOZNubk+uX33l1T9HwIKGQyRXjgeLIURJwZosDhphNNHeRFuSdnM5kCQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: scott.davis@xxxxxxxxxx, christopher.clark@xxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 27 Jul 2022 12:33:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.07.2022 23:04, Daniel P. Smith wrote:
> The existing physmap code is specific to dom0.

I think this needs better wording. Either you name the function or you
explain what piece of code you're talking about. "physmap" alone is
just not meaningful enough. (Also applies to the title.)

> --- a/xen/arch/x86/include/asm/dom0_build.h
> +++ b/xen/arch/x86/include/asm/dom0_build.h
> @@ -21,7 +21,7 @@ int dom0_construct_pvh(struct boot_domain *bd);
>  unsigned long dom0_paging_pages(const struct domain *d,
>                                  unsigned long nr_pages);
>  
> -void dom0_update_physmap(bool compat, unsigned long pfn,
> +void dom_update_physmap(bool compat, unsigned long pfn,
>                           unsigned long mfn, unsigned long vphysmap_s);

So my initial inclination was to suggest domain_ as a name prefix,
matching what we have elsewhere. But when we're already giving the
thing a new name, its PV-only nature also wants expressing. Hence
I'd like to suggest pv_update_physmap(). And then please fix
indentation of the continuation lines here and below.

> --- a/xen/arch/x86/pv/dom0_build.c
> +++ b/xen/arch/x86/pv/dom0_build.c
> @@ -34,8 +34,8 @@
>  #define L3_PROT (BASE_PROT|_PAGE_DIRTY)
>  #define L4_PROT (BASE_PROT|_PAGE_DIRTY)
>  
> -void __init dom0_update_physmap(bool compat, unsigned long pfn,
> -                                unsigned long mfn, unsigned long vphysmap_s)
> +void __init dom_update_physmap(
> +    bool compat, unsigned long pfn, unsigned long mfn, unsigned long 
> vphysmap_s)
>  {

Personally I dislike this further change to re-flow the parameter
list, as I see no particular reason for doing so.

Jan



 


Rackspace

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