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

Re: [Xen-devel] [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms



>>> On 09.03.17 at 16:24, <daniel.kiper@xxxxxxxxxx> wrote:
> Though it looks that I found a bug in Xen IOMMU code. If I run Xen from master
> in QEMU then QEMU complains and crashes:
> 
>   qemu-system-x86_64: /srv/dev/qemu/qemu_20170308/hw/i386/intel_iommu.c:1786: 
> vtd_mem_write: Assertion `size == 4' failed.
>   Aborted (core dumped)
> 
> So, I took a look at dma_msi_set_affinity() and found this:
> 
>   dmar_writeq(iommu->reg, DMAR_FEADDR_REG, msg.address);
> 
> It looks bogus because DMAR_FEADDR_REG is defined in spec as 32-bit wide.
> So, applied this patch:
> 
> -    dmar_writeq(iommu->reg, DMAR_FEADDR_REG, msg.address);
> +    dmar_writel(iommu->reg, DMAR_FEADDR_REG, msg.address_lo);
> +    if (x2apic_enabled)
> +        dmar_writel(iommu->reg, DMAR_FEUADDR_REG, msg.address_hi);
> 
> Ant it looks that right now everything works.
> 
> If patch make sense I can post it with proper commit message.

Please see commit ae05fd3912 ("VT-d: use qword MMIO access for
MSI address writes") before you consider posting a patch.

Jan


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

 


Rackspace

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