Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-14 Thread Jan Kiszka
Avi Kivity wrote: Nakajima, Jun wrote: On 7/13/2008 8:31:44 AM, Avi Kivity wrote: Avi Kivity wrote: Well, xen and bochs do not push an error code for real mode #GP. I tried running the attached test program but it doesn't work on real hardware (it does work on bochs). Jun,

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-14 Thread Avi Kivity
Jan Kiszka wrote: As we execute real mode guests in VM86 mode, exception have to be reinjected appropriately when the guest triggered them. For this purpose the patch adopts the real-mode injection pattern used in vmx_inject_irq to vmx_queue_exception, additionally taking care that the IP is set

RE: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-14 Thread Nakajima, Jun
On 7/14/2008 3:04:17 AM, Avi Kivity wrote: Nakajima, Jun wrote: On 7/13/2008 8:31:44 AM, Avi Kivity wrote: Avi Kivity wrote: Well, xen and bochs do not push an error code for real mode #GP. I tried running the attached test program but it doesn't work on real hardware (it

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Avi Kivity
Jan Kiszka wrote: As we execute real mode guests in VM86 mode, exception have to be reinjected appropriately when the guest triggered them. For this purpose the patch adopts the real-mode injection pattern used in vmx_inject_irq to vmx_queue_exception, additionally taking care that the IP is set

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Jan Kiszka
Avi Kivity wrote: Jan Kiszka wrote: ... @@ -2234,6 +2252,24 @@ static int handle_rmode_exception(struct if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) err_code == 0) if (emulate_instruction(vcpu, NULL, 0, 0, 0) == EMULATE_DONE) return 1; +/* + * Forward

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Avi Kivity
Jan Kiszka wrote: Avi Kivity wrote: Jan Kiszka wrote: ... @@ -2234,6 +2252,24 @@ static int handle_rmode_exception(struct if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) err_code == 0) if (emulate_instruction(vcpu, NULL, 0, 0, 0) == EMULATE_DONE) return

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Avi Kivity
Avi Kivity wrote: Well, xen and bochs do not push an error code for real mode #GP. I tried running the attached test program but it doesn't work on real hardware (it does work on bochs). Jun, perhaps you can clarify? do #GP exceptions in real-mode push an error code? -- error

RE: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Nakajima, Jun
On 7/13/2008 8:31:44 AM, Avi Kivity wrote: Avi Kivity wrote: Well, xen and bochs do not push an error code for real mode #GP. I tried running the attached test program but it doesn't work on real hardware (it does work on bochs). Jun, perhaps you can clarify? do #GP exceptions in

Re: [PATCH 2/2] VMX: Reinject real mode exception

2008-07-13 Thread Mohammed Gamal
On Sun, Jul 13, 2008 at 9:47 PM, Nakajima, Jun [EMAIL PROTECTED] wrote: On 7/13/2008 8:31:44 AM, Avi Kivity wrote: Avi Kivity wrote: Well, xen and bochs do not push an error code for real mode #GP. I tried running the attached test program but it doesn't work on real hardware (it does