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

Re: [PATCH 4/4] x86/vPMU: don't statically reserve the interrupt vector


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 20 Nov 2025 12:39:14 +0000
  • 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=HdLwMcnhlrjFVcov0EOJ9YlhH98/3pPHZO9quUEfe1Q=; b=LMQBjeLyfkFHjJc80p7UWFPnaX7Pz3BveReKst+BrO6jDyweU7h4FvE/tkNgOT303Ct5Q7pI1/Ayw7cNfEuHCk5BS8es29E/ArfULfylN8T0XBea0Y6ZaFS1LFKmsQNNQMoK9yMCYekUA6Q4MAk/MCUR8HKwk3FW945CPUrW0bouWJKJLls2MC0OkZ5GdlCcTTY09t+ENC3I9Zmq+ltNmG7/TzVb3XzNXMdMCtDPP2kMV2Piqwfu44zTnVdOIJHZ0OzpNPesoTFH1Mg7Y3hvITp8AEKZKEwsmUDrbnUshuQVkAHF5ubScrcVElzl4It5hqL2AlkjJi/LxfDIrfdT4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UK/zYpupBo8fFLv+gq4trKNDEr8ZiSF+BQhq6zn3n9N707a3sXQesTjM+OL0G1caW6YjhNyCateK2LR/1+YA9PgymmFd1v7ZyJvlZZ1FhDrKGO+jfK3h220ifQCpOOCBOXIBQgFFShejhE9CKX7LK8KfbGmpVwkdzLaHT9Nc/oRRQxh1vYT/JGt1WKOSDDqdhnvk5poM3lLrMOXls+gK+xUCHcAFD09od9ha++FoLvIpmSX/KOnLsa5ujB45Aj7bRI4FuhB8/LlxyaNbHEv2VscbGjZRBhDcfnjxLHLuf6n59asK8SEGEEJa1EkIY3ZlDft1oxO0tpvTEV+l+lCbDw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 20 Nov 2025 12:39:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20/11/2025 12:31 pm, Jan Beulich wrote:
> On 20.11.2025 13:24, Andrew Cooper wrote:
>> On 19/11/2025 10:51 am, Jan Beulich wrote:
>>> --- a/xen/arch/x86/apic.c
>>> +++ b/xen/arch/x86/apic.c
>>> @@ -1313,16 +1313,6 @@ static void cf_check error_interrupt(voi
>>>             entries[3], entries[2], entries[1], entries[0]);
>>>  }
>>>  
>>> -/*
>>> - * This interrupt handles performance counters interrupt
>>> - */
>>> -
>>> -static void cf_check pmu_interrupt(void)
>>> -{
>>> -    ack_APIC_irq();
>>> -    vpmu_do_interrupt();
>>> -}
>>> -
>> I know you're only moving this, but it's likely-buggy before and after. 
>> ack_APIC_irq() needs to be last, and Xen's habit for acking early is why
>> we have reentrancy problems.
> I was wondering, but was vaguely (but apparently wrongly) remembering that
> the PMU interrupt is self-disabling (i.e. requires re-enabling before it
> can fire again). Should have checked vpmu_do_interrupt() a little more
> closely, where from the various plain "return" it's pretty clear that isn't
> the case.

It can be configured to be self-disabling. 
IA32_DEBUGCTL.Freeze_PerfMon_On_PMI, and variations on this theme
depending on the arch perfmon revision.

I'm not aware of AMD having a similar capability.

>
>> I think there wants to be a patch ahead of this one swapping the order
>> so the ack is at the end, so that this patch can retain that property
>> when merging the functions.
>>
>> Or, if you're absolutely certain it doesn't need backporting as a
>> bugfix, then merging into this patch is probably ok as long as it's
>> called out clearly in the commit message.
> No, I'll make this a separate, prereq patch.

Ok, and with this rebased on top, Acked-by: Andrew Cooper
<andrew.cooper3@xxxxxxxxxx>



 


Rackspace

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