[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3 of 3] x86/mm: Enable paging and sharing in AMD NPT mode



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@xxxxxxxxxxxxxxxx>
> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
> 
> 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

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.