Emulate instructions in vm86 mode
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Keir Fraser <[email protected]> 09/07/06 2:42 PM >>>
Quoted 8 lines · Bastian Blank
This patch fixes the emulation of instructions in vm86 mode. It fetches them using cs and eip instead of only eip. This makes it at least possible to use the i945GM vesa bios from the running system.
I'm not sure if this is the correct fix or if we should call the gpf handler of the running system. At least the support in linux reports traps back to the userspace caller which is not possible if emulated in xen.
Quoted 4 lines
There are also data operands of some instructions that may need fixing (INS/OUTS). What happens if you just bail to the guest's GPF handler if in vm86 mode? I think the libint10 library in userspace will emulate all these instructions itself.
If the vm86 code isn't running with an i/o bitmap permitting access (which supposedly libint10 doesn't do), all i/o related faults should alread be reflected back to the guest, shouldn't they? If otoh there was permission granted from the kernel, then we shouldn't assume that code is prepared to deal with gp faults from respective port accesses.
However, the original patch would, if to be integrated, in my opinion need quite a bit of additional work - it should honor non-zero segment bases generally, and it should do proper limit checking for non-flat segments.
Jan
Quoted 5 lines · Jan Beulich
If the vm86 code isn't running with an i/o bitmap permitting access (which supposedly libint10 doesn't do), all i/o related faults should alread be reflected back to the guest, shouldn't they? If otoh there was permission granted from the kernel, then we shouldn't assume that code is prepared to deal with gp faults from respective port accesses.
Yes, but it does weird things, so I think there is something broken.
Quoted 3 lines
However, the original patch would, if to be integrated, in my opinion need quite a bit of additional work - it should honor non-zero segment bases generally, and it should do proper limit checking for non-flat segments.
Isn't this already done by copy_from_user?
Bastian
Signature · 1 line
Ahead warp factor one, Mr. Sulu.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Bastian Blank <[email protected]> 08.09.06 21:33 >>>
Quoted 5 lines · Jan Beulich
If the vm86 code isn't running with an i/o bitmap permitting access (which supposedly libint10 doesn't do), all i/o related faults should alread be reflected back to the guest, shouldn't they? If otoh there was permission granted from the kernel, then we shouldn't assume that code is prepared to deal with gp faults from respective port accesses.
Yes, but it does weird things, so I think there is something broken.
It would probably be good to first exactly understand what exactly is happening...
Quoted 5 lines
Quoted 3 lines
However, the original patch would, if to be integrated, in my opinion need quite a bit of additional work - it should honor non-zero segment bases generally, and it should do proper limit checking for non-flat segments.
Isn't this already done by
copy_from_user?
How can it, if it isn't being passed a segment limit (and generally, shouldn't)?
Jan