|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: Try to work around a BIOS that disables SVM but does not lock it
On Wed, Mar 7, 2012 at 5:59 PM, George Dunlap
<george.dunlap@xxxxxxxxxxxxx> wrote:
> This is for a particular system we found with this problem; a HP DL785 with
> BIOS
> dated 08/22/2008.
>
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Hmm, actually, looking at our ticket (CA-24173, for those who have
access to it), I'm not sure this was ever actually shown to fix the
bug. Tim, can you comment?
-George
>
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1145,7 +1145,18 @@ static int svm_cpu_up(void)
> rdmsrl(MSR_K8_VM_CR, msr_content);
> if ( msr_content & K8_VMCR_SVME_DISABLE )
> {
> - printk("CPU%d: AMD SVM Extension is disabled in BIOS.\n", cpu);
> + /* Try to re-enable it if we're allowed */
> + if ( !(msr_content & K8_VMCR_SVME_LOCK) )
> + {
> + msr_content &= ~K8_VMCR_SVME_DISABLE;
> + wrmsrl(MSR_K8_VM_CR, msr_content);
> + rdmsrl(MSR_K8_VM_CR, msr_content);
> + }
> + if ( msr_content & K8_VMCR_SVME_DISABLE )
> + {
> + printk("AMD SVM Extension is disabled in BIOS.\n");
> + return 0;
> + }
> return -EINVAL;
> }
>
> diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
> --- a/xen/include/asm-x86/msr-index.h
> +++ b/xen/include/asm-x86/msr-index.h
> @@ -198,6 +198,8 @@
> /* MSR_K8_VM_CR bits: */
> #define _K8_VMCR_SVME_DISABLE 4
> #define K8_VMCR_SVME_DISABLE (1 << _K8_VMCR_SVME_DISABLE)
> +#define _K8_VMCR_SVME_LOCK 3
> +#define K8_VMCR_SVME_LOCK (1 << _K8_VMCR_SVME_LOCK)
>
> /* AMD64 MSRs */
> #define MSR_AMD64_NB_CFG 0xc001001f
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |