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

RE: [PATCH v1 2/7] xen/vm_event: introduce vm_event_is_enabled()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Tue, 18 Nov 2025 10:11:24 +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=mXgZPuWfVNaFcLppfHsSUSWfXImbmJ+XVS1m2BZsvko=; b=meRiY5ay7QctgdvjQjrp3qZzTqGXuMpmEdfGRcQSI0aohIvmYn0u3qBm2Zz+v5fsOtDL9mvgpka+szohAPHl40CZT03FQho9zZtvPuxcYfJIDoQZZqBohBqMUeRcjIKN2JUerm4wUTaPY91Us+I9h3w8M5o+iquEtjpLtJpXJCsu9eGGpBuQUNaHIXKvOGwqgI5zmUWub+NwBBkovc/P3FpAtCsH01kOfRkon7AP7rxMGcA4bANi6rsw3l+pANtcFdvgCYyLZ/YT1mLm7X6fhXCdpzctPQ+Z9qNbAWenHcS1H4HB3/J4D1jFPWMCHXo+jO8WYCNH8p2rl7oOLgYIlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HBmtf4MWkkmcqmRWIelHnnD7mNNGYurofC6g60Eu9Sa+PAxZmCTmLFfXijMEGFyBiqNnsTl2NyyfxnxCmko/i5G31wgWl1Sf5kG0BEs8xwgZocjnC/gS8qKtJ+9xAJ2yW+OlRNsqzarsytF0VBNo9p5VQyS/7soZT0SQpVRYGeGkeqlT5IW5Jrxp8Cu+i3Sod+1OBvHJPh31RFQJ9LqJ+xBxzyci5dfDueIhUUYA1cq1h6OBxwM1haXU0qqjTbyRZOaIjxQum3uAtCR1bFPeDkzYMfFB9VSowX3WqUzypsAWuIwdET4MLMp+AeV0SuKqcaMetIudO5nGBh5KWSvlTA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Nov 2025 10:11:46 +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-11-18T10:11:16.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: AQHcVEv8xX7X3Fxy9k66rxMQCyTwArTwUwWAgAfo9XA=
  • Thread-topic: [PATCH v1 2/7] xen/vm_event: introduce vm_event_is_enabled()

[Public]

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Thursday, November 13, 2025 5:14 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné
> <roger.pau@xxxxxxxxxx>; Andryuk, Jason <Jason.Andryuk@xxxxxxx>; Tamas K
> Lengyel <tamas@xxxxxxxxxxxxx>; Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>;
> Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>; Grygorii Strashko
> <grygorii_strashko@xxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v1 2/7] xen/vm_event: introduce vm_event_is_enabled()
>
> On 13.11.2025 04:16, Penny Zheng wrote:
> > Function vm_event_is_enabled() is introduced to check if vm event is
> > enabled, and also make the checking conditional upon CONFIG_VM_EVENT,
> > which could help DCE a lot unreachable calls/codes, such as
> > hvm_monitor_io(), etc, when having VM_EVENT=n.
> >
> > Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
> > ---
> > v2 -> v3:
> > - move assignment (to ev) past the check.
> > - remove redundant check
> > - make "may_defer" & with vm_event_is_enabled() and have assertion
> > back
> > - add vm_event_is_enabled() for hvm_monitor_xxx() in
> > svm.c/vmx.c/mem_sharing.c, then later there is no need to add stubs
> > for them
> > ---
> > v3 -> v4:
> > - move "may_defer" & with vm_event_is_enabled() to the very top of the
> > function
> > - use ?: to avoid introducing a new local variable
> > - fix the wrong order
> > - use pointer-to-const when possible
> > - use IS_ENABLED(xxx) instead of #ifdef-block
>
> This is irritating, as the subject (bogusly) says v1.
>

I'm not sure whether I need to bring previous diff or not.

> > ---
> > +static inline bool vm_event_is_enabled(const struct vcpu *v) {
> > +    if ( IS_ENABLED(CONFIG_VM_EVENT) )
> > +        return v->arch.vm_event != NULL;
> > +
> > +    return false;
> > +}
>
> Simply
>
>     return IS_ENABLED(CONFIG_VM_EVENT) && v->arch.vm_event != NULL;
>
> ?
>
> I guess I might as well do the adjustments while committing, even if it's 
> quite a few
> of them. In any event, with the adjustments
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Mant thanks

> Jan

 


Rackspace

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