Commit Graph

1224478 Commits

Author SHA1 Message Date
Vitaly Kuznetsov 52f0e467d0 KVM: x86: Introduce __kvm_get_hypervisor_cpuid() helper
commit 7ceb1c694fd9b8a049eb3b2853455caa7d98cb83 upstream.

Similar to kvm_find_kvm_cpuid_features()/__kvm_find_kvm_cpuid_features(),
introduce a helper to search for the specific hypervisor signature in any
struct kvm_cpuid_entry2 array, not only in vcpu->arch.cpuid_entries.

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240228101837.93642-2-vkuznets@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Like Xu <likexu@tencent.com>
2024-05-14 21:19:52 +08:00
Hongbo Li 4366f32772 cpustat: make get_iowait_time external
The future patch will use get_iowait_time() function.
So add extern u64 get_idle_time(struct kernel_cpustat *kcs, int cpu);
in include/linux/kernel_stat.h

kernel/cgroup/cpuset.c also define a get_iowait_time() function which
is basiclly the same as the one in fs/proc/stat.c in commit f02c35d2e6.
And it also includes the include/linux/kernel_stat.h, then we got a conflict.

Fix: f02c35d2e6

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2024-05-14 03:28:32 +00:00
Jianping Liu 70618277b9 dist: release 6.6.30-4
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-13 18:59:25 +08:00
Jianping Liu 3ffd9b8285 Merge ock repo's next branch to tkernel5 repo's master branch 2024-05-13 18:56:34 +08:00
chinaljp030 d81cb50010
!159 [next-6.6]3snic:change sssnic kernel driver name
Merge pull request !159 from cleanerleon/next
2024-05-13 10:48:53 +00:00
linuszeng aabad4aeed mm/unevictable: avoid root memcg calling mem_cgroup_scan_tasks to
trigger BUG_ON

Avoid root memcg calling mem_cgroup_scan_tasks to trigger BUG_ON.

Signed-off-by: Zeng Jingxiang <linuszeng@tencent.com>
2024-05-13 10:47:21 +00:00
Jianping Liu a0eb18ab43 config: add SIMPLEFB and SIMPLEDRM
Add CONFIGs as below:
CONFIG_DRM_SIMPLEDRM=m
CONFIG_FB_SIMPLE=m
CONFIG_SYSFB_SIMPLEFB=y

To support iso's graphic install on more machines.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-13 18:43:32 +08:00
刘诗 fb373b78f4
!157 [next-6.6]Hygon: CSV3 patch series part 1 (Secure memory management and initialization)
Merge pull request !157 from hanliyang/next_CSV3-host-cma-smr-smcr
2024-05-13 05:59:19 +00:00
刘诗 350f0cd22f
!154 [next-6.6]Hygon:Fixed bugs related to THP allocation and memory page migration
Merge pull request !154 from hanliyang/next_mm-fix
2024-05-13 02:32:54 +00:00
Jianping Liu 8c278a4725 dist: release 6.6.30-3
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-11 21:31:34 +08:00
Jianping Liu e78fdcd7ce config: add some drm configs to support more drm
Add drm configs as below:
CONFIG_DRM_DP_CEC=y
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_I915_GVT_KVMGT=m
CONFIG_DRM_GM12U320=m
CONFIG_DRM_GUD=m

Add CONFIG_KUNIT=m, CONFIG_DRM_KUNIT_TEST depend on it.
Add CONFIG_THINKPAD_ACPI=m, to select CONFIG_DRM_PRIVACY_SCREEN.

Disable Hyper-V framebuffer driver (CONFIG_FB_HYPERV) so that DRM driver
is used by default.

For arm64, add CONFIG_HYPERV=m for enable CONFIG_DRM_HYPERV=m.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-11 21:16:49 +08:00
Jianping Liu f97aaab320 dist: fix filter-modules error when make dist-rpm
When run "make dist-rpm", there are errors as below:
filter-modules.sh: Failed to filter out external modules, broken depmod:
depmod: WARNING: /drivers/misc/cardreader/rtsx_pci.ko needs unknown symbol mfd_add_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_pci.ko needs unknown symbol mfd_remove_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_usb.ko needs unknown symbol mfd_add_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_usb.ko needs unknown symbol mfd_remove_devices
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_db_free
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_core_destroy_mkey
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_vf_get_core_dev
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_core_alloc_pd
......

Add mfd-core and mlx5_core to "overrides", which will let them back into
kernel-core*.rpm, and sovle "broken depmod" as above.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-11 20:46:30 +08:00
Jianping Liu 66aa0861d1 dist: release 6.6.30-2
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-11 20:27:02 +08:00
aurelianliu 65d281fd66 Kconfig: add more module support for aarch64
Signed-off-by: aurelianliu <aurelianliu@tencent.com>
2024-05-11 12:26:34 +00:00
刘诗 af8a5753e4
!156 [next-6.6]Hygon: Support reuse ASID feature for Hygon CSV
Merge pull request !156 from hanliyang/next_CSV-reuse-ASID
2024-05-11 07:12:15 +00:00
weiwei1 ae9a6942ef change kernel driver name to sssnic
Signed-off-by: weiwei1 <weiwei1@ramaxel.com>
2024-05-11 11:39:17 +08:00
aurelianliu e98f88ff23 Kconfig: add more module support
Signed-off-by: aurelianliu <aurelianliu@tencent.com>
2024-05-10 16:02:24 +08:00
aurelianliu f98792edf8 HZ: use CONFIG_HZ_250
Signed-off-by: aurelianliu <aurelianliu@tencent.com>
2024-05-09 19:23:00 +08:00
Baoqi Zhang da2fb71cdc irqchip/loongson-pch-pic: Update interrupt registration policy
Upstream commit: 234a557e28b9142e07eae21083a04fffef83ee8d

The current code is using a fixed mapping between the LS7A interrupt source
and the HT interrupt vector. This prevents the utilization of the full
interrupt vector space and therefore limits the number of interrupt source
in a system.

Replace the fixed mapping with a dynamic mapping which allocates a
vector when an interrupt source is set up. This avoids that unused
sources prevent vectors from being used for other devices.

Introduce a mapping table in struct pch_pic, where each interrupt source
will allocate an index as a 'hwirq' number from the table in the order of
application and set table value as interrupt source number. This hwirq
number will be configured as vector in the HT interrupt controller. For an
interrupt source, the validity period of the obtained hwirq will last until
the system reset.

Co-developed-by: Biao Dong <dongbiao@loongson.cn>
Signed-off-by: Biao Dong <dongbiao@loongson.cn>
Co-developed-by: Tianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: Tianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: Baoqi Zhang <zhangbaoqi@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240422093830.27212-1-zhangtianyang@loongson.cn
Signed-off-by: Ming Wang <wangming01@loongson.cn>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-09 18:50:35 +08:00
leonylgao dea53117e5 Merge branch 'frankjpliu/master' into 'master' (merge request !87)
dist: not split out modules-public and modules-public-removable-media rpm
2024-05-09 10:41:17 +00:00
Jianping Liu f67246a0d7 dist: not split out modules-public and modules-public-removable-media rpm
OC release need keep consistent with the community's conventions.
Spliting out modules-public and modules-public-removable-media rpm is
inconsistent with the community's conventions.

Revert:
commit 4faa03afdc ("dist: add a modules-public rpm subpackage")
commit 83c70cfab6 ("dist: rename modules-removable-media to
modules-public-removable-media")

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-09 16:26:44 +08:00
Xin Jiang 5a81ec00db crypto: ccp: Add SET_SMR/SET_SMCR commands for CSV3
Upstream: no

Set guest memory regions in hygon hardware with SET_SMR command.
Secure memory control region(SMCR) is a special memory region which
is dedicated for CSV3 guest's meta data. SET_SMCR command is used to
set SMCR memory in hygon hardware. Both SET_SMR and SET_SMCR should
be issued early during platform initialization.

Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 16:20:03 +08:00
Xin Jiang bdf67f35c3 x86/mm: Manage CSV3 guest's private memory by CMA
Upstream: no

The private memory of a CSV3 guest is isolated from VMM and has to be
physically contiguous. CMA (Contiguous Memory Allocator) is a memory
allocator within the kernel for contiguous physical memory.

Use the CMA for the CSV3 private memory management. In order to
support CSV3, select MMU and CMA when CONIFG_HYGON_CSV is
configured.

Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 16:08:02 +08:00
Xin Jiang 1f610375d1 crypto: ccp: Define CSV3 key management command id
Upstream: no

Define Hygon CSV3 key management command id and structure. CSV3 is
the technology for Hygon secure virtualization to improve security
of guest with secure isolated memory technology in hardware.

The command definition is available in CSV3 spec.

Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 16:05:54 +08:00
Xin Jiang 68c126a956 KVM: SEV: Pin SEV guest memory out of CMA area
Upstream: no

When pin_user_pages_fast pin SEV guest memory without FOLL_LONGTERM
flag, the pinning pages may be in CMA area, which resulting in other
applications may can't use the CMA area because the pinning pages
can't be migrated.

Add FOLL_LONGTERM flag to pin_user_pages_fast, which makes sure that we
don't keep non_movable pages (due to page reference count) in CMA area.
So CMA area can be allocated by other applications.

Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 16:05:01 +08:00
yangge 11d27a0ed5 mm/gup: don't check if a page is in lru before draining it
Upstream: no

Before migrating a page, we need to drain the page out of cpu's
pagevecs if the page is in cpu's pagevecs. Otherwise, the migration
will fail because of incorrect page reference. Whatever the return
value of the function folio_test_lru() is, it does not tell whether
the page is in cpu's pagevecs. Therefore, the check
folio_test_lru() needs to be removed to ensure that the migration
logic is correct.

Signed-off-by: yangge <yangge@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 15:35:43 +08:00
yangge 05848df6e8 mm/page_alloc: don't use PCP list for THP-sized allocations when using PF_MEMALLOC_PIN
Upstream: no

In the past, movable allocations could be disallowed from CMA through
PF_MEMALLOC_PIN. However, since commit 5d0a661d80 ("mm/page_alloc: use
only one PCP list for THP-sized allocations"), THP-sized pages of
different types are put into one PCP list. When allocate a THP with
PF_MEMALLOC_PIN, it would accidentally get a CMA page from PCP list,
which will cause the program to not run correctly. So, PCP list can't
be used for THP-sized allocations when using PF_MEMALLOC_PIN.

Fixes: 5d0a661d80 ("mm/page_alloc: use only one PCP list for THP-sized allocations")
Signed-off-by: yangge <yangge@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 15:35:19 +08:00
hanliyang 079cc16170 KVM: SVM: Add support for different CSV guests to reuse the same ASID
Upstream: no

If user want to reuse one ASID for many CSV guests, he should provide a
label (i.e. userid) and the length of the label when launch CSV guest.
The reference count of the ASID will be increased if user launch a CSV
guest with the label correspond to the ASID. When a CSV guest which
launch with a label is destroyed, the reference count of the ASID
correspond to the label will be decreased, and the ASID is freed only if
the reference count becomes zero.

The codes for reuse ASID is not compatible with CONFIG_CGROUP_MISC, we
introduce CONFIG_KVM_SUPPORTS_CSV_REUSE_ASID that depends on
!CGROUP_MISC, the code take effect only when
CONFIG_KVM_SUPPORTS_CSV_REUSE_ASID=y.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-09 15:14:00 +08:00
刘诗 d0eb7cacd6
!151 [next-6.6]Hygon: Support passthru DCU to virtual machine
Merge pull request !151 from hanliyang/next_hydcu
2024-05-09 06:10:22 +00:00
leonylgao e806fb8c8f Merge branch 'frankjpliu/master' into 'master' (merge request !85)
Merge linux 6.6.29 and linux 6.6.30
2024-05-09 06:10:15 +00:00
刘诗 d2da1edbd2
!150 [next-6.6]Hygon: Some enhancement and bugfixes for HYGON SME/CSV/CSV2
Merge pull request !150 from hanliyang/next_SME_CSV1_CSV2_robust
2024-05-09 06:09:52 +00:00
hanliyang b1f9358dd1 KVM: SVM: Unmap ghcb pages if they're still mapped when destroy guest
Upstream: no

The ghcb pages might be mapped when KVM handling the VMGEXIT events, and
these ghcb pages will be unmapped when prepare to switch to guest mode.
If we try to kill the userspace VMM (e.g. qemu) of a guest, it's
possible that the mapped ghcb pages will never be unmapped which will
cause memory leak. We exposed a serious memory leak by creating and
killing multiple qemu processes for state encrypted guests frequently.

In order to solve this issue, unmap ghcb pages if they're sill mapped
when destroy guest.

Fixes: ce7ea0cfdc ("KVM: SVM: Move GHCB unmapping to fix RCU warning")
Fixes: 291bd20d5d ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT")
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-08 22:26:03 +08:00
Zelin Deng 7eab361ebd anolis: x86/setup: Preserve _ENC flag when initrd is being relocated
Upstream: no

commit ea30196aea830c17565060644034ac7183d27a1a OpenAnolis.

ANBZ: #3267

Commit 107cd25321 ("Encrypt the initrd earlier for BSP microcode update")
when SME is enabled, initrd will be encrypted at earlier stage. If
initrd is located at e820 reserved area the initrd will be copied to
direct mapping area in relocate_initrd().

In this case source address of initrd should be mapped as encrypted
while copy_from_early_mem() will clear encrypted attribute as the source
address is not in kernel usable area, therefore relocated initrd is
encrypted data and is not able to be unpacked later.

Add new function copy_early_initrd() to preserve _ENC flag in setup.c
and remove copy_from_early_mem() as it's only used once here by x86.

Signed-off-by: Zelin Deng <zelin.deng@linux.alibaba.com>
Reviewed-by: Guanjun <guanjun@linux.alibaba.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/932
Signed-off-by: hanliyang <hanliyang@hygon.cn>
Link: https://gitee.com/anolis/cloud-kernel/pulls/2917
2024-05-08 22:25:58 +08:00
Zelin Deng 2086e567c2 anolis: mm/early_ioremap.c: Always build early_memremap_prot() in x86
Upstream: no

commit e1347ea0e4825294d441f6d8b4405412774ef313 OpenAnolis.

ANBZ: #3267

In some scenarios, we'd want to specify protection attributes when we
are doing early memory map. As early_memremap_prot() is also defined in
loongarch it's better to select ARCH_USE_MEMREMAP_PROT on X86 config to
avoid redefined error.

Signed-off-by: Zelin Deng <zelin.deng@linux.alibaba.com>
Reviewed-by: Guanjun <guanjun@linux.alibaba.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/932
[ hly: Fix conflict. ]
Signed-off-by: hanliyang <hanliyang@hygon.cn>
Link: https://gitee.com/anolis/cloud-kernel/pulls/2917
2024-05-08 22:25:56 +08:00
Mathias Krause d8bc7a383d KVM: x86: Fix KVM_GET_MSRS stack info leak
Upstream commit: 3376ca3f1a2075eaa23c5576c47d04d7e8a4adda

Commit 6abe9c1386 ("KVM: X86: Move ignore_msrs handling upper the
stack") changed the 'ignore_msrs' handling, including sanitizing return
values to the caller. This was fine until commit 12bc2132b1 ("KVM:
X86: Do the same ignore_msrs check for feature msrs") which allowed
non-existing feature MSRs to be ignored, i.e. to not generate an error
on the ioctl() level. It even tried to preserve the sanitization of the
return value. However, the logic is flawed, as '*data' will be
overwritten again with the uninitialized stack value of msr.data.

Fix this by simplifying the logic and always initializing msr.data,
vanishing the need for an additional error exit path.

Fixes: 12bc2132b1 ("KVM: X86: Do the same ignore_msrs check for feature msrs")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20240203124522.592778-2-minipli@grsecurity.net
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-05-08 22:25:46 +08:00
Michael Roth 62fda90d9e KVM: SEV: Do not intercept accesses to MSR_IA32_XSS for SEV-ES guests
Upstream commit: a26b7cd2254695f8258cc370f33280db0a9a3813

When intercepts are enabled for MSR_IA32_XSS, the host will swap in/out
the guest-defined values while context-switching to/from guest mode.
However, in the case of SEV-ES, vcpu->arch.guest_state_protected is set,
so the guest-defined value is effectively ignored when switching to
guest mode with the understanding that the VMSA will handle swapping
in/out this register state.

However, SVM is still configured to intercept these accesses for SEV-ES
guests, so the values in the initial MSR_IA32_XSS are effectively
read-only, and a guest will experience undefined behavior if it actually
tries to write to this MSR. Fortunately, only CET/shadowstack makes use
of this register on SEV-ES-capable systems currently, which isn't yet
widely used, but this may become more of an issue in the future.

Additionally, enabling intercepts of MSR_IA32_XSS results in #VC
exceptions in the guest in certain paths that can lead to unexpected #VC
nesting levels. One example is SEV-SNP guests when handling #VC
exceptions for CPUID instructions involving leaf 0xD, subleaf 0x1, since
they will access MSR_IA32_XSS as part of servicing the CPUID #VC, then
generate another #VC when accessing MSR_IA32_XSS, which can lead to
guest crashes if an NMI occurs at that point in time. Running perf on a
guest while it is issuing such a sequence is one example where these can
be problematic.

Address this by disabling intercepts of MSR_IA32_XSS for SEV-ES guests
if the host/guest configuration allows it. If the host/guest
configuration doesn't allow for MSR_IA32_XSS, leave it intercepted so
that it can be caught by the existing checks in
kvm_{set,get}_msr_common() if the guest still attempts to access it.

Fixes: 376c6d2850 ("KVM: SVM: Provide support for SEV-ES vCPU creation/loading")
Cc: Alexey Kardashevskiy <aik@amd.com>
Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Message-Id: <20231016132819.1002933-4-michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-08 22:25:42 +08:00
hanliyang a232fa20af x86/head/64: Flush caches for .bss..decrypted section after CR3 switches to early_top_pgt
Upstream: no

The memory region of .bss..decrypted section maybe mapped with encryption
before early boot stage of Linux. If the correspond stale caches lives in
earlier stage were not flushed before we access that memory region in
later stages, then Linux will crash because the stale caches will pollute
the memory.

Fix this issue by flush the caches with encrypted mapping before we
access .bss..decrypted section.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-08 22:01:19 +08:00
hanliyang b7f162545c KVM: x86: Calls is_64_bit_hypercall() instead of is_64_bit_mode() in complete_hypercall_exit()
Upstream: no

In the commit b5aead0064 ("KVM: x86: Assume a 64-bit hypercall for
guests with protected state"), is_64_bit_mode() will trigger warning,
as the following messages, for SEV-ES or CSV2 guest.

[85350.053201] ------------[ cut here ]------------
[85350.053206] WARNING: CPU: 2 PID: 68989 at arch/x86/kvm/x86.h:156 complete_hypercall_exit+0x6a/0x70 [kvm]
[85350.053299] Modules linked in: kvm_amd(OE) kvm(OE) ccp(E) irqbypass(E) vhost_net(E) vhost(E) vhost_iotlb(E) tap(E) fuse(E) xt_CHECKSUM(E) xt_MASQUERADE(E) xt_conntrack(E) ipt_REJECT(E) nf_reject_ipv4(E) ip6table_mangle(E) ip6table_nat(E) iptable_mangle(E) iptable_nat(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) nf_tables(E) libcrc32c(E) nfnetlink(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) tun(E) bridge(E) stp(E) llc(E) rfkill(E) vfat(E) fat(E) binfmt_misc(E) intel_rapl_msr(E) intel_rapl_common(E) amd64_edac(E) edac_mce_amd(E) crct10dif_pclmul(E) crc32_pclmul(E) acpi_ipmi(E) ipmi_ssif(E) ipmi_si(E) ast(E) joydev(E) mousedev(E) ghash_clmulni_intel(E) rapl(E) ipmi_devintf(E) drm_shmem_helper(E) drm_kms_helper(E) ipmi_msghandler(E) sg(E) k10temp(E) acpi_cpufreq(E) squashfs(E) loop(E) parport_pc(E) ppdev(E) lp(E) parport(E) drm(E) ip_tables(E) sd_mod(E) t10_pi(E) crc64_rocksoft(E) crc64(E) ahci(E) igb(E) i2c_designware_platform(E) libahci(E) i2c_algo_bit(E) dca(E) i2c_piix4(E)
[85350.053421]  i2c_designware_core(E) crc32c_intel(E) libata(E) i2c_core(E) [last unloaded: kvm(OE)]
[85350.053432] CPU: 2 PID: 68989 Comm: qemu-system-x86 Tainted: GF       W  OE      6.6.7-for-openanolis #5
[85350.053438] Hardware name: HYGON HongHaiA1b/HongHaiA1, BIOS A1633050 02/02/2023
[85350.053441] RIP: 0010:complete_hypercall_exit+0x6a/0x70 [kvm]
[85350.053511] Code: e8 9b fb ff ff 48 83 c4 08 5b 5d e9 60 68 68 d8 48 8d 54 24 04 48 89 e6 48 89 ef e8 40 db 12 00 8b 44 24 04 85 c0 74 c4 eb c4 <0f> 0b eb b5 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
[85350.053514] RSP: 0018:ffffc90000ea3e28 EFLAGS: 00010202
[85350.053519] RAX: ffff8881419f0000 RBX: 0000000000000000 RCX: ffff8881003ad780
[85350.053522] RDX: 0000606fc0a29bc0 RSI: 00000000fffffe01 RDI: ffff888b5dc20000
[85350.053525] RBP: ffff888b5dc20000 R08: 0000000000000001 R09: 0000000000000000
[85350.053527] R10: ffffc90000ea3ee8 R11: 0000000000000000 R12: ffff88810fe1ea00
[85350.053530] R13: ffff888b5dc20000 R14: ffff888b5dc20048 R15: 0000000000000000
[85350.053532] FS:  00007eff45528700(0000) GS:ffff88903f080000(0000) knlGS:0000000000000000
[85350.053536] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[85350.053539] CR2: 0000000000000000 CR3: 00000001415d2000 CR4: 00000000003506e0
[85350.053541] Call Trace:
[85350.053545]  <TASK>
[85350.053550]  ? __warn+0x84/0x140
[85350.053558]  ? complete_hypercall_exit+0x6a/0x70 [kvm]
[85350.053627]  ? report_bug+0x1bd/0x1d0
[85350.053635]  ? handle_bug+0x3c/0x70
[85350.053640]  ? exc_invalid_op+0x18/0x70
[85350.053645]  ? asm_exc_invalid_op+0x1a/0x20
[85350.053655]  ? complete_hypercall_exit+0x6a/0x70 [kvm]
[85350.053724]  kvm_arch_vcpu_ioctl_run+0x3dd/0x410 [kvm]
[85350.053796]  kvm_vcpu_ioctl+0x277/0x6c0 [kvm]
[85350.053855]  __x64_sys_ioctl+0x92/0xd0
[85350.053864]  do_syscall_64+0x3f/0x90
[85350.053868]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[85350.053874] RIP: 0033:0x7eff486c33ab
[85350.053878] Code: 0f 1e fa 48 8b 05 e5 7a 0d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b5 7a 0d 00 f7 d8 64 89 01 48
[85350.053881] RSP: 002b:00007eff45527848 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[85350.053886] RAX: ffffffffffffffda RBX: 000000000000ae80 RCX: 00007eff486c33ab
[85350.053888] RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000010
[85350.053891] RBP: 0000563586e32430 R08: 0000563584ff1d30 R09: 00007eff455276a4
[85350.053893] R10: 00007eff4552769c R11: 0000000000000246 R12: 0000000000000000
[85350.053896] R13: 00005635856bcd60 R14: 0000000000000000 R15: 0000000000000000
[85350.053904]  </TASK>
[85350.053906] ---[ end trace 0000000000000000 ]---

Use is_64_bit_hypercall() instead of is_64_bit_mode() in
complete_hypercall_exit() to avoid warning when the SEV-ES or CSV2
guest invoking KVM_HC_MAP_GPA_RANGE hypercall.

Fixes: b5aead0064 ("KVM: x86: Assume a 64-bit hypercall for guests with protected state")
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-05-08 22:00:59 +08:00
Jianping Liu d4f66320ef Merge linux 6.6.30 2024-05-08 19:22:41 +08:00
Jianping Liu 1f2d7cadb2 Merge linux 6.6.29 2024-05-08 19:21:35 +08:00
leonylgao 31a89ad959 Merge branch 'frankjpliu/master' into 'master' (merge request !84)
Merge ock next branch to tk5 master
2024-05-08 11:17:40 +00:00
Jianping Liu eb010b66b1 Merge branch 'ock/next'
!146 [next-6.6]kunpeng:Backport hns3 features and bugfixes
!143 [next-6.6] kunpeng:Backport some bugfixes for hisi_sas
!149 [next-6.6]Hygon:Update ccp-crypto driver to support Hygon 4th CPU
	& add hct.ko module which needed by HCT engine
!148 [next-6.6]Hygon:Support CSV(2) guest attestation, CSV firmware update,
	CSV(2) guest migration, CSV(2) guest reboot, x86-psp communicate interfaces
!147 [next-6.6] Montage:add support for Montage Mont-TSSE Driver
!144 [next-6.6]Support PSP identification for Hygon 4th CPU and print secure
	features when running on Hygon CPUs
!141 add 3snic 3s9xx NIC driver Merge pull request

Conflicts:
	drivers/scsi/hisi_sas/hisi_sas_main.c

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-08 15:25:28 +08:00
aurelianliu 0ded6e029a Hyper-V: support Hyper-V synthetic video device
open CONFIG_DRM_HYPERV to enable video device

Signed-off-by: aurelianliu <aurelianliu@tencent.com>
2024-05-08 07:03:35 +00:00
Dave Airlie 6c2cd75f27 amdkfd: use calloc instead of kzalloc to avoid integer overflow
[ Upstream commit 3b0daecfeac0103aba8b293df07a0cbaf8b43f29 ]

This uses calloc instead of doing the multiplication which might
overflow.

This fixes CVE-2024-26817

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
2024-05-08 07:02:25 +00:00
chinaljp030 ffca8a908f
!146 [next-6.6]kunpeng:Backport hns3 features and bugfixes
Merge pull request !146 from hongrongxuan/linux-6.6/next-ronson-dev
2024-05-08 06:43:35 +00:00
chinaljp030 7722165753
!143 [next-6.6] kunpeng:Backport some bugfixes for hisi_sas
Merge pull request !143 from chenyi/linux-6.6/next-cy-dev
2024-05-08 06:39:25 +00:00
刘诗 b294718c76
!149 [next-6.6]Hygon:Update ccp-crypto driver to support Hygon 4th CPU & add hct.ko module which needed by HCT engine
Merge pull request !149 from partyCoder/next
2024-05-07 06:36:14 +00:00
Yabin Li c77b21d787 Commit Message: Support 1024 processes simutaneously in the hct-mdev mode.
Signed-off-by: Yabin Li <liyabin@hygon.cn>
Signed-off-by: yangdepei <yangdepei@hygon.cn>
2024-05-07 09:54:36 +08:00
Yabin Li 0dfa39df10 Commit Message: Change the maximum number of supported ccps from 16 to 48.
Signed-off-by: Yabin Li <liyabin@hygon.cn>
Signed-off-by: yangdepei <yangdepei@hygon.cn>
2024-05-07 09:54:36 +08:00
Yabin Li 8dfdf88cb9 Commit Message: Compiling hct.ko when the module mdev is disabled.
Signed-off-by: Yabin Li <liyabin@hygon.cn>
Signed-off-by: yangdepei <yangdepei@hygon.cn>
2024-05-07 09:54:36 +08:00