diff options
author | Izik Eidus <izike@qumranet.com> | 2007-10-24 18:29:55 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:56 -0500 |
commit | cbc9402297b9a233981f74587786364cda21c771 (patch) | |
tree | 35ba97693ffc506bb08f6bafa9e61a260bc8189f /drivers/kvm/svm.c | |
parent | e0d62c7f48605119a7f9fa632e77561c89928963 (diff) |
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.c | 7 |
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, | |||
1439 | control->intercept &= ~(1ULL << INTERCEPT_VINTR); | 1439 | control->intercept &= ~(1ULL << INTERCEPT_VINTR); |
1440 | } | 1440 | } |
1441 | 1441 | ||
1442 | static int svm_set_tss_addr(struct kvm *kvm, unsigned int addr) | ||
1443 | { | ||
1444 | return 0; | ||
1445 | } | ||
1446 | |||
1442 | static void save_db_regs(unsigned long *db_regs) | 1447 | static void save_db_regs(unsigned long *db_regs) |
1443 | { | 1448 | { |
1444 | asm volatile ("mov %%dr0, %0" : "=r"(db_regs[0])); | 1449 | asm volatile ("mov %%dr0, %0" : "=r"(db_regs[0])); |
@@ -1744,6 +1749,8 @@ static struct kvm_x86_ops svm_x86_ops = { | |||
1744 | .set_irq = svm_set_irq, | 1749 | .set_irq = svm_set_irq, |
1745 | .inject_pending_irq = svm_intr_assist, | 1750 | .inject_pending_irq = svm_intr_assist, |
1746 | .inject_pending_vectors = do_interrupt_requests, | 1751 | .inject_pending_vectors = do_interrupt_requests, |
1752 | |||
1753 | .set_tss_addr = svm_set_tss_addr, | ||
1747 | }; | 1754 | }; |
1748 | 1755 | ||
1749 | static int __init svm_init(void) | 1756 | static int __init svm_init(void) |