Merge tag 'loongarch-kvm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD

LoongArch KVM changes for v6.16

1. Don't flush tlb if HW PTW supported.
2. Add LoongArch KVM selftests support.
This commit is contained in:
Paolo Bonzini
2025-05-26 16:12:13 -04:00
1486 changed files with 20709 additions and 9181 deletions
+15 -6
View File
@@ -8,10 +8,19 @@
#define _UAPI_CXL_FEATURES_H_
#include <linux/types.h>
#ifndef __KERNEL__
#include <uuid/uuid.h>
#else
typedef unsigned char __uapi_uuid_t[16];
#ifdef __KERNEL__
#include <linux/uuid.h>
/*
* Note, __uapi_uuid_t is 1-byte aligned on modern compilers and 4-byte
* aligned on others. Ensure that __uapi_uuid_t in a struct is placed at
* a 4-byte aligned offset, or the structure is packed, to ensure
* consistent padding.
*/
static_assert(sizeof(__uapi_uuid_t) == sizeof(uuid_t));
#define __uapi_uuid_t uuid_t
#endif
/*
@@ -60,7 +69,7 @@ struct cxl_mbox_get_sup_feats_in {
* Get Supported Features Supported Feature Entry
*/
struct cxl_feat_entry {
uuid_t uuid;
__uapi_uuid_t uuid;
__le16 id;
__le16 get_feat_size;
__le16 set_feat_size;
@@ -110,7 +119,7 @@ struct cxl_mbox_get_sup_feats_out {
* CXL spec r3.2 section 8.2.9.6.2 Table 8-99
*/
struct cxl_mbox_get_feat_in {
uuid_t uuid;
__uapi_uuid_t uuid;
__le16 offset;
__le16 count;
__u8 selection;
@@ -143,7 +152,7 @@ enum cxl_get_feat_selection {
*/
struct cxl_mbox_set_feat_in {
__struct_group(cxl_mbox_set_feat_hdr, hdr, /* no attrs */,
uuid_t uuid;
__uapi_uuid_t uuid;
__le32 flags;
__le16 offset;
__u8 version;
+2 -2
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*/
#ifndef __UAPI_IVPU_DRM_H__
@@ -147,7 +147,7 @@ struct drm_ivpu_param {
* platform type when executing on a simulator or emulator (read-only)
*
* %DRM_IVPU_PARAM_CORE_CLOCK_RATE:
* Current PLL frequency (read-only)
* Maximum frequency of the NPU data processing unit clock (read-only)
*
* %DRM_IVPU_PARAM_NUM_CONTEXTS:
* Maximum number of simultaneously existing contexts (read-only)
+3
View File
@@ -4968,6 +4968,9 @@ union bpf_attr {
* the netns switch takes place from ingress to ingress without
* going through the CPU's backlog queue.
*
* *skb*\ **->mark** and *skb*\ **->tstamp** are not cleared during
* the netns switch.
*
* The *flags* argument is reserved and must be 0. The helper is
* currently only supported for tc BPF program types at the
* ingress hook and for veth and netkit target device types. The
@@ -31,11 +31,6 @@ enum ethtool_header_flags {
ETHTOOL_FLAG_STATS = 4,
};
enum {
ETHTOOL_PHY_UPSTREAM_TYPE_MAC,
ETHTOOL_PHY_UPSTREAM_TYPE_PHY,
};
enum ethtool_tcp_data_split {
ETHTOOL_TCP_DATA_SPLIT_UNKNOWN,
ETHTOOL_TCP_DATA_SPLIT_DISABLED,
+3 -1
View File
@@ -1010,7 +1010,9 @@ struct io_uring_zcrx_ifq_reg {
__u64 region_ptr; /* struct io_uring_region_desc * */
struct io_uring_zcrx_offsets offsets;
__u64 __resv[4];
__u32 zcrx_id;
__u32 __resv2;
__u64 __resv[3];
};
#ifdef __cplusplus
+56 -29
View File
@@ -53,43 +53,70 @@ struct landlock_ruleset_attr {
__u64 scoped;
};
/*
* sys_landlock_create_ruleset() flags:
/**
* DOC: landlock_create_ruleset_flags
*
* - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
* version.
* - %LANDLOCK_CREATE_RULESET_ERRATA: Get a bitmask of fixed issues.
* **Flags**
*
* %LANDLOCK_CREATE_RULESET_VERSION
* Get the highest supported Landlock ABI version (starting at 1).
*
* %LANDLOCK_CREATE_RULESET_ERRATA
* Get a bitmask of fixed issues for the current Landlock ABI version.
*/
/* clang-format off */
#define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
#define LANDLOCK_CREATE_RULESET_ERRATA (1U << 1)
/* clang-format on */
/*
* sys_landlock_restrict_self() flags:
/**
* DOC: landlock_restrict_self_flags
*
* - %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF: Do not create any log related to the
* enforced restrictions. This should only be set by tools launching unknown
* or untrusted programs (e.g. a sandbox tool, container runtime, system
* service manager). Because programs sandboxing themselves should fix any
* denied access, they should not set this flag to be aware of potential
* issues reported by system's logs (i.e. audit).
* - %LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON: Explicitly ask to continue
* logging denied access requests even after an :manpage:`execve(2)` call.
* This flag should only be set if all the programs than can legitimately be
* executed will not try to request a denied access (which could spam audit
* logs).
* - %LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF: Do not create any log related
* to the enforced restrictions coming from future nested domains created by
* the caller or its descendants. This should only be set according to a
* runtime configuration (i.e. not hardcoded) by programs launching other
* unknown or untrusted programs that may create their own Landlock domains
* and spam logs. The main use case is for container runtimes to enable users
* to mute buggy sandboxed programs for a specific container image. Other use
* cases include sandboxer tools and init systems. Unlike
* %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF,
* %LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF does not impact the requested
* restriction (if any) but only the future nested domains.
* **Flags**
*
* By default, denied accesses originating from programs that sandbox themselves
* are logged via the audit subsystem. Such events typically indicate unexpected
* behavior, such as bugs or exploitation attempts. However, to avoid excessive
* logging, access requests denied by a domain not created by the originating
* program are not logged by default. The rationale is that programs should know
* their own behavior, but not necessarily the behavior of other programs. This
* default configuration is suitable for most programs that sandbox themselves.
* For specific use cases, the following flags allow programs to modify this
* default logging behavior.
*
* The %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF and
* %LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON flags apply to the newly created
* Landlock domain.
*
* %LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF
* Disables logging of denied accesses originating from the thread creating
* the Landlock domain, as well as its children, as long as they continue
* running the same executable code (i.e., without an intervening
* :manpage:`execve(2)` call). This is intended for programs that execute
* unknown code without invoking :manpage:`execve(2)`, such as script
* interpreters. Programs that only sandbox themselves should not set this
* flag, so users can be notified of unauthorized access attempts via system
* logs.
*
* %LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON
* Enables logging of denied accesses after an :manpage:`execve(2)` call,
* providing visibility into unauthorized access attempts by newly executed
* programs within the created Landlock domain. This flag is recommended
* only when all potential executables in the domain are expected to comply
* with the access restrictions, as excessive audit log entries could make
* it more difficult to identify critical events.
*
* %LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF
* Disables logging of denied accesses originating from nested Landlock
* domains created by the caller or its descendants. This flag should be set
* according to runtime configuration, not hardcoded, to avoid suppressing
* important security events. It is useful for container runtimes or
* sandboxing tools that may launch programs which themselves create
* Landlock domains and could otherwise generate excessive logs. Unlike
* ``LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF``, this flag only affects
* future nested domains, not the one being created. It can also be used
* with a @ruleset_fd value of -1 to mute subdomain logs without creating a
* domain.
*/
/* clang-format off */
#define LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF (1U << 0)
+2 -2
View File
@@ -28,10 +28,10 @@
/* Set current process as the (exclusive) owner of this file descriptor. This
* must be called before any other vhost command. Further calls to
* VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */
* VHOST_SET_OWNER fail until VHOST_RESET_OWNER is called. */
#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
/* Give up ownership, and reset the device to default values.
* Allows subsequent call to VHOST_OWNER_SET to succeed. */
* Allows subsequent call to VHOST_SET_OWNER to succeed. */
#define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02)
/* Set up/modify memory layout */
+1
View File
@@ -246,6 +246,7 @@ struct virtio_pci_cfg_cap {
#define VIRTIO_ADMIN_CMD_LIST_USE 0x1
/* Admin command group type. */
#define VIRTIO_ADMIN_GROUP_TYPE_SELF 0x0
#define VIRTIO_ADMIN_GROUP_TYPE_SRIOV 0x1
/* Transitional device admin command. */