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

RE: [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Mon, 13 Oct 2025 09:25:11 +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=ntwKeyXM4XE6rPHPWuVjaMwwVqub8b9fVCuoN/Np8IE=; b=A/HCAbJQ2P5J7F5oqC5/o9/C69k+ZnepiM2XIhVe0yU0sUGbfZa84yWKXVNLmOsSf3LfnIf7D9QZSxns5S+VbjkyIZz3Pik1a7lVKNp5KtKaRv90+sdfPmyhArjMnIACHLKSXePCMOZwL5H2Yog5uGotnMEriwpHCkMc4/6u+N+fK7tZYGpCHFsv28aSOOgiVlnUlDUbN3760di3QzCPoSyXVzQOlpzaVnLEmfzd/4vw/HmWNtO+/y91AHeA644ZG4jNu994Juxx1Z806YuM0956uFbWw5v7Ta5uY5gsj6r/NbjLYdfbrcVul9QyZ9p7ZPBBPrZbNVpW8Ur/NXyC9w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Uh7gA6qfJDWO37uRep2cpW7eVlaz6HbMNxr+iqs/ScaC+y50bOj1m+ZQlIbJBSflkqH61wh+zRjUNvWQrWh2uEnSmYvqu3qbH7IC3TGMfBRb3QxmiDIjYc9+hpW+vK7GB03aKdcerY/imt+IjRfP8GTAHu+7W5t09eSXrsJzcIuRihoLoNfSvSwTk7m4+MaxhH1Kq6Db12qtC/zGw3WnNNbHiKW20kFPgqRy6bfQWrjBs2E6bXWeP4Cd0qlpwJClemCaDZjE/K/jn+cO9nFWj4CZBPoXq8i0qF4JHsMPg5d3TH7lcb8R+KXe5ZP5IuDVo3IGBN6mDkZ4VeafVF0f9w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 13 Oct 2025 09:25:22 +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-10-13T09:25:05.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: AQHcIiYjKV/PcPIAQEuJ6TZ/Q8rQNrSN9F6AgC6RCYCAA08OAIAABX1QgAAY8ACAAAaosA==
  • Thread-topic: [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, October 13, 2025 4:30 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; Anthony PERARD <anthony.perard@xxxxxxxxxx>;
> Orzel, Michal <Michal.Orzel@xxxxxxx>; Julien Grall <julien@xxxxxxx>; Roger Pau
> Monné <roger.pau@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>;
> Bertrand Marquis <bertrand.marquis@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>; Tamas K Lengyel <tamas@xxxxxxxxxxxxx>;
> Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with
> CONFIG_MGMT_HYPERCALLS
>
> On 13.10.2025 09:18, Penny, Zheng wrote:
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: Monday, October 13, 2025 2:41 PM
> >>
> >> On 11.10.2025 08:44, Penny, Zheng wrote:
> >>>> -----Original Message-----
> >>>> From: Jan Beulich <jbeulich@xxxxxxxx>
> >>>> Sent: Thursday, September 11, 2025 9:03 PM
> >>>>
> >>>>> --- a/xen/lib/x86/Makefile
> >>>>> +++ b/xen/lib/x86/Makefile
> >>>>> @@ -1,3 +1,3 @@
> >>>>>  obj-y += cpuid.o
> >>>>>  obj-y += msr.o
> >>>>> -obj-y += policy.o
> >>>>> +obj-$(CONFIG_MGMT_HYPERCALLS) += policy.o
> >>>>
> >>>> Fair parts of cpuid.c also become unreachable. And all of msr.c afaics.
> >>>>
> >>>
> >>> I just found that the functions defined here, as helpers/libraries,
> >>> are used in
> >> tools/libs/guest/xg_cpuid_x86.c too. Emmm, to make compiler happy, I
> >> still need to provide stubs for them when MGMT_HYPERCALLS=n. Or any
> better suggestion?
> >>
> >> How does the Makefile change here affect tools/libs/guest/? What
> >> would you need stubs for there?
> >>
> >
> > Like Function xc_cpu_policy_is_compatible() in 
> > tools/libs/guest/xg_cpuid_x86.c
> is also using x86_cpu_policies_are_compatible() to do the comparison between
> host and guest. If making xen/lib/x86/plocy.o guarded by MGMT_HYPERCALLS,
> we will have "undefined reference " error. Imo, it is not suitable to guard 
> files
> tools/libs/guest/xg_cpuid_x86.o with MGMT_HYPERCALLS.
>
> Correct, but I still don't see what you're getting at. This Makefile is used 
> in the
> hypervisor build only. In tools/libs/guest/Makefile.common we have
>
> ifeq ($(CONFIG_X86),y) # Add libx86 to the build vpath %.c 
> ../../../xen/lib/x86
>
> OBJS-y                 += cpuid.o msr.o policy.o
> endif
>

Oh, true...
They are separately compiled with different Makefile.
It is fair parts of cpuid.c(x86_cpuid_copy_to{,from}_buffer) which got 
"undefined reference". Lets omit this part of change.

> Jan

 


Rackspace

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