* [patch 0/2] SVM: fix cpu onlining
@ 2010-08-31 22:13 Marcelo Tosatti
2010-08-31 22:13 ` [patch 1/2] KVM: SVM: reset mmu context in init_vmcb Marcelo Tosatti
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2010-08-31 22:13 UTC (permalink / raw)
To: avi; +Cc: kvm
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 1/2] KVM: SVM: reset mmu context in init_vmcb
2010-08-31 22:13 [patch 0/2] SVM: fix cpu onlining Marcelo Tosatti
@ 2010-08-31 22:13 ` Marcelo Tosatti
2010-08-31 22:13 ` [patch 2/2] KVM: SVM: init_vmcb should reset vcpu->efer Marcelo Tosatti
2010-09-01 7:09 ` [patch 0/2] SVM: fix cpu onlining Avi Kivity
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2010-08-31 22:13 UTC (permalink / raw)
To: avi; +Cc: kvm, Marcelo Tosatti
[-- Attachment #1: svm-reset-mmu --]
[-- Type: text/plain, Size: 808 bytes --]
Since commit aad827034e419fa no mmu reinitialization is performed
via init_vmcb.
Zero vcpu->arch.cr0 and pass the reset value as a parameter to
kvm_set_cr0.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm/arch/x86/kvm/svm.c
===================================================================
--- kvm.orig/arch/x86/kvm/svm.c
+++ kvm/arch/x86/kvm/svm.c
@@ -827,8 +827,8 @@ static void init_vmcb(struct vcpu_svm *s
* This is the guest-visible cr0 value.
* svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
*/
- svm->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET;
- (void)kvm_set_cr0(&svm->vcpu, svm->vcpu.arch.cr0);
+ svm->vcpu.arch.cr0 = 0;
+ (void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
save->cr4 = X86_CR4_PAE;
/* rdx = ?? */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2/2] KVM: SVM: init_vmcb should reset vcpu->efer
2010-08-31 22:13 [patch 0/2] SVM: fix cpu onlining Marcelo Tosatti
2010-08-31 22:13 ` [patch 1/2] KVM: SVM: reset mmu context in init_vmcb Marcelo Tosatti
@ 2010-08-31 22:13 ` Marcelo Tosatti
2010-09-01 7:09 ` [patch 0/2] SVM: fix cpu onlining Avi Kivity
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2010-08-31 22:13 UTC (permalink / raw)
To: avi; +Cc: kvm, Marcelo Tosatti
[-- Attachment #1: reset-efer --]
[-- Type: text/plain, Size: 575 bytes --]
Otherwise EFER_LMA bit is retained across a SIPI reset.
Fixes guest cpu onlining.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: kvm/arch/x86/kvm/svm.c
===================================================================
--- kvm.orig/arch/x86/kvm/svm.c
+++ kvm/arch/x86/kvm/svm.c
@@ -816,7 +816,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);
- save->efer = EFER_SVME;
+ svm_set_efer(&svm->vcpu, 0);
save->dr6 = 0xffff0ff0;
save->dr7 = 0x400;
save->rflags = 2;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/2] SVM: fix cpu onlining
2010-08-31 22:13 [patch 0/2] SVM: fix cpu onlining Marcelo Tosatti
2010-08-31 22:13 ` [patch 1/2] KVM: SVM: reset mmu context in init_vmcb Marcelo Tosatti
2010-08-31 22:13 ` [patch 2/2] KVM: SVM: init_vmcb should reset vcpu->efer Marcelo Tosatti
@ 2010-09-01 7:09 ` Avi Kivity
2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-09-01 7:09 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On 09/01/2010 01:13 AM, Marcelo Tosatti wrote:
applied, thanks.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-01 7:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31 22:13 [patch 0/2] SVM: fix cpu onlining Marcelo Tosatti
2010-08-31 22:13 ` [patch 1/2] KVM: SVM: reset mmu context in init_vmcb Marcelo Tosatti
2010-08-31 22:13 ` [patch 2/2] KVM: SVM: init_vmcb should reset vcpu->efer Marcelo Tosatti
2010-09-01 7:09 ` [patch 0/2] SVM: fix cpu onlining Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).