diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-10-07 08:07:06 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-10-07 08:07:06 +0100 |
commit | f20f3c8ece5c10fa7626f253d28f570a43b23208 (patch) | |
tree | 7b2cd782dc844947aadf9f04d9c1079c04e69a94 /xen/arch/x86/hvm/emulate.c | |
parent | af78c0b35d00dac353936ad6f8afc7f01f91c6d2 (diff) | |
download | xen-f20f3c8ece5c10fa7626f253d28f570a43b23208.tar.gz xen-f20f3c8ece5c10fa7626f253d28f570a43b23208.tar.bz2 xen-f20f3c8ece5c10fa7626f253d28f570a43b23208.zip |
x86 hvm: On failed hvm_send_assist_req(), io emulation state should be
reset to HVMIO_none, as no IO is in flight.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/emulate.c')
-rw-r--r-- | xen/arch/x86/hvm/emulate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index ac3f807c22..9168158e0b 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -163,8 +163,11 @@ static int hvmemul_do_io( curr->arch.hvm_vcpu.io_state = HVMIO_none; break; case X86EMUL_UNHANDLEABLE: - rc = (!hvm_send_assist_req(curr) || (p_data != NULL) - ? X86EMUL_RETRY : X86EMUL_OKAY); + rc = X86EMUL_RETRY; + if ( !hvm_send_assist_req(curr) ) + curr->arch.hvm_vcpu.io_state = HVMIO_none; + else if ( p_data == NULL ) + rc = X86EMUL_OKAY; break; default: BUG(); |