Re: proposal to add "virtual instruction exception" to the hypervisor extension
Paolo Bonzini wrote:
On 05/05/20 23:15, John Hauser wrote:I'm afraid this makes no sense to me. Ordinary user-mode applications- attempts to execute WFI, unless the instruction completes within anIt would be great to have this controlled by a bit in the hstatus CSR.
don't execute WFI. In U mode, WFI is useful only in connection
with support for user-level interrupts provided by the may-never-be-
standardized N extension.
And if a guest OS itself executes WFI, I find it hard to believe it
expects the WFI to trap as an illegal instruction, much less that it
has a performance-sensitive response coded in its illegal instruction
So I don't understand "delegate WFI to the guest". What's the scenario
where a guest OS expects WFI to trap?
The only thing I can think of is when the guest is a nested
hypervisor. But I'm not sure that specifically focusing on optimizing
WFI for a nested hypervisor is really on the agenda. Why not make many
other improvements in support of nested hypervisors, besides this one
thing? We intend eventually to propose a whole package of optional
added support for nested hypervisors. But outside of that add-on
extension, nested hypervisors aren't catered to beyond a bare-bones
level of support.
- John Hauser