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

Re: Event delivery and "domain blocking" on PVHv2



On 2020-06-19 13:21, Andrew Cooper wrote:
On 19/06/2020 11:28, Martin Lucina wrote:
RIP 0x209997 is the 'hlt' instruction in
mirage_xen_evtchn_block_domain() so we are indeed blocking waiting for
events to show up.

I can't find this in the code, but it might be an x86-ism you're falling
over here.

Solo5 only contains the lowest-level bits, and only then those parts that "fit" the responsibility of that layer. The rest is here (WIP, not cleaned
up yet):

https://github.com/mato/mirage-xen/tree/xen-pvh-via-solo5

The event channel code, including the function that blocks the domain,
is in lib/bindings/evtchn_stubs.c.


Its not safe to use hlt with interrupts enabled, unless it is exactly
`sti; hlt` where the STI instruction transitions the interrupt flag from
clear to set (i.e. you had interrupts disabled beforehand).

Otherwise you can take the interrupt intended to wake you on the before
the hlt is executed.

Hmm, so what is the right thing to do when blocking on PVHv2 in this
scenario? Just use SCHEDOP_block? "cli; sti; hlt"? (Tried the latter,
doesn't help).

Martin



 


Rackspace

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