[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Fwd: [v3 12/15] vmx: posted-interrupt handling when vCPU is blocked
On Tue, 2015-06-30 at 02:59 +0000, Wu, Feng wrote: > > Quoting the design document in patch 1: > > > > +Here is the scenario for the usage of the new global vector: > > + > > +1. vCPU0 is running on pCPU0 > > +2. vCPU0 is blocked and vCPU1 is currently running on pCPU0 > > +3. An external interrupt from an assigned device occurs for vCPU0, if we > > +still use 'posted_intr_vector' as the notification vector for vCPU0, the > > +notification event for vCPU0 (the event will go to pCPU1) will be consumed > > +by vCPU1 incorrectly (remember this is a special vector to CPU). The worst > > +case is that vCPU0 will never be woken up again since the wakeup event > > +for it is always consumed by other vCPUs incorrectly. So we need introduce > > +another global vector, naming 'pi_wakeup_vector' to wake up the blocked > > vCPU. > > + > > +After using 'pi_wakeup_vector' for vCPU0, VT-d engine will issue > > notification > > +event using this new vector. Since this new vector is not a SPECIAL one to > > CPU, > > +it is just a normal vector. To cpu, it just receives an normal external > > interrupt, > > +then we can get control in the handler of this new vector. In this case, > > hypervisor > > +can do something in it, such as wakeup the blocked vCPU. > > > > Let's assume that there are two vCPUs blocked, waiting for a (posted) > > interrupt, on pCPU0, and that they are vCPU2 and vCPU4, while vCPU12 is > > running there. > > > > AFAIU the code above, when an interrupt arrives on pCPU0, you scan the > > list, find both vCPU2 and vCPU4, which both have pi_desc.on set to true, > > and hence you kick (via the tasklet) both of them? > > Yes, that is the case. Do you have any questions about it? > The question is if that is how things should work as, by reading the design document, my understanding was that you wanted a certain interrupt to wake-up a specific vCPU. But perhaps I'm failing to understand what really happens, and how the 'special vector' vs. 'normal vector' thing work (due to lack of my lack of confidence in this area). Am I actually talking nonsense? Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |