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

RE: [PATCH v1] xen: move getdomaininfo() to domain.c


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Fri, 25 Jul 2025 06:33:45 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Df2w9G4SsB1sSdX/TG3RVrtEfLDcY7cbyy5X7WlzD3c=; b=DqVUCdTFYJyPQ3XgmUXgKIfST6QRT6jZ/s1bd1YWZBdaKu37eBZsstW9YmAFTOLdF5/wHoOh3mN4mnYdwM5Wmw7xapyPrJwi84UAe8bchKY/t5c53LRITfVA7kINdmXU9W2GK7H1SWng8/7R0baVKhYjWUpfaf/+Z69DiWhk6HF1sWFjq2OFyR67gFuio+k1C2658MMgjVyCAkC3WT7JsAhRwqWl1Ow8s2pncoOfMCJJZoQZnYk9twR9i4vGEdcUq7llBCACm3Z6SpjaKny2w5E4xHZ7Bh+OlgrxIJ0yW+bgSROIVvx3wVfgnACazI3idMBcAUVDNWnS/DpDXHcDsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wzu7fNriTcBosARwUfMMPcvhXOrayn6M1FvZyv9M4MKLBO/vHUC6W1T/g96f0sGbqjgdd9ORfY+t/k3IwP1nn8tmGNdW3gZ0koWlxLVpFvEaX4IjrtjrqVxCqLA3d1hcZ9dwOhQLWVdrGLcU3V7BN0RZTIuK9qEfeV+GG2ukoxXCRvMqk44Bu9iJpW65KzV6rxuwZu/4uap/kJyVI8LjS1nh62z6iKoPLa7qQRxNuTufRN0WNPEyabz5z9VdDlMKT2HiFMjro6CRG5ZNHFGjLhM9zQ7JupI7CilSvnZypI6+JrI+zwp5/nGQ4R19Xd5CYG7J6Er5U8d1J7May5H96A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 25 Jul 2025 06:34:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=True;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2025-07-25T06:33:39.0000000Z;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=3;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged
  • Thread-index: AQHb+sYi9F4sF9Jjy0ur9mCegpzXYLQ9u1eAgAEle4CAAFcTAIAA88oAgAC42YCAASrIAIAAR76AgAANF1A=
  • Thread-topic: [PATCH v1] xen: move getdomaininfo() to domain.c

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Friday, July 25, 2025 1:38 PM
> To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: Penny, Zheng <penny.zheng@xxxxxxx>; Huang, Ray
> <Ray.Huang@xxxxxxx>; Julien Grall <julien@xxxxxxx>; Bertrand Marquis
> <bertrand.marquis@xxxxxxx>; Orzel, Michal <Michal.Orzel@xxxxxxx>;
> Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; Anthony PERARD <anthony.perard@xxxxxxxxxx>;
> Roger Pau Monné <roger.pau@xxxxxxxxxx>; Daniel P. Smith
> <dpsmith@xxxxxxxxxxxxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v1] xen: move getdomaininfo() to domain.c
>
> On 25.07.2025 03:21, Stefano Stabellini wrote:
> > On Thu, 24 Jul 2025, Jan Beulich wrote:
> >> On 23.07.2025 22:30, Stefano Stabellini wrote:
> >>> On Wed, 23 Jul 2025, Jan Beulich wrote:
> >>>> On 23.07.2025 02:46, Stefano Stabellini wrote:
> >>>>> On Tue, 22 Jul 2025, Jan Beulich wrote:
> >>>>>> On 22.07.2025 07:04, Penny Zheng wrote:
> >>>>>>> Function getdomaininfo() is not only invoked by domctl-op, but
> >>>>>>> also sysctl-op, so it shall better live in domain.c, rather than
> >>>>>>> domctl.c. Which is also applied for arch_get_domain_info().
> >>>>>>> Style corrections shall be applied at the same time while moving
> >>>>>>> these functions, such as converting u64 to uint64_t.
> >>>>>>>
> >>>>>>> The movement could also fix CI error of a randconfig picking
> >>>>>>> both SYSCTL=y and PV_SHIM_EXCLUSIVE=y results in sysctl.c being
> >>>>>>> built, but domctl.c not being built, which leaves getdomaininfo()
> undefined, causing linking to fail.
> >>>>>>>
> >>>>>>> Fixes: 34317c508294 ("xen/sysctl: wrap around sysctl hypercall")
> >>>>>>> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
> >>>>>>> Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
> >>>>>>
> >>>>>> I'm not convinced of this approach. In the longer run this would
> >>>>>> mean wrapping everything you move in "#if defined(CONFIG_SYSCTL)
> >>>>>> || defined(CONFIG_DOMCTL)", which I consider undesirable. Without
> >>>>>> DOMCTL, the usefulness of XEN_SYSCTL_getdomaininfolist is at
> >>>>>> least questionable. Therefore adding more isolated "#ifdef
> >>>>>> CONFIG_DOMCTL" just there may be an option. Similarly, as
> >>>>>> mentioned on the other thread, having SYSCTL depend on DOMCTL is an
> approach which imo wants at least considering. And there surely are further 
> options.
> >>>>>>
> >>>>>> As indicated elsewhere, my preference goes towards reverting the
> >>>>>> final one or two patches of that series. They can be re-applied
> >>>>>> once the dependencies were properly sorted, which may (as per
> >>>>>> above) involve properly introducing a DOMCTL Kconfig setting first.
> >>>>>
> >>>>> I don't think this is a good idea.
> >>>>
> >>>> And implicitly you say that what I put under question in the first
> >>>> paragraph is a good way forward?
> >>>
> >>> I think it is OK.
> >>>
> >>> I also think "having SYSCTL depend on DOMCTL" is certainly worth
> >>> thinking about. In terms of privilege and potential for interference
> >>> with other domains sysctl and domctl don't seem different so it is
> >>> unlikely one would want to disable one but not the other.
> >>>
> >>> Another idea is to have a single kconfig for both SYSCTL and DOMCTL:
> >>> we don't necessarily need to offer individual kconfig for every feature.
> >>> From a safety point of view, we want to disable them both.
> >>
> >> Then again (and going against the thought of making SYSCTL depend on
> >> DOMCTL) there may be a desire to query / alter certain properties of
> >> the system as a whole, without also having that need for individual
> >> domains. But yes, covering both with a single control also is an option to
> consider.
> >
> > If making SYSCTL depend on DOMCTL and/or a single kconfig for both
> > SYSCTL and DOMCTL are both way forward, then we can take this patch as
> > is?
>
> In both of the named cases this patch simply wouldn't be needed. Once the
> conversion work was done, that is. And to be frank, I'm not happy to see the
> function move out and then back in.
>

I think the new patch "move domctl.o out of PV_SHIM_EXCLUSIVE " could also fix 
getdomaininfo() linking error

> Jan

 


Rackspace

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