diff options
author | Xiantao Zhang <xiantao.zhang@intel.com> | 2008-09-28 04:39:46 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-10-15 08:25:38 -0400 |
commit | b010eb5103cfbe12ae6f08a4cdb3a748bf78c410 (patch) | |
tree | e2b812000bbb1b13edb52667e42a8d04d4ad02e5 /arch/ia64/kvm/kvm-ia64.c | |
parent | 1cbea809c400661eecb538e0dd0bc4f3660f0a35 (diff) |
KVM: ia64: add directed mmio range support for kvm guests
Using vt-d, kvm guests can be assigned physcial devices, so
this patch introduce a new mmio type (directed mmio)
to handle its mmio access.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 800a4f2e917e..3df82f3fe547 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -1447,11 +1447,11 @@ int kvm_arch_set_memory_region(struct kvm *kvm, | |||
1447 | if (!kvm_is_mmio_pfn(pfn)) { | 1447 | if (!kvm_is_mmio_pfn(pfn)) { |
1448 | kvm_set_pmt_entry(kvm, base_gfn + i, | 1448 | kvm_set_pmt_entry(kvm, base_gfn + i, |
1449 | pfn << PAGE_SHIFT, | 1449 | pfn << PAGE_SHIFT, |
1450 | _PAGE_MA_WB); | 1450 | _PAGE_AR_RWX | _PAGE_MA_WB); |
1451 | memslot->rmap[i] = (unsigned long)pfn_to_page(pfn); | 1451 | memslot->rmap[i] = (unsigned long)pfn_to_page(pfn); |
1452 | } else { | 1452 | } else { |
1453 | kvm_set_pmt_entry(kvm, base_gfn + i, | 1453 | kvm_set_pmt_entry(kvm, base_gfn + i, |
1454 | GPFN_LOW_MMIO | (pfn << PAGE_SHIFT), | 1454 | GPFN_PHYS_MMIO | (pfn << PAGE_SHIFT), |
1455 | _PAGE_MA_UC); | 1455 | _PAGE_MA_UC); |
1456 | memslot->rmap[i] = 0; | 1456 | memslot->rmap[i] = 0; |
1457 | } | 1457 | } |