All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/14] Add support for Hygon Dhyana Family 18h processor
@ 2019-03-25 13:29 Pu Wen
  2019-03-25 13:29 ` [PATCH v3 01/14] x86/cpu: Create Hygon Dhyana architecture support file Pu Wen
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: Pu Wen @ 2019-03-25 13:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Suravee Suthikulpanit, Pu Wen, Ian Jackson, Jan Beulich,
	Andrew Cooper, Boris Ostrovsky, Brian Woods, Roger Pau Monné

As a new x86 CPU vendor, Chengdu Haiguang IC Design Co., Ltd (Hygon)
is a joint venture between AMD and Haiguang Information Technology Co.,
Ltd., aims at providing high performance x86 processors for China
server market.

The first generation Hygon processor(Dhyana) originates from AMD
technology and shares most of the architecture with AMD's family 17h,
but with different CPU vendor ID("HygonGenuine") and family series
number 18h (Hygon negotiated with AMD to make sure that only Hygon
will use family 18h).

To enable support of Xen to Hygon Dhyana CPU, add a new vendor type
(X86_VENDOR_HYGON, with value of 5), and share most of the code with
AMD family 17h.

The MSRs and CPUIDs which are used by this patch series are all defined
in this PPR[1].

This patch series have been applied and tested successfully on Hygon
Dhyana processor, also been tested on AMD EPYC (family 17h) processor.
It works fine and makes no harm to the existing code.

Reference:
[1] https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf


v2->v3:
  - Rebased on 4.13-unstable and tested against it.
  - Simplify code of hygon.c by re-using early_init_amd().
  - Return false in the function probe_cpuid_faulting().
  - Adjust code for calculating phys_proc_id for Hygon.
  - Abstract common function _vpmu_init() and add hygon_vpmu_init().
  - Refine some comments and descriptions.
  - Add Acked-by from Jan Beulich for x86/cpu/mtrr, x86/cpu/mce,
    x86/spec_ctrl, x86/apic, x86/acpi, x86/iommu, x86/pv, x86/domain,
    x86/domctl and x86/cpuid.

v1->v2:
  - Rebased on 4.12.0-rc3 and tested against it.
  - Move opt_cpuid_mask_l7s0_(eax/ebx) to common.c.
  - Insert Hygon cases after AMD ones instead of above.
  - Remove (rd/wr)msr_hygon_safe and use (rd/wr)msr_safe instead.
  - Remove wrmsr_hygon and use wrmsrl instead.
  - Remove the unnecessary change to xstate.
  - Refine some codes and comments.
  - Add Acked-by from Jan Beulich for x86/traps.
  - Add Acked-by from Wei Liu for tools/libxc.


Pu Wen (14):
  x86/cpu: Create Hygon Dhyana architecture support file
  x86/cpu/mtrr: Add Hygon Dhyana support to get TOP_MEM2
  x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU
  x86/cpu/mce: Add Hygon Dhyana support to the MCA infrastructure
  x86/spec_ctrl: Add Hygon Dhyana to the respective mitigation machinery
  x86/apic: Add Hygon Dhyana support
  x86/acpi: Add Hygon Dhyana support
  x86/iommu: Add Hygon Dhyana support
  x86/pv: Add Hygon Dhyana support to emulate MSRs access
  x86/domain: Add Hygon Dhyana support
  x86/domctl: Add Hygon Dhyana support
  x86/traps: Add Hygon Dhyana support
  x86/cpuid: Add Hygon Dhyana support
  tools/libxc: Add Hygon Dhyana support

 tools/libxc/xc_cpuid_x86.c             | 16 ++++--
 xen/arch/x86/acpi/cpu_idle.c           |  3 +-
 xen/arch/x86/acpi/cpufreq/cpufreq.c    |  8 +--
 xen/arch/x86/acpi/cpufreq/powernow.c   |  3 +-
 xen/arch/x86/apic.c                    |  5 ++
 xen/arch/x86/cpu/Makefile              |  1 +
 xen/arch/x86/cpu/amd.c                 |  7 +--
 xen/arch/x86/cpu/common.c              | 12 ++++-
 xen/arch/x86/cpu/cpu.h                 |  4 ++
 xen/arch/x86/cpu/hygon.c               | 95 ++++++++++++++++++++++++++++++++++
 xen/arch/x86/cpu/mcheck/amd_nonfatal.c |  5 +-
 xen/arch/x86/cpu/mcheck/mce.c          |  6 ++-
 xen/arch/x86/cpu/mcheck/mce_amd.c      |  5 +-
 xen/arch/x86/cpu/mcheck/non-fatal.c    |  3 +-
 xen/arch/x86/cpu/mcheck/vmce.c         |  2 +
 xen/arch/x86/cpu/mtrr/generic.c        |  5 +-
 xen/arch/x86/cpu/vpmu.c                |  5 ++
 xen/arch/x86/cpu/vpmu_amd.c            | 57 ++++++++++++++------
 xen/arch/x86/cpuid.c                   | 10 ++--
 xen/arch/x86/dom0_build.c              |  3 +-
 xen/arch/x86/domain.c                  |  9 ++--
 xen/arch/x86/domctl.c                  | 13 +++--
 xen/arch/x86/pv/emul-priv-op.c         | 19 ++++---
 xen/arch/x86/spec_ctrl.c               |  6 ++-
 xen/arch/x86/traps.c                   |  3 ++
 xen/include/asm-x86/iommu.h            |  1 +
 xen/include/asm-x86/vpmu.h             |  1 +
 xen/include/asm-x86/x86-vendors.h      |  3 +-
 28 files changed, 250 insertions(+), 60 deletions(-)
 create mode 100644 xen/arch/x86/cpu/hygon.c

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-03-27 10:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-25 13:29 [PATCH v3 00/14] Add support for Hygon Dhyana Family 18h processor Pu Wen
2019-03-25 13:29 ` [PATCH v3 01/14] x86/cpu: Create Hygon Dhyana architecture support file Pu Wen
2019-03-26 15:48   ` Jan Beulich
2019-03-27  8:14     ` Pu Wen
2019-03-27  8:30       ` Jan Beulich
2019-03-27 10:08         ` Pu Wen
2019-03-25 13:30 ` [PATCH v3 02/14] x86/cpu/mtrr: Add Hygon Dhyana support to get TOP_MEM2 Pu Wen
2019-03-25 13:30 ` [PATCH v3 03/14] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU Pu Wen
2019-03-26 16:10   ` Jan Beulich
2019-03-27  8:16     ` Pu Wen
2019-03-27  8:37       ` Jan Beulich
2019-03-27 10:08         ` Pu Wen
2019-03-25 13:30 ` [PATCH v3 04/14] x86/cpu/mce: Add Hygon Dhyana support to the MCA infrastructure Pu Wen
2019-03-25 13:30 ` [PATCH v3 05/14] x86/spec_ctrl: Add Hygon Dhyana to the respective mitigation machinery Pu Wen
2019-03-25 13:30 ` [PATCH v3 06/14] x86/apic: Add Hygon Dhyana support Pu Wen
2019-03-25 13:30 ` [PATCH v3 07/14] x86/acpi: " Pu Wen
2019-03-25 13:31 ` [PATCH v3 08/14] x86/iommu: " Pu Wen
2019-03-25 13:31 ` [PATCH v3 09/14] x86/pv: Add Hygon Dhyana support to emulate MSRs access Pu Wen
2019-03-25 13:31 ` [PATCH v3 10/14] x86/domain: Add Hygon Dhyana support Pu Wen
2019-03-25 13:31 ` [PATCH v3 11/14] x86/domctl: " Pu Wen
2019-03-25 13:31 ` [PATCH v3 12/14] x86/traps: " Pu Wen
2019-03-25 13:32 ` [PATCH v3 13/14] x86/cpuid: " Pu Wen
2019-03-25 13:32 ` [PATCH v3 14/14] tools/libxc: " Pu Wen

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.