All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@kernel.org>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
	gorcunov@gmail.com
Subject: Re: [PATCH] kvm tools: Fix IRQ mapping
Date: Thu, 11 Aug 2011 12:17:28 +0300	[thread overview]
Message-ID: <4E439E28.1040300@kernel.org> (raw)
In-Reply-To: <1313053448-13315-1-git-send-email-levinsasha928@gmail.com>

On 8/11/11 12:04 PM, Sasha Levin wrote:
> This thread fixes two issues:
>   - Slave IRQCHIP was mapped wrong, this caused all IRQs which belong
> to it to be ignored (breaking such things as the mouse).
>   - Line 2 was being mapped, since it's the link between slave and master
> IRQCHIPs it shouldn't be.
>
> Signed-off-by: Sasha Levin<levinsasha928@gmail.com>

Asias, does this fix the VNC mouse problem for you?

> ---
>   tools/kvm/irq.c |    7 ++++---
>   1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/kvm/irq.c b/tools/kvm/irq.c
> index 85e2238..e35bf18 100644
> --- a/tools/kvm/irq.c
> +++ b/tools/kvm/irq.c
> @@ -147,17 +147,18 @@ void irq__init(struct kvm *kvm)
>
>   	/* Hook first 8 GSIs to master IRQCHIP */
>   	for (i = 0; i<  8; i++)
> -		irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_MASTER, i);
> +		if (i != 2)
> +			irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_MASTER, i);
>
>   	/* Hook next 8 GSIs to slave IRQCHIP */
>   	for (i = 8; i<  16; i++)
> -		irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_SLAVE, 8-i);
> +		irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_SLAVE, i - 8);
>
>   	/* Last but not least, IOAPIC */
>   	for (i = 0; i<  24; i++) {
>   		if (i == 0)
>   			irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_IOAPIC, 2);
> -		else
> +		else if (i != 2)
>   			irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_IOAPIC, i);
>   	}
>


  parent reply	other threads:[~2011-08-11  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  9:04 [PATCH] kvm tools: Fix IRQ mapping Sasha Levin
2011-08-11  9:04 ` [PATCH] kvm tools: Use correct size for VESA memory bar Sasha Levin
2011-08-11  9:49   ` walimis
2011-08-11 11:55     ` Sasha Levin
2011-08-11  9:17 ` Pekka Enberg [this message]
2011-08-11 13:54   ` [PATCH] kvm tools: Fix IRQ mapping Asias He
2011-08-11 13:42     ` walimis

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=4E439E28.1040300@kernel.org \
    --to=penberg@kernel.org \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.