From: "Zhang Haoyu" <zhanghy@sangfor.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Chen, Tiejun" <tiejun.chen@intel.com>,
"Wang, Wei W" <wei.w.wang@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: RE: [PATCH] KVM: x86: reset RVI upon system reset
Date: Fri, 12 Dec 2014 17:56:50 +0800 [thread overview]
Message-ID: <201412121756500480610@sangfor.com> (raw)
In-Reply-To: A9667DDFB95DB7438FA9D7D576C3D87E0ABFF312@SHSMSX104.ccr.corp.intel.com
On 2014-12-11 19:06:33, Zhang, Yang Z wrote:
>Zhang Haoyu wrote on 2014-12-11:
>> Then?
>
>It's already in upstream KVM
>
Strange, I didn't find this commit in https://git.kernel.org/cgit/virt/kvm/kvm.git/log/
but found it from the repository downloaded by git clone git://git.kernel.org/pub/scm/virt/kvm/kvm.git
Thanks,
Zhang Haoyu
>commit 4114c27d450bef228be9c7b0c40a888e18a3a636
>Author: Wei Wang <wei.w.wang@intel.com>
>Date: Wed Nov 5 10:53:43 2014 +0800
>
> KVM: x86: reset RVI upon system reset
>
> A bug was reported as follows: when running Windows 7 32-bit guests on qemu-kvm,
> sometimes the guests run into blue screen during reboot. The problem was that a
> guest's RVI was not cleared when it rebooted. This patch has fixed the problem.
>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
> Tested-by: Rongrong Liu <rongrongx.liu@intel.com>, Da Chun <ngugc@qq.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
>
>>
>>>> On 05/11/2014 10:02, Chen, Tiejun wrote:
>>>>>> I think both are ok.
>>>>>> If we zero max_irr in vmx_set_rvi(), we still need this check:
>>>>>> if ((is_guest_mode(vcpu) && nested_exit_on_intr(vcpu)) || max_irr
>>>>>> ==
>>>>>> -1)
>>>>>
>>>>> No, I don't think we need to add this.
>>>>
>>>> You don't, because the code will look like:
>>>>
>>>> if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu))
>>>> return; if (!is_guest_mode(vcpu)) {
>>>> vmx_set_rvi(max_irr); return;
>>>> }
>>>>
>>>> if (max_irr == -1)
>>>> return;
>>>> and thus vmx_set_rvi() is never reached if is_guest_mode(vcpu) &&
>>>> !nested_exit_on_intr(vcpu).
>>>
>>> I don't think the above code is perfect. Since hwapic_irr_update() is
>>> a hot point,
>> it's better to move the first check after the second check. In this
>> case, Wei's patch looks more reasonable.
>>>
>>>>
>>>> I applied the lapic.c part of Wei's patch, and the vmx.c part of Tiejun's patch.
>>>>
>>>> Paolo
>>>
>>>
>>> Best regards,
>
>
>Best regards,
>Yang
next prev parent reply other threads:[~2014-12-12 9:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 2:53 [PATCH] KVM: x86: reset RVI upon system reset Wei Wang
2014-11-05 6:13 ` Chen, Tiejun
2014-11-05 7:39 ` Wang, Wei W
2014-11-05 8:06 ` Chen, Tiejun
2014-11-05 8:50 ` Wang, Wei W
2014-11-05 9:02 ` Chen, Tiejun
2014-11-05 10:02 ` Paolo Bonzini
2014-11-06 1:08 ` Zhang, Yang Z
2014-12-11 8:15 ` Zhang Haoyu
2014-12-11 11:06 ` Zhang, Yang Z
2014-12-12 9:56 ` Zhang Haoyu [this message]
2014-12-12 10:27 ` Paolo Bonzini
2014-12-15 1:52 ` Zhang Haoyu
2014-12-15 9:32 ` Paolo Bonzini
2014-12-11 11:35 ` Paolo Bonzini
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=201412121756500480610@sangfor.com \
--to=zhanghy@sangfor.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=tiejun.chen@intel.com \
--cc=wei.w.wang@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