KVM: add hypercall nr to kvm_run
authorJeff Dike <jdike@addtoit.com>
Mon, 16 Jul 2007 19:24:47 +0000 (15:24 -0400)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:20 +0000 (10:18 +0200)
Add the hypercall number to kvm_run and initialize it.  This changes the ABI,
but as this particular ABI was unusable before this no users are affected.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
include/linux/kvm.h

index 69d9ab4e7cb4bb203db63fb590dd69dcca9313e1..20947462f40185dc9aef08b6d48c89e1776d74cf 100644 (file)
@@ -1378,6 +1378,7 @@ int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run)
        }
        switch (nr) {
        default:
+               run->hypercall.nr = nr;
                run->hypercall.args[0] = a0;
                run->hypercall.args[1] = a1;
                run->hypercall.args[2] = a2;
index 8db01a91e1a77c5fe8531102a687433758d82970..91a446f450b8e76ed5d46ff32cd67c95caec35f4 100644 (file)
@@ -99,6 +99,7 @@ struct kvm_run {
                } mmio;
                /* KVM_EXIT_HYPERCALL */
                struct {
+                       __u64 nr;
                        __u64 args[6];
                        __u64 ret;
                        __u32 longmode;