From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: translate pirq to irq Date: Sun, 12 Jan 2014 18:29:38 +0000 Message-ID: <52D2DF12.5050801@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Igor Kozhukhov , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 11/01/2014 22:59, Igor Kozhukhov wrote: > Hello All, > > I see a comment in physdev.h for 'struct physdev_map_pirq', var 'pirq': > /* IN - high 16 bits hold segment for MAP_PIRQ_TYPE_MSI_SEG */ > > i have received 'pirq' from hypervisor > 255. > > map_irq.domid = DOMID_SELF; > map_irq.type = MAP_PIRQ_TYPE_MSI; > map_irq.index = -1; /* hypervisor auto allocates vector */ > map_irq.pirq = -1; > map_irq.bus = busnum; > map_irq.devfn = devfn; > map_irq.entry_nr = i; > map_irq.table_base = 0; > rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq); > irqno = map_irq.pirq; > > i have: > irqno = 279 - it is more APIC_MAX_VECTOR(255) > > i have a question: how to correct translate pirq to irq for APIC map table ? > > all work well on xen-3.4, but it has another realization in function physdev_map_pirq() then for xen-4.2. Is this for a PV or HVM guest? I suspect PV, in which case the irqno handed back will be the event channel on which the notification will arrive, and has nothing to do with regular IDT vectors. ~Andrew