Re: KVM Kernel 5.6+, BUG: stack guard page was hit at

Suravee Suthikulpanit
2020-04-24T01:13:41Z

Boris,

On 4/23/20 10:33 PM, Boris V. wrote:
> On 2020-04-23 13:54, Suravee Suthikulpanit wrote:
>> Boris,
>>
>> On 4/22/20 12:43 PM, Boris V. wrote:
>>> Hello,
>>>
>>> when running qemu with GPU passthrough it crashes with 5.6 and also 5.7-rc kernels, it works with 5.5 and lower.
>>> Without GPU passthrough I don't see this crash.
>>> With bisecting, I found commit that causes this BUG.
>>> It seems bad commit is f458d039db7e8518041db4169d657407e3217008, if I revert this patch it works.
>>
>> Could you please try the following patch?
>>
>> Thanks,
>> Suravee
>>
>> --- BEGIN PATCH ---
>> commit 5a605d65a71583195f64d42f39a29c771e2c763a
>> Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>> Date:   Thu Apr 23 06:40:11 2020 -0500
>>
>>     kvm: ioapic: Introduce arch-specific check for lazy update EOI mechanism
>>
>>     commit f458d039db7e ("kvm: ioapic: Lazy update IOAPIC EOI") introduces
>>     a regression on Intel VMX APICv since it always force IOAPIC lazy update
>>     EOI mechanism when APICv is activated, which is needed to support AMD
>>     SVM AVIC.
>>
>>     Fixes by introducing struct kvm_arch.use_lazy_eoi variable to specify
>>     whether the architecture needs lazy update EOI support.
>>
>>     Fixes: f458d039db7e ("kvm: ioapic: Lazy update IOAPIC EOI")
>>     Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>> ---
>>  arch/x86/include/asm/kvm_host.h | 2 ++
>>  arch/x86/kvm/ioapic.c           | 3 +++
>>  arch/x86/kvm/svm.c              | 1 +
>>  3 files changed, 6 insertions(+)
>>
>
> Yes, this this patch works, there is no longer kernel BUG.
>
> Thanks,
> Boris
>

Thanks for testing. I'll clean up and send out the patch.

Suravee