aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-03-04 14:17:08 +0200
committerAvi Kivity <avi@qumranet.com>2007-05-03 10:52:24 +0300
commit8eb7d334bd8e693340ee198280f7d45035cdab8c (patch)
tree438ec0b6b6c7714e436884576a3fdce84507813f /drivers/kvm/kvm_main.c
parentKVM: Allow userspace to process hypercalls which have no kernel handler (diff)
downloadlinux-dev-8eb7d334bd8e693340ee198280f7d45035cdab8c.tar.xz
linux-dev-8eb7d334bd8e693340ee198280f7d45035cdab8c.zip
KVM: Fold kvm_run::exit_type into kvm_run::exit_reason
Currently, userspace is told about the nature of the last exit from the guest using two fields, exit_type and exit_reason, where exit_type has just two enumerations (and no need for more). So fold exit_type into exit_reason, reducing the complexity of determining what really happened. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index de93117f1e97..ac44df551aa8 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1608,8 +1608,7 @@ static int kvm_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
vcpu->mmio_needed = 0;
- if (kvm_run->exit_type == KVM_EXIT_TYPE_VM_EXIT
- && kvm_run->exit_reason == KVM_EXIT_HYPERCALL) {
+ if (kvm_run->exit_reason == KVM_EXIT_HYPERCALL) {
kvm_arch_ops->cache_regs(vcpu);
vcpu->regs[VCPU_REGS_RAX] = kvm_run->hypercall.ret;
kvm_arch_ops->decache_regs(vcpu);