aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/svm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index fa17d6d4f0cb..6cd6a50a0340 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -378,7 +378,7 @@ static __init int svm_hardware_setup(void)
378 int cpu; 378 int cpu;
379 struct page *iopm_pages; 379 struct page *iopm_pages;
380 struct page *msrpm_pages; 380 struct page *msrpm_pages;
381 void *msrpm_va; 381 void *iopm_va, *msrpm_va;
382 int r; 382 int r;
383 383
384 kvm_emulator_want_group7_invlpg(); 384 kvm_emulator_want_group7_invlpg();
@@ -387,8 +387,10 @@ static __init int svm_hardware_setup(void)
387 387
388 if (!iopm_pages) 388 if (!iopm_pages)
389 return -ENOMEM; 389 return -ENOMEM;
390 memset(page_address(iopm_pages), 0xff, 390
391 PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); 391 iopm_va = page_address(iopm_pages);
392 memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER));
393 clear_bit(0x80, iopm_va); /* allow direct access to PC debug port */
392 iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT; 394 iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT;
393 395
394 396