From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <wanpeng.li@linux.intel.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
Gleb Natapov <gleb@kernel.org>, Bandan Das <bsd@redhat.com>,
Zhang Yang <yang.z.zhang@intel.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: nested TPR shadow/threshold emulation
Date: Thu, 31 Jul 2014 11:25:37 +0200 [thread overview]
Message-ID: <53DA0B91.1010703@redhat.com> (raw)
In-Reply-To: <20140731080353.GA3033@kernel>
Il 31/07/2014 10:03, Wanpeng Li ha scritto:
>> One thing:
>>
>>> + if (nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW))
>>> + vmcs_write32(TPR_THRESHOLD, vmcs12->tpr_threshold);
>>
>> I think you can just do this write unconditionally, since most
>> hypervisors will enable this. Also, you probably can add the tpr
>
> What will happen if a hypervisor doesn't enable it? I make it more
> cleaner in version two.
TPR_THRESHOLD will be likely written as zero, but the processor will
never use it anyway. It's just a small optimization because
nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW) will almost always be true.
Paolo
>> threshold field to the read-write fields for shadow VMCS.
>
> Agreed.
>
> Regards,
> Wanpeng Li
next prev parent reply other threads:[~2014-07-31 9:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 12:04 [PATCH] KVM: nVMX: nested TPR shadow/threshold emulation Wanpeng Li
2014-07-30 15:20 ` Paolo Bonzini
2014-07-31 8:03 ` Wanpeng Li
2014-07-31 9:25 ` Paolo Bonzini [this message]
2014-08-01 0:57 ` Zhang, Yang Z
2014-08-01 6:35 ` Paolo Bonzini
2014-08-01 6:44 ` Zhang, Yang Z
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=53DA0B91.1010703@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=gleb@kernel.org \
--cc=jan.kiszka@siemens.com \
--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