All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: Doug Goldstein <cardoe@cardoe.com>
Cc: Juergen Gross <JGross@suse.com>,
	sstabellini@kernel.org, andrew.cooper3@citrix.com,
	pgnet.dev@gmail.com, ning.sun@intel.com, julien.grall@arm.com,
	Jan Beulich <JBeulich@suse.com>,
	xen-devel@lists.xenproject.org, qiaowei.ren@intel.com,
	gang.wei@intel.com, fu.wei@linaro.org
Subject: Re: [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms
Date: Thu, 9 Mar 2017 16:24:23 +0100	[thread overview]
Message-ID: <20170309152423.GC4378@olila.local.net-space.pl> (raw)
In-Reply-To: <20170306233904.GI29281@olila.local.net-space.pl>

On Tue, Mar 07, 2017 at 12:39:04AM +0100, Daniel Kiper wrote:
> On Wed, Feb 22, 2017 at 09:04:17AM -0800, Doug Goldstein wrote:
>
> [...]
>
> > I'm currently at ELC and then on vacation so I don't have access to any
> > of the machines currently myself. However the machine I most use to test
> > is a NUC5i5MYHE and a NUC5i3MYHE if you want to ask around if someone
> > has one internally. But that's why I gave QEMU as an example.
> >
> > I was using qemu master from a few weeks ago. I'll have to find the
> > revision for you. But the command line I use is:
> >
> > -enable-kvm -M pc-q35-2.8 -device intel-iommu -cpu host -m 2048 -smp 2
> > -drive if=pflash,format=raw,file=/tmp/tmp.EiR6ixmYzV -global
> > isa-debugcon.iobase=0x402 -debugcon file:/tmp/tmp.nuvEXUWfnA -monitor
> > stdio -chardev socket,host=127.0.0.1,port=25914,id=S0,server,nowait
> > -device isa-serial,chardev=S0 -device piix3-usb-uhci -device usb-tablet
> > -netdev id=net0,type=tap -device
> > virtio-net-pci,netdev=net0,mac=52:54:00:12:34:56 -boot order=n -device
> > qxl-vga -gdb tcp::14952
>
> Sadly, my colleagues and I are not able to reproduce the problem on any of
> machines available for us (available on the market and some development
> stuff in our labs). I did tests with QEMU (I am not able to run it with
> "-device intel-iommu" on my machine; I have to investigate this). Everything
> works. Joao did some tests on Intel NUC D34010WYK second generation.
> Everything works. So, Konrad ordered Intel NUC NUC5i3MYHE for me. I am
> waiting for delivery. Doug, could you tell me what distro, Xen, etc. you
> have installed on that NUC? I would like to test same config as yours on
> this machine.

Latest QEMU from git with intel-iommu device enabled works without any issue.
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.

Daniel

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

  parent reply	other threads:[~2017-03-09 15:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 19:19 [PATCH v16 0/9] x86: multiboot2 protocol support Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 1/9] x86: add " Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 2/9] efi: build xen.gz with EFI code Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 3/9] efi: create new early memory allocator Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 4/9] x86: add multiboot2 protocol support for EFI platforms Daniel Kiper
2017-02-21 19:24   ` Daniel Kiper
2017-02-22 13:42     ` Jan Beulich
2017-02-22 13:46       ` Doug Goldstein
2017-02-22 15:34       ` Daniel Kiper
2017-02-22 17:04         ` Doug Goldstein
2017-03-06 23:39           ` Daniel Kiper
2017-03-08  3:44             ` Konrad Rzeszutek Wilk
2017-03-08 14:17               ` Daniel Kiper
2017-03-08 16:46                 ` Konrad Rzeszutek Wilk
2017-03-09 20:02               ` Doug Goldstein
2017-03-09 22:20                 ` Konrad Rzeszutek Wilk
2017-03-15 11:35                 ` Daniel Kiper
2017-03-15 14:27                   ` Doug Goldstein
2017-03-15 14:38                     ` Daniel Kiper
2017-03-15 14:42                       ` Doug Goldstein
2017-03-15 15:02                         ` Daniel Kiper
2017-03-16 12:12                     ` Daniel Kiper
2017-03-16 13:12                       ` Jan Beulich
2017-03-16 13:35                         ` Daniel Kiper
2017-03-16 13:43                           ` Jan Beulich
2017-03-21 13:05                             ` Daniel Kiper
2017-03-21 13:48                               ` Jan Beulich
2017-03-09 15:24             ` Daniel Kiper [this message]
2017-03-09 15:41               ` Andrew Cooper
2017-03-09 15:45               ` Jan Beulich
2017-02-21 19:19 ` [PATCH v16 5/9] x86: change default load address from 1 MiB to 2 MiB Daniel Kiper
2017-03-01  9:05   ` Jan Beulich
2017-03-01 10:13     ` Daniel Kiper
2017-03-01 10:34       ` Jan Beulich
2017-03-01 10:51         ` Daniel Kiper
2017-03-01 11:21           ` Jan Beulich
2017-03-06 14:51             ` Daniel Kiper
2017-03-06 14:59               ` Jan Beulich
2017-02-21 19:19 ` [PATCH v16 6/9] x86/setup: use XEN_IMG_OFFSET instead of Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 7/9] x86: make Xen early boot code relocatable Daniel Kiper
2017-04-07 11:23   ` Jan Beulich
2017-04-13 14:11     ` Daniel Kiper
2017-04-13 19:43       ` Doug Goldstein
2017-04-14 10:46         ` Daniel Kiper
2017-04-14  1:44       ` Konrad Rzeszutek Wilk
2017-04-14 10:50         ` Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 8/9] x86/boot: rename sym_phys() to sym_offs() Daniel Kiper
2017-02-21 19:19 ` [PATCH v16 9/9] x86: add multiboot2 protocol support for relocatable images Daniel Kiper

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=20170309152423.GC4378@olila.local.net-space.pl \
    --to=daniel.kiper@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=julien.grall@arm.com \
    --cc=ning.sun@intel.com \
    --cc=pgnet.dev@gmail.com \
    --cc=qiaowei.ren@intel.com \
    --cc=sstabellini@kernel.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.