From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [Xenhackthon] Virtualized APIC registers - virtual interrupt delivery. Date: Fri, 24 May 2013 10:30:20 -0400 Message-ID: <20130524143020.GJ3900@phenom.dumpdata.com> References: <20130522162132.GA8859@phenom.dumpdata.com> <519DE63E02000078000D85C5@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <519DE63E02000078000D85C5@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: yang.z.zhang@intel.com, keir.xen@gmail.com, jun.nakajima@intel.com, xiantao.zhang@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, May 23, 2013 at 08:49:50AM +0100, Jan Beulich wrote: > >>> On 22.05.13 at 18:21, Konrad Rzeszutek Wilk wrote: > > Which means that if this is set to be higher than the hypervisor timer > > or IPI callback the guest can run unbounded. Also it would seem that > > this value has to be often reset when migrating a guest between the pCPUs. > > And it would appear that this value is static. Meaning the guest only > > sets these vectors once and the hypervisor is responsible for managing > > the priority of that guest and other guests (say dom0) on the CPU. > > > > For example, we have a guest with a 10gB NIC and the guest has decided > > to use vector 0x80 for it (assume a UP guest). Dom0 has an SAS controller > > and is using event number 30, 31, 32, and 33 (there are only 4 PCPUS). > > The hypervisor maps them to be 0x58, 0x68, 0x78 and 0x88 and spreads those > > vectors on each pCPU. The guest is running on pCPU1 and there are two > > vectors - 0x80 and 0x58. The one assigned to the guest wins and dom0 > > SAS controller is preempted. > > > > The solution for that seems to have some interaction with the > > guest when it allocates the vectors so that they are always below > > the dom0 priority vectors. Or hypervisor has to dynamically shuffle its > > own vectors to be higher priority. > > > > Or is there an guest vector <-> hypervisor vector lookup table that > > the CPU can use? So the hypervisor can say: the vector 0x80 in the > > guest actually maps to vector 0x48 in the hypervisor? > > It is my understanding that the vector spaces are separate, and > hence guest interrupts can't block host ones (like the timer). Iirc > there's some sort of flag bit in the IRTE to tell whether an interrupt > should get delivered directly to the guest, or to the hypervisor. Ah, so the VT-d interrupt remap table would help in setting the "Xen"s vectors. Got it. > > Jan > > Jan > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >