diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-08 07:21:27 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-08 07:21:27 -0400 |
commit | e635a01ea0a16cf7cd31ecd2305870385dca9be6 (patch) | |
tree | c7153e7dee5caf6ac90d85694ff27e4d0b606290 /arch/x86/kvm/svm.c | |
parent | 143070e74630b9557e1bb64d899ff2cc5a1dcb48 (diff) | |
parent | 947391cfbaa3b08558844c0b187bcd0223c3f660 (diff) |
Merge branch 'next-mtd' of git://aeryn.fluff.org.uk/bjdooks/linux
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1821c2078199..1f8510c51d6e 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -411,7 +411,6 @@ static __init int svm_hardware_setup(void) | |||
411 | 411 | ||
412 | iopm_va = page_address(iopm_pages); | 412 | iopm_va = page_address(iopm_pages); |
413 | memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); | 413 | memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); |
414 | clear_bit(0x80, iopm_va); /* allow direct access to PC debug port */ | ||
415 | iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT; | 414 | iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT; |
416 | 415 | ||
417 | if (boot_cpu_has(X86_FEATURE_NX)) | 416 | if (boot_cpu_has(X86_FEATURE_NX)) |
@@ -796,6 +795,11 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, | |||
796 | var->db = (s->attrib >> SVM_SELECTOR_DB_SHIFT) & 1; | 795 | var->db = (s->attrib >> SVM_SELECTOR_DB_SHIFT) & 1; |
797 | var->g = (s->attrib >> SVM_SELECTOR_G_SHIFT) & 1; | 796 | var->g = (s->attrib >> SVM_SELECTOR_G_SHIFT) & 1; |
798 | 797 | ||
798 | /* AMD's VMCB does not have an explicit unusable field, so emulate it | ||
799 | * for cross vendor migration purposes by "not present" | ||
800 | */ | ||
801 | var->unusable = !var->present || (var->type == 0); | ||
802 | |||
799 | switch (seg) { | 803 | switch (seg) { |
800 | case VCPU_SREG_CS: | 804 | case VCPU_SREG_CS: |
801 | /* | 805 | /* |
@@ -827,8 +831,6 @@ static void svm_get_segment(struct kvm_vcpu *vcpu, | |||
827 | var->type |= 0x1; | 831 | var->type |= 0x1; |
828 | break; | 832 | break; |
829 | } | 833 | } |
830 | |||
831 | var->unusable = !var->present; | ||
832 | } | 834 | } |
833 | 835 | ||
834 | static int svm_get_cpl(struct kvm_vcpu *vcpu) | 836 | static int svm_get_cpl(struct kvm_vcpu *vcpu) |