Subject: [PATCH][SVM] Allow direct guest access to PC debug port From: Anthony Liguori The PC debug port is used for IO delay and does not require emulation. Signed-off-by: Anthony Liguori Index: kernel/drivers/kvm/svm.c =================================================================== --- kernel.orig/drivers/kvm/svm.c 2007-04-29 10:57:27.219080792 -0500 +++ kernel/drivers/kvm/svm.c 2007-04-29 10:58:37.481399296 -0500 @@ -377,7 +377,7 @@ int cpu; struct page *iopm_pages; struct page *msrpm_pages; - void *msrpm_va; + void *iopm_va, *msrpm_va; int r; kvm_emulator_want_group7_invlpg(); @@ -386,8 +386,10 @@ if (!iopm_pages) return -ENOMEM; - memset(page_address(iopm_pages), 0xff, - PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); + + iopm_va = page_address(iopm_pages); + memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); + clear_bit(0x80, iopm_va); /* allow direct access to PC debug port */ iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT;