[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 11/15] x86/domain: Add Hygon Dhyana support
Add Hygon Dhyana support to handle HyperTransport range. Also loading a nul selector does not clear bases and limits on Hygon CPUs, so add Hygon Dhyana support to the function preload_segment. Signed-off-by: Pu Wen <puwen@xxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/dom0_build.c | 3 ++- xen/arch/x86/domain.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 73f5407..4a36b63 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -542,7 +542,8 @@ int __init dom0_setup_permissions(struct domain *d) paddr_to_pfn(MSI_ADDR_BASE_LO + MSI_ADDR_DEST_ID_MASK)); /* HyperTransport range. */ - if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) + if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD || + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON ) rc |= iomem_deny_access(d, paddr_to_pfn(0xfdULL << 32), paddr_to_pfn((1ULL << 40) - 1)); diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 20b86fd..c9a7964 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1253,13 +1253,14 @@ arch_do_vcpu_op( } /* - * Loading a nul selector does not clear bases and limits on AMD CPUs. Be on - * the safe side and re-initialize both to flat segment values before loading - * a nul selector. + * Loading a nul selector does not clear bases and limits on AMD or Hygon + * CPUs. Be on the safe side and re-initialize both to flat segment values + * before loading a nul selector. */ #define preload_segment(seg, value) do { \ if ( !((value) & ~3) && \ - boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) \ + (boot_cpu_data.x86_vendor == X86_VENDOR_AMD || \ + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) ) \ asm volatile ( "movl %k0, %%" #seg \ :: "r" (FLAT_USER_DS32) ); \ } while ( false ) -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |