On May 11, 2022 10:06 PM, Lendacky, Thomas wrote: > On 5/10/22 21:00, Xu, Min M wrote: > > On May 11, 2022 4:30 AM, Tom Lendacky wrote: > >> I'm replying to this patch since I can't find patch V12 46/47 > >> anywhere in my email. > >> > >> I've bisected a regression in the Linux kernel to this patch when an > >> SEV-SNP guest is booted. The following message is issued in the > >> kernel for every AP being brought online: > >> > >> APIC: Stale IRR: > >> > 00000000,00000000,00000000,00000000,00000000,00000000,00000000,000 > >> 00020 ISR: > >> > 00000000,00000000,00000000,00000000,00000000,00000000,00000000,000 > >> 00000 > >> > >> Possibly a timing issue involving the mode switch with the interrupt > >> unmasked. If I leave the interrupt masked and only un-mask it after > >> the programming of the init-count, then the message goes away. > > > > Do you mean in InitializeApicTimer, it should follow below steps: > > 1. mask LvtTimer. (set LvtTimer.Bits.Mask = 1) 2. Do other stuff, > > including programing the init-count register. > > 3. un-mask LvtTimer (set LvtTimer.Bit.Mask = 0) > > Yes, I believe so. I'm not an expert on the APIC timer, but that seems > reasonable to me. I tested this fix in Td guest and it has no side effect. I check the Intel SDM (Vol.3A Chap 10.5 Handling Local Interrupts) but it doesn't describe the actual sequence of LvtTimer.Bits.Mask and programming of init-count register. @ Ni, Ray, What's your thought about it?
Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#89688): https://edk2.groups.io/g/devel/message/89688 Mute This Topic: https://groups.io/mt/89446188/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-