summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorIzik Eidus2007-10-25 00:29:55 +0200
committerAvi Kivity2008-01-30 16:52:56 +0100
commitcbc9402297b9a233981f74587786364cda21c771 (patch)
tree35ba97693ffc506bb08f6bafa9e61a260bc8189f /drivers/kvm/svm.c
parentKVM: Add kernel-internal memory slots (diff)
downloadkernel-qcow2-linux-cbc9402297b9a233981f74587786364cda21c771.tar.gz
kernel-qcow2-linux-cbc9402297b9a233981f74587786364cda21c771.tar.xz
kernel-qcow2-linux-cbc9402297b9a233981f74587786364cda21c771.zip
KVM: Add ioctl to tss address from userspace,
Currently kvm has a wart in that it requires three extra pages for use as a tss when emulating real mode on Intel. This patch moves the allocation internally, only requiring userspace to tell us where in the physical address space we can place the tss. Signed-off-by: Izik Eidus <izike@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 953c111544e1..beb1e684b68a 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1439,6 +1439,11 @@ static void do_interrupt_requests(struct kvm_vcpu *vcpu,
control->intercept &= ~(1ULL << INTERCEPT_VINTR);
}
+static int svm_set_tss_addr(struct kvm *kvm, unsigned int addr)
+{
+ return 0;
+}
+
static void save_db_regs(unsigned long *db_regs)
{
asm volatile ("mov %%dr0, %0" : "=r"(db_regs[0]));
@@ -1744,6 +1749,8 @@ static struct kvm_x86_ops svm_x86_ops = {
.set_irq = svm_set_irq,
.inject_pending_irq = svm_intr_assist,
.inject_pending_vectors = do_interrupt_requests,
+
+ .set_tss_addr = svm_set_tss_addr,
};
static int __init svm_init(void)