Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 126962 Details for
Bug 187812
load/runtime issues with kvm-amd on kernels >=2.6.22
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
KVM: SVM: Reliably detect if SVM was disabled by BIOS
kvm_svm.patch (text/plain), 1.55 KB, created by
Mike Pagano
on 2007-08-05 15:07:32 UTC
(
hide
)
Description:
KVM: SVM: Reliably detect if SVM was disabled by BIOS
Filename:
MIME Type:
Creator:
Mike Pagano
Created:
2007-08-05 15:07:32 UTC
Size:
1.55 KB
patch
obsolete
>From: Joerg Roedel <joerg.roedel@amd.com> >Date: Fri, 22 Jun 2007 09:29:50 +0000 (+0300) >Subject: KVM: SVM: Reliably detect if SVM was disabled by BIOS >X-Git-Tag: v2.6.23-rc1~520^2~11 >X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6031a61c2ef4cf22b69ef5494aefa54b84a27d2f > >KVM: SVM: Reliably detect if SVM was disabled by BIOS > >This patch adds an implementation to the svm is_disabled function to >detect reliably if the BIOS disabled the SVM feature in the CPU. This >fixes the issues with kernel panics when loading the kvm-amd module on >machines where SVM is available but disabled. > >Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> >Signed-off-by: Avi Kivity <avi@qumranet.com> >--- > >diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c >index 62ec38c..a0d4428 100644 >--- a/drivers/kvm/svm.c >+++ b/drivers/kvm/svm.c >@@ -1735,6 +1735,12 @@ static void svm_inject_page_fault(struct kvm_vcpu *vcpu, > > static int is_disabled(void) > { >+ u64 vm_cr; >+ >+ rdmsrl(MSR_VM_CR, vm_cr); >+ if (vm_cr & (1 << SVM_VM_CR_SVM_DISABLE)) >+ return 1; >+ > return 0; > } > >diff --git a/drivers/kvm/svm.h b/drivers/kvm/svm.h >index 5e93814..3b1b0f3 100644 >--- a/drivers/kvm/svm.h >+++ b/drivers/kvm/svm.h >@@ -175,8 +175,11 @@ struct __attribute__ ((__packed__)) vmcb { > #define SVM_CPUID_FUNC 0x8000000a > > #define MSR_EFER_SVME_MASK (1ULL << 12) >+#define MSR_VM_CR 0xc0010114 > #define MSR_VM_HSAVE_PA 0xc0010117ULL > >+#define SVM_VM_CR_SVM_DISABLE 4 >+ > #define SVM_SELECTOR_S_SHIFT 4 > #define SVM_SELECTOR_DPL_SHIFT 5 > #define SVM_SELECTOR_P_SHIFT 7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187812
:
126942
|
126943
| 126962 |
126967
|
127037