mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>,
	Keir Fraser <Keir.Fraser@eu.citrix.com>,
	Ingo Molnar <mingo@elte.hu>, Ian Pratt <Ian.Pratt@eu.citrix.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH 7/7] xen: Enable event channel of PV extension of HVM
Date: Mon, 8 Mar 2010 17:10:56 +0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1003081701160.16237@kaball-desktop> (raw)
In-Reply-To: <1268032732-8025-8-git-send-email-sheng@linux.intel.com>

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 there.
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);
> +}


  parent reply	other threads:[~2010-03-08 17:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08  7:18 [PATCH 0/7][v7] PV extension of HVM (Hybrid) for Xen Sheng Yang
2010-03-08  7:18 ` [PATCH 1/7] xen: add support for hvm_op Sheng Yang
2010-03-08  7:18 ` [PATCH 2/7] xen: Import cpuid.h from Xen Sheng Yang
2010-03-08  7:18 ` [PATCH 3/7] xen: Make pv drivers only work with xen_pv_domain() Sheng Yang
2010-03-08  7:18 ` [PATCH 4/7] xen/hvm: Xen PV extension of HVM initialization Sheng Yang
2010-03-08  7:18 ` [PATCH 5/7] x86/xen: The entrance for PV extension of HVM Sheng Yang
2010-03-08  7:18 ` [PATCH 6/7] xen: Enable PV clocksource for HVM Sheng Yang
2010-03-08  7:18 ` [PATCH 7/7] xen: Enable event channel of PV extension of HVM Sheng Yang
2010-03-08 17:00   ` [Xen-devel] " Stefano Stabellini
2010-03-09  1:23     ` Sheng Yang
2010-03-08 17:10   ` Stefano Stabellini [this message]
2010-03-09  1:53     ` Sheng Yang
2010-03-09  7:00       ` Jeremy Fitzhardinge
2010-03-09  9:48         ` Ian Campbell
2010-03-09 10:22           ` Stefano Stabellini
2010-03-09 19:26             ` Jeremy Fitzhardinge
2010-03-10  3:08               ` Konrad Rzeszutek Wilk
2010-03-10  2:56             ` Sheng Yang
2010-03-10 15:29               ` Stefano Stabellini
2010-03-11  1:34                 ` Sheng Yang
2010-03-11 11:43                   ` Stefano Stabellini
2010-03-12  1:23                     ` Sheng Yang
2010-03-12 10:47                       ` Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2010-03-05  6:07 [PATCH 0/7][v6] PV extension of HVM (Hybrid) for Xen Sheng Yang
2010-03-05  6:07 ` [PATCH 7/7] xen: Enable event channel of PV extension of HVM Sheng Yang
2010-03-08 22:16   ` [Xen-devel] " Jeremy Fitzhardinge
2010-03-09  5:55     ` Sheng Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1003081701160.16237@kaball-desktop \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sheng@linux.intel.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®