]> bbs.cooldavid.org Git - net-next-2.6.git/commit - arch/x86/kvm/svm.c
KVM: Avoid guest virtual addresses in string pio userspace interface
authorAvi Kivity <avi@qumranet.com>
Tue, 20 Mar 2007 10:46:50 +0000 (12:46 +0200)
committerAvi Kivity <avi@qumranet.com>
Thu, 3 May 2007 07:52:25 +0000 (10:52 +0300)
commit039576c03c35e2f990ad9bb9c39e1bad3cd60d34
treefa6c81a40a36d2c0da1cf20c5deb45cb9bd7ba95
parentf0fe510864a4520a85dfa35ae14f5f376c56efc7
KVM: Avoid guest virtual addresses in string pio userspace interface

The current string pio interface communicates using guest virtual addresses,
relying on userspace to translate addresses and to check permissions.  This
interface cannot fully support guest smp, as the check needs to take into
account two pages at one in case an unaligned string transfer straddles a
page boundary.

Change the interface not to communicate guest addresses at all; instead use
a buffer page (mmaped by userspace) and do transfers there.  The kernel
manages the virtual to physical translation and can perform the checks
atomically by taking the appropriate locks.

Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c
drivers/kvm/mmu.c
drivers/kvm/svm.c
drivers/kvm/vmx.c
include/linux/kvm.h