|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] do_iret bug in xen
yeah but the do_iret function is done on behalf of a guest, therefore do_iret function forces user cs and user ss
code excerpt " regs->rip = iret_saved.rip; regs->cs = iret_saved.cs | 3; /* force guest privilege */
regs->rflags = (iret_saved.rflags & ~(EF_IOPL|EF_VM)) | EF_IE; regs->rsp = iret_saved.rsp; regs->ss = iret_saved.ss | 3; /* force guest privilege */ " this can cause ret_from_intr go to test_all_events and finally go to __enter_scheduler
-a
On Nov 27, 2007 6:17 PM, Ian Campbell < Ian.Campbell@xxxxxxxxxx> wrote:
On Tue, 2007-11-27 at 17:41 -0500, Ashish Bijlani wrote: > "cpumask_raise_softirq(mask, SCHEDULE_SOFTIRQ)" sends an IPI to the > target processor, this can cause current to change.
No it can't.
The IPI causes smp_event_check_interrupt() to be called which just ACKs the IPI and returns via ret_from_intr (in entry.S). It is only if a guest was interrupted that we go down the test_all_events path which
processes softirqs. If it was Xen which was interrupted then we go to restore_all_xen which just returns to Xen. In this case Xen will eventually return to the guest and take the test_all_events path and process the softirq.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|