From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <wanpeng.li@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@kernel.org>,
Zhang Yang <yang.z.zhang@intel.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: fix xen guest panic due to lack of KVM_REQ_EVENT
Date: Mon, 25 Aug 2014 11:16:16 +0200 [thread overview]
Message-ID: <53FAFEE0.9000408@redhat.com> (raw)
In-Reply-To: <20140825090822.GA4955@kernel>
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
especially), then capture a trace of the panic. At least this is how I
was planning to start... :)
Paolo
next prev parent reply other threads:[~2014-08-25 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 7:58 [PATCH] KVM: x86: fix xen guest panic due to lack of KVM_REQ_EVENT Wanpeng Li
2014-08-25 9:01 ` Paolo Bonzini
2014-08-25 9:08 ` Wanpeng Li
2014-08-25 9:16 ` Paolo Bonzini [this message]
2014-08-25 9:40 ` Wanpeng Li
2014-08-26 4:07 ` Wanpeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53FAFEE0.9000408@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=wanpeng.li@linux.intel.com \
--cc=yang.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox