All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Xiang <hao.xiang@linux.alibaba.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Xiaoyao Li <xiaoyao.li@intel.com>,
	kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, chenyi.qiang@intel.com,
	shannon.zhao@linux.alibaba.com,
	Sean Christopherson <seanjc@google.com>,
	hao.xiang@linux.alibaba.com
Subject: Re: [PATCH] KVM: VMX: Check if bus lock vmexit was preempted
Date: Thu, 23 Sep 2021 08:59:11 +0800	[thread overview]
Message-ID: <84cd2713-3cc4-3120-946e-0cf8b8a8187d@linux.alibaba.com> (raw)
In-Reply-To: <a0d6bcd8-11e4-4efd-0317-0bec6e59f06a@redhat.com>


On 2021/9/22 20:40, Paolo Bonzini wrote:
> On 22/09/21 12:32, Xiaoyao Li wrote:
>>>
>>
>> EXIT_REASON.bus_lock_detected may or may not be set when exit reason 
>> == EXIT_REASON_BUS_LOCK. Intel will update ISE or SDM to state it.
>>
>> Maybe we can do below in handle_bus_lock_vmexit handler:
>>
>>      if (!to_vmx(vcpu)->exit_reason.bus_lock_detected)
>>          to_vmx(vcpu)->exit_reason.bus_lock_detected = 1;
>>
>> But is manually changing the hardware reported value for software 
>> purpose a good thing?
>
> No.  That said, Hao's patch is just making the code clearer; there's 
> no behavioral change since the "if" will just redo the same 
> assignments as handle_bus_lock_vmexit.
>
> Paolo
I agree Paolo. EXIT_REASON.bus_lock_detected may or may not be set when 
exit_reason=EXIT_REASON_BUS_LOCK,  It clould depend on hardware 
implementaion. No matter when intel states it clearly, I think it is 
better that we avoid repeated assignment by adding additional check 
condition in vmx_handle_exit.  Of course , it is also ok that 
hand_bus_lock_vmexit do nothing , but the code is not clear, and the 
code logic will be inconsistent with spec description.

  reply	other threads:[~2021-09-23  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18 11:30 [PATCH] KVM: VMX: Check if bus lock vmexit was preempted Hao Xiang
2021-09-22 10:02 ` Paolo Bonzini
2021-09-22 10:32   ` Xiaoyao Li
2021-09-22 12:40     ` Paolo Bonzini
2021-09-23  0:59       ` Hao Xiang [this message]
2021-09-23  6:37         ` Paolo Bonzini
2021-09-22 14:58     ` Sean Christopherson
2021-09-23  7:15       ` Hao Xiang

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=84cd2713-3cc4-3120-946e-0cf8b8a8187d@linux.alibaba.com \
    --to=hao.xiang@linux.alibaba.com \
    --cc=chenyi.qiang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=shannon.zhao@linux.alibaba.com \
    --cc=xiaoyao.li@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.