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

RE: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>, "Stabellini, Stefano" <stefano.stabellini@xxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Thu, 25 Sep 2025 09:41:01 +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=ko3JZ8qdP4Qi1Vru36LVAxvI5i0fpqb8xxCJswln1N4=; b=C7TNXPe0dB05k87mUXPe4bezCzendomW9Fq13AmxiEBPNV5rNn1BZwx/wbxYH9VOBBo9l7Jo2ljxu0kn3X46Ffnq0GuVNGY5LmrdGnzauX2DEd2acWmRhF4RZeE3SFOlDKF07/Y03HPcqTVfhIWSSfrXx252AlDN2FPaWWnMa27uVQujlwADokMXS42KSI1zbwNpTL7Y0KZTk/X2X68LV/0unvsrG0sXNDHJlI3UDViy7P7WU6J2rty0jPzaatHvYVYzyNPLTZR/azPO01PvsuVAcbYabEm7oakJFd2wY6+cZwLBrk2D2MxHgHEN0AEEvrzwdCa1RoSW8sCwl397IQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qfLilHEFV+Kak1n+nCMGUVtFbHu2qh0E+c5ba7C/9wfGTLXtq+S9Wv/DwelVnmkw8vBaow1guFLsl+eivCFP0fjDkJ75K1jYo8skiokzTaKUigtVI6rHOjTzPJJwXSiP2qt8zXkZmjFEst8qS7vi+o6/wg7H8LSJjTD/HYwNmNDarB68oPqNOwcRkW5pg7u5CCLzCU09Ur/9e9MrfgruREY7MlseI0iMmeIbz3HJRQ91dQeAicQnKW5xE9i//RRyvoIlwOSLtbTmvJKr3e+glldkqo8cDcIfi9cPG6o45n6MYfakaojb+L04J4/lmsFrQU0RkNrt0HhPkDJHNklhSA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Sep 2025 09:41: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-09-25T08:35:04.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: AQHcIiYYEaVyPVCsmkah0K573htVM7SN/BaAgBWuJIA=
  • Thread-topic: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Thursday, September 11, 2025 9:30 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Daniel P. Smith
> <dpsmith@xxxxxxxxxxxxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with
> CONFIG_MGMT_HYPERCALLS
>
> On 10.09.2025 09:38, Penny Zheng wrote:
> > --- a/xen/include/xsm/xsm.h
> > +++ b/xen/include/xsm/xsm.h
> > @@ -55,8 +55,8 @@ struct xsm_ops {
> >      void (*security_domaininfo)(struct domain *d,
> >                                  struct xen_domctl_getdomaininfo *info);
> >      int (*domain_create)(struct domain *d, uint32_t ssidref);
> > -    int (*getdomaininfo)(struct domain *d);
> >  #ifdef CONFIG_MGMT_HYPERCALLS
> > +    int (*getdomaininfo)(struct domain *d);
> >      int (*domctl_scheduler_op)(struct domain *d, int op);
> >      int (*sysctl_scheduler_op)(int op);
> >      int (*set_target)(struct domain *d, struct domain *e); @@ -234,7
> > +234,11 @@ static inline int xsm_domain_create(
> >
> >  static inline int xsm_getdomaininfo(xsm_default_t def, struct domain
> > *d)  {
> > +#ifdef CONFIG_MGMT_HYPERCALLS
> >      return alternative_call(xsm_ops.getdomaininfo, d);
> > +#else
> > +    return -EOPNOTSUPP;
> > +#endif
> >  }
>
> This is in use by a Xenstore sysctl and a Xenstore domctl. The sysctl is hence
> already broken with the earlier series. Now the domctl is also being screwed 
> up. I
> don't think MGMT_HYPERCALLS really ought to extend to any operations available
> to other than the core toolstack. That's the Xenstore ones here, but also the 
> ones
> used by qemu (whether run in Dom0 or a stubdom).

Maybe not only limited to the core toolstack. In dom0less/hyperlaunched 
scenarios, hypercalls are strictly limited. QEMU is also limited to pvh machine 
type and with very restricted functionality(, only acting as a few virtio-pci 
devices backend). @Andryuk, Jason @Stabellini, Stefano Am I understanding 
correctly and thoroughly about our scenario here for upstream?
Tracking the codes, if Xenstore is created as a stub domain, it requires 
getdomaininfo-domctl to acquire related info.  Sorry, I haven't found how it 
was called in QEMU...

> IOW I think there's a conceptual issue with this work which needs resolving 
> first.
>
> Jan

 


Rackspace

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