Re: [Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-03-16 Thread Pu Wen

On 2019/3/15 21:41, Jan Beulich wrote:

On 21.02.19 at 10:48,  wrote:

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


In addition to these changes, what about pci_cfg_ok()? I don't think
I've seen any of the patches touch it.


Because Hygon does not access the extended NB configuration space right
now, so there is no change to pci_cfg_ok().

--
Regards,
Pu Wen

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

Re: [Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-03-15 Thread Jan Beulich
>>> On 21.02.19 at 10:48,  wrote:
> 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

In addition to these changes, what about pci_cfg_ok()? I don't think
I've seen any of the patches touch it.

Jan



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

Re: [Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-02-22 Thread Wei Liu
On Fri, Feb 22, 2019 at 10:30:17AM +0800, Pu Wen wrote:
> On 2019/2/22 0:38, Wei Liu wrote:
> > I think the version should have been v5?
> 
> Aha. This is the second revision of the patch series. So why should it
> have been v5?

I have seen several previous postings from last year. But I just
realised they were for Linux, not Xen.

Sorry for the noise.

Wei.

> 
> -- 
> Regards,
> Pu Wen

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

Re: [Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-02-21 Thread Pu Wen
On 2019/2/22 0:38, Wei Liu wrote:
> I think the version should have been v5?

Aha. This is the second revision of the patch series. So why should it
have been v5?

-- 
Regards,
Pu Wen

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

Re: [Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-02-21 Thread Wei Liu
I think the version should have been v5?

Wei.

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

[Xen-devel] [PATCH v2 00/14] Add support for Hygon Dhyana Family 18h processor

2019-02-21 Thread Pu Wen
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., and aims at providing high performance x86 processor for China
server market.

The first generation Hygon's 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 will negotiate with AMD to make sure that only Hygon
will use family 18h).

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

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


v1->v2:
  - Rebased on 4.20.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 |   5 -
 xen/arch/x86/cpu/common.c  |   9 +-
 xen/arch/x86/cpu/cpu.h |   2 +
 xen/arch/x86/cpu/hygon.c   | 248 +
 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|   2 +
 xen/arch/x86/cpu/vpmu_amd.c|   2 +
 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/x86-vendors.h  |   3 +-
 27 files changed, 354 insertions(+), 43 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