KVM/arm64 updates for v5.14.
- Add MTE support in guests, complete with tag save/restore interface - Reduce the impact of CMOs by moving them in the page-table code - Allow device block mappings at stage-2 - Reduce the footprint of the vmemmap in protected mode - Support the vGIC on dumb systems such as the Apple M1 - Add selftest infrastructure to support multiple configuration and apply that to PMU/non-PMU setups - Add selftests for the debug architecture - The usual crop of PMU fixes -----BEGIN PGP SIGNATURE----- iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmDV2bEPHG1hekBrZXJu ZWwub3JnAAoJECPQ0LrRPXpDEr8P/ivwROx5NwGcHGmU5RfUCT3aFqhtVHHwD/lu jPcgoO61kz9TelOu6QRaVuK+mVHxcq3iP4R8nPq/QCkUlEXTmK2xkyhXhGXSYpH4 6jM8+BbC3eG7iAxx6H0UM4JTl4Riwat6ZZtXpWEWs9TKqOHOQYFpMkxSttwVZ1CZ SjbtFvXLEdzKn6PzUWnKdBNMV/mHsdAtohZit9oJOc4ttc8072XxETQ4TFQ+MSvA j9zY9QPmWzgcZnotqRRu9sbTGO2vxtXuUtY3sjdD8+C9OgSe9qvpnNjymcmfwaMu 1fBkfh65oaO4ItJBdGOUOoEcFqwN5imPiI7CB/O+ZYkO9sBCuTUPSQwPkyiwXb9r bUkTaQw2nZiNWsqR1x07fQ2sGYbMp5mnmgmqiV4MUWkLmFp9LZATCWYTTn24cBNS 6SjVP6/8S0r3EhLnYjH0Pn1we5PooU1EF6RlCAd3ewYoo+9fPnwjNYwIWH5i5wB7 +tnei44NACAw9cfbos+BYQQ/dY15OSFzLzIMomlabB7OpXOdDg3H6tJnPbFwWwXb 9nF8XdHqxeDVVVrDCAx1BSodSXm9xqgnQM2RDGTUnpVcAfqAr3MXX6VsyKQDzj8T QXF9qOVCBAABv6BXAvSQ6mvMJZDUVbUPEPhf7kXzF46JsRd6A7wWoU/OnMGHQ/w7 wjvH8HVy =fWBV -----END PGP SIGNATURE----- Merge tag 'kvmarm-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for v5.14. - Add MTE support in guests, complete with tag save/restore interface - Reduce the impact of CMOs by moving them in the page-table code - Allow device block mappings at stage-2 - Reduce the footprint of the vmemmap in protected mode - Support the vGIC on dumb systems such as the Apple M1 - Add selftest infrastructure to support multiple configuration and apply that to PMU/non-PMU setups - Add selftests for the debug architecture - The usual crop of PMU fixes
This commit is contained in:
commit
b8917b4ae4
816 changed files with 9392 additions and 4425 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/build_bug.h>
|
||||
#define GENMASK_INPUT_CHECK(h, l) \
|
||||
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
|
||||
__builtin_constant_p((l) > (h)), (l) > (h), 0)))
|
||||
__is_constexpr((l) > (h)), (l) > (h), 0)))
|
||||
#else
|
||||
/*
|
||||
* BUILD_BUG_ON_ZERO is not available in h files included from asm files,
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ struct css_set {
|
|||
struct list_head task_iters;
|
||||
|
||||
/*
|
||||
* On the default hierarhcy, ->subsys[ssid] may point to a css
|
||||
* On the default hierarchy, ->subsys[ssid] may point to a css
|
||||
* attached to an ancestor instead of the cgroup this css_set is
|
||||
* associated with. The following node is anchored at
|
||||
* ->subsys[ssid]->cgroup->e_csets[ssid] and provides a way to
|
||||
|
|
@ -668,7 +668,7 @@ struct cgroup_subsys {
|
|||
*/
|
||||
bool threaded:1;
|
||||
|
||||
/* the following two fields are initialized automtically during boot */
|
||||
/* the following two fields are initialized automatically during boot */
|
||||
int id;
|
||||
const char *name;
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) {}
|
|||
* sock_cgroup_data overloads (prioidx, classid) and the cgroup pointer.
|
||||
* On boot, sock_cgroup_data records the cgroup that the sock was created
|
||||
* in so that cgroup2 matches can be made; however, once either net_prio or
|
||||
* net_cls starts being used, the area is overriden to carry prioidx and/or
|
||||
* net_cls starts being used, the area is overridden to carry prioidx and/or
|
||||
* classid. The two modes are distinguished by whether the lowest bit is
|
||||
* set. Clear bit indicates cgroup pointer while set bit prioidx and
|
||||
* classid.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct kernel_clone_args;
|
|||
#ifdef CONFIG_CGROUPS
|
||||
|
||||
/*
|
||||
* All weight knobs on the default hierarhcy should use the following min,
|
||||
* All weight knobs on the default hierarchy should use the following min,
|
||||
* default and max values. The default value is the logarithmic center of
|
||||
* MIN and MAX and allows 100x to be expressed in both directions.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -213,12 +213,11 @@ typedef struct compat_siginfo {
|
|||
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */
|
||||
struct {
|
||||
compat_uptr_t _addr; /* faulting insn/memory ref. */
|
||||
#ifdef __ARCH_SI_TRAPNO
|
||||
int _trapno; /* TRAP # which caused the signal */
|
||||
#endif
|
||||
#define __COMPAT_ADDR_BND_PKEY_PAD (__alignof__(compat_uptr_t) < sizeof(short) ? \
|
||||
sizeof(short) : __alignof__(compat_uptr_t))
|
||||
union {
|
||||
/* used on alpha and sparc */
|
||||
int _trapno; /* TRAP # which caused the signal */
|
||||
/*
|
||||
* used when si_code=BUS_MCEERR_AR or
|
||||
* used when si_code=BUS_MCEERR_AO
|
||||
|
|
@ -236,7 +235,10 @@ typedef struct compat_siginfo {
|
|||
u32 _pkey;
|
||||
} _addr_pkey;
|
||||
/* used when si_code=TRAP_PERF */
|
||||
compat_ulong_t _perf;
|
||||
struct {
|
||||
compat_ulong_t _data;
|
||||
u32 _type;
|
||||
} _perf;
|
||||
};
|
||||
} _sigfault;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,12 @@
|
|||
|
||||
#include <vdso/const.h>
|
||||
|
||||
/*
|
||||
* This returns a constant expression while determining if an argument is
|
||||
* a constant expression, most importantly without evaluating the argument.
|
||||
* Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
|
||||
*/
|
||||
#define __is_constexpr(x) \
|
||||
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
|
||||
|
||||
#endif /* _LINUX_CONST_H */
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ struct device {
|
|||
* @flags: Link flags.
|
||||
* @rpm_active: Whether or not the consumer device is runtime-PM-active.
|
||||
* @kref: Count repeated addition of the same link.
|
||||
* @rcu_head: An RCU head to use for deferred execution of SRCU callbacks.
|
||||
* @rm_work: Work structure used for removing the link.
|
||||
* @supplier_preactivated: Supplier has been made active before consumer probe.
|
||||
*/
|
||||
struct device_link {
|
||||
|
|
@ -583,9 +583,7 @@ struct device_link {
|
|||
u32 flags;
|
||||
refcount_t rpm_active;
|
||||
struct kref kref;
|
||||
#ifdef CONFIG_SRCU
|
||||
struct rcu_head rcu_head;
|
||||
#endif
|
||||
struct work_struct rm_work;
|
||||
bool supplier_preactivated; /* Owned by consumer probe. */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ struct _ddebug {
|
|||
#define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2)
|
||||
#define _DPRINTK_FLAGS_INCL_LINENO (1<<3)
|
||||
#define _DPRINTK_FLAGS_INCL_TID (1<<4)
|
||||
|
||||
#define _DPRINTK_FLAGS_INCL_ANY \
|
||||
(_DPRINTK_FLAGS_INCL_MODNAME | _DPRINTK_FLAGS_INCL_FUNCNAME |\
|
||||
_DPRINTK_FLAGS_INCL_LINENO | _DPRINTK_FLAGS_INCL_TID)
|
||||
|
||||
#if defined DEBUG
|
||||
#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -306,8 +306,6 @@ static inline void bd_unlink_disk_holder(struct block_device *bdev,
|
|||
}
|
||||
#endif /* CONFIG_SYSFS */
|
||||
|
||||
extern struct rw_semaphore bdev_lookup_sem;
|
||||
|
||||
dev_t blk_lookup_devt(const char *name, int partno);
|
||||
void blk_request_module(dev_t devt);
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
|
|
|||
|
|
@ -242,7 +242,8 @@ extern bool initcall_debug;
|
|||
asm(".section \"" __sec "\", \"a\" \n" \
|
||||
__stringify(__name) ": \n" \
|
||||
".long " __stringify(__stub) " - . \n" \
|
||||
".previous \n");
|
||||
".previous \n"); \
|
||||
static_assert(__same_type(initcall_t, &fn));
|
||||
#else
|
||||
#define ____define_initcall(fn, __unused, __name, __sec) \
|
||||
static initcall_t __name __used \
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
#ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H
|
||||
#define __LINUX_IRQCHIP_ARM_GIC_COMMON_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/irqchip/arm-vgic-info.h>
|
||||
|
||||
#define GICD_INT_DEF_PRI 0xa0
|
||||
#define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
|
||||
|
|
@ -16,28 +15,6 @@
|
|||
(GICD_INT_DEF_PRI << 8) |\
|
||||
GICD_INT_DEF_PRI)
|
||||
|
||||
enum gic_type {
|
||||
GIC_V2,
|
||||
GIC_V3,
|
||||
};
|
||||
|
||||
struct gic_kvm_info {
|
||||
/* GIC type */
|
||||
enum gic_type type;
|
||||
/* Virtual CPU interface */
|
||||
struct resource vcpu;
|
||||
/* Interrupt number */
|
||||
unsigned int maint_irq;
|
||||
/* Virtual control interface */
|
||||
struct resource vctrl;
|
||||
/* vlpi support */
|
||||
bool has_v4;
|
||||
/* rvpeid support */
|
||||
bool has_v4_1;
|
||||
};
|
||||
|
||||
const struct gic_kvm_info *gic_get_kvm_info(void);
|
||||
|
||||
struct irq_domain;
|
||||
struct fwnode_handle;
|
||||
int gicv2m_init(struct fwnode_handle *parent_handle,
|
||||
|
|
|
|||
45
include/linux/irqchip/arm-vgic-info.h
Normal file
45
include/linux/irqchip/arm-vgic-info.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* include/linux/irqchip/arm-vgic-info.h
|
||||
*
|
||||
* Copyright (C) 2016 ARM Limited, All Rights Reserved.
|
||||
*/
|
||||
#ifndef __LINUX_IRQCHIP_ARM_VGIC_INFO_H
|
||||
#define __LINUX_IRQCHIP_ARM_VGIC_INFO_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioport.h>
|
||||
|
||||
enum gic_type {
|
||||
/* Full GICv2 */
|
||||
GIC_V2,
|
||||
/* Full GICv3, optionally with v2 compat */
|
||||
GIC_V3,
|
||||
};
|
||||
|
||||
struct gic_kvm_info {
|
||||
/* GIC type */
|
||||
enum gic_type type;
|
||||
/* Virtual CPU interface */
|
||||
struct resource vcpu;
|
||||
/* Interrupt number */
|
||||
unsigned int maint_irq;
|
||||
/* No interrupt mask, no need to use the above field */
|
||||
bool no_maint_irq_mask;
|
||||
/* Virtual control interface */
|
||||
struct resource vctrl;
|
||||
/* vlpi support */
|
||||
bool has_v4;
|
||||
/* rvpeid support */
|
||||
bool has_v4_1;
|
||||
/* Deactivation impared, subpar stuff */
|
||||
bool no_hw_deactivation;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
void vgic_set_kvm_info(const struct gic_kvm_info *info);
|
||||
#else
|
||||
static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
#ifndef _LINUX_MINMAX_H
|
||||
#define _LINUX_MINMAX_H
|
||||
|
||||
#include <linux/const.h>
|
||||
|
||||
/*
|
||||
* min()/max()/clamp() macros must accomplish three things:
|
||||
*
|
||||
|
|
@ -17,14 +19,6 @@
|
|||
#define __typecheck(x, y) \
|
||||
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
|
||||
|
||||
/*
|
||||
* This returns a constant expression while determining if an argument is
|
||||
* a constant expression, most importantly without evaluating the argument.
|
||||
* Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
|
||||
*/
|
||||
#define __is_constexpr(x) \
|
||||
(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
|
||||
|
||||
#define __no_side_effects(x, y) \
|
||||
(__is_constexpr(x) && __is_constexpr(y))
|
||||
|
||||
|
|
|
|||
|
|
@ -703,6 +703,27 @@ struct mlx5_hv_vhca;
|
|||
#define MLX5_LOG_SW_ICM_BLOCK_SIZE(dev) (MLX5_CAP_DEV_MEM(dev, log_sw_icm_alloc_granularity))
|
||||
#define MLX5_SW_ICM_BLOCK_SIZE(dev) (1 << MLX5_LOG_SW_ICM_BLOCK_SIZE(dev))
|
||||
|
||||
enum {
|
||||
MLX5_PROF_MASK_QP_SIZE = (u64)1 << 0,
|
||||
MLX5_PROF_MASK_MR_CACHE = (u64)1 << 1,
|
||||
};
|
||||
|
||||
enum {
|
||||
MR_CACHE_LAST_STD_ENTRY = 20,
|
||||
MLX5_IMR_MTT_CACHE_ENTRY,
|
||||
MLX5_IMR_KSM_CACHE_ENTRY,
|
||||
MAX_MR_CACHE_ENTRIES
|
||||
};
|
||||
|
||||
struct mlx5_profile {
|
||||
u64 mask;
|
||||
u8 log_max_qp;
|
||||
struct {
|
||||
int size;
|
||||
int limit;
|
||||
} mr_cache[MAX_MR_CACHE_ENTRIES];
|
||||
};
|
||||
|
||||
struct mlx5_core_dev {
|
||||
struct device *device;
|
||||
enum mlx5_coredev_type coredev_type;
|
||||
|
|
@ -731,7 +752,7 @@ struct mlx5_core_dev {
|
|||
struct mutex intf_state_mutex;
|
||||
unsigned long intf_state;
|
||||
struct mlx5_priv priv;
|
||||
struct mlx5_profile *profile;
|
||||
struct mlx5_profile profile;
|
||||
u32 issi;
|
||||
struct mlx5e_resources mlx5e_res;
|
||||
struct mlx5_dm *dm;
|
||||
|
|
@ -1083,18 +1104,6 @@ static inline u8 mlx5_mkey_variant(u32 mkey)
|
|||
return mkey & 0xff;
|
||||
}
|
||||
|
||||
enum {
|
||||
MLX5_PROF_MASK_QP_SIZE = (u64)1 << 0,
|
||||
MLX5_PROF_MASK_MR_CACHE = (u64)1 << 1,
|
||||
};
|
||||
|
||||
enum {
|
||||
MR_CACHE_LAST_STD_ENTRY = 20,
|
||||
MLX5_IMR_MTT_CACHE_ENTRY,
|
||||
MLX5_IMR_KSM_CACHE_ENTRY,
|
||||
MAX_MR_CACHE_ENTRIES
|
||||
};
|
||||
|
||||
/* Async-atomic event notifier used by mlx5 core to forward FW
|
||||
* evetns recived from event queue to mlx5 consumers.
|
||||
* Optimise event queue dipatching.
|
||||
|
|
@ -1148,15 +1157,6 @@ int mlx5_rdma_rn_get_params(struct mlx5_core_dev *mdev,
|
|||
struct ib_device *device,
|
||||
struct rdma_netdev_alloc_params *params);
|
||||
|
||||
struct mlx5_profile {
|
||||
u64 mask;
|
||||
u8 log_max_qp;
|
||||
struct {
|
||||
int size;
|
||||
int limit;
|
||||
} mr_cache[MAX_MR_CACHE_ENTRIES];
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_PCI_DEV_IS_VF = 1 << 0,
|
||||
};
|
||||
|
|
|
|||
18
include/linux/mlx5/mpfs.h
Normal file
18
include/linux/mlx5/mpfs.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
* Copyright (c) 2021 Mellanox Technologies Ltd.
|
||||
*/
|
||||
|
||||
#ifndef _MLX5_MPFS_
|
||||
#define _MLX5_MPFS_
|
||||
|
||||
struct mlx5_core_dev;
|
||||
|
||||
#ifdef CONFIG_MLX5_MPFS
|
||||
int mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u8 *mac);
|
||||
int mlx5_mpfs_del_mac(struct mlx5_core_dev *dev, u8 *mac);
|
||||
#else /* #ifndef CONFIG_MLX5_MPFS */
|
||||
static inline int mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u8 *mac) { return 0; }
|
||||
static inline int mlx5_mpfs_del_mac(struct mlx5_core_dev *dev, u8 *mac) { return 0; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -496,6 +496,11 @@ struct macsec_ops;
|
|||
* @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY
|
||||
* @state: State of the PHY for management purposes
|
||||
* @dev_flags: Device-specific flags used by the PHY driver.
|
||||
* Bits [15:0] are free to use by the PHY driver to communicate
|
||||
* driver specific behavior.
|
||||
* Bits [23:16] are currently reserved for future use.
|
||||
* Bits [31:24] are reserved for defining generic
|
||||
* PHY driver behavior.
|
||||
* @irq: IRQ number of the PHY's interrupt (-1 if none)
|
||||
* @phy_timer: The timer for handling the state machine
|
||||
* @phylink: Pointer to phylink instance for this PHY
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ int send_sig_mceerr(int code, void __user *, short, struct task_struct *);
|
|||
|
||||
int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper);
|
||||
int force_sig_pkuerr(void __user *addr, u32 pkey);
|
||||
int force_sig_perf(void __user *addr, u32 type, u64 sig_data);
|
||||
|
||||
int force_sig_ptrace_errno_trap(int errno, void __user *addr);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ enum siginfo_layout {
|
|||
SIL_TIMER,
|
||||
SIL_POLL,
|
||||
SIL_FAULT,
|
||||
SIL_FAULT_TRAPNO,
|
||||
SIL_FAULT_MCEERR,
|
||||
SIL_FAULT_BNDERR,
|
||||
SIL_FAULT_PKUERR,
|
||||
|
|
|
|||
|
|
@ -644,8 +644,8 @@ struct spi_controller {
|
|||
int *cs_gpios;
|
||||
struct gpio_desc **cs_gpiods;
|
||||
bool use_gpio_descriptors;
|
||||
u8 unused_native_cs;
|
||||
u8 max_native_cs;
|
||||
s8 unused_native_cs;
|
||||
s8 max_native_cs;
|
||||
|
||||
/* statistics */
|
||||
struct spi_statistics statistics;
|
||||
|
|
|
|||
|
|
@ -368,6 +368,8 @@ struct rpc_xprt * xprt_alloc(struct net *net, size_t size,
|
|||
unsigned int num_prealloc,
|
||||
unsigned int max_req);
|
||||
void xprt_free(struct rpc_xprt *);
|
||||
void xprt_add_backlog(struct rpc_xprt *xprt, struct rpc_task *task);
|
||||
bool xprt_wake_up_backlog(struct rpc_xprt *xprt, struct rpc_rqst *req);
|
||||
|
||||
static inline int
|
||||
xprt_enable_swap(struct rpc_xprt *xprt)
|
||||
|
|
|
|||
|
|
@ -98,9 +98,9 @@ struct ssam_device_uid {
|
|||
| (((fun) != SSAM_ANY_FUN) ? SSAM_MATCH_FUNCTION : 0), \
|
||||
.domain = d, \
|
||||
.category = cat, \
|
||||
.target = ((tid) != SSAM_ANY_TID) ? (tid) : 0, \
|
||||
.instance = ((iid) != SSAM_ANY_IID) ? (iid) : 0, \
|
||||
.function = ((fun) != SSAM_ANY_FUN) ? (fun) : 0 \
|
||||
.target = __builtin_choose_expr((tid) != SSAM_ANY_TID, (tid), 0), \
|
||||
.instance = __builtin_choose_expr((iid) != SSAM_ANY_IID, (iid), 0), \
|
||||
.function = __builtin_choose_expr((fun) != SSAM_ANY_FUN, (fun), 0)
|
||||
|
||||
/**
|
||||
* SSAM_VDEV() - Initialize a &struct ssam_device_id as virtual device with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue