From: Jan Kiszka <jan.kiszka@web.de>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, kvm <kvm@vger.kernel.org>,
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Yang Zhang <yang.z.zhang@intel.com>
Subject: Re: [PATCH 6/7] KVM: nVMX: Implement support for EFER saving on VM-exit
Date: Mon, 05 Aug 2013 09:35:59 +0200 [thread overview]
Message-ID: <51FF55DF.1010905@web.de> (raw)
In-Reply-To: <CABpY8MLPfw6tiMZjJY2n6DHweWp7MiZvc4YjXGHhVq--2NM5Zw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
On 2013-08-05 09:21, Arthur Chunqi Li wrote:
> On Mon, Aug 5, 2013 at 1:49 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Implement and advertise VM_EXIT_SAVE_IA32_EFER. L0 traps EFER writes
>> unconditionally, so we always find the current L2 value in the
>> architectural state.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> arch/x86/kvm/vmx.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> index 84a05b4..7208d0b 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -2203,7 +2203,7 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>> nested_vmx_exit_ctls_high = 0;
>> #endif
>> nested_vmx_exit_ctls_high |= (VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>> - VM_EXIT_LOAD_IA32_EFER);
>> + VM_EXIT_LOAD_IA32_EFER | VM_EXIT_SAVE_IA32_EFER);
> Here you may need to access MSR_IA32_VMX_EXIT_CTLS first to check if
> host support these two features. The codes for "entry controls"
> following it can achieve goals like this.
We are providing this feature independently of the host's support. Every
write to EFER is trapped by L0, so we can emulate saving by reading what
L0 recorded.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2013-08-05 7:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 17:48 [PATCH 0/7] KVM: nVMX: Enable unrestricted guest mode and fix some nEPT issues Jan Kiszka
2013-08-04 17:49 ` [PATCH 1/7] KVM: nEPT: Advertise WB type EPTP Jan Kiszka
2013-08-05 13:12 ` Gleb Natapov
2013-08-04 17:49 ` [PATCH 2/7] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state Jan Kiszka
2013-08-04 17:49 ` [PATCH 3/7] KVM: nVMX: Enable unrestricted guest mode support Jan Kiszka
2013-08-04 17:49 ` [PATCH 4/7] KVM: nVMX: Fix guest CR3 read-back on VM-exit Jan Kiszka
2013-08-04 17:49 ` [PATCH 5/7] KVM: nVMX: Load nEPT state after EFER Jan Kiszka
2013-08-04 17:49 ` [PATCH 6/7] KVM: nVMX: Implement support for EFER saving on VM-exit Jan Kiszka
2013-08-05 7:21 ` Arthur Chunqi Li
2013-08-05 7:35 ` Jan Kiszka [this message]
2013-08-04 17:49 ` [PATCH 7/7] KVM: nVMX: Update mmu.base_role.nxe after EFER loading on VM-entry/exit Jan Kiszka
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=51FF55DF.1010905@web.de \
--to=jan.kiszka@web.de \
--cc=gleb@redhat.com \
--cc=jun.nakajima@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
--cc=yang.z.zhang@intel.com \
--cc=yzt356@gmail.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