|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/vLAPIC: only accept interrupts on enabled LAPICs
On 20.11.2026 22:44, Stefano Stabellini wrote: > On Thu, 19 Nov 2026, Jan Beulich wrote: >> On 19.11.2026 13:49, Andrew Cooper wrote: >>> On 19/11/2026 12:18 pm, Jan Beulich wrote: >>>> --- a/xen/arch/x86/include/asm/hvm/vlapic.h >>>> +++ b/xen/arch/x86/include/asm/hvm/vlapic.h >>>> @@ -136,6 +136,6 @@ struct vlapic *vlapic_lowest_prio( >>>> >>>> bool vlapic_match_dest( >>>> const struct vlapic *target, const struct vlapic *source, >>>> - int short_hand, uint32_t dest, bool dest_mode); >>>> + unsigned int short_hand, uint32_t dest, bool dest_mode, unsigned int >>>> dm); >>>> >>> >>> Even before this change, I was thinking that 3 fragments of ICR were too >>> many parameters to be passing, especially as some are bits as per their >>> ICR position, but dest_mode is shifted down to bit 0. >>> >>> I think passing a real ICR pair will be an improvement both for >>> legibility and for code generation. >> >> Are you saying this with just two of the three uses in vlapic.c in mind, >> or did you mean to suggest to have all the other call sites end up more >> complicated to achieve this goal? > > Only the IPI paths have an ICR, and even there the destination has to be > decoded in the sender's mode first. The vIO-APIC, MSI and passthrough > callers would have to build a fake ICR. > > On the patch itself: > > > default: needs fallthrough; Oh, yes, just that it wants to be break. > In _hvm_dpci_msi_eoi() if the guest EOIs after disabling its LAPIC in > software, the match now fails and the physical EOI is left to eoi_timer. > This is a change compared to existing behavior, was this intended? Yes, it was intended, yet I wasn't quite sure of the (supposed) behavior there. I should have added a remark, and I've now done so: "What correct (or maybe merely "best") behavior is in _hvm_dpci_msi_eoi() isn't quite clear to me: SDM section "Local APIC State After It Has Been Software Disabled" doesn't cover the EOI register's behavior in that mode. Nor does APM's "Local APIC Enable" section. Do we perhaps need a fake APIC_DM_EOI mode which would then also only check HW-disabled?" Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |