Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
54e9d51
dt-bindings: phytmac: Add bindings for Phytium MAC 1.0 and 2.0
Mar 21, 2024
dd78c3d
crypto: ccp: Introduce hygon specific interface to support driver
Mar 30, 2024
a1c0663
crypto: ccp: Fixup the capability of Hygon PSP during initialization
Mar 8, 2024
e080f67
crypto: ccp: Add support to detect CCP devices on Hygon 2nd and 3rd CPUs
Mar 25, 2021
16a57de
crypto: ccp: Add support to detect CCP devices on Hygon 4th CPUs
Aug 10, 2023
5d0cdb8
crypto: ccp: Implement CSV_HGSC_CERT_IMPORT ioctl command
BaoshunFang Sep 22, 2022
36d7f94
Documentation/arch/x86: Add HYGON secure virtualization description
Mar 11, 2024
25eb6cc
x86/mm: Provide a Kconfig entry to build the HYGON memory encryption …
Jul 14, 2023
82cfaa9
crypto: ccp: Fix compile error on csv_cmd_buffer_len()
Aug 5, 2024
df30541
crypto: ccp: Adapt for kernel >=6.11
opsiff Dec 22, 2025
d390ec7
x86/mm: Print CSV info into the kernel log
Jul 14, 2023
a65c3b9
crypto: ccp: Print Hygon CSV API version when CSV support is detected
Jul 17, 2023
857bf10
KVM: SVM: Print Hygon CSV support info if support is detected
Jul 17, 2023
1c9a40c
x86/cpu: Detect memory encryption features on Hygon CPUs
Jul 31, 2023
d19ce8b
x86/cpufeatures: Add CPUID_8C86_0000_EDX CPUID leaf
Aug 3, 2023
63c4215
x86/cpufeatures: Add CSV3 CPU feature
Aug 3, 2023
168e3f2
x86/cpu/hygon: Clear SME feature flag when not in use
Mar 10, 2024
18f14e2
deepin_x86_desktop_defconfig: Set CONFIG_HYGON_CSV by default
Apr 25, 2024
e05ed35
x86/cpufeatures: Rename X86_FEATURE_SM{3,4} to X86_FEATURE_HYGON_SM{3,4}
Feb 27, 2025
112c15d
crypto: ccp: Fix compile error on file csv-dev.h
Aug 6, 2024
99b3f9a
KVM: x86: Support VM_ATTESTATION hypercall
Apr 26, 2021
9cb2e15
driver/virt/coco: Add HYGON CSV Guest dirver.
BaoshunFang May 30, 2023
fdd081d
crypto: ccp: Support DOWNLOAD_FIRMWARE when detect CSV
Dec 3, 2021
1848f09
crypto: ccp: Implement CSV_PLATFORM_INIT ioctl command
Dec 3, 2021
b7a8332
crypto: ccp: Implement CSV_PLATFORM_SHUTDOWN ioctl command
Dec 3, 2021
e34323d
crypto: ccp: Implement CSV_DOWNLOAD_FIRMWARE ioctl command
Dec 3, 2021
21405aa
crypto: ccp: Introduce init and free helpers to manage CSV RING_BUFFE…
BaoshunFang Jul 30, 2021
001ea46
crypto: ccp: Add support for enqueue command pointers in CSV RING_BUF…
BaoshunFang Jul 30, 2021
d26eca4
crypto: ccp: Add support for dequeue status in CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
9f2e1f5
crypto: ccp: Add support to switch to CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
81cc0b2
crypto: ccp: Add support for issue commands in CSV RING_BUFFER mode
BaoshunFang Jul 30, 2021
6e019f0
KVM: SVM: Add KVM_CSV_COMMAND_BATCH command for applying CSV RING_BUF…
BaoshunFang Jul 30, 2021
252d848
KVM: SVM: Prepare memory pool to allocate buffers for KVM_CSV_COMMAND…
BaoshunFang Jul 30, 2021
cab194e
KVM: SVM: Add SEND_UPDATE_DATA command helper to support KVM_CSV_COMM…
BaoshunFang Aug 1, 2021
58e5dfe
KVM: SVM: Add RECEIVE_UPDATE_DATA command helper to support KVM_CSV_C…
BaoshunFang Aug 1, 2021
bc7a43d
crypto: ccp: Add a new interface for X86 sending command to PSP
chench246 Mar 15, 2024
bd3ba6e
crypto: ccp: Add another mailbox interrupt support for PSP sending co…
chench246 Mar 18, 2024
2f44103
crypto: ccp: Fix definition of struct sev_data_send_update_vmsa
May 24, 2022
e6d6c40
KVM: SVM: Add KVM_SEV_SEND_UPDATE_VMSA command
Apr 8, 2021
2cc4a49
KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_VMSA command
Apr 8, 2021
8ab2e3d
KVM: x86: Restore control registers in __set_sregs() to support CSV2 …
Apr 7, 2021
4e8fb55
KVM: SVM: Export MSR_AMD64_SEV_ES_GHCB to userspace for CSV2 guest
Jun 15, 2021
b3f6370
KVM: x86: Introduce control_{pre,post}_system_reset ioctl interfaces
Aug 8, 2023
49f3a45
KVM: SVM: Add support for rebooting CSV2 guest
Apr 15, 2021
efb2448
KVM: SVM: Force flush caches before reboot CSV guest
May 6, 2023
4aaeb19
deepin_x86_desktop_defconfig: Set CONFIG_CSV_GUEST=m by default
Aug 6, 2024
4fac841
KVM: SVM: convert to fd_file()
opsiff Dec 22, 2025
89fce79
KVM: SEV: hygon: Use long-term pin when registering encrypted memory …
opsiff Dec 22, 2025
3986326
x86: config: Increase maximum number of CPUs to 512
Aug 13, 2024
86d3f97
deepin: Add OWNERS for deepin kernel
Aug 11, 2024
24e6769
KVM: SVM: CSV: Explicitly enable LBR Virtualization after succeed to …
Aug 7, 2024
5d74b72
config: enable support for MT7925
opsiff Aug 13, 2024
348050f
crypto: tdm: Add Hygon TDM driver
chench246 Aug 1, 2024
419d4d1
crypto: tdm: Support dynamic protection for SCT and IDT by HYGON TDM
chench246 Aug 1, 2024
ba78541
linux: tpm: add Hygon TPM2 driver
chench246 Aug 1, 2024
6af19c6
tpm: hygon: Add bufsiz parameter to tpm_c_send()
opsiff Dec 23, 2025
2efed4a
linux: tcm: add Hygon TCM2 driver
chench246 Aug 1, 2024
a8d739e
tpm: hygon: don't bother with removal of files in directory we'll be …
opsiff Dec 23, 2025
479f430
x86/mce: Add NMIs setup in machine_check func
leoliu-oc Aug 16, 2024
ada5d2c
x86/mce/zhaoxin: Update mcelog to decode PCIE, ZDI/ZPI and DRAM errors
leoliu-oc Aug 16, 2024
65c96aa
perf/x86/zhaoxin: fix warning log issue on KH-40000
leoliu-oc Aug 16, 2024
9a12c59
x86/hpet: Read HPET directly if panic in progress
leoliu-oc Aug 16, 2024
0e510a0
can: phytium: Use phytium_can_of_ids only when CONFIG_OF enabled
Aug 17, 2024
20f36a2
spi: Introduce dependencise for Phytium to avoid warnings
Aug 17, 2024
57fed69
KVM: SVM: Fix the available ASID range for CSV2 guest
Jan 10, 2021
885d7dc
x86/csv2: Keep in atomic context when holding ghcb page if the #VC co…
Apr 6, 2023
0b9f80f
x86/head/64: Flush caches for .bss..decrypted section after CR3 switc…
Jan 6, 2024
9074b92
KVM: SVM: Unmap ghcb pages if they're still mapped when destroy guest
Nov 12, 2023
5390f02
KVM: SVM: Add support for different CSV guests to reuse the same ASID
Sep 9, 2023
27ee982
crypto: ccp: Define CSV3 key management command id
Mar 11, 2024
2b9f34b
x86/mm: Manage CSV3 guest's private memory by CMA
Mar 11, 2024
b7c23c4
crypto: ccp: Add SET_SMR/SET_SMCR commands for CSV3
Mar 11, 2024
c0742c7
crypto: ccp: Support SM2 algorithm for hygon ccp.
liyabin27 May 7, 2022
3408ae4
crypto: ccp: Support SM3 algorithm for hygon ccp.
liyabin27 May 7, 2022
d888a27
crypto: ccp: Support SM4 algorithm for hygon ccp.
liyabin27 May 7, 2022
27eb8c0
crypto: ccp: fix sm2 not return due to wrong complete callback parameter
Mar 19, 2024
9da05b5
crypto: ccp: It prompt ILLEGAL_MEM_ADDR when using PSPCCP.
liyabin27 May 7, 2022
47bd25c
crypto: ccp: Only handle interrupts by completion.
liyabin27 May 7, 2022
580f2b8
crypto: ccp: Fix a problem that vq thread may stuck when do multi pro…
Aug 22, 2022
96fc3a5
crypto: ccp: fix sm2 test failed in testmgr because of missing DER co…
Nov 17, 2023
794d6e5
crypto: hygon - Drop sign/verify operations
opsiff Dec 23, 2025
c876f33
crypto: ccp: fix bug that SM2 encryption of long data causes kernel c…
Mar 18, 2024
5325ab1
crypto: ccp: Modify value of COMMANDS_PER_QUEUE from 16 to 8192.
liyabin27 May 8, 2022
d78f86c
crypto: ccp: Process multiple VQ commands once for SM3 ccp.
liyabin27 May 8, 2022
cea3dd3
crypto: ccp: Process multiple VQ commands once for SM4/SM4-CTR ccp.
liyabin27 May 8, 2022
987bffe
crypto: ccp: remove repeated sm4-hs mode
Apr 8, 2024
8224eed
crypto: ccp: support sm2 on Hygon generation 4th CPU
Apr 16, 2024
c4321e5
drivers/crypto/ccp: concurrent psp access support between user and ke…
Mar 14, 2024
218fac6
drivers/crypto/ccp: Add psp mutex enable ioctl support
Mar 14, 2024
389bdfb
arch/x86/kvm: Support psp virtualization
Aug 10, 2023
f66406c
arch/x86/kvm: Support tkm virtualization
Aug 10, 2023
dce5c51
drivers/crypto/ccp: support tkm key isolation
Dec 26, 2023
9a0f9af
drivers/crypto/ccp: Allow VM without a configured vid to use TKM
Feb 18, 2024
7774cb7
drivers/crypto/ccp: Eliminate dependence of the kvm module on the ccp…
Mar 29, 2024
356b0cf
drivers/crypto/ccp: memmove is used instead of memcpy in overlapped m…
Aug 2, 2024
3a89976
drivers/crypto/ccp: fix hygon ccp build for 6.18
opsiff Dec 24, 2025
eafa7be
crypto: ccp: fix the sev_do_cmd panic on non-Hygon platforms
Sep 14, 2024
0540dfe
crypto: ccp: Fix S4 kernel panic issue on HYGON psp
Nov 22, 2024
be86911
crypto: ccp: Fix some compile errors on Hygon interfaces
Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions Documentation/arch/x86/hygon-secure-virtualization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. SPDX-License-Identifier: GPL-2.0

===========================
HYGON Secure Virtualization
===========================

China Secure Virtualization (CSV) is a key virtualization feature on Hygon
processors.

The 1st generation of CSV (CSV for short) is a secure virtualization technology
to provide memory encryption for the virtual machine (VM), each VM's memory is
encrypted by its unique encryption key which is managed by secure processor.

The 2nd generation of CSV (CSV2 for short) provides security enhancement to CSV
by encrypting not only the VM's memory but also the vCPU's registers of the VM.

The 3rd generation of CSV (CSV3 for short) is a more advanced secure
virtualization technology, it integrates secure processor, memory encryption and
memory isolation to provide the ability to protect guest's private data. The CSV3
guest's context like CPU registers, control block and nested page table is accessed
only by the guest itself and the secure processor. Neither other guests nor the
host can tamper with the guest's context.

The secure processor is a separate processor inside Hygon hardware. The firmware
running inside the secure processor performs activities in a secure way, such as
OVMF encryption, VM launch, secure memory management and nested page table
management etc. For more information, please see CSV spec and CSV3 spec from Hygon.

A CSV guest is running in the memory that is encrypted with a dedicated encrypt
key which is set by the secure processor. And CSV guest's memory encrypt key is
unique from the others. A low latency crypto engine resides on Hygon hardware
to minimize the negative effect on memory bandwidth. In CSV guest, a guest private
page will be automatically decrypted when read from memory and encrypted when
written to memory.

CSV3 provides an enhancement technology named memory isolation to improve the
security. A dedicated memory isolation hardware is built in Hygon hardware. Only
the secure processor has privilege to configure the isolation hardware. The VMM
allocates CMA memory and transfers them to secure processor. The secure processor
maps the memory to secure nested page table and manages them as guest's private
memory. Any memory access (read or write) to CSV3 guest's private memory outside
the guest will be blocked by isolation hardware.

A CSV3 guest may declare some memory regions as shared to share data with the
host. When a page is set as shared, read/write on the page will bypass the
isolation hardware and the guest's shared memory can be accessed by the host. A
method named CSV3 secure call command is designed and CSV3 guest sends the secure
call command to the secure processor to change private memory to shared memory.
In the method, 2 dedicated pages are reserved at early stage of the guest. Any
read/write on the dedicated pages will trigger nested page fault. When NPF
happens, the host helps to issue an external command to the secure processor but
cannot tamper with the data in the guest's private memory. Then the secure
processor checks the fault address and handles the command if the address is
exactly the dedicated pages.

Support for CSV can be determined through the CPUID instruction. The CPUID
function 0x8000001f reports information to CSV::

0x8000001f[eax]:
Bit[1] indicates support for CSV
Bit[3] indicates support for CSV2
Bit[30] indicates support for CSV3

If CSV is support, MSR 0xc0010131 can be used to determine if CSV is active::

0xc0010131:
Bit[0] 0 = CSV is not active
1 = CSV is active
Bit[1] 0 = CSV2 is not active
1 = CSV2 is active
Bit[30] 0 = CSV3 is not active
1 = CSV3 is active

All CSV/CSV2's configurations must be enabled in CSV3. Linux can activate CSV3 by
default (CONFIG_HYGON_CSV=y, CONFIG_CMA=y). CSV3 guest's memory is managed by
CMA (Contiguous Memory Allocation). User must specify CSV3 total secure memory on
the linux kernel command line with csv_mem_size or csv_mem_percentage::

csv_mem_size=nn[MG]
[KNL,CSV]
Reserve specified CSV3 memory size in CMA. CSV3's memory will be
allocated from these CMAs.
For instance, csv_mem_size=40G, 40G memory is reserved for CSV3.

csv_mem_percentage=nn
[KNL,CSV]
Reserve specified memory size which is prorated according to the
whole system memory size. CSV3 guest's memory will be allocated
from these CMAs.
For instance, csv_mem_percentage=60, means 60% system memory is
reserved for CSV3.
The maximum percentage is 80. And the default percentage is 0.

Limitations
The reserved CSV3 memory within CMA cannot be used by kernel or any application that
may pin memory using long term gup during the application's life time.
For instance, if the whole system memory is 64G and 32G is reserved for CSV3 with
kernel command line csv_mem_percentage=50, only 32G memory is available for CSV/CSV2.
As a result, user will fail to run a CSV/CSV2 guest with memory size which exceeds
32G.
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/net/phytmac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
* Phytium xgmac Ethernet controller

Required properties:
- compatible: Should be "phytium,gmac-[version]"
Use "phytium,gmac-1.0" for gmac version 1.0 on Phytium SoCs
Use "phytium,gmac-2.0" for gmac version 2.0 on Phytium SoCs

- reg: Address and length of the register set for the device
- interrupts: Should contain phytmac interrupt
- queue-number: The number of queues for the device
- phy-mode: See ethernet.txt file in the same directory
- fixed-link:See ethernet.txt file in the same directory
- dma-coherent: Boolean property, must only be present if memory
accesses performed by the device are cache coherent.

The MAC address will be determined using the optional properties
defined in ethernet.txt.

Examples:

eth0@36ce0000 {
compatible = "phytium,gmac-1.0";
reg = <0x00 0x36ce0000 0x00 0x2000>;
interrupts = <0x00 0x20 0x04 0x00 0x21 0x04 0x00 0x22 0x04 0x00 0x23 0x04>;
queue-number = <0x04>;
magic-packet;
dma-coherent;
phy-mode = "usxgmii";
status = "okay";

fixed-link {
speed = <0x2710>;
full-duplex;
};
};
33 changes: 33 additions & 0 deletions Documentation/virt/coco/csv-guest.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. SPDX-License-Identifier: GPL-2.0

===================================================================
CSV Guest API Documentation
===================================================================

1. General description
======================

The CSV guest driver exposes IOCTL interfaces via the /dev/csv-guest misc
device to allow userspace to get certain CSV guest-specific details.

2. API description
==================

In this section, for each supported IOCTL, the following information is
provided along with a generic description.

:Input parameters: Parameters passed to the IOCTL and related details.
:Output: Details about output data and return value (with details about
the non common error values).

2.1 CSV_CMD_GET_REPORT
-----------------------

:Input parameters: struct csv_report_req
:Output: Upon successful execution, CSV_REPORT data is copied to
csv_report_req.report_data and return 0. Return -EINVAL for invalid
operands, -EIO on VMMCALL failure or standard error number on other
common failures.

The CSV_CMD_GET_REPORT IOCTL can be used by the attestation software to get
the CSV_REPORT from the CSV module using VMMCALL[KVM_HC_VM_ATTESTATION].
5 changes: 5 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6878,6 +6878,11 @@ F: arch/mips/dec/
F: arch/mips/include/asm/dec/
F: arch/mips/include/asm/mach-dec/

DEEPIN OWNERS
M: "WangYuli" <wangyuli@uniontech.com>
S: Maintained
F: OWNERS

DEFXX FDDI NETWORK DRIVER
M: "Maciej W. Rozycki" <macro@orcam.me.uk>
S: Maintained
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/configs/deepin_arm64_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,8 @@ CONFIG_MT7921E=m
CONFIG_MT7921S=m
CONFIG_MT7921U=m
CONFIG_MT7996E=m
CONFIG_MT7925E=m
CONFIG_MT7925U=m
CONFIG_RT2X00=m
CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m
Expand Down
5 changes: 5 additions & 0 deletions arch/loongarch/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners

reviewers:
- allinaent
- JohnsPony
2 changes: 2 additions & 0 deletions arch/loongarch/configs/deepin_loongarch_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,8 @@ CONFIG_MT7921E=m
CONFIG_MT7921S=m
CONFIG_MT7921U=m
CONFIG_MT7996E=m
CONFIG_MT7925E=m
CONFIG_MT7925U=m
CONFIG_WILC1000_SDIO=m
CONFIG_WILC1000_SPI=m
CONFIG_WILC1000_HW_OOB_INTR=y
Expand Down
5 changes: 5 additions & 0 deletions arch/mips/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners

reviewers:
- allinaent
- JohnsPony
25 changes: 25 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,31 @@ config EFI_RUNTIME_MAP

See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.

config HYGON_CSV
bool "Hygon secure virtualization CSV support"
default y
depends on CPU_SUP_HYGON && AMD_MEM_ENCRYPT
select MMU
select CMA
help
Hygon CSV integrates secure processor, memory encryption and
memory isolation to provide the ability to protect guest's private
data. It has evolved from CSV, CSV2 to CSV3.

For CSV, the guest's memory is encrypted.

For CSV2, not only the guest's memory, but also the guest's vCPU
registers are encrypted, neither other guests nor the host can tamper
with the vCPU registers.

For CSV3, the guest's context like vCPU registers, control block and
nested page table is accessed only by the guest itself and the secure
processor. Neither other guests nor the host can tamper with the
guest's context.

Say Y here to enable support for the whole capbilities of Hygon secure
virtualization on hygon processor.

source "kernel/Kconfig.hz"

config ARCH_SUPPORTS_KEXEC
Expand Down
13 changes: 13 additions & 0 deletions arch/x86/coco/sev/vc-handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/cpu.h>
#include <asm/apic.h>
#include <asm/cpuid/api.h>
#include <asm/processor-hygon.h>

static enum es_result vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
unsigned long vaddr, phys_addr_t *paddr)
Expand Down Expand Up @@ -897,6 +898,15 @@ static bool vc_raw_handle_exception(struct pt_regs *regs, unsigned long error_co
struct ghcb *ghcb;
bool ret = true;

/*
* Make sure the codes between __sev_get_ghcb() and __sev_put_ghcb()
* keep in atomic context. If #VC comes from kernel mode, then the
* codes here are in atomic context. If #VC comes from user mode, then
* it's necessary to switch to atomic context manually.
*/
if (is_x86_vendor_hygon() && !in_nmi())
__preempt_count_add(HARDIRQ_OFFSET);

ghcb = __sev_get_ghcb(&state);

vc_ghcb_invalidate(ghcb);
Expand All @@ -907,6 +917,9 @@ static bool vc_raw_handle_exception(struct pt_regs *regs, unsigned long error_co

__sev_put_ghcb(&state);

if (is_x86_vendor_hygon() && !in_nmi())
__preempt_count_sub(HARDIRQ_OFFSET);

/* Done - now check the result */
switch (result) {
case ES_OK:
Expand Down
6 changes: 6 additions & 0 deletions arch/x86/configs/deepin_x86_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ CONFIG_JAILHOUSE_GUEST=y
CONFIG_ACRN_GUEST=y
CONFIG_PROCESSOR_SELECT=y
CONFIG_GART_IOMMU=y
CONFIG_NR_CPUS=512
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCELOG_LEGACY=y
CONFIG_PERF_EVENTS_INTEL_RAPL=m
Expand All @@ -85,6 +86,7 @@ CONFIG_X86_USER_SHADOW_STACK=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y
CONFIG_HYGON_CSV=y
CONFIG_LIVEPATCH=y
CONFIG_HIBERNATION=y
CONFIG_PM_WAKELOCKS=y
Expand Down Expand Up @@ -1493,6 +1495,8 @@ CONFIG_MT7921E=m
CONFIG_MT7921S=m
CONFIG_MT7921U=m
CONFIG_MT7996E=m
CONFIG_MT7925E=m
CONFIG_MT7925U=m
CONFIG_WILC1000_SDIO=m
CONFIG_WILC1000_SPI=m
CONFIG_WILC1000_HW_OOB_INTR=y
Expand Down Expand Up @@ -4197,6 +4201,7 @@ CONFIG_VFIO_PCI_VGA=y
CONFIG_VIRT_DRIVERS=y
CONFIG_VBOXGUEST=m
CONFIG_NITRO_ENCLAVES=m
CONFIG_CSV_GUEST=m
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_VDPA=m
CONFIG_VIRTIO_PMEM=m
Expand Down Expand Up @@ -5290,6 +5295,7 @@ CONFIG_CRYPTO_DEV_VIRTIO=m
CONFIG_CRYPTO_DEV_SAFEXCEL=m
CONFIG_CRYPTO_DEV_AMLOGIC_GXL=m
CONFIG_CRYPTO_DEV_TSSE=m
CONFIG_HYGON_GM=y
CONFIG_PKCS8_PRIVATE_KEY_PARSER=m
CONFIG_SIGNED_PE_FILE_VERIFICATION=y
CONFIG_SYSTEM_EXTRA_CERTIFICATE=y
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/events/zhaoxin/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ __init int zhaoxin_pmu_init(void)

if (boot_cpu_data.x86_model == 0x5b)
pr_cont("Yongfeng events, ");

if (boot_cpu_data.x86_model == 0x6b)
pr_cont("Shijidadao events, ");

Expand Down
17 changes: 9 additions & 8 deletions arch/x86/events/zhaoxin/uncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static int kh40000_pcibus_limit[KH40000_MAX_SUBNODE_NUMBER];
#define KX7000_MC_B1_CHy_PMON_CTL0 0xee0
#define KX7000_MC_B1_CHy_PMON_BLK_CTL 0xef4

#define KX7000_ZDI_DL_MMIO_PMON_CTR0 0xf00
#define KX7000_ZDI_DL_MMIO_PMON_CTR0 0xf00
#define KX7000_ZDI_DL_MMIO_PMON_CTL0 0xf28
#define KX7000_ZDI_DL_MMIO_PMON_BLK_CTL 0xf44
#define KX7000_IOD_ZDI_DL_MMIO_BASE_OFFSET 0x168
Expand Down Expand Up @@ -397,24 +397,24 @@ DEFINE_PER_CPU(cpumask_t, zx_subnode_core_bits);

static void zx_gen_core_map(void)
{
int i, nr, cpu;
int cpu, i;
int cluster_id, subnode_id;

for_each_present_cpu(cpu) {
cluster_id = zx_topology_cluster_id(cpu);

for (i = 0; i < 4; i++) {
nr = (cluster_id << 2) + i;
cpumask_set_cpu(nr, &per_cpu(zx_cluster_core_bits, cpu));
for_each_present_cpu(i) {
if (zx_topology_cluster_id(i) == cluster_id)
cpumask_set_cpu(i, &per_cpu(zx_cluster_core_bits, cpu));
}
}

for_each_present_cpu(cpu) {
subnode_id = zx_topology_subnode_id(cpu);

for (i = 0; i < 8; i++) {
nr = (subnode_id << 3) + i;
cpumask_set_cpu(nr, &per_cpu(zx_subnode_core_bits, cpu));
for_each_present_cpu(i) {
if (zx_topology_subnode_id(i) == subnode_id)
cpumask_set_cpu(i, &per_cpu(zx_subnode_core_bits, cpu));
}
}
}
Expand Down Expand Up @@ -2828,6 +2828,7 @@ static void kx7000_uncore_cpu_init(void)
{
u64 val;
int cpu;

uncore_msr_uncores = kx7000_msr_uncores;

/* clear bit 16 of MSR 0x1877 so that HIF can work normally */
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/events/zhaoxin/uncore.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ struct zhaoxin_uncore_type {
unsigned int fixed_ctl;
unsigned int box_ctl;
union {
unsigned int msr_offset;
unsigned int mmio_offset;
};
unsigned int msr_offset;
unsigned int mmio_offset;
};
unsigned int num_shared_regs:8;
unsigned int single_fixed:1;
unsigned int pair_ctr_ctl:1;
Expand Down
Loading