All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Elena Ufimtseva <elena.ufimtseva@oracle.com>, xen-devel@lists.xen.org
Cc: kevin.tian@intel.com, tim@xen.org, jbeulich@suse.com,
	yang.z.zhang@intel.com, boris.ostrovsky@oracle.com,
	roger.pau@citrix.com
Subject: Re: [PATCH RFC 5/5] pvh: dom0 boot option to specify iommu rw ranges
Date: Fri, 13 Feb 2015 22:09:39 +0000	[thread overview]
Message-ID: <54DE7623.1000106@citrix.com> (raw)
In-Reply-To: <20150213185247.GA12753@elena.ufimtseva>

On 13/02/15 18:52, Elena Ufimtseva wrote:
> It appears from the experiments that some devices on few systems
> may attempt to access memory ranges that are not RMRRs regions (and
> are not reported by ACPI) and are reserved in the host e820 map.
> These memory addresses appear to be the targets for DMA reads by
> devices. Presumably, these devices may be the USB debug ports.
> When devices issues DMA read, EPT violation in some cases is being
> reported. Some particular machines do not report EPT violation and
> become unresponsive (example Dell T5600).
>
> This patch introduces xen boot option dom0_iommu_rwmem that allows
> to specify these special ranges and perform mapping with required
> access rights. For this purpose p2m type p2m_sys_rw was introduced.
> For now it has RW permissions, though from experiments read permission
> is enough.
>
> dom0_iommu_rwmem has following format:
> =<start:end>,<start:end>,...
> where start and end are mfns (or pfn, as 1:1 mapping performed).
> Ranges number is limited to 10 and can be changed.
>
> TODO:
>  - make sure the user defined regions do not conflict with disallowed
>  io regions as ioapic etc;
>  - comply with rmrr design;
>  - naming convention;
>  - only applicable for vtd for now, other arch is in question;
>
> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>

The problem in question appears to be that the needs of USB debugging
(i.e. reading from a magic BIOS location) are not reflected correctly in
the systems ACPI tables (probably because noone ever tried to use USB
debugging on that platform).

This proposed solution doesn't account for situations like dom0 wishing
to pass the offending device through to a domU.

If I understand the problem correctly, I believe that the correct
solution would be to add a dmar_rmrr[ command line parameter along the
same lines as ivrs_hpet[ and ivrs_ioapic[ which allows the user to
inject corrections to the ACPI tables via the command line.

In this case, something like dmar_rmrr[sbdf]=<size>@<start>.  Xen can
then treat this in exactly the same way as if it had found the RMRR in
the ACPI tables.

Or am I missing something?

~Andrew

  reply	other threads:[~2015-02-13 22:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 18:52 [PATCH RFC 5/5] pvh: dom0 boot option to specify iommu rw ranges Elena Ufimtseva
2015-02-13 22:09 ` Andrew Cooper [this message]
2015-02-13 23:21   ` Elena Ufimtseva
2015-02-17 12:36     ` Jan Beulich
2015-02-17 13:32       ` Andrew Cooper
2015-02-17 13:39         ` Jan Beulich
2015-02-17 14:14           ` Andrew Cooper
2015-02-18 18:15             ` Konrad Rzeszutek Wilk
2015-02-19  9:13               ` Jan Beulich
2015-02-20 20:03                 ` Konrad Rzeszutek Wilk

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=54DE7623.1000106@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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.