[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qubes-devel
Subject:    [qubes-devel] Re: [Xen-devel] pre Sandy bridge IOMMU support (gm45)
From:       Thierry Laurion <thierry.laurion () gmail ! com>
Date:       2016-06-26 23:47:49
Message-ID: CAAzJznxPkVyU0Nk6NRErW2kidPjJid5i_CKyQMRqvdGEkGt3EQ () mail ! gmail ! com
[Download RAW message or body]

Sorry for the precedent post that was written a bit too fast. Libreboot was
flashed when I wrote it, which is the equivalent of a having vt-d
deactivated (iommu=0). Thanks to a user that read this post and wrote to me
personally so I could do my mea culpa. Sorry for the precedent misleading
post.

Xen on a GM45 chipset and with IGD i915 driver is still getting the system
hanged when vt-d is activated. I'm willing to borrow a machine to the Xen
developer that could fix the iommu=no-igfx code for gm45 chipset to
actually work.

A ticket is opened here with current states of thing:
https://github.com/QubesOS/qubes-issues/issues/1594#issuecomment-209213917

Sorry about that.
Thierry

Le dim. 28 févr. 2016 à 14:08, Thierry Laurion <thierry.laurion@gmail.com>
a écrit :

> The problem wasn't with xen iommu support but kms/drm and i915 driver.
> 
> Passing to the kernel i915.preliminary_hw_support=1 fixes it all :)
> 
> Thanks
> 
> Le sam. 20 févr. 2016 à 22:44, Thierry Laurion <thierry.laurion@gmail.com>
> a écrit :
> 
> > Le mar. 26 janv. 2016 à 05:52, Jan Beulich <JBeulich@suse.com> a écrit :
> > 
> > > > > > On 25.01.16 at 22:49, <thierry.laurion@gmail.com> wrote:
> > > > The case is 1) disabling iommu for IGD, unilaterally since i915 + gm45
> > > > doesn't play well together. Iommu is still desired to isolate usb and
> > > > network devices, so we don't want to disable iommu completely. The side
> > > > effect of this would be to have IGD only for dom0, which would also
> > > > completely make sense in this use case.
> > > > 
> > > > The point is the iommu=no-igfx doesn't fix the issue, since remapping
> > > seems
> > > > to still happen for IGD. Does that make sense ?
> > > 
> > > It certainly may make sense, just that in what you have written so
> > > far I don't think I've been able to spot any evidence thereof. Since,
> > > as you say, nothing interesting gets logged by Xen, you must be
> > > drawing this conclusion from something (or else you wouldn't say
> > > "doesn't fix the issue").
> > > 
> > > Jan
> > > 
> > > 
> > Here is some interesting lines showing Xen failing without iommu=no-igfx:
> > 
> > --- /home/john/Downloads/amtterm/x200_xen_debug-normal-no_ts.txt
> > +++ /home/john/Downloads/amtterm/x200_xen_debug-iommu-no_igfx-no_ts.txt
> > @@ -339,23 +339,10 @@
> > (XEN) [VT-D]iommu.c:1465: d0:PCI: map 0000:00:1f.3
> > (XEN) [VT-D]iommu.c:1453: d0:PCIe: map 0000:03:00.0
> > (XEN) [VT-D]iommu.c:729: iommu_enable_translation: iommu->reg =
> > ffff82c000205000
> > -(XEN) [VT-D]iommu.c:729: iommu_enable_translation: iommu->reg =
> > ffff82c000203000
> > +(XEN) [VT-D]iommu.c:719: BIOS did not enable IGD for VT properly.
> > Disabling IGD VT-d engine.
> > (XEN) [VT-D]iommu.c:729: iommu_enable_translation: iommu->reg =
> > ffff82c000201000
> > (XEN) [VT-D]iommu.c:729: iommu_enable_translation: iommu->reg =
> > ffff82c000207000
> > (XEN) Scrubbing Free RAM on 1 nodes using 2 CPUs
> > -(XEN) [VT-D]iommu.c:873: iommu_fault_status: Fault Overflow
> > -(XEN) [VT-D]iommu.c:875: iommu_fault_status: Primary Pending Fault
> > -(XEN) [VT-D]DMAR:[DMA Write] Request device [0000:00:02.0] fault addr
> > ffffff000, iommu reg = ffff82c000203000
> > -(XEN) [VT-D]DMAR: reason 05 - PTE Write access is not set
> > -(XEN) print_vtd_entries: iommu ffff8301363fa7d0 dev 0000:00:02.0 gmfn
> > ffffff
> > -(XEN) root_entry = ffff8301363f4000
> > -(XEN) root_entry[0] = 80fa001
> > -(XEN) context = ffff8300080fa000
> > -(XEN) context[10] = 1_8ae0001
> > -(XEN) l3 = ffff830008ae0000
> > -(XEN) l3_index = 3f
> > -(XEN) l3[3f] = 0
> > -(XEN) l3[3f] not present
> > (XEN) ....................done.
> > (XEN) Initial low memory virq threshold set at 0x4000 pages.
> > (XEN) Std. Loglevel: All
> > 
> > I restate my comprehension.
> > iommu=no-igfx needs to be passed to hypervisor for it to boot.
> > iommu=dom0-passthrough would also be needed for dom0 tobe able to unset
> > iommu usage for itself?
> > 
> > For Dom0 to have access to device, I also understand that
> > intel_iommu=igfx_off kernel option would need to be passed to i915 driver
> > of dom0?
> > 
> > Doing so still fails without error. Any hint?
> > Doing so by providing dom0-pass
> > 
> > 

-- 
You received this message because you are subscribed to the Google Groups \
"qubes-devel" group. To unsubscribe from this group and stop receiving emails from \
it, send an email to qubes-devel+unsubscribe@googlegroups.com. To post to this group, \
send email to qubes-devel@googlegroups.com. To view this discussion on the web visit \
https://groups.google.com/d/msgid/qubes-devel/CAAzJznxPkVyU0Nk6NRErW2kidPjJid5i_CKyQMRqvdGEkGt3EQ%40mail.gmail.com.
 For more options, visit https://groups.google.com/d/optout.


[Attachment #3 (text/html)]

<div dir="ltr"><div><div><div><div>Sorry for the precedent post that was written a \
bit too fast. Libreboot was flashed when I wrote it, which is the equivalent of a \
having vt-d deactivated (iommu=0). Thanks to a user that read this post and wrote to \
me personally so I could do my mea culpa. Sorry for the precedent misleading \
post.<br><br></div>Xen on a GM45 chipset and with IGD i915 driver is still getting \
the system hanged when vt-d is activated. I&#39;m willing to borrow a machine to the \
Xen developer that could fix the iommu=no-igfx code for gm45 chipset to actually \
work.<br><br></div>A ticket is opened here with current states of thing: <a \
href="https://github.com/QubesOS/qubes-issues/issues/1594#issuecomment-209213917">http \
s://github.com/QubesOS/qubes-issues/issues/1594#issuecomment-209213917</a><br><br></div>Sorry \
about that.<br></div>Thierry<br></div><br><div class="gmail_quote"><div dir="ltr">Le  \
dim. 28 févr. 2016 à  14:08, Thierry Laurion &lt;<a \
href="mailto:thierry.laurion@gmail.com">thierry.laurion@gmail.com</a>&gt; a écrit  \
:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr">The problem wasn&#39;t with xen iommu \
support but kms/drm and i915 driver.<br><br>Passing to the kernel \
i915.preliminary_hw_support=1 fixes it all :)<br><br>Thanks <br></div><div \
dir="ltr"><br><div class="gmail_quote"><div dir="ltr">Le  sam. 20 févr. 2016 à  \
22:44, Thierry Laurion &lt;<a href="mailto:thierry.laurion@gmail.com" \
target="_blank">thierry.laurion@gmail.com</a>&gt; a écrit  :<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Le  mar. 26 janv. 2016 Ã   05:52, Jan Beulich \
&lt;<a href="mailto:JBeulich@suse.com" target="_blank">JBeulich@suse.com</a>&gt; a \
écrit  :<br><div dir="ltr"><div><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">&gt;&gt;&gt; On 25.01.16 at 22:49, &lt;<a \
href="mailto:thierry.laurion@gmail.com" \
target="_blank">thierry.laurion@gmail.com</a>&gt; wrote:<br> &gt; The case is 1) \
disabling iommu for IGD, unilaterally since i915 + gm45<br> &gt; doesn&#39;t play \
well together. Iommu is still desired to isolate usb and<br> &gt; network devices, so \
we don&#39;t want to disable iommu completely. The side<br> &gt; effect of this would \
be to have IGD only for dom0, which would also<br> &gt; completely make sense in this \
use case.<br> &gt;<br>
&gt; The point is the iommu=no-igfx doesn&#39;t fix the issue, since remapping \
seems<br> &gt; to still happen for IGD. Does that make sense ?<br>
<br>
It certainly may make sense, just that in what you have written so<br>
far I don&#39;t think I&#39;ve been able to spot any evidence thereof. Since,<br>
as you say, nothing interesting gets logged by Xen, you must be<br>
drawing this conclusion from something (or else you wouldn&#39;t say<br>
&quot;doesn&#39;t fix the issue&quot;).<br>
<br>
Jan<br>
<br></blockquote><div><br></div></div></div></div></div><div dir="ltr"><div \
dir="ltr"><div><div class="gmail_quote"><div>Here is some interesting lines showing \
Xen failing without iommu=no-igfx:<br><br>--- \
/home/john/Downloads/amtterm/x200_xen_debug-normal-no_ts.txt <br>+++ \
/home/john/Downloads/amtterm/x200_xen_debug-iommu-no_igfx-no_ts.txt<br>@@ -339,23 \
+339,10 @@  <br>(XEN)  [VT-D]iommu.c:1465: d0:PCI: map 0000:00:1f.3
 <br>(XEN)  [VT-D]iommu.c:1453: d0:PCIe: map 0000:03:00.0
 <br>(XEN)  [VT-D]iommu.c:729: iommu_enable_translation: iommu-&gt;reg = \
ffff82c000205000 <br>-(XEN)  [VT-D]iommu.c:729: iommu_enable_translation: \
iommu-&gt;reg = ffff82c000203000 <br>+(XEN)  [VT-D]iommu.c:719: BIOS did not enable \
IGD for VT properly.  Disabling IGD VT-d engine. <br> (XEN)  [VT-D]iommu.c:729: \
iommu_enable_translation: iommu-&gt;reg = ffff82c000201000  <br>(XEN)  \
[VT-D]iommu.c:729: iommu_enable_translation: iommu-&gt;reg = ffff82c000207000  \
<br>(XEN)  Scrubbing Free RAM on 1 nodes using 2 CPUs <br>-(XEN)  [VT-D]iommu.c:873: \
iommu_fault_status: Fault Overflow <br>-(XEN)  [VT-D]iommu.c:875: iommu_fault_status: \
Primary Pending Fault <br>-(XEN)  [VT-D]DMAR:[DMA Write] Request device \
[0000:00:02.0] fault addr ffffff000, iommu reg = ffff82c000203000 <br>-(XEN)  \
[VT-D]DMAR: reason 05 - PTE Write access is not set <br>-(XEN)  print_vtd_entries: \
iommu ffff8301363fa7d0 dev 0000:00:02.0 gmfn ffffff <br>-(XEN)      root_entry = \
ffff8301363f4000 <br>-(XEN)      root_entry[0] = 80fa001
<br>-(XEN)      context = ffff8300080fa000
<br>-(XEN)      context[10] = 1_8ae0001
<br>-(XEN)      l3 = ffff830008ae0000
<br>-(XEN)      l3_index = 3f
<br>-(XEN)      l3[3f] = 0
<br>-(XEN)      l3[3f] not present
 <br>(XEN)  ....................done.
 <br>(XEN)  Initial low memory virq threshold set at 0x4000 pages.
 <br>(XEN)  Std. Loglevel: All<br><br></div><div>I restate my \
comprehension.<br></div><div>iommu=no-igfx needs to be passed to hypervisor for it to \
boot. <br></div><div>iommu=dom0-passthrough would also be needed for dom0 tobe able \
to unset iommu usage for itself?<code><br></code></div><div><br>For Dom0 to have \
access to device, I also understand that intel_iommu=igfx_off kernel option would \
need to be passed to i915 driver of dom0?<br><br></div><div>Doing so still fails \
without error. Any hint?<br></div><div>Doing so by providing \
dom0-pass<br></div><div><br></div></div></div></div></div></blockquote></div></div></blockquote></div>


<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups \
&quot;qubes-devel&quot; group.<br /> To unsubscribe from this group and stop \
receiving emails from it, send an email to <a \
href="mailto:qubes-devel+unsubscribe@googlegroups.com">qubes-devel+unsubscribe@googlegroups.com</a>.<br \
/> To post to this group, send email to <a \
href="mailto:qubes-devel@googlegroups.com">qubes-devel@googlegroups.com</a>.<br /> To \
view this discussion on the web visit <a \
href="https://groups.google.com/d/msgid/qubes-devel/CAAzJznxPkVyU0Nk6NRErW2kidPjJid5i_ \
CKyQMRqvdGEkGt3EQ%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups. \
google.com/d/msgid/qubes-devel/CAAzJznxPkVyU0Nk6NRErW2kidPjJid5i_CKyQMRqvdGEkGt3EQ%40mail.gmail.com</a>.<br \
/> For more options, visit <a \
href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br \
/>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic