On 23/11/16 16:31, Tim Deegan wrote: > At 15:38 +0000 on 23 Nov (1479915532), Andrew Cooper wrote: >> Introduce a new x86_emul_pagefault() similar to x86_emul_hw_exception(), and >> use this instead of hvm_inject_page_fault() from emulation codepaths. >> >> Replace one hvm_inject_hw_exception() in the shadow emulation codepaths. >> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> >> NOTE: this is a functional change for the shadow code, as a #PF previously >> raised properly with the guest will now cause X86EMUL_UNHANDLABLE. It is my >> understanding after a discusion with Tim that this is ok, but I haven't done >> extenstive testing yet. > Do you plan to? I think this is indeed OK, but there may be some edge > case, e.g. an instruction that writes to both the current top-level > pagetable (which can't be unshadowed) and an unmapped virtual address. > That ought to raise #PF in the guest but might now spin retrying?
That is a devious corner case. I take it you have been there before? The more I think about these changes, the more I think that the shadow code would be better by selectively looking a pending event, injecting pagefaults, but rejecting and retrying if any other event shows up. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel