lkml.org 
[lkml]   [2014]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: x86: fix xen guest panic due to lack of KVM_REQ_EVENT
Hi Paolo,
On Mon, Aug 25, 2014 at 11:16:16AM +0200, Paolo Bonzini wrote:
>Il 25/08/2014 11:08, Wanpeng Li ha scritto:
>> Hi Paolo,
>> On Mon, Aug 25, 2014 at 11:01:07AM +0200, Paolo Bonzini wrote:
>>> Il 25/08/2014 09:58, Wanpeng Li ha scritto:
>>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>>> index c10408e..b7c0073 100644
>>>> --- a/arch/x86/kvm/x86.c
>>>> +++ b/arch/x86/kvm/x86.c
>>>> @@ -4928,6 +4928,8 @@ static void toggle_interruptibility(struct kvm_vcpu *vcpu, u32 mask)
>>>> if (!mask)
>>>> kvm_make_request(KVM_REQ_EVENT, vcpu);
>>>> }
>>>> + if (!(int_shadow || mask))
>>>> + kvm_make_request(KVM_REQ_EVENT, vcpu);
>>>> }
>>>>
>>>> static void inject_emulated_exception(struct kvm_vcpu *vcpu)
>>>
>>> No, this patch undoes the optimization in the buggy patch.
>>>
>>> A KVM_REQ_EVENT must be missing somewhere else.
>>>
>>
>> Could you give some tips in order that I can figure it out?
>
>I have no idea right now (I was planning to debug it this week).
>
>(BTW, look at the original commit that introduced KVM_REQ_EVENT --
>https://git.kernel.org/cgit/virt/kvm/kvm.git/commit/?id=3842d135 -- and
>compare the patch and the commit message. You can see that it was added
>to the emulator because it is a "place that can set EFLAGS" and this
>idea is preserved in the buggy patch).
>
>The important thing is that (despite Xen being involved) this is not
>related to nested virtualization. So I would first of all try to see if
>some module parameter makes it go away (apicv and unrestricted mode

This bug can be reproduced w/o apicv.

>especially), then capture a trace of the panic. At least this is how I
>was planning to start... :)

Great, I will also continue to debug it. ;-)

Regards,
Wanpeng Li

>
>Paolo


\
 
 \ /
  Last update: 2014-08-25 12:01    [W:0.058 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site