xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Cc: olaf@aepfle.de, xen-devel@lists.xensource.com,
	andres@gridcentric.ca, wei.wang2@amd.com, hongkaixing@huawei.com,
	adin@gridcentric.ca
Subject: Re: [PATCH 3 of 3] x86/mm: Enable paging and sharing in AMD NPT mode
Date: Thu, 8 Mar 2012 13:30:21 +0000	[thread overview]
Message-ID: <20120308133021.GI64337@ocelot.phlegethon.org> (raw)
In-Reply-To: <4c6bee5a191a2325be96.1330571758@xdev.gridcentric.ca>

At 22:15 -0500 on 29 Feb (1330553758), Andres Lagar-Cavilla wrote:
>  xen/arch/x86/mm/mem_event.c   |  7 +++++--
>  xen/arch/x86/mm/mem_sharing.c |  7 +++++++
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> 
> Both features are mutually exclusive with sharing iommu and p2m tables.
> 
> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
> Signed-off-by: Adin Scannell <adin@scannell.ca>
> 
> diff -r d6c3c77ad749 -r 4c6bee5a191a xen/arch/x86/mm/mem_event.c
> --- a/xen/arch/x86/mm/mem_event.c
> +++ b/xen/arch/x86/mm/mem_event.c
> @@ -550,8 +550,11 @@ int mem_event_domctl(struct domain *d, x
>              if ( !hap_enabled(d) )
>                  break;
>  
> -            /* Currently only EPT is supported */
> -            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
> +            /* Currently EPT or AMD with no iommu/hap page table sharing are
> +             * supported */
> +            if ( !((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) ||
> +                   ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && 
> +                     !iommu_hap_pt_share)) )

AFAICT p2m tricks are not going to work with IOMMU/passthrough at all,
since there's no mechanism to fault and retry.  So the interlock should
really be against need_iommu() or similar.  (And vice versa, to stop a
device being passed through to a VM that has sharing/paging/events
enabled).

Cheers,

Tim

  reply	other threads:[~2012-03-08 13:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01  3:15 [PATCH 0 of 3] RFC Paging support for AMD NPT V2 Andres Lagar-Cavilla
2012-03-01  3:15 ` [PATCH 1 of 3] IOMMU: Add command line param to disable sharing of IOMMU and hap tables Andres Lagar-Cavilla
2012-03-01  3:15 ` [PATCH 2 of 3] x86/mm: Teach paging to page table-based p2m Andres Lagar-Cavilla
2012-03-08 14:15   ` Tim Deegan
2012-03-14 19:12     ` Andres Lagar-Cavilla
2012-03-15 10:52       ` Tim Deegan
2012-03-15 15:46         ` Andres Lagar-Cavilla
2012-03-15 17:21           ` Tim Deegan
2012-03-15 17:34             ` Keir Fraser
2012-03-01  3:15 ` [PATCH 3 of 3] x86/mm: Enable paging and sharing in AMD NPT mode Andres Lagar-Cavilla
2012-03-08 13:30   ` Tim Deegan [this message]
2012-03-01  7:55 ` [PATCH 0 of 3] RFC Paging support for AMD NPT V2 Hongkaixing
2012-03-01 16:34   ` Andres Lagar-Cavilla
2012-03-02  9:35     ` Hongkaixing
2012-03-02 15:55       ` Andres Lagar-Cavilla

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=20120308133021.GI64337@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=andres@lagarcavilla.org \
    --cc=hongkaixing@huawei.com \
    --cc=olaf@aepfle.de \
    --cc=wei.wang2@amd.com \
    --cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).