[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/domain: Add Hygon Dhyana support
commit c8604e3e60325663df55a0831c2a37d857da3a24 Author: Pu Wen <puwen@xxxxxxxx> AuthorDate: Thu Apr 4 21:47:29 2019 +0800 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jun 6 15:28:21 2019 +0100 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> [Rebase over 0cd074144cb "x86/cpu: Renumber X86_VENDOR_* to form a bitmap"] Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/dom0_build.c | 2 +- xen/arch/x86/domain.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 9b063639c9..c69570920c 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -542,7 +542,7 @@ 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 | 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 d505d2e456..894d8673e2 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1279,13 +1279,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 | X86_VENDOR_HYGON)) ) \ asm volatile ( "movl %k0, %%" #seg \ :: "r" (FLAT_USER_DS32) ); \ } while ( false ) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |