Fix handle_pio so internal PIO handlers can return X86EMUL_RETRY and
it is properly handled by not advancing the IP.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
break;
case X86EMUL_RETRY:
- /* We should not advance RIP/EIP if the domain is shutting down */
- if ( curr->domain->is_shutting_down )
+ /*
+ * We should not advance RIP/EIP if the domain is shutting down or
+ * if X86EMUL_RETRY has been returned by an internal handler.
+ */
+ if ( curr->domain->is_shutting_down || !hvm_io_pending(curr) )
return false;
break;