diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-25 12:24:41 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-29 03:01:14 -0400 |
commit | ac0a48c39af31fe27bdb1afca7b26f109ff1c704 (patch) | |
tree | 2c2d3cecadd5333b8ed8fa147b2e61ed2d5bced4 | |
parent | a343c9b7673e2228bc8a9ac65aae42140f6f9977 (diff) |
KVM: x86: rename EMULATE_DO_MMIO
The next patch will reuse it for other userspace exits than MMIO,
namely debug events.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 4 | ||||
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 531f47cbf1f8..f5df0a84e51c 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -803,8 +803,8 @@ extern u32 kvm_min_guest_tsc_khz; | |||
803 | extern u32 kvm_max_guest_tsc_khz; | 803 | extern u32 kvm_max_guest_tsc_khz; |
804 | 804 | ||
805 | enum emulation_result { | 805 | enum emulation_result { |
806 | EMULATE_DONE, /* no further processing */ | 806 | EMULATE_DONE, /* no further processing */ |
807 | EMULATE_DO_MMIO, /* kvm_run filled with mmio request */ | 807 | EMULATE_USER_EXIT, /* kvm_run ready for userspace exit */ |
808 | EMULATE_FAIL, /* can't emulate this instruction */ | 808 | EMULATE_FAIL, /* can't emulate this instruction */ |
809 | }; | 809 | }; |
810 | 810 | ||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3a9493ad1066..2c1bb95bb93c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -4182,7 +4182,7 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u32 error_code, | |||
4182 | switch (er) { | 4182 | switch (er) { |
4183 | case EMULATE_DONE: | 4183 | case EMULATE_DONE: |
4184 | return 1; | 4184 | return 1; |
4185 | case EMULATE_DO_MMIO: | 4185 | case EMULATE_USER_EXIT: |
4186 | ++vcpu->stat.mmio_exits; | 4186 | ++vcpu->stat.mmio_exits; |
4187 | /* fall through */ | 4187 | /* fall through */ |
4188 | case EMULATE_FAIL: | 4188 | case EMULATE_FAIL: |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e999dc7662d8..45fd70cef88e 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -5452,7 +5452,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) | |||
5452 | 5452 | ||
5453 | err = emulate_instruction(vcpu, EMULTYPE_NO_REEXECUTE); | 5453 | err = emulate_instruction(vcpu, EMULTYPE_NO_REEXECUTE); |
5454 | 5454 | ||
5455 | if (err == EMULATE_DO_MMIO) { | 5455 | if (err == EMULATE_USER_EXIT) { |
5456 | ret = 0; | 5456 | ret = 0; |
5457 | goto out; | 5457 | goto out; |
5458 | } | 5458 | } |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d2caeb9e592f..8589cc02789e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -5038,11 +5038,11 @@ restart: | |||
5038 | writeback = false; | 5038 | writeback = false; |
5039 | vcpu->arch.complete_userspace_io = complete_emulated_pio; | 5039 | vcpu->arch.complete_userspace_io = complete_emulated_pio; |
5040 | } | 5040 | } |
5041 | r = EMULATE_DO_MMIO; | 5041 | r = EMULATE_USER_EXIT; |
5042 | } else if (vcpu->mmio_needed) { | 5042 | } else if (vcpu->mmio_needed) { |
5043 | if (!vcpu->mmio_is_write) | 5043 | if (!vcpu->mmio_is_write) |
5044 | writeback = false; | 5044 | writeback = false; |
5045 | r = EMULATE_DO_MMIO; | 5045 | r = EMULATE_USER_EXIT; |
5046 | vcpu->arch.complete_userspace_io = complete_emulated_mmio; | 5046 | vcpu->arch.complete_userspace_io = complete_emulated_mmio; |
5047 | } else if (r == EMULATION_RESTART) | 5047 | } else if (r == EMULATION_RESTART) |
5048 | goto restart; | 5048 | goto restart; |