All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Liran Alon <liran.alon@oracle.com>,
	rkrcmar@redhat.com, kvm@vger.kernel.org
Cc: sean.j.christopherson@intel.com, jmattson@google.com,
	vkuznets@redhat.com, Joao Martins <joao.m.martins@oracle.com>
Subject: Re: [PATCH 1/2] KVM: VMX: Refactor update_cr8_intercept()
Date: Mon, 11 Nov 2019 15:57:30 +0100	[thread overview]
Message-ID: <de93a7b8-d0b6-33b2-2039-ad836fcfab1e@redhat.com> (raw)
In-Reply-To: <20191111123055.93270-2-liran.alon@oracle.com>

On 11/11/19 13:30, Liran Alon wrote:
> No functional changes.
> 
> Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Liran Alon <liran.alon@oracle.com>
> ---
>  arch/x86/kvm/vmx/vmx.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index f53b0c74f7c8..d5742378d031 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -6013,17 +6013,14 @@ static void vmx_l1d_flush(struct kvm_vcpu *vcpu)
>  static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
>  {
>  	struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
> +	int tpr_threshold;
>  
>  	if (is_guest_mode(vcpu) &&
>  		nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW))
>  		return;
>  
> -	if (irr == -1 || tpr < irr) {
> -		vmcs_write32(TPR_THRESHOLD, 0);
> -		return;
> -	}
> -
> -	vmcs_write32(TPR_THRESHOLD, irr);
> +	tpr_threshold = ((irr == -1) || (tpr < irr)) ? 0 : irr;

Pascal parentheses? :)

Paolo

> +	vmcs_write32(TPR_THRESHOLD, tpr_threshold);
>  }
>  
>  void vmx_set_virtual_apic_mode(struct kvm_vcpu *vcpu)
> 


  reply	other threads:[~2019-11-11 14:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 12:30 [PATCH 0/2] KVM: nVMX: Update vmcs01 TPR_THRESHOLD if L2 changed L1 TPR Liran Alon
2019-11-11 12:30 ` [PATCH 1/2] KVM: VMX: Refactor update_cr8_intercept() Liran Alon
2019-11-11 14:57   ` Paolo Bonzini [this message]
2019-11-11 15:00     ` Liran Alon
2019-11-11 16:01       ` Paolo Bonzini
2019-11-11 16:02         ` Liran Alon
2019-11-11 12:30 ` [PATCH 2/2] KVM: nVMX: Update vmcs01 TPR_THRESHOLD if L2 changed L1 TPR Liran Alon
2019-11-11 15:02   ` Paolo Bonzini
2019-11-11 15:24     ` Liran Alon
2019-11-11 15:59       ` Paolo Bonzini
2019-11-11 16:07       ` Paolo Bonzini
2019-11-11 16:17         ` Liran Alon
2019-11-11 16:50           ` 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=de93a7b8-d0b6-33b2-2039-ad836fcfab1e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.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.