From: <gregkh@linuxfoundation.org>
To: pbonzini@redhat.com, gregkh@linuxfoundation.org, yang.z.zhang@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "kvm: x86: zero EFER on INIT" has been added to the 4.3-stable tree
Date: Mon, 07 Dec 2015 00:31:16 -0800 [thread overview]
Message-ID: <1449477076180238@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
kvm: x86: zero EFER on INIT
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-x86-zero-efer-on-init.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 5690891bcec5fcfda38da974ffa5488e36a59811 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon, 19 Oct 2015 11:30:19 +0200
Subject: kvm: x86: zero EFER on INIT
From: Paolo Bonzini <pbonzini@redhat.com>
commit 5690891bcec5fcfda38da974ffa5488e36a59811 upstream.
Not zeroing EFER means that a 32-bit firmware cannot enter paging mode
without clearing EFER.LME first (which it should not know about).
Yang Zhang from Intel confirmed that the manual is wrong and EFER is
cleared to zero on INIT.
Fixes: d28bc9dd25ce023270d2e039e7c98d38ecbf7758
Cc: Yang Z Zhang <yang.z.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kvm/svm.c | 11 +++++------
arch/x86/kvm/vmx.c | 3 +--
2 files changed, 6 insertions(+), 8 deletions(-)
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1086,7 +1086,7 @@ static u64 svm_compute_tsc_offset(struct
return target_tsc - tsc;
}
-static void init_vmcb(struct vcpu_svm *svm, bool init_event)
+static void init_vmcb(struct vcpu_svm *svm)
{
struct vmcb_control_area *control = &svm->vmcb->control;
struct vmcb_save_area *save = &svm->vmcb->save;
@@ -1157,8 +1157,7 @@ static void init_vmcb(struct vcpu_svm *s
init_sys_seg(&save->ldtr, SEG_TYPE_LDT);
init_sys_seg(&save->tr, SEG_TYPE_BUSY_TSS16);
- if (!init_event)
- svm_set_efer(&svm->vcpu, 0);
+ svm_set_efer(&svm->vcpu, 0);
save->dr6 = 0xffff0ff0;
kvm_set_rflags(&svm->vcpu, 2);
save->rip = 0x0000fff0;
@@ -1212,7 +1211,7 @@ static void svm_vcpu_reset(struct kvm_vc
if (kvm_vcpu_is_reset_bsp(&svm->vcpu))
svm->vcpu.arch.apic_base |= MSR_IA32_APICBASE_BSP;
}
- init_vmcb(svm, init_event);
+ init_vmcb(svm);
kvm_cpuid(vcpu, &eax, &dummy, &dummy, &dummy);
kvm_register_write(vcpu, VCPU_REGS_RDX, eax);
@@ -1268,7 +1267,7 @@ static struct kvm_vcpu *svm_create_vcpu(
clear_page(svm->vmcb);
svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT;
svm->asid_generation = 0;
- init_vmcb(svm, false);
+ init_vmcb(svm);
svm_init_osvw(&svm->vcpu);
@@ -1890,7 +1889,7 @@ static int shutdown_interception(struct
* so reinitialize it.
*/
clear_page(svm->vmcb);
- init_vmcb(svm, false);
+ init_vmcb(svm);
kvm_run->exit_reason = KVM_EXIT_SHUTDOWN;
return 0;
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4771,8 +4771,7 @@ static void vmx_vcpu_reset(struct kvm_vc
vmx_set_cr0(vcpu, cr0); /* enter rmode */
vmx->vcpu.arch.cr0 = cr0;
vmx_set_cr4(vcpu, 0);
- if (!init_event)
- vmx_set_efer(vcpu, 0);
+ vmx_set_efer(vcpu, 0);
vmx_fpu_activate(vcpu);
update_exception_bitmap(vcpu);
Patches currently in stable-queue which might be from pbonzini@redhat.com are
queue-4.3/kvm-x86-set-kvm_req_event-when-updating-irr.patch
queue-4.3/mips-kvm-fix-cache-immediate-offset-sign-extension.patch
queue-4.3/kvm-x86-handle-smbase-as-physical-address-in-rsm.patch
queue-4.3/kvm-x86-obey-kvm_x86_quirk_cd_nw_cleared-in-kvm_set_cr0.patch
queue-4.3/mips-kvm-fix-asid-restoration-logic.patch
queue-4.3/kvm-x86-zero-efer-on-init.patch
queue-4.3/x86-setup-fix-low-identity-map-for-2gb-kernel-range.patch
queue-4.3/x86-fpu-fix-get_xsave_addr-behavior-under-virtualization.patch
queue-4.3/kvm-x86-allow-rsm-from-64-bit-mode.patch
queue-4.3/kvm-x86-add-read_phys-to-x86_emulate_ops.patch
queue-4.3/kvm-x86-work-around-infinite-loop-in-microcode-when-ac-is-delivered.patch
queue-4.3/mips-kvm-uninit-vcpu-in-vcpu_create-error-path.patch
reply other threads:[~2015-12-07 12:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1449477076180238@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=pbonzini@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--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.