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

RE: [PATCH v3 6/7] xen/mem_access: wrap memory access when VM_EVENT=n


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Mon, 1 Dec 2025 03:46:48 +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=eJJ92duJHZRAHvmDUvVqO816Fjj51lbIVpkTPrDRKIs=; b=Dx2sw1vtOyTO1NNH9f9ru3hDOcY3LGLyLEO7bPPR5jTh6mYSxzk+66BhDGvoY/3u6T21vdUV5dFnnv/PKIGz6xzq1Ks9LFxHKkXmiIXXsS3MU3w+kEGvLPfpSuoTDIQe+FBx2E0naZMwzROMn9sd5Cs1ZU4lbqUtMNj+GLmE8+aoSK1E8/FC6qX8P2Z+Sbi8SQRd4EFQosj+wXQzhAviCVI55dPujhCg/PyZYuxGZ2Jw0bSFttVrE13YMlADz1+VCRFQdq5XRIi+Jayk1QJNel2e7a7m8TR0XDtf/4UoIkz6QaPuDNefFnJ37RkliLaqvy2qGFTbRpH+2FbpMzq2cA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yCCq3NQbCp1lBuhnzczyzWF6CLsbNvhIFbMGzSxfqxNqnxO6AE3zm63SAmjkJpic2ue7z/u61FEbvRu9bp8IcAMwbKh+N16L0d92LlqgHnQ66KbgZgkX+631tUtaYuE85D3D8Vz2mm+B6VdeFJD003fl57ufLE65ZbwrFzWERHN6CaQ+AwGOUORgi5zkhBoW6B7mRDCpNDJbsUqcYg83zWOuoHBqWF4CFrLVYZpWrP6IO2rUj/sqGrp+xiKFBupNVAEwrbz+fYrBSTiyjPjR5pLluc9spNhTy62AqgXrTItTZ7ywy/3HZlOoQxePLdbUkuv5wv4xQz8WwHvABtQkMw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, "grygorii_strashko@xxxxxxxx" <grygorii_strashko@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 01 Dec 2025 03:47:24 +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-12-01T03:46:40.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: AQHcWseQ6uI32DuOSE+vYe1IrUdoVbUB4liAgApSOvA=
  • Thread-topic: [PATCH v3 6/7] xen/mem_access: wrap memory access when VM_EVENT=n

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, November 24, 2025 10:10 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; grygorii_strashko@xxxxxxxx; Andrew
> Cooper <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>;
> Tamas K Lengyel <tamas@xxxxxxxxxxxxx>; Alexandru Isaila
> <aisaila@xxxxxxxxxxxxxxx>; Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v3 6/7] xen/mem_access: wrap memory access when
> VM_EVENT=n
>
> On 21.11.2025 10:15, Penny Zheng wrote:
> > @@ -2080,7 +2081,11 @@ int hvm_hap_nested_page_fault(paddr_t gpa,
> > unsigned long gla,  #endif
> >      }
> >
> > -    if ( req_ptr )
> > +    /*
> > +     * Excessive condition is to avoid runtime undefined error only
> > +     * when CONFIG_USBAN=y
> > +     */
> > +    if ( req_ptr && vm_event_is_enabled(curr) )
> >      {
>
> I fear the comment isn't really helpful this way. What's "excessive" here may 
> be
> clear from patch context, but it won't be clear when looking at the code 
> later. Nor
> would it then be immediately clear why the vm_event_is_enabled() check is
> (seemingly) unnecessary. How about this:
>
> "req_ptr being constant NULL when !CONFIG_VM_EVENT, CONFIG_UBSAN=y
> builds  have been observed to still hit undefined-ness at runtime. Hence do a
> seemingly redundant vm_event_is_enabled() check here."
>
> With this or any other suitable improvement to the comment:
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> If we want to go with the suggestion
> above, I'd be happy to do the replacement while committing. But of course 
> first the
> necessary 2nd ack will want collecting.

Thx!

>
> Jan

 


Rackspace

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