projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
682edb4
)
KVM: VMX: Flush volatile msrs before emulating rdmsr
author
Avi Kivity
<avi@redhat.com>
Sun, 15 Feb 2009 00:32:07 +0000
(
02:32
+0200)
committer
Avi Kivity
<avi@redhat.com>
Sun, 15 Feb 2009 00:47:39 +0000
(
02:47
+0200)
Some msrs (notable MSR_KERNEL_GS_BASE) are held in the processor registers
and need to be flushed to the vcpu struture before they can be read.
This fixes cygwin longjmp() failure on Windows x64.
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/vmx.c
b/arch/x86/kvm/vmx.c
index b1fe1422afb18dd4b6bd32fb07d418741407f771..7611af576829d820eba8de4a79d389e8baef7759 100644
(file)
--- a/
arch/x86/kvm/vmx.c
+++ b/
arch/x86/kvm/vmx.c
@@
-903,6
+903,7
@@
static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
data = vmcs_readl(GUEST_SYSENTER_ESP);
break;
default:
+ vmx_load_host_state(to_vmx(vcpu));
msr = find_msr_entry(to_vmx(vcpu), msr_index);
if (msr) {
data = msr->data;