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

Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap


  • To: Penny Zheng <penny.zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 15 Oct 2021 10:46:41 +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=PyvRoloTOWjWUXSGIpwSFTfMd1GNqAm6Q6HANk4lEc4=; b=fcaoEPRwbLC8Z4tZoDjxb4th2blAjZY29xt49QR6HYH/o42g/n+FEDidvh+LrLhRjKSUbfl6umKALhxavCub7EN1yKx3DLjhjK9pJvzw/ftxe2fSYikMRXRx1076WQScRikdi+Uuz0M8rFieyZwFvrYaTXglDwyBBOZaD4pcEFcWNyxqKh0J0Oi7rFgNVZOeT1ymrrjaf2Ac8ih8j6Pyf3y1E8Nm9PD+tRDt5dQRr6n5naOc+dxJ9lATTD4DeZYzwTqrAeiScgN7GN2Rwq3pJ6TqF2hRLpe/G+89npJod9/2hPGtPC2tikj61OW2syDcBmJOQmXgxLg56BwEqIpc4w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F5uTaTsAYj4L6OZDJaYRRc2If4cZ9W5AxmUetRjku1Z9eRafREkm/fM1F/WMe34dLtPKhKzTpXdahT6qHasP2Y2ceySBXsapEZN6dV3FcggbPdRg9NPGc/S/zlBDvjCjZEdKdRyO2r2pG29IfiT02CItx1QYl7EYu6gT4cY7OaZVGmY/JuD26DEvVgqz3mwpVSvfpiYq3EYKnmIhBEHOsZCuXeq+DHI09EnseAbt9waMGHxQ0I9yHolCzYtxX0yxLos8GF0E0l25hTvi4SzSRJhi9WGPscrFwveFapXNipls3fjV2fjdBSJkEggsl8CA4UFTmfjS4pE+H+t5kZVeXA==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Wei.Chen@xxxxxxx, Bertrand.Marquis@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, julien@xxxxxxx
  • Delivery-date: Fri, 15 Oct 2021 08:46:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.10.2021 05:09, Penny Zheng wrote:
> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> 
> This commit introduces a new arm-specific flag XEN_DOMCTL_CDF_directmap to
> specify that this domain should have its memory directly mapped
> (guest physical address == physical address) at domain creation.
> 
> Refine is_domain_direct_mapped to check whether the flag
> XEN_DOMCTL_CDF_directmap is set.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> ---
> CC: andrew.cooper3@xxxxxxxxxx
> CC: jbeulich@xxxxxxxx
> CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
> ---

Please have here a brief log of changes in the new version, to aid
reviewers.

>  xen/arch/arm/domain.c        | 3 ++-
>  xen/arch/arm/domain_build.c  | 4 +++-
>  xen/common/domain.c          | 3 ++-
>  xen/include/asm-arm/domain.h | 4 ++--
>  xen/include/public/domctl.h  | 4 +++-
>  5 files changed, 12 insertions(+), 6 deletions(-)

You clearly had to re-base over the XEN_DOMCTL_CDF_vpmu addition. I think
just like that change (which I'd expect you to have looked at while doing
the re-base) you also need to at least fiddle with OCaml's
domain_create_flag, to keep the ABI check there happy.

> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -72,9 +72,11 @@ struct xen_domctl_createdomain {
>  #define XEN_DOMCTL_CDF_nested_virt    (1U << _XEN_DOMCTL_CDF_nested_virt)
>  /* Should we expose the vPMU to the guest? */
>  #define XEN_DOMCTL_CDF_vpmu           (1U << 7)
> +/* If this domain has its memory directly mapped? (ARM only) */
> +#define XEN_DOMCTL_CDF_directmap      (1U << 8)

The comment doesn't read well; how about "Should domain memory be directly
mapped?" That's if a comment here is really needed in the first place. I
also don't think "Arm only" should be here - this may go stale. What I'm
missing in this regard is rejecting of the flag in x86'es
arch_sanitise_domain_config() (or by whichever other means).

Jan




 


Rackspace

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