All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: David Vrabel <david.vrabel@citrix.com>,
	Julien Grall <julien.grall@citrix.com>
Cc: Keir Fraser <keir@xen.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, TimDeegan <tim@xen.org>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>,
	SanderEikelenboom <linux@eikelenboom.it>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86/MSI: fix guest unmasking when handling IRQ via event channel
Date: Wed, 08 Jul 2015 11:58:00 +0100	[thread overview]
Message-ID: <559D1E58020000780008E1E6@mail.emea.novell.com> (raw)
In-Reply-To: <559CEFD5.6020906@citrix.com>

>>> On 08.07.15 at 11:39, <david.vrabel@citrix.com> wrote:
> On 08/07/15 09:56, Jan Beulich wrote:
>> Rather than assuming only PV guests need special treatment (and
>> dealing with that directly when an IRQ gets set up), keep all guest MSI
>> IRQs masked until either the (HVM) guest unmasks them via vMSI or the
>> (PV, PVHVM, or PVH) guest sets up an event channel for it.
>> 
>> To not further clutter the common evtchn_bind_pirq() with x86-specific
>> code, introduce an arch_evtchn_bind_pirq() hook instead.
> 
> Can you describe the symptoms of the bug being fixed here?

Interrupts simply didn't get unmasked for PVHVM Linux guests.

>> --- a/xen/include/asm-arm/irq.h
>> +++ b/xen/include/asm-arm/irq.h
>> @@ -47,6 +47,8 @@ int release_guest_irq(struct domain *d, 
>>  
>>  void arch_move_irqs(struct vcpu *v);
>>  
>> +#define arch_evtchn_bind_pirq(d, pirq) ((void)((d) + (pirq)))
> 
> Would this be better as a inline function?
> 
>> +
>>  /* Set IRQ type for an SPI */
>>  int irq_set_spi_type(unsigned int spi, unsigned int type);
>>  
>> --- a/xen/include/xen/irq.h
>> +++ b/xen/include/xen/irq.h
>> @@ -172,4 +172,8 @@ unsigned int set_desc_affinity(struct ir
>>  unsigned int arch_hwdom_irqs(domid_t);
>>  #endif
>>  
>> +#ifndef arch_evtchn_bind_pirq
>> +void arch_evtchn_bind_pirq(struct domain *, int pirq);
> 
> ... moving this into xen/include/asm-x86/irq.h

Oh, right, (also to Julien) - this is exactly the reason I do not want it
to be an inline function for ARM: I want the declaration here, not
replicated in every interested arch's header.

Jan

  reply	other threads:[~2015-07-08 10:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08  8:56 [PATCH] x86/MSI: fix guest unmasking when handling IRQ via event channel Jan Beulich
2015-07-08  9:03 ` Andrew Cooper
2015-07-08  9:07 ` Julien Grall
2015-07-08 10:55   ` Jan Beulich
2015-07-08 11:02     ` Julien Grall
2015-07-08  9:39 ` David Vrabel
2015-07-08 10:58   ` Jan Beulich [this message]
2015-07-08 11:14     ` David Vrabel
2015-07-08 12:33       ` Jan Beulich
2015-07-10 10:29 ` Ian Campbell

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=559D1E58020000780008E1E6@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=keir@xen.org \
    --cc=linux@eikelenboom.it \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.