[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] possible I/O emulation state machine issue



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 26 March 2018 09:43
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; xen-devel <xen-
> devel@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: possible I/O emulation state machine issue
> 
> >>> On 23.03.18 at 14:41, <Paul.Durrant@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.