All of lore.kernel.org
 help / color / mirror / Atom feed
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: Thu, 11 Dec 2014 16:15:35 +0800	[thread overview]
Message-ID: <201412111615355608149@sangfor.com> (raw)
In-Reply-To: A9667DDFB95DB7438FA9D7D576C3D87E0ABC9BA1@SHSMSX104.ccr.corp.intel.com

Then?

>> 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,


  reply	other threads:[~2014-12-11  8:15 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 [this message]
2014-12-11 11:06                 ` Zhang, Yang Z
2014-12-12  9:56                   ` Zhang Haoyu
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=201412111615355608149@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.