[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac6fc14c-3cbe-42c3-b077-1c167cbe1d31@linux.microsoft.com>
Date: Tue, 14 Oct 2025 11:04:51 +0530
From: Naman Jain <namjain@...ux.microsoft.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: "K . Y . Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H . Peter Anvin"
<hpa@...or.com>, linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, Mukesh Rathor <mrathor@...ux.microsoft.com>,
Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>,
Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
Peter Zijlstra <peterz@...radead.org>, Paolo Bonzini <pbonzini@...hat.com>,
Michael Kelley <mhklinux@...look.com>, Christoph Hellwig
<hch@...radead.org>, Saurabh Sengar <ssengar@...ux.microsoft.com>,
ALOK TIWARI <alok.a.tiwari@...cle.com>
Subject: Re: [PATCH v8 2/2] Drivers: hv: Introduce mshv_vtl driver
On 10/13/2025 7:42 PM, Sean Christopherson wrote:
> On Mon, Oct 13, 2025, Naman Jain wrote:
>> +static int mshv_vtl_ioctl_return_to_lower_vtl(void)
>> +{
>> + preempt_disable();
>> + for (;;) {
>> + u32 cancel;
>> + unsigned long irq_flags;
>> + struct hv_vp_assist_page *hvp;
>> + int ret;
>> +
>> + local_irq_save(irq_flags);
>> + cancel = READ_ONCE(mshv_vtl_this_run()->cancel);
>> + if (cancel)
>> + current_thread_info()->flags |= _TIF_SIGPENDING;
>
> There's no need to force SIGPENDING, this code can return directly if cancel is
> set[1]. And then you can wait to disable IRQs until after handling pending work,
> and thus avoid having to immediately re-enable IRQs[2].
>
> [1] https://lore.kernel.org/all/20250828000156.23389-3-seanjc@google.com
> [2] https://lore.kernel.org/all/20250828000156.23389-4-seanjc@google.com
Thank you for reviewing and sharing your inputs. I will incorporate
these changes in the next version.
Regards,
Naman
Powered by blists - more mailing lists