All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: yang.z.zhang@intel.com, Kevin Tian <kevin.tian@intel.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [BUG] 'o' debug key panics the hypervisor
Date: Thu, 27 Aug 2015 13:02:05 +0100	[thread overview]
Message-ID: <55DEFC3D.8050902@citrix.com> (raw)
In-Reply-To: <55DEF491.3040405@citrix.com>

On 27/08/15 12:29, Roger Pau Monné wrote:
> Hello,
>
> When using Intel hardware without shared page tables between the IOMMU 
> and EPT (I have not tried if the same happens when sharing the page 
> tables), the following crash happens if I press the 'o' debug key with 
> a HVM guest running. The guest doesn't have any device passed-through.
>
> (XEN) domain1 IOMMU p2m table:
> (XEN) p2m table has 4 levels
> (XEN) Assertion 'pfn_to_pdx(ma >> PAGE_SHIFT) < (DIRECTMAP_SIZE >> PAGE_SHIFT)' failed at /root/src/xen/xen/include/asm/x86_64/page.h:80
> (XEN) ----[ Xen-4.6.0-rc  x86_64  debug=y  Tainted:    C ]----
> (XEN) CPU:    0
> (XEN) RIP:    e008:[<ffff82d080165f20>] map_domain_page+0x1ef/0x5e6
> (XEN) RFLAGS: 0000000000010216   CONTEXT: hypervisor

The use of paddr_to_pfn() in map_vtd_domain_page() is incorrect.

Does this fix the issue?

diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c
b/xen/drivers/passthrough/vtd/x86/vtd.c
index c0d6aab..35cfd89 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -40,7 +40,7 @@
 
 void *map_vtd_domain_page(u64 maddr)
 {
-    return map_domain_page(_mfn(paddr_to_pfn(maddr)));
+    return __map_domain_page(maddr_to_page(maddr));
 }
 
 void unmap_vtd_domain_page(void *va)


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

  reply	other threads:[~2015-08-27 12:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 11:29 [BUG] 'o' debug key panics the hypervisor Roger Pau Monné
2015-08-27 12:02 ` Andrew Cooper [this message]
2015-08-27 13:49   ` Roger Pau Monné
2015-08-27 14:01 ` Jan Beulich
2015-08-27 14:07   ` Roger Pau Monné
2015-08-27 18:33     ` Konrad Rzeszutek Wilk
2015-08-28  8:28       ` Jan Beulich
2015-08-28  2:06     ` Tian, Kevin

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=55DEFC3D.8050902@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yang.z.zhang@intel.com \
    /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.