Laurent Vivier wrote: >>> >>> I agree but this increases the size of the structure shared with the >>> userspace with variable used only locally in x86_emulate.c, is it >>> acceptable ? >>> >> >> It isn't shared with userspace, just part of the vcpu. > > OK > >> Looking a bit more, eflags is already present in x86_emulate_ctxt (and > > OK, I think we can do the same thing with cr2 ? >
For the present, yes. For the future, cr2 should be killed off since it's wrong to depend on it: sometimes we emulate not in response to a page fault, so we don't have a cr2, and sometimes, when the access crosses a page boundary, cr2 may point at the second half of the access instead of the correct location. I already fixed most of the uses of cr2, but I think some remain (mov abs is one example). -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel