diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-02-21 08:00:47 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-04-25 05:38:08 -0400 |
commit | 112592da0dc2460c95e8a89d0c5657c6a30286aa (patch) | |
tree | 9d5333412d49a452500b34601c5b097d544a718a /arch/x86/kvm/x86.c | |
parent | 032c3407310c7612db55ab7e1335a21dc2b4690d (diff) |
KVM: drop unneeded kvm_run check in emulate_instruction()
vcpu->run is initialized on vcpu creation and can never be NULL
here.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 274a8e39bca..1d27a57026a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3443,7 +3443,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, | |||
3443 | if (vcpu->arch.pio.string) | 3443 | if (vcpu->arch.pio.string) |
3444 | return EMULATE_DO_MMIO; | 3444 | return EMULATE_DO_MMIO; |
3445 | 3445 | ||
3446 | if ((r || vcpu->mmio_is_write) && run) { | 3446 | if (r || vcpu->mmio_is_write) { |
3447 | run->exit_reason = KVM_EXIT_MMIO; | 3447 | run->exit_reason = KVM_EXIT_MMIO; |
3448 | run->mmio.phys_addr = vcpu->mmio_phys_addr; | 3448 | run->mmio.phys_addr = vcpu->mmio_phys_addr; |
3449 | memcpy(run->mmio.data, vcpu->mmio_data, 8); | 3449 | memcpy(run->mmio.data, vcpu->mmio_data, 8); |