From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
Sander Eikelenboom <linux@eikelenboom.it>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Tim Deegan <tim@xen.org>
Subject: Re: Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble
Date: Fri, 17 Apr 2015 16:46:56 +0100 [thread overview]
Message-ID: <55312AF0.1030405@citrix.com> (raw)
In-Reply-To: <553140EF0200007800073577@mail.emea.novell.com>
On 17/04/15 16:20, Jan Beulich wrote:
>>>> On 17.04.15 at 17:11, <linux@eikelenboom.it> wrote:
>> Friday, April 17, 2015, 1:43:32 PM, you wrote:
>>> --- unstable.orig/xen/drivers/passthrough/amd/iommu_intr.c
>>> +++ unstable/xen/drivers/passthrough/amd/iommu_intr.c
>>> @@ -365,15 +365,17 @@ unsigned int amd_iommu_read_ioapic_from_
>>> unsigned int apic, unsigned int reg)
>>> {
>>> unsigned int val = __io_apic_read(apic, reg);
>>> + unsigned int pin = (reg - 0x10) / 2;
>>> + unsigned int offset = ioapic_sbdf[IO_APIC_ID(apic)].pin_2_idx[pin];
>>>
>>> - if ( !(reg & 1) )
>>> + if ( !(reg & 1) && offset < INTREMAP_ENTRIES )
>>> {
>>> - unsigned int offset = val & (INTREMAP_ENTRIES - 1);
>>> u16 bdf = ioapic_sbdf[IO_APIC_ID(apic)].bdf;
>>> u16 seg = ioapic_sbdf[IO_APIC_ID(apic)].seg;
>>> u16 req_id = get_intremap_requestor_id(seg, bdf);
>>> const u32 *entry = get_intremap_entry(seg, req_id, offset);
>>>
>>> + ASSERT(offset == (val & (INTREMAP_ENTRIES - 1)));
>>> val &= ~(INTREMAP_ENTRIES - 1);
>>> val |= get_field_from_reg_u32(*entry,
>>> INT_REMAP_ENTRY_INTTYPE_MASK,
>>
>> Hmmm can this patch or tim's patch make andrew's patch ineffective ?
> I can't see how either would.
Tim indicated that he thought my patch might be racy, so I might not be
surprised if a problem still exists.
~Andrew
next prev parent reply other threads:[~2015-04-17 15:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 15:34 Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble Sander Eikelenboom
2015-03-28 17:30 ` Andrew Cooper
2015-03-28 20:10 ` Sander Eikelenboom
2015-03-30 11:04 ` Andrew Cooper
2015-03-30 13:26 ` Sander Eikelenboom
2015-04-01 14:43 ` Andrew Cooper
2015-04-01 14:47 ` Sander Eikelenboom
2015-04-14 12:46 ` Sander Eikelenboom
2015-04-15 14:15 ` Jan Beulich
2015-04-17 11:43 ` Jan Beulich
2015-04-17 14:13 ` Sander Eikelenboom
2015-04-17 15:11 ` Sander Eikelenboom
2015-04-17 15:20 ` Jan Beulich
2015-04-17 15:46 ` Andrew Cooper [this message]
2015-04-17 15:53 ` Sander Eikelenboom
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=55312AF0.1030405@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=linux@eikelenboom.it \
--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.