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

Re: [PATCH v1 1/2] domctl: Handle XEN_DOMCTL_getpageframeinfo3 without the domctl lock


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 11 Jun 2026 16:23:05 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=qe4tf15hT1j67LjPeEYkl0fRGQTF6kndGFvCqDcbhHw=; b=eIYToCIwMhzNoAZN7TW2VsWadXAm1+P9UJh+68OJKWJ4xtggXjTDZstkjgLmRMhIYAAq+zEj69C0Y4qanWg5+5j4U+2h24UOw0mF+Ld91lvILH1LNLW3yFt1tVbWtonz6mj1UQ3VnGjFcCMQws7GVlwcB/4yuzvAJDzAQNmo8QoBCBHaEuj02Uu3vdhfQrR1tAAZBCRc82c3k+Wbk90+j8X89bnulbmVlEWCv+8tPnIKyQHy+rugSMp0gEXpDEkZAA6it6ffTR5ZITTd3Fyw287p/TDC5vWhkCoQK/yp2oF6VDRczKPZKRJhuCToEtAELEBaoF/PCpHauaRFmlonUg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZhPFThPUn91Hgu77rERG8qHPtiL8OXA35kV9sv/iP4Kv2/vSh3AREzilp1Fcgopi6GM/W8lY0jpjpW7+IPrlRYFD3eQmXl01X/ub1W3YhnF7bU4oqCL2T9BKT99SXC6SfO5NCu1hVaFBPNRHwwTUSdd1MpOEgIKG5AFio3aQ/PIy7FXnM+r957zDId4KM8XcuB4Yg340eyu1m4+bAOocVK1t1AOiAKUVu/2f2ZDj0NNTmVXhmHWht15ItGgwUNOYvgu/06Gb1R7H1Gmx7xF23LUmmSDcXyPY6yy1xwBmpXIDrLNPfGbidXRenmAeXo0Por5AeDf3e/N/VjdptahyjA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 11 Jun 2026 14:23:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jun 11, 2026 at 09:11:15AM -0400, Daniel P. Smith wrote:
> On 6/9/26 11:15 AM, Ross Lagerwall wrote:
> > It does not have side effects and is protected from concurrent changes
> > by the P2M read lock therefore skip taking the domctl lock.
> > 
> > Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> > ---
> >   xen/arch/x86/domctl.c | 4 ++++
> >   xen/common/domctl.c   | 1 +
> >   2 files changed, 5 insertions(+)
> > 
> > diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> > index 83bf51e498df..0e9a2532887e 100644
> > --- a/xen/arch/x86/domctl.c
> > +++ b/xen/arch/x86/domctl.c
> > @@ -301,6 +301,10 @@ long arch_do_domctl(
> >           /* Games to allow this code block to handle a compat guest. */
> >           void __user *guest_handle = domctl->u.getpageframeinfo3.array.p;
> > +        ret = xsm_domctl(XSM_OTHER, d, domctl);
> > +        if ( ret )
> > +            break;
> > +
> >           if ( unlikely(num > 1024) ||
> >                unlikely(num != domctl->u.getpageframeinfo3.num) )
> >           {
> > diff --git a/xen/common/domctl.c b/xen/common/domctl.c
> > index 3efa5b9d55b9..35144d95b808 100644
> > --- a/xen/common/domctl.c
> > +++ b/xen/common/domctl.c
> > @@ -555,6 +555,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> > u_domctl)
> >       case XEN_DOMCTL_gsi_permission:
> >       case XEN_DOMCTL_bind_pt_irq:
> >       case XEN_DOMCTL_unbind_pt_irq:
> > +    case XEN_DOMCTL_getpageframeinfo3:
> >           ret = arch_do_domctl(op, d, u_domctl);
> >           goto domctl_out_unlock_domonly;
> I would respectfully ask to be mindful when XSM hooks are being manipulated
> in a patch that a review from an XSM maintainer should be sought before
> committing a patch. In this case case the change itself is good, though I
> would have liked the opportunity to comment that the commit message should
> have had some explanation on the xsm change.

I've already replied to 2/2, but would like to re-instate my apology
here so it doesn't seem like this went unnoticed:

Sorry, this was already picked up in a rush to get it into 4.22 and I
didn't realize it was missing an XSM maintainer Ack.  That's entirely
my fault, there was no intention to bypass or overrule your opinion.

Regards, Roger.



 


Rackspace

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