xen-devel
Re: [Xen-devel] [PATCH 7/7] xen: Enable event channel of PV extension of
To: |
Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> |
Subject: |
Re: [Xen-devel] [PATCH 7/7] xen: Enable event channel of PV extension of HVM |
From: |
Sheng Yang <sheng@xxxxxxxxxxxxxxx> |
Date: |
Tue, 9 Mar 2010 09:53:16 +0800 |
Cc: |
xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx> |
Delivery-date: |
Mon, 08 Mar 2010 17:52:41 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<alpine.DEB.2.00.1003081701160.16237@kaball-desktop> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
Organization: |
Intel Opensource Technology Center |
References: |
<1268032732-8025-1-git-send-email-sheng@xxxxxxxxxxxxxxx> <1268032732-8025-8-git-send-email-sheng@xxxxxxxxxxxxxxx> <alpine.DEB.2.00.1003081701160.16237@kaball-desktop> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
KMail/1.12.2 (Linux/2.6.31-19-generic; KDE/4.3.2; x86_64; ; ) |
On Tuesday 09 March 2010 01:10:56 Stefano Stabellini wrote:
> I think that mapping interrupts into VIRQs is a bad idea: you should map
> interrupts into pirqs instead, the code exists already on the kernel
> side so we don't need to do any (ugly) change ther.
The code existed in the pv_ops dom0 side, but not in the upstream Linux. The
latter is our target. We want this work to be accepted by upstream Linux soon.
Thanks.
--
regards
Yang, Sheng
> Look at xen_setup_pirqs() to get an idea about how it works, in my patch
> series enabling pirq\interrupt mappings is basically a one line change.
> Besides pirqs and interrupts can coexist without problems and even make
> pv on hvm work out of the box.
>
> Even though you don't seem interested, I am still open on collaborating
> with you to complete this patch series.
>
> On Mon, 8 Mar 2010, Sheng Yang wrote:
> > @@ -944,3 +958,51 @@ void __init xen_init_IRQ(void)
> >
> > irq_ctx_init(smp_processor_id());
> > }
> > +
> > +void __init xen_hvm_pv_evtchn_init_IRQ(void)
> > +{
> > + int i;
> > +
> > + xen_init_IRQ();
> > + for (i = 0; i < NR_IRQS_LEGACY; i++) {
> > + struct evtchn_bind_virq bind_virq;
> > + struct irq_desc *desc = irq_to_desc(i);
> > + int virq, evtchn;
> > +
> > + virq = i + VIRQ_EMUL_PIN_START;
> > + bind_virq.virq = virq;
> > + bind_virq.vcpu = 0;
> > +
> > + if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
> > + &bind_virq) != 0)
> > + BUG();
> > +
> > + evtchn = bind_virq.port;
> > + evtchn_to_irq[evtchn] = i;
> > + irq_info[i] = mk_virq_info(evtchn, virq);
> > +
> > + desc->status = IRQ_DISABLED;
> > + desc->action = NULL;
> > + desc->depth = 1;
> > +
> > + /*
> > + * 16 old-style INTA-cycle interrupts:
> > + */
> > + set_irq_chip_and_handler_name(i, &xen_dynamic_chip,
> > + handle_level_irq, "event");
> > + }
> > +
> > + /*
> > + * Cover the whole vector space, no vector can escape
> > + * us. (some of these will be overridden and become
> > + * 'special' SMP interrupts)
> > + */
> > + for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
> > + int vector = FIRST_EXTERNAL_VECTOR + i;
> > + if (vector != IA32_SYSCALL_VECTOR)
> > + set_intr_gate(vector, interrupt[i]);
> > + }
> > +
> > + /* generic IPI for platform specific use, now used for HVM evtchn
> > */ + alloc_intr_gate(X86_PLATFORM_IPI_VECTOR, x86_platform_ipi); +}
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|