[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble



On 17/04/15 16:20, Jan Beulich wrote:
>>>> On 17.04.15 at 17:11, <linux@xxxxxxxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.