> -----Original Message----- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 26 March 2018 09:43 > To: Paul Durrant <paul.durr...@citrix.com> > Cc: Andrew Cooper <andrew.coop...@citrix.com>; xen-devel <xen- > de...@lists.xenproject.org> > Subject: Re: possible I/O emulation state machine issue > > >>> On 23.03.18 at 14:41, <paul.durr...@citrix.com> wrote: > > So somehow it appears the vcpu got back into guest and executed the next > > instruction whilst there was pending I/O. > > Two new pieces of information, in case either rings a bell: >
Alas neither rings a bell. > The issue appears to never occur in hap=0 mode. > That's quite an odd correlation. > After having added I/O emulation state checks at the beginning of > vmx_vmexit_handler() as well as very early and very late in > vmx_vmenter_helper(), it was the one early in > vmx_vmenter_helper() which triggered (still seeing the VGA port > access in STATE_IORESP_READY while vio->io_completion was > HVMIO_no_completion). > The same test is used (hvm_vcpu_io_need_completion()) in handle_pio() to set the completion handler and in hvm_io_assist() to set the state to IORESP_READY. The only place the internal state gets set to IORESP_READY is in hvm_io_assist() so the fact that you see a disparity between the state and the completion handler is very odd. Perhaps it might be worth adding an ASSERT into hvm_io_assist() to ensure there really is a completion handler in place before setting the internal state to IORESP_READY would be worthwhile. Paul > Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel