aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:27:56 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-27 17:27:56 -0500
commit2ea0718884c520f85c869c3bfef57477316ea91f (patch)
tree560be7967d411d2ce19162c6402f51983d860ee7 /drivers
parent9c8ff4f4dac189e4111238d54c2b12e7837f4818 (diff)
parent404fb881b82cf0cf6981832f8d31a7484e4dee81 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: KVM: SVM: Fix FPU leak while emulating clts KVM: SVM: Unload guest fpu on vcpu_put() KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std KVM: x86 emulator: fix the saving of of the eip value KVM: x86 emulator: fix JMP_REL
Diffstat (limited to 'drivers')
-rw-r--r--drivers/kvm/kvm_main.c3
-rw-r--r--drivers/kvm/svm.c1
-rw-r--r--drivers/kvm/x86_emulate.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 07ae280e8fe5..47c10b8f89b3 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1188,8 +1188,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)
1188 1188
1189int emulate_clts(struct kvm_vcpu *vcpu) 1189int emulate_clts(struct kvm_vcpu *vcpu)
1190{ 1190{
1191 vcpu->cr0 &= ~X86_CR0_TS; 1191 kvm_x86_ops->set_cr0(vcpu, vcpu->cr0 & ~X86_CR0_TS);
1192 kvm_x86_ops->set_cr0(vcpu, vcpu->cr0);
1193 return X86EMUL_CONTINUE; 1192 return X86EMUL_CONTINUE;
1194} 1193}
1195 1194
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 7a6eead63a6b..4e04e49a2f1c 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -663,6 +663,7 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
663 wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]); 663 wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]);
664 664
665 rdtscll(vcpu->host_tsc); 665 rdtscll(vcpu->host_tsc);
666 kvm_put_guest_fpu(vcpu);
666} 667}
667 668
668static void svm_vcpu_decache(struct kvm_vcpu *vcpu) 669static void svm_vcpu_decache(struct kvm_vcpu *vcpu)
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 33b181451557..bd46de6bf891 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -448,8 +448,7 @@ struct operand {
448 448
449#define JMP_REL(rel) \ 449#define JMP_REL(rel) \
450 do { \ 450 do { \
451 _eip += (int)(rel); \ 451 register_address_increment(_eip, rel); \
452 _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \
453 } while (0) 452 } while (0)
454 453
455/* 454/*
@@ -1147,7 +1146,7 @@ done_prefixes:
1147 } 1146 }
1148 register_address_increment(_regs[VCPU_REGS_RSP], 1147 register_address_increment(_regs[VCPU_REGS_RSP],
1149 -dst.bytes); 1148 -dst.bytes);
1150 if ((rc = ops->write_std( 1149 if ((rc = ops->write_emulated(
1151 register_address(ctxt->ss_base, 1150 register_address(ctxt->ss_base,
1152 _regs[VCPU_REGS_RSP]), 1151 _regs[VCPU_REGS_RSP]),
1153 &dst.val, dst.bytes, ctxt->vcpu)) != 0) 1152 &dst.val, dst.bytes, ctxt->vcpu)) != 0)
@@ -1359,6 +1358,7 @@ special_insn:
1359 } 1358 }
1360 src.val = (unsigned long) _eip; 1359 src.val = (unsigned long) _eip;
1361 JMP_REL(rel); 1360 JMP_REL(rel);
1361 op_bytes = ad_bytes;
1362 goto push; 1362 goto push;
1363 } 1363 }
1364 case 0xe9: /* jmp rel */ 1364 case 0xe9: /* jmp rel */