diff options
author | Avi Kivity <avi@qumranet.com> | 2007-05-08 04:34:07 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:41 -0400 |
commit | cd0536d7cb4d5d5c5aa37ccd3edd71c4b0524add (patch) | |
tree | b68b65aa2abdd5a7b7b7085105e4edb51a2255e3 /drivers | |
parent | 653e3108b7d6097d25089d25ab4e99bc58b28962 (diff) |
KVM: Fix vmx I/O bitmap initialization on highmem systems
kunmap() expects a struct page, not a virtual address. Fixes an oops loading
kvm-intel.ko on i386 with CONFIG_HIGHMEM.
Thanks to Michael Ivanov <deruhu@peterstar.ru> for reporting.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index e39ebe0b6958..34171d9008ff 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -2274,11 +2274,11 @@ static int __init vmx_init(void) | |||
2274 | iova = kmap(vmx_io_bitmap_a); | 2274 | iova = kmap(vmx_io_bitmap_a); |
2275 | memset(iova, 0xff, PAGE_SIZE); | 2275 | memset(iova, 0xff, PAGE_SIZE); |
2276 | clear_bit(0x80, iova); | 2276 | clear_bit(0x80, iova); |
2277 | kunmap(iova); | 2277 | kunmap(vmx_io_bitmap_a); |
2278 | 2278 | ||
2279 | iova = kmap(vmx_io_bitmap_b); | 2279 | iova = kmap(vmx_io_bitmap_b); |
2280 | memset(iova, 0xff, PAGE_SIZE); | 2280 | memset(iova, 0xff, PAGE_SIZE); |
2281 | kunmap(iova); | 2281 | kunmap(vmx_io_bitmap_b); |
2282 | 2282 | ||
2283 | r = kvm_init_arch(&vmx_arch_ops, THIS_MODULE); | 2283 | r = kvm_init_arch(&vmx_arch_ops, THIS_MODULE); |
2284 | if (r) | 2284 | if (r) |