svm: Re-enable 2MB super paging
authorKeir Fraser <keir@xen.org>
Wed, 20 Oct 2010 07:41:58 +0000 (08:41 +0100)
committerKeir Fraser <keir@xen.org>
Wed, 20 Oct 2010 07:41:58 +0000 (08:41 +0100)
Bitwise OR operator has higher precedence than conditional
operator. This patch fixes the incorrect associativity and re-enables
2MB paging for AMD family 10h system.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
Acked-by: Wei Huang <wei.huang2@amd.com>
xen/arch/x86/hvm/svm/svm.c

index 12b1e5d6c593b89a6bb1918a886871d72989d10d..a43bc728dcf31dd48d211e9e1a8cf43bb12d5cc1 100644 (file)
@@ -904,8 +904,8 @@ struct hvm_function_table * __init start_svm(void)
 
     svm_function_table.hap_supported = cpu_has_svm_npt;
     svm_function_table.hap_capabilities = HVM_HAP_SUPERPAGE_2MB |
-        ((CONFIG_PAGING_LEVELS == 4) && (cpuid_edx(0x80000001) & 0x04000000)) ?
-            HVM_HAP_SUPERPAGE_1GB : 0;
+        (((CONFIG_PAGING_LEVELS == 4) && (cpuid_edx(0x80000001) & 0x04000000)) ?
+            HVM_HAP_SUPERPAGE_1GB : 0);
 
     return &svm_function_table;
 }