KVM: x86: rename EMULATE_DO_MMIO
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 25 Jun 2013 16:24:41 +0000 (18:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 29 Jul 2013 07:01:14 +0000 (09:01 +0200)
The next patch will reuse it for other userspace exits than MMIO,
namely debug events.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c

index 531f47cbf1f826950ec8afa62fb98320ac63aabf..f5df0a84e51cbacd4cb4d056ddfa064a2be250db 100644 (file)
@@ -803,8 +803,8 @@ extern u32  kvm_min_guest_tsc_khz;
 extern u32  kvm_max_guest_tsc_khz;
 
 enum emulation_result {
-       EMULATE_DONE,       /* no further processing */
-       EMULATE_DO_MMIO,      /* kvm_run filled with mmio request */
+       EMULATE_DONE,         /* no further processing */
+       EMULATE_USER_EXIT,    /* kvm_run ready for userspace exit */
        EMULATE_FAIL,         /* can't emulate this instruction */
 };
 
index 3a9493ad1066d44adeeedb700bd3db5fe0a23336..2c1bb95bb93cfd76ae9d2acff6abe6197110c9c2 100644 (file)
@@ -4182,7 +4182,7 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u32 error_code,
        switch (er) {
        case EMULATE_DONE:
                return 1;
-       case EMULATE_DO_MMIO:
+       case EMULATE_USER_EXIT:
                ++vcpu->stat.mmio_exits;
                /* fall through */
        case EMULATE_FAIL:
index e999dc7662d8359a744918ec17ee2d4328b99e57..45fd70cef88ea73834323d5c76d46e7a59bc7582 100644 (file)
@@ -5452,7 +5452,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
 
                err = emulate_instruction(vcpu, EMULTYPE_NO_REEXECUTE);
 
-               if (err == EMULATE_DO_MMIO) {
+               if (err == EMULATE_USER_EXIT) {
                        ret = 0;
                        goto out;
                }
index d2caeb9e592fc03b43789314bf74deaee78ce0ff..8589cc02789ecffb9624185a9f6b583d6e25f023 100644 (file)
@@ -5038,11 +5038,11 @@ restart:
                        writeback = false;
                        vcpu->arch.complete_userspace_io = complete_emulated_pio;
                }
-               r = EMULATE_DO_MMIO;
+               r = EMULATE_USER_EXIT;
        } else if (vcpu->mmio_needed) {
                if (!vcpu->mmio_is_write)
                        writeback = false;
-               r = EMULATE_DO_MMIO;
+               r = EMULATE_USER_EXIT;
                vcpu->arch.complete_userspace_io = complete_emulated_mmio;
        } else if (r == EMULATION_RESTART)
                goto restart;