Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Aug 2022 21:59:54 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Aug 2022 21:59:54 +0000 (14:59 -0700)
Pull kvm updates from Paolo Bonzini:
 "Quite a large pull request due to a selftest API overhaul and some
  patches that had come in too late for 5.19.

  ARM:

   - Unwinder implementations for both nVHE modes (classic and
     protected), complete with an overflow stack

   - Rework of the sysreg access from userspace, with a complete rewrite
     of the vgic-v3 view to allign with the rest of the infrastructure

   - Disagregation of the vcpu flags in separate sets to better track
     their use model.

   - A fix for the GICv2-on-v3 selftest

   - A small set of cosmetic fixes

  RISC-V:

   - Track ISA extensions used by Guest using bitmap

   - Added system instruction emulation framework

   - Added CSR emulation framework

   - Added gfp_custom flag in struct kvm_mmu_memory_cache

   - Added G-stage ioremap() and iounmap() functions

   - Added support for Svpbmt inside Guest

  s390:

   - add an interface to provide a hypervisor dump for secure guests

   - improve selftests to use TAP interface

   - enable interpretive execution of zPCI instructions (for PCI
     passthrough)

   - First part of deferred teardown

   - CPU Topology

   - PV attestation

   - Minor fixes

  x86:

   - Permit guests to ignore single-bit ECC errors

   - Intel IPI virtualization

   - Allow getting/setting pending triple fault with
     KVM_GET/SET_VCPU_EVENTS

   - PEBS virtualization

   - Simplify PMU emulation by just using PERF_TYPE_RAW events

   - More accurate event reinjection on SVM (avoid retrying
     instructions)

   - Allow getting/setting the state of the speaker port data bit

   - Refuse starting the kvm-intel module if VM-Entry/VM-Exit controls
     are inconsistent

   - "Notify" VM exit (detect microarchitectural hangs) for Intel

   - Use try_cmpxchg64 instead of cmpxchg64

   - Ignore benign host accesses to PMU MSRs when PMU is disabled

   - Allow disabling KVM's "MONITOR/MWAIT are NOPs!" behavior

   - Allow NX huge page mitigation to be disabled on a per-vm basis

   - Port eager page splitting to shadow MMU as well

   - Enable CMCI capability by default and handle injected UCNA errors

   - Expose pid of vcpu threads in debugfs

   - x2AVIC support for AMD

   - cleanup PIO emulation

   - Fixes for LLDT/LTR emulation

   - Don't require refcounted "struct page" to create huge SPTEs

   - Miscellaneous cleanups:
      - MCE MSR emulation
      - Use separate namespaces for guest PTEs and shadow PTEs bitmasks
      - PIO emulation
      - Reorganize rmap API, mostly around rmap destruction
      - Do not workaround very old KVM bugs for L0 that runs with nesting enabled
      - new selftests API for CPUID

  Generic:

   - Fix races in gfn->pfn cache refresh; do not pin pages tracked by
     the cache

   - new selftests API using struct kvm_vcpu instead of a (vm, id)
     tuple"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (606 commits)
  selftests: kvm: set rax before vmcall
  selftests: KVM: Add exponent check for boolean stats
  selftests: KVM: Provide descriptive assertions in kvm_binary_stats_test
  selftests: KVM: Check stat name before other fields
  KVM: x86/mmu: remove unused variable
  RISC-V: KVM: Add support for Svpbmt inside Guest/VM
  RISC-V: KVM: Use PAGE_KERNEL_IO in kvm_riscv_gstage_ioremap()
  RISC-V: KVM: Add G-stage ioremap() and iounmap() functions
  KVM: Add gfp_custom flag in struct kvm_mmu_memory_cache
  RISC-V: KVM: Add extensible CSR emulation framework
  RISC-V: KVM: Add extensible system instruction emulation framework
  RISC-V: KVM: Factor-out instruction emulation into separate sources
  RISC-V: KVM: move preempt_disable() call in kvm_arch_vcpu_ioctl_run
  RISC-V: KVM: Make kvm_riscv_guest_timer_init a void function
  RISC-V: KVM: Fix variable spelling mistake
  RISC-V: KVM: Improve ISA extension by using a bitmap
  KVM, x86/mmu: Fix the comment around kvm_tdp_mmu_zap_leafs()
  KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog
  KVM: x86/mmu: Treat NX as a valid SPTE bit for NPT
  KVM: x86: Do not block APIC write for non ICR registers
  ...

15 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/virt/kvm/api.rst
MAINTAINERS
arch/arm64/include/asm/memory.h
arch/arm64/kvm/hyp/nvhe/sys_regs.c
arch/arm64/kvm/sys_regs.c
arch/x86/events/intel/core.c
arch/x86/events/perf_event.h
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/perf_event.h
arch/x86/include/uapi/asm/kvm.h
drivers/vfio/pci/vfio_pci_core.c
include/uapi/linux/kvm.h
tools/testing/selftests/kvm/Makefile

        arm64.nomte     [ARM64] Unconditionally disable Memory Tagging Extension
                        support
  
 +      arm64.nosve     [ARM64] Unconditionally disable Scalable Vector
 +                      Extension support
 +
 +      arm64.nosme     [ARM64] Unconditionally disable Scalable Matrix
 +                      Extension support
 +
        ataflop=        [HW,M68k]
  
        atarimouse=     [HW,MOUSE] Atari Mouse
                        nosocket -- Disable socket memory accounting.
                        nokmem -- Disable kernel memory accounting.
  
 -      checkreqprot    [SELINUX] Set initial checkreqprot flag value.
 +      checkreqprot=   [SELINUX] Set initial checkreqprot flag value.
                        Format: { "0" | "1" }
                        See security/selinux/Kconfig help text.
                        0 -- check protection applied by kernel (includes
                        (in particular on some ATI chipsets).
                        The kernel tries to set a reasonable default.
  
 -      enforcing       [SELINUX] Set initial enforcing status.
 +      enforcing=      [SELINUX] Set initial enforcing status.
                        Format: {"0" | "1"}
                        See security/selinux/Kconfig help text.
                        0 -- permissive (log only, no denials).
                        the KVM_CLEAR_DIRTY ioctl, and only for the pages being
                        cleared.
  
-                       Eager page splitting currently only supports splitting
-                       huge pages mapped by the TDP MMU.
+                       Eager page splitting is only supported when kvm.tdp_mmu=Y.
  
                        Default is Y (on).
  
                        mem_encrypt=on:         Activate SME
                        mem_encrypt=off:        Do not activate SME
  
 -                      Refer to Documentation/virt/kvm/amd-memory-encryption.rst
 +                      Refer to Documentation/virt/kvm/x86/amd-memory-encryption.rst
                        for details on when memory encryption can be activated.
  
        mem_sleep_default=      [SUSPEND] Default system suspend mode:
                                improves system performance, but it may also
                                expose users to several CPU vulnerabilities.
                                Equivalent to: nopti [X86,PPC]
 -                                             kpti=0 [ARM64]
 +                                             if nokaslr then kpti=0 [ARM64]
                                               nospectre_v1 [X86,PPC]
                                               nobp=0 [S390]
                                               nospectre_v2 [X86,PPC,S390,ARM64]
                                               no_entry_flush [PPC]
                                               no_uaccess_flush [PPC]
                                               mmio_stale_data=off [X86]
 +                                             retbleed=off [X86]
  
                                Exceptions:
                                               This does not have any effect on
                                               mds=full,nosmt [X86]
                                               tsx_async_abort=full,nosmt [X86]
                                               mmio_stale_data=full,nosmt [X86]
 +                                             retbleed=auto,nosmt [X86]
  
        mminit_loglevel=
                        [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
                        just as if they had also been called out in the
                        rcu_nocbs= boot parameter.
  
 +                      Note that this argument takes precedence over
 +                      the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option.
 +
        noiotrap        [SH] Disables trapped I/O port accesses.
  
        noirqdebug      [X86-32] Disables the code which attempts to detect and
        noreplace-smp   [X86-32,SMP] Don't replace SMP instructions
                        with UP alternatives
  
 -      nordrand        [X86] Disable kernel use of the RDRAND and
 -                      RDSEED instructions even if they are supported
 -                      by the processor.  RDRAND and RDSEED are still
 -                      available to user space applications.
 -
        noresume        [SWSUSP] Disables resume and restores original swap
                        space.
  
                        no-callback mode from boot but the mode may be
                        toggled at runtime via cpusets.
  
 +                      Note that this argument takes precedence over
 +                      the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option.
 +
        rcu_nocb_poll   [KNL]
                        Rather than requiring that offloaded CPUs
                        (specified by rcu_nocbs= above) explicitly
                        When RCU_NOCB_CPU is set, also adjust the
                        priority of NOCB callback kthreads.
  
 +      rcutree.rcu_divisor= [KNL]
 +                      Set the shift-right count to use to compute
 +                      the callback-invocation batch limit bl from
 +                      the number of callbacks queued on this CPU.
 +                      The result will be bounded below by the value of
 +                      the rcutree.blimit kernel parameter.  Every bl
 +                      callbacks, the softirq handler will exit in
 +                      order to allow the CPU to do other work.
 +
 +                      Please note that this callback-invocation batch
 +                      limit applies only to non-offloaded callback
 +                      invocation.  Offloaded callbacks are instead
 +                      invoked in the context of an rcuoc kthread, which
 +                      scheduler will preempt as it does any other task.
 +
 +      rcutree.nocb_nobypass_lim_per_jiffy= [KNL]
 +                      On callback-offloaded (rcu_nocbs) CPUs,
 +                      RCU reduces the lock contention that would
 +                      otherwise be caused by callback floods through
 +                      use of the ->nocb_bypass list.  However, in the
 +                      common non-flooded case, RCU queues directly to
 +                      the main ->cblist in order to avoid the extra
 +                      overhead of the ->nocb_bypass list and its lock.
 +                      But if there are too many callbacks queued during
 +                      a single jiffy, RCU pre-queues the callbacks into
 +                      the ->nocb_bypass queue.  The definition of "too
 +                      many" is supplied by this kernel boot parameter.
 +
        rcutree.rcu_nocb_gp_stride= [KNL]
                        Set the number of NOCB callback kthreads in
                        each group, which defaults to the square root
@@@ -1150,6 -1150,10 +1150,10 @@@ The following bits are defined in the f
    fields contain a valid state. This bit will be set whenever
    KVM_CAP_EXCEPTION_PAYLOAD is enabled.
  
+ - KVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the
+   triple_fault_pending field contains a valid state. This bit will
+   be set whenever KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled.
  ARM64:
  ^^^^^^
  
@@@ -1245,6 -1249,10 +1249,10 @@@ can be set in the flags field to signa
  exception_has_payload, exception_payload, and exception.pending fields
  contain a valid state and shall be written into the VCPU.
  
+ If KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled, KVM_VCPUEVENT_VALID_TRIPLE_FAULT
+ can be set in flags field to signal that the triple_fault field contains
+ a valid state and shall be written into the VCPU.
  ARM64:
  ^^^^^^
  
@@@ -2998,7 -3006,9 +3006,9 @@@ KVM_CREATE_PIT2. The state is returned 
  Valid flags are::
  
    /* disable PIT in HPET legacy mode */
-   #define KVM_PIT_FLAGS_HPET_LEGACY  0x00000001
+   #define KVM_PIT_FLAGS_HPET_LEGACY     0x00000001
+   /* speaker port data bit enabled */
+   #define KVM_PIT_FLAGS_SPEAKER_DATA_ON 0x00000002
  
  This IOCTL replaces the obsolete KVM_GET_PIT.
  
@@@ -4667,7 -4677,7 +4677,7 @@@ encrypted VMs
  
  Currently, this ioctl is used for issuing Secure Encrypted Virtualization
  (SEV) commands on AMD Processors. The SEV commands are defined in
 -Documentation/virt/kvm/amd-memory-encryption.rst.
 +Documentation/virt/kvm/x86/amd-memory-encryption.rst.
  
  4.111 KVM_MEMORY_ENCRYPT_REG_REGION
  -----------------------------------
@@@ -5127,7 -5137,15 +5137,15 @@@ into ESA mode. This reset is a superse
        __u32 reserved[3];
    };
  
- cmd values:
+ **Ultravisor return codes**
+ The Ultravisor return (reason) codes are provided by the kernel if a
+ Ultravisor call has been executed to achieve the results expected by
+ the command. Therefore they are independent of the IOCTL return
+ code. If KVM changes `rc`, its value will always be greater than 0
+ hence setting it to 0 before issuing a PV command is advised to be
+ able to detect a change of `rc`.
+ **cmd values:**
  
  KVM_PV_ENABLE
    Allocate memory and register the VM with the Ultravisor, thereby
    =====      =============================
  
  KVM_PV_DISABLE
    Deregister the VM from the Ultravisor and reclaim the memory that
    had been donated to the Ultravisor, making it usable by the kernel
    again.  All registered VCPUs are converted back to non-protected
@@@ -5160,6 -5177,117 +5177,117 @@@ KVM_PV_VM_VERIF
    Verify the integrity of the unpacked image. Only if this succeeds,
    KVM is allowed to start protected VCPUs.
  
+ KVM_PV_INFO
+   :Capability: KVM_CAP_S390_PROTECTED_DUMP
+   Presents an API that provides Ultravisor related data to userspace
+   via subcommands. len_max is the size of the user space buffer,
+   len_written is KVM's indication of how much bytes of that buffer
+   were actually written to. len_written can be used to determine the
+   valid fields if more response fields are added in the future.
+   ::
+      enum pv_cmd_info_id {
+       KVM_PV_INFO_VM,
+       KVM_PV_INFO_DUMP,
+      };
+      struct kvm_s390_pv_info_header {
+       __u32 id;
+       __u32 len_max;
+       __u32 len_written;
+       __u32 reserved;
+      };
+      struct kvm_s390_pv_info {
+       struct kvm_s390_pv_info_header header;
+       struct kvm_s390_pv_info_dump dump;
+       struct kvm_s390_pv_info_vm vm;
+      };
+ **subcommands:**
+   KVM_PV_INFO_VM
+     This subcommand provides basic Ultravisor information for PV
+     hosts. These values are likely also exported as files in the sysfs
+     firmware UV query interface but they are more easily available to
+     programs in this API.
+     The installed calls and feature_indication members provide the
+     installed UV calls and the UV's other feature indications.
+     The max_* members provide information about the maximum number of PV
+     vcpus, PV guests and PV guest memory size.
+     ::
+       struct kvm_s390_pv_info_vm {
+       __u64 inst_calls_list[4];
+       __u64 max_cpus;
+       __u64 max_guests;
+       __u64 max_guest_addr;
+       __u64 feature_indication;
+       };
+   KVM_PV_INFO_DUMP
+     This subcommand provides information related to dumping PV guests.
+     ::
+       struct kvm_s390_pv_info_dump {
+       __u64 dump_cpu_buffer_len;
+       __u64 dump_config_mem_buffer_per_1m;
+       __u64 dump_config_finalize_len;
+       };
+ KVM_PV_DUMP
+   :Capability: KVM_CAP_S390_PROTECTED_DUMP
+   Presents an API that provides calls which facilitate dumping a
+   protected VM.
+   ::
+     struct kvm_s390_pv_dmp {
+       __u64 subcmd;
+       __u64 buff_addr;
+       __u64 buff_len;
+       __u64 gaddr;            /* For dump storage state */
+     };
+   **subcommands:**
+   KVM_PV_DUMP_INIT
+     Initializes the dump process of a protected VM. If this call does
+     not succeed all other subcommands will fail with -EINVAL. This
+     subcommand will return -EINVAL if a dump process has not yet been
+     completed.
+     Not all PV vms can be dumped, the owner needs to set `dump
+     allowed` PCF bit 34 in the SE header to allow dumping.
+   KVM_PV_DUMP_CONFIG_STOR_STATE
+      Stores `buff_len` bytes of tweak component values starting with
+      the 1MB block specified by the absolute guest address
+      (`gaddr`). `buff_len` needs to be `conf_dump_storage_state_len`
+      aligned and at least >= the `conf_dump_storage_state_len` value
+      provided by the dump uv_info data. buff_user might be written to
+      even if an error rc is returned. For instance if we encounter a
+      fault after writing the first page of data.
+   KVM_PV_DUMP_COMPLETE
+     If the subcommand succeeds it completes the dump process and lets
+     KVM_PV_DUMP_INIT be called again.
+     On success `conf_dump_finalize_len` bytes of completion data will be
+     stored to the `buff_addr`. The completion data contains a key
+     derivation seed, IV, tweak nonce and encryption keys as well as an
+     authentication tag all of which are needed to decrypt the dump at a
+     later time.
  4.126 KVM_X86_SET_MSR_FILTER
  ----------------------------
  
@@@ -5811,6 -5939,78 +5939,78 @@@ of CPUID leaf 0xD on the host
  
  This ioctl injects an event channel interrupt directly to the guest vCPU.
  
+ 4.136 KVM_S390_PV_CPU_COMMAND
+ -----------------------------
+ :Capability: KVM_CAP_S390_PROTECTED_DUMP
+ :Architectures: s390
+ :Type: vcpu ioctl
+ :Parameters: none
+ :Returns: 0 on success, < 0 on error
+ This ioctl closely mirrors `KVM_S390_PV_COMMAND` but handles requests
+ for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares
+ the command ids.
+ **command:**
+ KVM_PV_DUMP
+   Presents an API that provides calls which facilitate dumping a vcpu
+   of a protected VM.
+ **subcommand:**
+ KVM_PV_DUMP_CPU
+   Provides encrypted dump data like register values.
+   The length of the returned data is provided by uv_info.guest_cpu_stor_len.
+ 4.137 KVM_S390_ZPCI_OP
+ ----------------------
+ :Capability: KVM_CAP_S390_ZPCI_OP
+ :Architectures: s390
+ :Type: vm ioctl
+ :Parameters: struct kvm_s390_zpci_op (in)
+ :Returns: 0 on success, <0 on error
+ Used to manage hardware-assisted virtualization features for zPCI devices.
+ Parameters are specified via the following structure::
+   struct kvm_s390_zpci_op {
+       /* in */
+       __u32 fh;               /* target device */
+       __u8  op;               /* operation to perform */
+       __u8  pad[3];
+       union {
+               /* for KVM_S390_ZPCIOP_REG_AEN */
+               struct {
+                       __u64 ibv;      /* Guest addr of interrupt bit vector */
+                       __u64 sb;       /* Guest addr of summary bit */
+                       __u32 flags;
+                       __u32 noi;      /* Number of interrupts */
+                       __u8 isc;       /* Guest interrupt subclass */
+                       __u8 sbo;       /* Offset of guest summary bit vector */
+                       __u16 pad;
+               } reg_aen;
+               __u64 reserved[8];
+       } u;
+   };
+ The type of operation is specified in the "op" field.
+ KVM_S390_ZPCIOP_REG_AEN is used to register the VM for adapter event
+ notification interpretation, which will allow firmware delivery of adapter
+ events directly to the vm, with KVM providing a backup delivery mechanism;
+ KVM_S390_ZPCIOP_DEREG_AEN is used to subsequently disable interpretation of
+ adapter event notifications.
+ The target zPCI function must also be specified via the "fh" field.  For the
+ KVM_S390_ZPCIOP_REG_AEN operation, additional information to establish firmware
+ delivery must be provided via the "reg_aen" struct.
+ The "pad" and "reserved" fields may be used for future extensions and should be
+ set to 0s by userspace.
  5. The kvm_run structure
  ========================
  
@@@ -6416,6 -6616,26 +6616,26 @@@ spec refer, https://github.com/riscv/ri
  
  ::
  
+     /* KVM_EXIT_NOTIFY */
+     struct {
+   #define KVM_NOTIFY_CONTEXT_INVALID  (1 << 0)
+       __u32 flags;
+     } notify;
+ Used on x86 systems. When the VM capability KVM_CAP_X86_NOTIFY_VMEXIT is
+ enabled, a VM exit generated if no event window occurs in VM non-root mode
+ for a specified amount of time. Once KVM_X86_NOTIFY_VMEXIT_USER is set when
+ enabling the cap, it would exit to userspace with the exit reason
+ KVM_EXIT_NOTIFY for further handling. The "flags" field contains more
+ detailed info.
+ The valid value for 'flags' is:
+   - KVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid
+     in VMCS. It would run into unknown result if resume the target VM.
+ ::
                /* Fix the size of the union. */
                char padding[256];
        };
@@@ -7357,8 -7577,71 +7577,71 @@@ The valid bits in cap.args[0] are
                                      hypercall instructions. Executing the
                                      incorrect hypercall instruction will
                                      generate a #UD within the guest.
+ KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if
+                                     they are intercepted) as NOPs regardless of
+                                     whether or not MONITOR/MWAIT are supported
+                                     according to guest CPUID.  When this quirk
+                                     is disabled and KVM_X86_DISABLE_EXITS_MWAIT
+                                     is not set (MONITOR/MWAIT are intercepted),
+                                     KVM will inject a #UD on MONITOR/MWAIT if
+                                     they're unsupported per guest CPUID.  Note,
+                                     KVM will modify MONITOR/MWAIT support in
+                                     guest CPUID on writes to MISC_ENABLE if
+                                     KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is
+                                     disabled.
  =================================== ============================================
  
+ 7.32 KVM_CAP_MAX_VCPU_ID
+ ------------------------
+ :Architectures: x86
+ :Target: VM
+ :Parameters: args[0] - maximum APIC ID value set for current VM
+ :Returns: 0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS
+           supported in KVM or if it has been set.
+ This capability allows userspace to specify maximum possible APIC ID
+ assigned for current VM session prior to the creation of vCPUs, saving
+ memory for data structures indexed by the APIC ID.  Userspace is able
+ to calculate the limit to APIC ID values from designated
+ CPU topology.
+ The value can be changed only until KVM_ENABLE_CAP is set to a nonzero
+ value or until a vCPU is created.  Upon creation of the first vCPU,
+ if the value was set to zero or KVM_ENABLE_CAP was not invoked, KVM
+ uses the return value of KVM_CHECK_EXTENSION(KVM_CAP_MAX_VCPU_ID) as
+ the maximum APIC ID.
+ 7.33 KVM_CAP_X86_NOTIFY_VMEXIT
+ ------------------------------
+ :Architectures: x86
+ :Target: VM
+ :Parameters: args[0] is the value of notify window as well as some flags
+ :Returns: 0 on success, -EINVAL if args[0] contains invalid flags or notify
+           VM exit is unsupported.
+ Bits 63:32 of args[0] are used for notify window.
+ Bits 31:0 of args[0] are for some flags. Valid bits are::
+   #define KVM_X86_NOTIFY_VMEXIT_ENABLED    (1 << 0)
+   #define KVM_X86_NOTIFY_VMEXIT_USER       (1 << 1)
+ This capability allows userspace to configure the notify VM exit on/off
+ in per-VM scope during VM creation. Notify VM exit is disabled by default.
+ When userspace sets KVM_X86_NOTIFY_VMEXIT_ENABLED bit in args[0], VMM will
+ enable this feature with the notify window provided, which will generate
+ a VM exit if no event window occurs in VM non-root mode for a specified of
+ time (notify window).
+ If KVM_X86_NOTIFY_VMEXIT_USER is set in args[0], upon notify VM exits happen,
+ KVM would exit to userspace for handling.
+ This capability is aimed to mitigate the threat that malicious VMs can
+ cause CPU stuck (due to event windows don't open up) and make the CPU
+ unavailable to host or other VMs.
  8. Other capabilities.
  ======================
  
@@@ -7679,7 -7962,7 +7962,7 @@@ architecture-specific interfaces.  Thi
  specific interfaces must be consistent, i.e. if one says the feature
  is supported, than the other should as well and vice versa.  For arm64
  see Documentation/virt/kvm/devices/vcpu.rst "KVM_ARM_VCPU_PVTIME_CTRL".
 -For x86 see Documentation/virt/kvm/msr.rst "MSR_KVM_STEAL_TIME".
 +For x86 see Documentation/virt/kvm/x86/msr.rst "MSR_KVM_STEAL_TIME".
  
  8.25 KVM_CAP_S390_DIAG318
  -------------------------
@@@ -7965,6 -8248,61 +8248,61 @@@ should adjust CPUID leaf 0xA to reflec
  When enabled, KVM will exit to userspace with KVM_EXIT_SYSTEM_EVENT of
  type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.
  
+ 8.37 KVM_CAP_S390_PROTECTED_DUMP
+ --------------------------------
+ :Capability: KVM_CAP_S390_PROTECTED_DUMP
+ :Architectures: s390
+ :Type: vm
+ This capability indicates that KVM and the Ultravisor support dumping
+ PV guests. The `KVM_PV_DUMP` command is available for the
+ `KVM_S390_PV_COMMAND` ioctl and the `KVM_PV_INFO` command provides
+ dump related UV data. Also the vcpu ioctl `KVM_S390_PV_CPU_COMMAND` is
+ available and supports the `KVM_PV_DUMP_CPU` subcommand.
+ 8.38 KVM_CAP_VM_DISABLE_NX_HUGE_PAGES
+ ---------------------------
+ :Capability KVM_CAP_VM_DISABLE_NX_HUGE_PAGES
+ :Architectures: x86
+ :Type: vm
+ :Parameters: arg[0] must be 0.
+ :Returns 0 on success, -EPERM if the userspace process does not
+        have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
+        created.
+ This capability disables the NX huge pages mitigation for iTLB MULTIHIT.
+ The capability has no effect if the nx_huge_pages module parameter is not set.
+ This capability may only be set before any vCPUs are created.
+ 8.39 KVM_CAP_S390_CPU_TOPOLOGY
+ ------------------------------
+ :Capability: KVM_CAP_S390_CPU_TOPOLOGY
+ :Architectures: s390
+ :Type: vm
+ This capability indicates that KVM will provide the S390 CPU Topology
+ facility which consist of the interpretation of the PTF instruction for
+ the function code 2 along with interception and forwarding of both the
+ PTF instruction with function codes 0 or 1 and the STSI(15,1,x)
+ instruction to the userland hypervisor.
+ The stfle facility 11, CPU Topology facility, should not be indicated
+ to the guest without this capability.
+ When this capability is present, KVM provides a new attribute group
+ on vm fd, KVM_S390_VM_CPU_TOPOLOGY.
+ This new attribute allows to get, set or clear the Modified Change
+ Topology Report (MTCR) bit of the SCA through the kvm_device_attr
+ structure.
+ When getting the Modified Change Topology Report value, the attr->addr
+ must point to a byte where the value will be stored or retrieved from.
  9. Known KVM API problems
  =========================
  
diff --combined MAINTAINERS
@@@ -171,6 -171,7 +171,6 @@@ F: drivers/scsi/53c700
  
  6LOWPAN GENERIC (BTLE/IEEE 802.15.4)
  M:    Alexander Aring <alex.aring@gmail.com>
 -M:    Jukka Rissanen <jukka.rissanen@linux.intel.com>
  L:    linux-bluetooth@vger.kernel.org
  L:    linux-wpan@vger.kernel.org
  S:    Maintained
@@@ -241,11 -242,6 +241,11 @@@ F:       include/trace/events/9p.
  F:    include/uapi/linux/virtio_9p.h
  F:    net/9p/
  
 +A64FX DIAG DRIVER
 +M:    Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
 +S:    Supported
 +F:    drivers/soc/fujitsu/a64fx-diag.c
 +
  A8293 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -284,37 -280,38 +284,37 @@@ S:      Maintaine
  F:    drivers/hwmon/abituguru3.c
  
  ACCES 104-DIO-48E GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-dio-48e.c
  
  ACCES 104-IDI-48 GPIO DRIVER
 -M:    "William Breathitt Gray" <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-idi-48.c
  
  ACCES 104-IDIO-16 GPIO DRIVER
 -M:    "William Breathitt Gray" <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-104-idio-16.c
  
  ACCES 104-QUAD-8 DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 -M:    Syed Nayyar Waris <syednwaris@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/counter/104-quad-8.c
  
  ACCES PCI-IDIO-16 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-pci-idio-16.c
  
  ACCES PCIe-IDIO-24 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-pcie-idio-24.c
@@@ -765,14 -762,6 +765,14 @@@ T:       git git://linuxtv.org/media_tree.gi
  F:    Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
  F:    drivers/media/platform/sunxi/sun4i-csi/
  
 +ALLWINNER A31 MIPI CSI-2 BRIDGE DRIVER
 +M:    Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-mipi-csi2.yaml
 +F:    drivers/media/platform/sunxi/sun6i-mipi-csi2/
 +
  ALLWINNER CPUFREQ DRIVER
  M:    Yangtao Li <tiny.windzz@gmail.com>
  L:    linux-pm@vger.kernel.org
@@@ -1339,7 -1328,7 +1339,7 @@@ M:      Todd Kjos <tkjos@android.com
  M:    Martijn Coenen <maco@android.com>
  M:    Joel Fernandes <joel@joelfernandes.org>
  M:    Christian Brauner <christian@brauner.io>
 -M:    Hridya Valsaraju <hridya@google.com>
 +M:    Carlos Llamas <cmllamas@google.com>
  M:    Suren Baghdasaryan <surenb@google.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
@@@ -1366,7 -1355,7 +1366,7 @@@ S:      Maintaine
  F:    sound/aoa/
  
  APEX EMBEDDED SYSTEMS STX104 IIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/adc/stx104.c
@@@ -1480,13 -1469,6 +1480,13 @@@ S:    Supporte
  W:    http://www.aquantia.com
  F:    drivers/net/ethernet/aquantia/atlantic/aq_ptp*
  
 +AR0521 ON SEMICONDUCTOR CAMERA SENSOR DRIVER
 +M:    Krzysztof HaÅ‚asa <khalasa@piap.pl>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/i2c/onnn,ar0521.yaml
 +F:    drivers/media/i2c/ar0521.c
 +
  ARASAN NAND CONTROLLER DRIVER
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  M:    Naga Sureshkumar Relli <nagasure@xilinx.com>
@@@ -1539,7 -1521,7 +1539,7 @@@ F:      Documentation/devicetree/bindings/ar
  F:    Documentation/devicetree/bindings/arm/arm,vexpress-juno.yaml
  F:    Documentation/devicetree/bindings/auxdisplay/arm,versatile-lcd.yaml
  F:    Documentation/devicetree/bindings/clock/arm,syscon-icst.yaml
 -F:    Documentation/devicetree/bindings/i2c/i2c-versatile.txt
 +F:    Documentation/devicetree/bindings/i2c/arm,i2c-versatile.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/arm,versatile-fpga-irq.txt
  F:    Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
  F:    arch/arm/boot/dts/arm-realview-*
@@@ -1912,7 -1894,6 +1912,7 @@@ L:      linux-aspeed@lists.ozlabs.org (moder
  S:    Supported
  Q:    https://patchwork.ozlabs.org/project/linux-aspeed/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git
 +F:    Documentation/devicetree/bindings/arm/aspeed/
  F:    arch/arm/boot/dts/aspeed-*
  F:    arch/arm/mach-aspeed/
  N:    aspeed
@@@ -2001,9 -1982,11 +2001,9 @@@ L:     linux-arm-kernel@lists.infradead.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
 -F:    Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
 -F:    Documentation/devicetree/bindings/arm/coresight-cti.yaml
 -F:    Documentation/devicetree/bindings/arm/coresight.txt
 -F:    Documentation/devicetree/bindings/arm/ete.yaml
 -F:    Documentation/devicetree/bindings/arm/trbe.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,coresight-*.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,embedded-trace-extension.yaml
 +F:    Documentation/devicetree/bindings/arm/arm,trace-buffer-extension.yaml
  F:    Documentation/trace/coresight/*
  F:    drivers/hwtracing/coresight/*
  F:    include/dt-bindings/arm/coresight-cti-dt.h
@@@ -2158,13 -2141,11 +2158,13 @@@ M:   Jean-Marie Verdun <verdun@hpe.com
  M:    Nick Hawkins <nick.hawkins@hpe.com>
  S:    Maintained
  F:    Documentation/devicetree/bindings/arm/hpe,gxp.yaml
 +F:    Documentation/devicetree/bindings/spi/hpe,gxp-spi.yaml
  F:    Documentation/devicetree/bindings/timer/hpe,gxp-timer.yaml
  F:    arch/arm/boot/dts/hpe-bmc*
  F:    arch/arm/boot/dts/hpe-gxp*
  F:    arch/arm/mach-hpe/
  F:    drivers/clocksource/timer-gxp.c
 +F:    drivers/spi/spi-gxp.c
  F:    drivers/watchdog/gxp-wdt.c
  
  ARM/IGEP MACHINE SUPPORT
@@@ -2436,7 -2417,7 +2436,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/devicetree/bindings/arm/ste-*
  F:    Documentation/devicetree/bindings/arm/ux500.yaml
  F:    Documentation/devicetree/bindings/arm/ux500/
 -F:    Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
 +F:    Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml
  F:    arch/arm/boot/dts/ste-*
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/mach-ux500/
@@@ -2468,11 -2449,9 +2468,11 @@@ F:    Documentation/devicetree/bindings/*/
  F:    Documentation/devicetree/bindings/arm/npcm/*
  F:    arch/arm/boot/dts/nuvoton-npcm*
  F:    arch/arm/mach-npcm/
 +F:    arch/arm64/boot/dts/nuvoton/
  F:    drivers/*/*npcm*
  F:    drivers/*/*/*npcm*
  F:    include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
 +F:    include/dt-bindings/clock/nuvoton,npcm845-clk.h
  
  ARM/NUVOTON WPCM450 ARCHITECTURE
  M:    Jonathan Neuschäfer <j.neuschaefer@gmx.net>
@@@ -2637,8 -2616,6 +2637,8 @@@ Q:      http://patchwork.kernel.org/project/
  C:    irc://irc.libera.chat/renesas-soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
  F:    Documentation/devicetree/bindings/arm/renesas.yaml
 +F:    Documentation/devicetree/bindings/hwinfo/renesas,prr.yaml
 +F:    Documentation/devicetree/bindings/soc/renesas/
  F:    arch/arm64/boot/dts/renesas/
  F:    drivers/soc/renesas/
  F:    include/linux/soc/renesas/
@@@ -2738,7 -2715,6 +2738,7 @@@ M:      Sylwester Nawrocki <s.nawrocki@samsu
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-media@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/samsung,s5pv210-jpeg.yaml
  F:    drivers/media/platform/samsung/s5p-jpeg/
  
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
@@@ -2758,7 -2734,6 +2758,7 @@@ Q:      http://patchwork.kernel.org/project/
  C:    irc://irc.libera.chat/renesas-soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
  F:    Documentation/devicetree/bindings/arm/renesas.yaml
 +F:    Documentation/devicetree/bindings/soc/renesas/
  F:    arch/arm/boot/dts/emev2*
  F:    arch/arm/boot/dts/gr-peach*
  F:    arch/arm/boot/dts/iwg20d-q7*
@@@ -2848,23 -2823,6 +2848,23 @@@ F:    drivers/clocksource/armv7m_systick.
  N:    stm32
  N:    stm
  
 +ARM/SUNPLUS SP7021 SOC SUPPORT
 +M:    Qin Jian <qinjian@cqplus1.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for mon-subscribers)
 +S:    Maintained
 +W:    https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
 +F:    Documentation/devicetree/bindings/arm/sunplus,sp7021.yaml
 +F:    Documentation/devicetree/bindings/clock/sunplus,sp7021-clkc.yaml
 +F:    Documentation/devicetree/bindings/interrupt-controller/sunplus,sp7021-intc.yaml
 +F:    Documentation/devicetree/bindings/reset/sunplus,reset.yaml
 +F:    arch/arm/boot/dts/sunplus-sp7021*.dts*
 +F:    arch/arm/configs/sp7021_*defconfig
 +F:    arch/arm/mach-sunplus/
 +F:    drivers/irqchip/irq-sp7021-intc.c
 +F:    drivers/reset/reset-sunplus.c
 +F:    include/dt-bindings/clock/sunplus,sp7021-clkc.h
 +F:    include/dt-bindings/reset/sunplus,sp7021-reset.h
 +
  ARM/Synaptics SoC support
  M:    Jisheng Zhang <jszhang@kernel.org>
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@ -3179,13 -3137,6 +3179,13 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/media/aspeed-video.txt
  F:    drivers/media/platform/aspeed/
  
 +ASPEED USB UDC DRIVER
 +M:    Neal Liu <neal_liu@aspeedtech.com>
 +L:    linux-aspeed@lists.ozlabs.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml
 +F:    drivers/usb/gadget/udc/aspeed_udc.c
 +
  ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
  M:    Corentin Chary <corentin.chary@gmail.com>
  L:    acpi4asus-user@lists.sourceforge.net
@@@ -3924,28 -3875,15 +3924,28 @@@ BROADCOM BCMBCA ARM ARCHITECTUR
  M:    William Zhang <william.zhang@broadcom.com>
  M:    Anand Gore <anand.gore@broadcom.com>
  M:    Kursad Oney <kursad.oney@broadcom.com>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  T:    git git://github.com/broadcom/stblinux.git
  F:    Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml
 -F:    arch/arm/boot/dts/bcm47622.dtsi
 -F:    arch/arm/boot/dts/bcm947622.dts
 +F:    arch/arm64/boot/dts/broadcom/bcmbca/*
  N:    bcmbca
  N:    bcm[9]?47622
 +N:    bcm[9]?4912
 +N:    bcm[9]?63138
 +N:    bcm[9]?63146
 +N:    bcm[9]?63148
 +N:    bcm[9]?63158
 +N:    bcm[9]?63178
 +N:    bcm[9]?6756
 +N:    bcm[9]?6813
 +N:    bcm[9]?6846
 +N:    bcm[9]?6855
 +N:    bcm[9]?6856
 +N:    bcm[9]?6858
 +N:    bcm[9]?6878
  
  BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
  M:    Florian Fainelli <f.fainelli@gmail.com>
@@@ -4021,6 -3959,14 +4021,6 @@@ S:     Maintaine
  F:    arch/arm/boot/dts/bcm47189*
  F:    arch/arm/boot/dts/bcm53573*
  
 -BROADCOM BCM63XX ARM ARCHITECTURE
 -M:    Florian Fainelli <f.fainelli@gmail.com>
 -R:    Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -T:    git git://github.com/broadcom/stblinux.git
 -N:    bcm63xx
 -
  BROADCOM BCM63XX/BCM33XX UDC DRIVER
  M:    Kevin Cernekee <cernekee@gmail.com>
  L:    linux-usb@vger.kernel.org
@@@ -4427,7 -4373,7 +4427,7 @@@ L:      linux-pm@vger.kernel.or
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
 -F:    Documentation/devicetree/bindings/devfreq/exynos-bus.txt
 +F:    Documentation/devicetree/bindings/interconnect/samsung,exynos-bus.yaml
  F:    drivers/devfreq/exynos-bus.c
  
  BUSLOGIC SCSI DRIVER
@@@ -5017,7 -4963,7 +5017,7 @@@ R:      Nick Desaulniers <ndesaulniers@googl
  L:    llvm@lists.linux.dev
  S:    Supported
  B:    https://github.com/ClangBuiltLinux/linux/issues
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/clang/features
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/cfi.h
  F:    kernel/cfi.c
  
@@@ -5184,7 -5130,6 +5184,7 @@@ F:      include/linux/console
  
  CONTEXT TRACKING
  M:    Frederic Weisbecker <frederic@kernel.org>
 +M:    "Paul E. McKenney" <paulmck@kernel.org>
  S:    Maintained
  F:    kernel/context_tracking.c
  F:    include/linux/context_tracking*
@@@ -5260,10 -5205,10 +5260,10 @@@ F:   Documentation/hwmon/corsair-psu.rs
  F:    drivers/hwmon/corsair-psu.c
  
  COUNTER SUBSYSTEM
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 -T:    git git@gitlab.com:vilhelmgray/counter.git
 +T:    git https://git.linaro.org/people/william.gray/counter.git
  F:    Documentation/ABI/testing/sysfs-bus-counter
  F:    Documentation/driver-api/generic-counter.rst
  F:    drivers/counter/
@@@ -5910,7 -5855,6 +5910,7 @@@ L:      linux-pm@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
  F:    Documentation/devicetree/bindings/devfreq/
 +F:    Documentation/devicetree/bindings/interconnect/mediatek,cci.yaml
  F:    drivers/devfreq/
  F:    include/linux/devfreq.h
  F:    include/trace/events/devfreq.h
@@@ -6023,7 -5967,7 +6023,7 @@@ F:      include/sound/da[79]*.
  F:    sound/soc/codecs/da[79]*.[ch]
  
  DIAMOND SYSTEMS GPIO-MM GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-gpio-mm.c
@@@ -6373,13 -6317,6 +6373,13 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/display/bridge/chipone,icn6211.yaml
  F:    drivers/gpu/drm/bridge/chipone-icn6211.c
  
 +DRM DRIVER FOR EBBG FT8719 PANEL
 +M:    Joel Selvaraj <jo@jsfamily.in>
 +S:    Maintained
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    Documentation/devicetree/bindings/display/panel/ebbg,ft8719.yaml
 +F:    drivers/gpu/drm/panel/panel-ebbg-ft8719.c
 +
  DRM DRIVER FOR FARADAY TVE200 TV ENCODER
  M:    Linus Walleij <linus.walleij@linaro.org>
  S:    Maintained
@@@ -6438,12 -6375,6 +6438,12 @@@ S:    Orphan / Obsolet
  F:    drivers/gpu/drm/i810/
  F:    include/uapi/drm/i810_drm.h
  
 +DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER
 +M:    Paul Kocialkowski <paul.kocialkowski@bootlin.com>
 +S:    Supported
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    drivers/gpu/drm/logicvc/
 +
  DRM DRIVER FOR LVDS PANELS
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6620,17 -6551,12 +6620,17 @@@ S:   Orphan / Obsolet
  F:    drivers/gpu/drm/savage/
  F:    include/uapi/drm/savage_drm.h
  
 -DRM DRIVER FOR SIMPLE FRAMEBUFFERS
 +DRM DRIVER FOR FIRMWARE FRAMEBUFFERS
  M:    Thomas Zimmermann <tzimmermann@suse.de>
 +M:    Javier Martinez Canillas <javierm@redhat.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
 +F:    drivers/gpu/drm/drm_aperture.c
  F:    drivers/gpu/drm/tiny/simpledrm.c
 +F:    drivers/video/aperture.c
 +F:    include/drm/drm_aperture.h
 +F:    include/linux/aperture.h
  
  DRM DRIVER FOR SIS VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -6668,12 -6594,6 +6668,12 @@@ DRM DRIVER FOR TDFX VIDEO CARD
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/tdfx/
  
 +DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE
 +M:    Jagan Teki <jagan@amarulasolutions.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/bridge/ti,dlpc3433.yaml
 +F:    drivers/gpu/drm/bridge/ti-dlpc3433.c
 +
  DRM DRIVER FOR TI SN65DSI86 BRIDGE CHIP
  R:    Douglas Anderson <dianders@chromium.org>
  F:    Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
@@@ -6803,6 -6723,7 +6803,6 @@@ F:      drivers/gpu/drm/bridge
  
  DRM DRIVERS FOR EXYNOS
  M:    Inki Dae <inki.dae@samsung.com>
 -M:    Joonyoung Shim <jy0922.shim@samsung.com>
  M:    Seung-Woo Kim <sw0312.kim@samsung.com>
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6831,16 -6752,6 +6831,16 @@@ F:    Documentation/devicetree/bindings/di
  F:    drivers/gpu/drm/imx/
  F:    drivers/gpu/ipu-v3/
  
 +DRM DRIVERS FOR FREESCALE IMX BRIDGE
 +M:    Liu Ying <victor.liu@nxp.com>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-link.yaml
 +F:    Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml
 +F:    drivers/gpu/drm/bridge/imx/
 +
  DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets)
  M:    Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
  L:    dri-devel@lists.freedesktop.org
@@@ -6885,7 -6796,6 +6885,7 @@@ L:      linux-mediatek@lists.infradead.org (
  S:    Supported
  F:    Documentation/devicetree/bindings/display/mediatek/
  F:    drivers/gpu/drm/mediatek/
 +F:    drivers/phy/mediatek/phy-mtk-dp.c
  F:    drivers/phy/mediatek/phy-mtk-hdmi*
  F:    drivers/phy/mediatek/phy-mtk-mipi*
  
@@@ -6895,7 -6805,7 +6895,7 @@@ L:      dri-devel@lists.freedesktop.or
  L:    linux-tegra@vger.kernel.org
  S:    Supported
  T:    git git://anongit.freedesktop.org/tegra/linux.git
 -F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
 +F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
  F:    Documentation/devicetree/bindings/gpu/host1x/
  F:    drivers/gpu/drm/tegra/
  F:    drivers/gpu/host1x/
@@@ -6972,7 -6882,6 +6972,7 @@@ F:      drivers/gpu/drm/omapdrm
  
  DRM DRIVERS FOR V3D
  M:    Emma Anholt <emma@anholt.net>
 +M:    Melissa Wen <mwen@igalia.com>
  S:    Supported
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
@@@ -7484,13 -7393,6 +7484,13 @@@ L:    netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/ibm/ehea/
  
 +ELM327 CAN NETWORK DRIVER
 +M:    Max Staudt <max@enpas.org>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/networking/device_drivers/can/can327.rst
 +F:    drivers/net/can/can327.c
 +
  EM28XX VIDEO4LINUX DRIVER
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
  L:    linux-media@vger.kernel.org
@@@ -7501,7 -7403,7 +7501,7 @@@ F:      Documentation/admin-guide/media/em28
  F:    drivers/media/usb/em28xx/
  
  EMBEDDED LINUX
 -M:    Matt Mackall <mpm@selenic.com>
 +M:    Olivia Mackall <olivia@selenic.com>
  M:    David Woodhouse <dwmw2@infradead.org>
  L:    linux-embedded@vger.kernel.org
  S:    Maintained
@@@ -7583,8 -7485,6 +7583,8 @@@ F:      include/video/s1d13xxxfb.
  EROFS FILE SYSTEM
  M:    Gao Xiang <xiang@kernel.org>
  M:    Chao Yu <chao@kernel.org>
 +R:    Yue Hu <huyue2@coolpad.com>
 +R:    Jeffle Xu <jefflexu@linux.alibaba.com>
  L:    linux-erofs@lists.ozlabs.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
@@@ -7598,13 -7498,6 +7598,13 @@@ S:    Maintaine
  F:    include/linux/errseq.h
  F:    lib/errseq.c
  
 +ESD CAN/USB DRIVERS
 +M:    Frank Jungclaus <frank.jungclaus@esd.eu>
 +R:    socketcan@esd.eu
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/usb/esd_usb.c
 +
  ET131X NETWORK DRIVER
  M:    Mark Einon <mark.einon@gmail.com>
  S:    Odd Fixes
@@@ -7880,6 -7773,9 +7880,6 @@@ F:      include/linux/fs.
  F:    include/linux/fs_types.h
  F:    include/uapi/linux/fs.h
  F:    include/uapi/linux/openat2.h
 -X:    fs/io-wq.c
 -X:    fs/io-wq.h
 -X:    fs/io_uring.c
  
  FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    Riku Voipio <riku.voipio@iki.fi>
@@@ -7978,7 -7874,6 +7978,7 @@@ FORTIFY_SOURC
  M:    Kees Cook <keescook@chromium.org>
  L:    linux-hardening@vger.kernel.org
  S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/fortify-string.h
  F:    lib/test_fortify/*
  F:    scripts/test_fortify.sh
@@@ -8011,21 -7906,6 +8011,21 @@@ F:    Documentation/fpga
  F:    drivers/fpga/
  F:    include/linux/fpga/
  
 +INTEL MAX10 BMC SECURE UPDATES
 +M:    Russ Weight <russell.h.weight@intel.com>
 +L:    linux-fpga@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update
 +F:    drivers/fpga/intel-m10-bmc-sec-update.c
 +
 +MICROCHIP POLARFIRE FPGA DRIVERS
 +M:    Conor Dooley <conor.dooley@microchip.com>
 +R:    Ivan Bornyakov <i.bornyakov@metrotek.ru>
 +L:    linux-fpga@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml
 +F:    drivers/fpga/microchip-spi.c
 +
  FPU EMULATOR
  M:    Bill Metzenthen <billm@melbpc.org.au>
  S:    Maintained
@@@ -8436,7 -8316,6 +8436,7 @@@ GCC PLUGIN
  M:    Kees Cook <keescook@chromium.org>
  L:    linux-hardening@vger.kernel.org
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/kbuild/gcc-plugins.rst
  F:    scripts/Makefile.gcc-plugins
  F:    scripts/gcc-plugins/
@@@ -8528,7 -8407,6 +8528,7 @@@ Q:      https://patchwork.kernel.org/project
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
  F:    Documentation/devicetree/bindings/phy/
  F:    drivers/phy/
 +F:    include/dt-bindings/phy/
  F:    include/linux/phy/
  
  GENERIC PINCTRL I2C DEMULTIPLEXER DRIVER
@@@ -8882,7 -8760,6 +8882,7 @@@ L:      linux-media@vger.kernel.or
  L:    linux-rockchip@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml
 +F:    Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml
  F:    Documentation/devicetree/bindings/media/rockchip-vpu.yaml
  F:    drivers/staging/media/hantro/
  
@@@ -8909,7 -8786,7 +8909,7 @@@ F:      include/trace/events/hwmon*.
  K:    (devm_)?hwmon_device_(un)?register(|_with_groups|_with_info)
  
  HARDWARE RANDOM NUMBER GENERATOR CORE
 -M:    Matt Mackall <mpm@selenic.com>
 +M:    Olivia Mackall <olivia@selenic.com>
  M:    Herbert Xu <herbert@gondor.apana.org.au>
  L:    linux-crypto@vger.kernel.org
  S:    Odd fixes
@@@ -9159,31 -9036,16 +9159,31 @@@ F:   Documentation/admin-guide/perf/hisi-
  F:    Documentation/admin-guide/perf/hisi-pmu.rst
  F:    drivers/perf/hisilicon
  
 -HISILICON QM AND ZIP Controller DRIVER
 +HISILICON HNS3 PMU DRIVER
 +M:    Guangbin Huang <huangguangbin2@huawei.com>
 +S:    Supported
 +F:    Documentation/admin-guide/perf/hns3-pmu.rst
 +F:    drivers/perf/hisilicon/hns3_pmu.c
 +
 +HISILICON QM DRIVER
 +M:    Weili Qian <qianweili@huawei.com>
  M:    Zhou Wang <wangzhou1@hisilicon.com>
  L:    linux-crypto@vger.kernel.org
  S:    Maintained
 -F:    Documentation/ABI/testing/debugfs-hisi-zip
 +F:    drivers/crypto/hisilicon/Kconfig
 +F:    drivers/crypto/hisilicon/Makefile
  F:    drivers/crypto/hisilicon/qm.c
  F:    drivers/crypto/hisilicon/sgl.c
 -F:    drivers/crypto/hisilicon/zip/
  F:    include/linux/hisi_acc_qm.h
  
 +HISILICON ZIP Controller DRIVER
 +M:    Yang Shen <shenyang39@huawei.com>
 +M:    Zhou Wang <wangzhou1@hisilicon.com>
 +L:    linux-crypto@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/debugfs-hisi-zip
 +F:    drivers/crypto/hisilicon/zip/
 +
  HISILICON ROCE DRIVER
  M:    Wenpeng Liang <liangwenpeng@huawei.com>
  M:    Weihang Li <liweihang@huawei.com>
@@@ -9411,7 -9273,6 +9411,7 @@@ S:      Supporte
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
  F:    Documentation/ABI/stable/sysfs-bus-vmbus
  F:    Documentation/ABI/testing/debugfs-hyperv
 +F:    Documentation/virt/hyperv
  F:    Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst
  F:    arch/arm64/hyperv
  F:    arch/arm64/include/asm/hyperv-tlfs.h
@@@ -9757,7 -9618,6 +9757,7 @@@ F:      drivers/input/misc/ideapad_slidebar.
  
  IDMAPPED MOUNTS
  M:    Christian Brauner <brauner@kernel.org>
 +M:    Seth Forshee <sforshee@kernel.org>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
@@@ -9850,7 -9710,6 +9850,7 @@@ F:      Documentation/ABI/testing/sysfs-bus-
  F:    Documentation/devicetree/bindings/iio/
  F:    drivers/iio/
  F:    drivers/staging/iio/
 +F:    include/dt-bindings/iio/
  F:    include/linux/iio/
  F:    tools/iio/
  
@@@ -10617,7 -10476,9 +10617,7 @@@ L:   io-uring@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.dk/linux-block
  T:    git git://git.kernel.dk/liburing
 -F:    fs/io-wq.c
 -F:    fs/io-wq.h
 -F:    fs/io_uring.c
 +F:    io_uring/
  F:    include/linux/io_uring.h
  F:    include/uapi/linux/io_uring.h
  F:    tools/io_uring/
@@@ -10686,7 -10547,7 +10686,7 @@@ F:   Documentation/devicetree/bindings/in
  F:    drivers/irqchip/
  
  ISA
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  S:    Maintained
  F:    Documentation/driver-api/isa.rst
  F:    drivers/base/isa.c
@@@ -10977,17 -10838,6 +10977,17 @@@ F: scripts/mk
  F:    scripts/mod/
  F:    scripts/package/
  
 +KERNEL HARDENING (not covered by other areas)
 +M:    Kees Cook <keescook@chromium.org>
 +L:    linux-hardening@vger.kernel.org
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
 +F:    include/linux/overflow.h
 +F:    include/linux/randomize_kstack.h
 +F:    mm/usercopy.c
 +K:    \b(add|choose)_random_kstack_offset\b
 +K:    \b__check_(object_size|heap_object)\b
 +
  KERNEL JANITORS
  L:    kernel-janitors@vger.kernel.org
  S:    Odd Fixes
@@@ -11798,7 -11648,7 +11798,7 @@@ F:   drivers/media/usb/dvb-usb-v2/lmedm04
  LOADPIN SECURITY MODULE
  M:    Kees Cook <keescook@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git lsm/loadpin
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/admin-guide/LSM/LoadPin.rst
  F:    security/loadpin/
  
@@@ -12462,7 -12312,7 +12462,7 @@@ F:   drivers/net/ieee802154/mcr20a.
  F:    drivers/net/ieee802154/mcr20a.h
  
  MEASUREMENT COMPUTING CIO-DAC IIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/dac/cio-dac.c
@@@ -12703,7 -12553,6 +12703,7 @@@ F:   Documentation/driver-api/media
  F:    Documentation/userspace-api/media/
  F:    drivers/media/
  F:    drivers/staging/media/
 +F:    include/dt-bindings/media/
  F:    include/linux/platform_data/media/
  F:    include/media/
  F:    include/uapi/linux/dvb/
@@@ -12786,7 -12635,6 +12786,7 @@@ F:   drivers/media/platform/mediatek/vpu
  MEDIATEK MEDIA DRIVER
  M:    Tiffany Lin <tiffany.lin@mediatek.com>
  M:    Andrew-CT Chen <andrew-ct.chen@mediatek.com>
 +M:    Yunfei Dong <yunfei.dong@mediatek.com>
  S:    Supported
  F:    Documentation/devicetree/bindings/media/mediatek,vcodec*.yaml
  F:    Documentation/devicetree/bindings/media/mediatek-vpu.txt
@@@ -13321,7 -13169,6 +13321,7 @@@ M:   UNGLinuxDriver@microchip.co
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
 +F:    Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
  F:    drivers/net/dsa/microchip/*
  F:    include/linux/platform_data/microchip-ksz.h
  F:    net/dsa/tag_ksz.c
@@@ -13381,14 -13228,6 +13381,14 @@@ S: Supporte
  F:    Documentation/devicetree/bindings/mtd/atmel-nand.txt
  F:    drivers/mtd/nand/raw/atmel/*
  
 +MICROCHIP OTPC DRIVER
 +M:    Claudiu Beznea <claudiu.beznea@microchip.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Supported
 +F:    Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml
 +F:    drivers/nvmem/microchip-otpc.c
 +F:    include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
 +
  MICROCHIP PWM DRIVER
  M:    Claudiu Beznea <claudiu.beznea@microchip.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -13993,11 -13832,12 +13993,11 @@@ L:        netdev@vger.kernel.or
  S:    Maintained
  F:    net/sched/sch_netem.c
  
 -NETERION 10GbE DRIVERS (s2io/vxge)
 +NETERION 10GbE DRIVERS (s2io)
  M:    Jon Mason <jdmason@kudzu.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    Documentation/networking/device_drivers/ethernet/neterion/s2io.rst
 -F:    Documentation/networking/device_drivers/ethernet/neterion/vxge.rst
  F:    drivers/net/ethernet/neterion/
  
  NETFILTER
@@@ -14998,7 -14838,6 +14998,7 @@@ M:   Daniel Scally <djrscally@gmail.com
  L:    linux-media@vger.kernel.org
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/i2c/ovti,ov5693.yaml
  F:    drivers/media/i2c/ov5693.c
  
  OMNIVISION OV5695 SENSOR DRIVER
@@@ -15073,13 -14912,6 +15073,13 @@@ S: Maintaine
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/i2c/ov9734.c
  
 +ONBOARD USB HUB DRIVER
 +M:    Matthias Kaehlcke <mka@chromium.org>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub
 +F:    drivers/usb/misc/onboard_usb_hub.c
 +
  ONENAND FLASH DRIVER
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    linux-mtd@lists.infradead.org
@@@ -15166,7 -14998,7 +15166,7 @@@ M:   Peter Korsgaard <peter@korsgaard.com
  M:    Andrew Lunn <andrew@lunn.ch>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/i2c/i2c-ocores.txt
 +F:    Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml
  F:    Documentation/i2c/busses/i2c-ocores.rst
  F:    drivers/i2c/busses/i2c-ocores.c
  F:    include/linux/platform_data/i2c-ocores.h
@@@ -16493,6 -16325,7 +16493,6 @@@ F:   drivers/media/rc/pwm-ir-tx.
  PWM SUBSYSTEM
  M:    Thierry Reding <thierry.reding@gmail.com>
  R:    Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
 -M:    Lee Jones <lee.jones@linaro.org>
  L:    linux-pwm@vger.kernel.org
  S:    Maintained
  Q:    https://patchwork.ozlabs.org/project/linux-pwm/list/
@@@ -16503,7 -16336,6 +16503,7 @@@ F:   Documentation/driver-api/pwm.rs
  F:    drivers/gpio/gpio-mvebu.c
  F:    drivers/pwm/
  F:    drivers/video/backlight/pwm_bl.c
 +F:    include/dt-bindings/pwm/
  F:    include/linux/pwm.h
  F:    include/linux/pwm_backlight.h
  K:    pwm_(config|apply_state|ops)
@@@ -16828,13 -16660,6 +16828,13 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt
  F:    drivers/i2c/busses/i2c-qcom-cci.c
  
 +QUALCOMM INTERCONNECT BWMON DRIVER
 +M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 +L:    linux-arm-msm@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
 +F:    drivers/soc/qcom/icc-bwmon.c
 +
  QUALCOMM IOMMU
  M:    Rob Clark <robdclark@gmail.com>
  L:    iommu@lists.linux.dev
@@@ -17350,19 -17175,6 +17350,19 @@@ S: Supporte
  F:    Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml
  F:    drivers/iio/adc/rzg2l_adc.c
  
 +RENESAS RZ/N1 A5PSW SWITCH DRIVER
 +M:    Clément Léger <clement.leger@bootlin.com>
 +L:    linux-renesas-soc@vger.kernel.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
 +F:    Documentation/devicetree/bindings/net/pcs/renesas,rzn1-miic.yaml
 +F:    drivers/net/dsa/rzn1_a5psw*
 +F:    drivers/net/pcs/pcs-rzn1-miic.c
 +F:    include/dt-bindings/net/pcs-rzn1-miic.h
 +F:    include/linux/pcs-rzn1-miic.h
 +F:    net/dsa/tag_rzn1_a5psw.c
 +
  RENESAS RZ/N1 RTC CONTROLLER DRIVER
  M:    Miquel Raynal <miquel.raynal@bootlin.com>
  L:    linux-rtc@vger.kernel.org
@@@ -17471,8 -17283,6 +17471,8 @@@ F:   drivers/clk/microchip/clk-mpfs.
  F:    drivers/mailbox/mailbox-mpfs.c
  F:    drivers/pci/controller/pcie-microchip-host.c
  F:    drivers/soc/microchip/
 +F:    drivers/spi/spi-microchip-core.c
 +F:    drivers/usb/musb/mpfs.c
  F:    include/soc/microchip/mpfs.h
  
  RNBD BLOCK DRIVERS
@@@ -17784,6 -17594,7 +17784,7 @@@ M:   Eric Farman <farman@linux.ibm.com
  L:    linux-s390@vger.kernel.org
  L:    kvm@vger.kernel.org
  S:    Supported
+ F:    arch/s390/kvm/pci*
  F:    drivers/vfio/pci/vfio_pci_zdev.c
  F:    include/uapi/linux/vfio_zdev.h
  
@@@ -18168,7 -17979,7 +18169,7 @@@ M:   Kees Cook <keescook@chromium.org
  R:    Andy Lutomirski <luto@amacapital.net>
  R:    Will Drewry <wad@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/seccomp
  F:    Documentation/userspace-api/seccomp_filter.rst
  F:    include/linux/seccomp.h
  F:    include/uapi/linux/seccomp.h
@@@ -18239,13 -18050,12 +18240,13 @@@ S:        Supporte
  F:    Documentation/admin-guide/security-bugs.rst
  
  SECURITY SUBSYSTEM
 +M:    Paul Moore <paul@paul-moore.com>
  M:    James Morris <jmorris@namei.org>
  M:    "Serge E. Hallyn" <serge@hallyn.com>
  L:    linux-security-module@vger.kernel.org (suggested Cc:)
  S:    Supported
  W:    http://kernsec.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git
  F:    security/
  X:    security/selinux/
  
@@@ -18348,7 -18158,6 +18349,7 @@@ SFF/SFP/SFP+ MODULE SUPPOR
  M:    Russell King <linux@armlinux.org.uk>
  L:    netdev@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/sff,sfp.yaml
  F:    drivers/net/phy/phylink.c
  F:    drivers/net/phy/sfp*
  F:    include/linux/mdio/mdio-i2c.h
@@@ -18635,12 -18444,6 +18636,12 @@@ T: git git://git.kernel.org/pub/scm/lin
  F:    include/linux/sl?b*.h
  F:    mm/sl?b*
  
 +SLCAN CAN NETWORK DRIVER
 +M:    Dario Binacchi <dario.binacchi@amarulasolutions.com>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/can/slcan/
 +
  SLEEPABLE READ-COPY UPDATE (SRCU)
  M:    Lai Jiangshan <jiangshanlai@gmail.com>
  M:    "Paul E. McKenney" <paulmck@kernel.org>
@@@ -19261,7 -19064,6 +19262,7 @@@ F:   drivers/staging/olpc_dcon
  STAGING - REALTEK RTL8188EU DRIVERS
  M:    Larry Finger <Larry.Finger@lwfinger.net>
  M:    Phillip Potter <phil@philpotter.co.uk>
 +R:    Pavel Skripkin <paskripkin@gmail.com>
  S:    Supported
  F:    drivers/staging/r8188eu/
  
@@@ -19972,7 -19774,7 +19973,7 @@@ M:   Sowjanya Komatineni <skomatineni@nvi
  L:    linux-media@vger.kernel.org
  L:    linux-tegra@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt
 +F:    Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
  F:    drivers/staging/media/tegra-video/
  
  TEGRA XUSB PADCTL DRIVER
@@@ -20095,7 -19897,6 +20096,7 @@@ F:   Documentation/ABI/testing/sysfs-clas
  F:    Documentation/devicetree/bindings/thermal/
  F:    Documentation/driver-api/thermal/
  F:    drivers/thermal/
 +F:    include/dt-bindings/thermal/
  F:    include/linux/cpu_cooling.h
  F:    include/linux/thermal.h
  F:    include/uapi/linux/thermal.h
@@@ -20570,7 -20371,7 +20571,7 @@@ F:   tools/tracing/rtla
  
  TRADITIONAL CHINESE DOCUMENTATION
  M:    Hu Haowen <src.res@email.cn>
 -L:    linux-doc-tw-discuss@lists.sourceforge.net
 +L:    linux-doc-tw-discuss@lists.sourceforge.net (moderated for non-subscribers)
  S:    Maintained
  W:    https://github.com/srcres258/linux-doc
  T:    git git://github.com/srcres258/linux-doc.git doc-zh-tw
@@@ -20690,13 -20491,6 +20691,13 @@@ F: Documentation/filesystems/ubifs-auth
  F:    Documentation/filesystems/ubifs.rst
  F:    fs/ubifs/
  
 +UBLK USERSPACE BLOCK DRIVER
 +M:    Ming Lei <ming.lei@redhat.com>
 +L:    linux-block@vger.kernel.org
 +S:    Maintained
 +F:    drivers/block/ublk_drv.c
 +F:    include/uapi/linux/ublk_cmd.h
 +
  UCLINUX (M68KNOMMU AND COLDFIRE)
  M:    Greg Ungerer <gerg@linux-m68k.org>
  L:    linux-m68k@lists.linux-m68k.org
@@@ -21400,7 -21194,6 +21401,7 @@@ M:   Jason Wang <jasowang@redhat.com
  L:    virtualization@lists.linux-foundation.org
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-vdpa
 +F:    Documentation/ABI/testing/sysfs-class-vduse
  F:    Documentation/devicetree/bindings/virtio/
  F:    drivers/block/virtio_blk.c
  F:    drivers/crypto/virtio/
@@@ -21581,10 -21374,12 +21582,10 @@@ M:        Martyn Welch <martyn@welchs.me.uk
  M:    Manohar Vanga <manohar.vanga@gmail.com>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-kernel@vger.kernel.org
 -S:    Maintained
 +S:    Odd fixes
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  F:    Documentation/driver-api/vme.rst
  F:    drivers/staging/vme_user/
 -F:    drivers/vme/
 -F:    include/linux/vme*
  
  VM SOCKETS (AF_VSOCK)
  M:    Stefano Garzarella <sgarzare@redhat.com>
@@@ -21767,13 -21562,6 +21768,13 @@@ L: linux-input@vger.kernel.or
  S:    Maintained
  F:    drivers/input/tablet/wacom_serial4.c
  
 +WANGXUN ETHERNET DRIVER
 +M:    Jiawen Wu <jiawenwu@trustnetic.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst
 +F:    drivers/net/ethernet/wangxun/
 +
  WATCHDOG DEVICE DRIVERS
  M:    Wim Van Sebroeck <wim@linux-watchdog.org>
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -21817,13 -21605,13 +21818,13 @@@ S:        Maintaine
  F:    drivers/media/rc/winbond-cir.c
  
  WINSYSTEMS EBC-C384 WATCHDOG DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-watchdog@vger.kernel.org
  S:    Maintained
  F:    drivers/watchdog/ebc-c384_wdt.c
  
  WINSYSTEMS WS16C48 GPIO DRIVER
 -M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +M:    William Breathitt Gray <william.gray@linaro.org>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-ws16c48.c
@@@ -22090,7 -21878,8 +22091,7 @@@ F:   include/uapi/linux/if_xdp.
  F:    include/uapi/linux/xdp_diag.h
  F:    include/net/netns/xdp.h
  F:    net/xdp/
 -F:    samples/bpf/xdpsock*
 -F:    tools/lib/bpf/xsk*
 +F:    tools/testing/selftests/bpf/*xsk*
  
  XEN BLOCK SUBSYSTEM
  M:    Roger Pau Monné <roger.pau@citrix.com>
@@@ -22330,7 -22119,7 +22331,7 @@@ F:   include/linux/yam.
  YAMA SECURITY MODULE
  M:    Kees Cook <keescook@chromium.org>
  S:    Supported
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git yama/tip
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    Documentation/admin-guide/LSM/Yama.rst
  F:    security/yama/
  
  #define OVERFLOW_STACK_SIZE   SZ_4K
  
  /*
+  * With the minimum frame size of [x29, x30], exactly half the combined
+  * sizes of the hyp and overflow stacks is the maximum size needed to
+  * save the unwinded stacktrace; plus an additional entry to delimit the
+  * end.
+  */
+ #define NVHE_STACKTRACE_SIZE  ((OVERFLOW_STACK_SIZE + PAGE_SIZE) / 2 + sizeof(long))
+ /*
   * Alignment of kernel segments (e.g. .text, .data).
   *
   *  4 KB granule:  16 level 3 entries, with contiguous bit
  #include <linux/types.h>
  #include <asm/bug.h>
  
 +#if VA_BITS > 48
  extern u64                    vabits_actual;
 +#else
 +#define vabits_actual         ((u64)VA_BITS)
 +#endif
  
  extern s64                    memstart_addr;
  /* PHYS_OFFSET - the physical address of the start of memory. */
@@@ -355,11 -359,6 +363,11 @@@ static inline void *phys_to_virt(phys_a
  })
  
  void dump_mem_limit(void);
 +
 +static inline bool defer_reserve_crashkernel(void)
 +{
 +      return IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32);
 +}
  #endif /* !ASSEMBLY */
  
  /*
@@@ -38,9 -38,7 +38,7 @@@ static void inject_undef64(struct kvm_v
        *vcpu_pc(vcpu) = read_sysreg_el2(SYS_ELR);
        *vcpu_cpsr(vcpu) = read_sysreg_el2(SYS_SPSR);
  
-       vcpu->arch.flags |= (KVM_ARM64_EXCEPT_AA64_EL1 |
-                            KVM_ARM64_EXCEPT_AA64_ELx_SYNC |
-                            KVM_ARM64_PENDING_EXCEPTION);
+       kvm_pend_exception(vcpu, EXCEPT_AA64_EL1_SYNC);
  
        __kvm_adjust_pc(vcpu);
  
@@@ -173,10 -171,10 +171,10 @@@ static u64 get_pvm_id_aa64isar1(const s
        u64 allow_mask = PVM_ID_AA64ISAR1_ALLOW;
  
        if (!vcpu_has_ptrauth(vcpu))
 -              allow_mask &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR1_APA) |
 -                              ARM64_FEATURE_MASK(ID_AA64ISAR1_API) |
 -                              ARM64_FEATURE_MASK(ID_AA64ISAR1_GPA) |
 -                              ARM64_FEATURE_MASK(ID_AA64ISAR1_GPI));
 +              allow_mask &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_APA) |
 +                              ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_API) |
 +                              ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPA) |
 +                              ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPI));
  
        return id_aa64isar1_el1_sys_val & allow_mask;
  }
@@@ -186,8 -184,8 +184,8 @@@ static u64 get_pvm_id_aa64isar2(const s
        u64 allow_mask = PVM_ID_AA64ISAR2_ALLOW;
  
        if (!vcpu_has_ptrauth(vcpu))
 -              allow_mask &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_APA3) |
 -                              ARM64_FEATURE_MASK(ID_AA64ISAR2_GPA3));
 +              allow_mask &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_APA3) |
 +                              ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_GPA3));
  
        return id_aa64isar2_el1_sys_val & allow_mask;
  }
  #include "trace.h"
  
  /*
-  * All of this file is extremely similar to the ARM coproc.c, but the
-  * types are different. My gut feeling is that it should be pretty
-  * easy to merge, but that would be an ABI breakage -- again. VFP
-  * would also need to be abstracted.
-  *
   * For AArch32, we only take care of what is being trapped. Anything
   * that has to do with init and userspace access has to go via the
   * 64bit interface.
   */
  
- static int reg_from_user(u64 *val, const void __user *uaddr, u64 id);
- static int reg_to_user(void __user *uaddr, const u64 *val, u64 id);
  static u64 sys_reg_to_index(const struct sys_reg_desc *reg);
  
  static bool read_from_write_only(struct kvm_vcpu *vcpu,
@@@ -72,7 -65,7 +65,7 @@@ u64 vcpu_read_sys_reg(const struct kvm_
  {
        u64 val = 0x8badf00d8badf00d;
  
-       if (vcpu->arch.sysregs_loaded_on_cpu &&
+       if (vcpu_get_flag(vcpu, SYSREGS_ON_CPU) &&
            __vcpu_read_sys_reg_from_cpu(reg, &val))
                return val;
  
@@@ -81,7 -74,7 +74,7 @@@
  
  void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg)
  {
-       if (vcpu->arch.sysregs_loaded_on_cpu &&
+       if (vcpu_get_flag(vcpu, SYSREGS_ON_CPU) &&
            __vcpu_write_sys_reg_to_cpu(val, reg))
                return;
  
@@@ -321,16 -314,8 +314,8 @@@ static bool trap_oslsr_el1(struct kvm_v
  }
  
  static int set_oslsr_el1(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                        const struct kvm_one_reg *reg, void __user *uaddr)
+                        u64 val)
  {
-       u64 id = sys_reg_to_index(rd);
-       u64 val;
-       int err;
-       err = reg_from_user(&val, uaddr, id);
-       if (err)
-               return err;
        /*
         * The only modifiable bit is the OSLK bit. Refuse the write if
         * userspace attempts to change any other bit in the register.
@@@ -387,7 -372,7 +372,7 @@@ static bool trap_debug_regs(struct kvm_
  {
        if (p->is_write) {
                vcpu_write_sys_reg(vcpu, p->regval, r->reg);
-               vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
+               vcpu_set_flag(vcpu, DEBUG_DIRTY);
        } else {
                p->regval = vcpu_read_sys_reg(vcpu, r->reg);
        }
   * A 32 bit write to a debug register leave top bits alone
   * A 32 bit read from a debug register only returns the bottom bits
   *
-  * All writes will set the KVM_ARM64_DEBUG_DIRTY flag to ensure the
-  * hyp.S code switches between host and guest values in future.
+  * All writes will set the DEBUG_DIRTY flag to ensure the hyp code
+  * switches between host and guest values in future.
   */
  static void reg_to_dbg(struct kvm_vcpu *vcpu,
                       struct sys_reg_params *p,
        val |= (p->regval & (mask >> shift)) << shift;
        *dbg_reg = val;
  
-       vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
+       vcpu_set_flag(vcpu, DEBUG_DIRTY);
  }
  
  static void dbg_to_reg(struct kvm_vcpu *vcpu,
@@@ -451,22 -436,16 +436,16 @@@ static bool trap_bvr(struct kvm_vcpu *v
  }
  
  static int set_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-               const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm];
-       if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm] = val;
        return 0;
  }
  
  static int get_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-       const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 *val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm];
-       if (copy_to_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       *val = vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm];
        return 0;
  }
  
@@@ -493,23 -472,16 +472,16 @@@ static bool trap_bcr(struct kvm_vcpu *v
  }
  
  static int set_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-               const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm];
-       if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm] = val;
        return 0;
  }
  
  static int get_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-       const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 *val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm];
-       if (copy_to_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       *val = vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm];
        return 0;
  }
  
@@@ -537,22 -509,16 +509,16 @@@ static bool trap_wvr(struct kvm_vcpu *v
  }
  
  static int set_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-               const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm];
-       if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm] = val;
        return 0;
  }
  
  static int get_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-       const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 *val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm];
-       if (copy_to_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       *val = vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm];
        return 0;
  }
  
@@@ -579,22 -545,16 +545,16 @@@ static bool trap_wcr(struct kvm_vcpu *v
  }
  
  static int set_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-               const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm];
-       if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm] = val;
        return 0;
  }
  
  static int get_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-       const struct kvm_one_reg *reg, void __user *uaddr)
+                  u64 *val)
  {
-       __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm];
-       if (copy_to_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0)
-               return -EFAULT;
+       *val = vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm];
        return 0;
  }
  
@@@ -1136,17 -1096,17 +1096,17 @@@ static u64 read_id_reg(const struct kvm
                break;
        case SYS_ID_AA64ISAR1_EL1:
                if (!vcpu_has_ptrauth(vcpu))
 -                      val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR1_APA) |
 -                               ARM64_FEATURE_MASK(ID_AA64ISAR1_API) |
 -                               ARM64_FEATURE_MASK(ID_AA64ISAR1_GPA) |
 -                               ARM64_FEATURE_MASK(ID_AA64ISAR1_GPI));
 +                      val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_APA) |
 +                               ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_API) |
 +                               ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPA) |
 +                               ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPI));
                break;
        case SYS_ID_AA64ISAR2_EL1:
                if (!vcpu_has_ptrauth(vcpu))
 -                      val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_APA3) |
 -                               ARM64_FEATURE_MASK(ID_AA64ISAR2_GPA3));
 +                      val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_APA3) |
 +                               ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_GPA3));
                if (!cpus_have_final_cap(ARM64_HAS_WFXT))
 -                      val &= ~ARM64_FEATURE_MASK(ID_AA64ISAR2_WFXT);
 +                      val &= ~ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_WFxT);
                break;
        case SYS_ID_AA64DFR0_EL1:
                /* Limit debug to ARMv8.0 */
@@@ -1227,16 -1187,9 +1187,9 @@@ static unsigned int sve_visibility(cons
  
  static int set_id_aa64pfr0_el1(struct kvm_vcpu *vcpu,
                               const struct sys_reg_desc *rd,
-                              const struct kvm_one_reg *reg, void __user *uaddr)
+                              u64 val)
  {
-       const u64 id = sys_reg_to_index(rd);
        u8 csv2, csv3;
-       int err;
-       u64 val;
-       err = reg_from_user(&val, uaddr, id);
-       if (err)
-               return err;
  
        /*
         * Allow AA64PFR0_EL1.CSV2 to be set from userspace as long as
                return -EINVAL;
  
        vcpu->kvm->arch.pfr0_csv2 = csv2;
-       vcpu->kvm->arch.pfr0_csv3 = csv3 ;
+       vcpu->kvm->arch.pfr0_csv3 = csv3;
  
        return 0;
  }
   * to be changed.
   */
  static int __get_id_reg(const struct kvm_vcpu *vcpu,
-                       const struct sys_reg_desc *rd, void __user *uaddr,
+                       const struct sys_reg_desc *rd, u64 *val,
                        bool raz)
  {
-       const u64 id = sys_reg_to_index(rd);
-       const u64 val = read_id_reg(vcpu, rd, raz);
-       return reg_to_user(uaddr, &val, id);
+       *val = read_id_reg(vcpu, rd, raz);
+       return 0;
  }
  
  static int __set_id_reg(const struct kvm_vcpu *vcpu,
-                       const struct sys_reg_desc *rd, void __user *uaddr,
+                       const struct sys_reg_desc *rd, u64 val,
                        bool raz)
  {
-       const u64 id = sys_reg_to_index(rd);
-       int err;
-       u64 val;
-       err = reg_from_user(&val, uaddr, id);
-       if (err)
-               return err;
        /* This is what we mean by invariant: you can't change it. */
        if (val != read_id_reg(vcpu, rd, raz))
                return -EINVAL;
  }
  
  static int get_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                     const struct kvm_one_reg *reg, void __user *uaddr)
+                     u64 *val)
  {
        bool raz = sysreg_visible_as_raz(vcpu, rd);
  
-       return __get_id_reg(vcpu, rd, uaddr, raz);
+       return __get_id_reg(vcpu, rd, val, raz);
  }
  
  static int set_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                     const struct kvm_one_reg *reg, void __user *uaddr)
+                     u64 val)
  {
        bool raz = sysreg_visible_as_raz(vcpu, rd);
  
-       return __set_id_reg(vcpu, rd, uaddr, raz);
+       return __set_id_reg(vcpu, rd, val, raz);
  }
  
  static int set_raz_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                         const struct kvm_one_reg *reg, void __user *uaddr)
+                         u64 val)
  {
-       return __set_id_reg(vcpu, rd, uaddr, true);
+       return __set_id_reg(vcpu, rd, val, true);
  }
  
  static int get_raz_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                      const struct kvm_one_reg *reg, void __user *uaddr)
+                      u64 *val)
  {
-       const u64 id = sys_reg_to_index(rd);
-       const u64 val = 0;
-       return reg_to_user(uaddr, &val, id);
+       *val = 0;
+       return 0;
  }
  
  static int set_wi_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
-                     const struct kvm_one_reg *reg, void __user *uaddr)
+                     u64 val)
  {
-       int err;
-       u64 val;
-       /* Perform the access even if we are going to ignore the value */
-       err = reg_from_user(&val, uaddr, sys_reg_to_index(rd));
-       if (err)
-               return err;
        return 0;
  }
  
@@@ -2639,35 -2572,34 +2572,34 @@@ static bool index_to_params(u64 id, str
        }
  }
  
- const struct sys_reg_desc *find_reg_by_id(u64 id,
-                                         struct sys_reg_params *params,
-                                         const struct sys_reg_desc table[],
-                                         unsigned int num)
+ const struct sys_reg_desc *get_reg_by_id(u64 id,
+                                        const struct sys_reg_desc table[],
+                                        unsigned int num)
  {
-       if (!index_to_params(id, params))
+       struct sys_reg_params params;
+       if (!index_to_params(id, &params))
                return NULL;
  
-       return find_reg(params, table, num);
+       return find_reg(&params, table, num);
  }
  
  /* Decode an index value, and find the sys_reg_desc entry. */
- static const struct sys_reg_desc *index_to_sys_reg_desc(struct kvm_vcpu *vcpu,
-                                                   u64 id)
+ static const struct sys_reg_desc *
+ id_to_sys_reg_desc(struct kvm_vcpu *vcpu, u64 id,
+                  const struct sys_reg_desc table[], unsigned int num)
  {
        const struct sys_reg_desc *r;
-       struct sys_reg_params params;
  
        /* We only do sys_reg for now. */
        if ((id & KVM_REG_ARM_COPROC_MASK) != KVM_REG_ARM64_SYSREG)
                return NULL;
  
-       if (!index_to_params(id, &params))
-               return NULL;
-       r = find_reg(&params, sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
+       r = get_reg_by_id(id, table, num);
  
        /* Not saved in the sys_reg array and not otherwise accessible? */
-       if (r && !(r->reg || r->get_user))
+       if (r && (!(r->reg || r->get_user) || sysreg_hidden(vcpu, r)))
                r = NULL;
  
        return r;
@@@ -2707,48 -2639,30 +2639,30 @@@ static struct sys_reg_desc invariant_sy
        { SYS_DESC(SYS_CTR_EL0), NULL, get_ctr_el0 },
  };
  
- static int reg_from_user(u64 *val, const void __user *uaddr, u64 id)
- {
-       if (copy_from_user(val, uaddr, KVM_REG_SIZE(id)) != 0)
-               return -EFAULT;
-       return 0;
- }
- static int reg_to_user(void __user *uaddr, const u64 *val, u64 id)
- {
-       if (copy_to_user(uaddr, val, KVM_REG_SIZE(id)) != 0)
-               return -EFAULT;
-       return 0;
- }
- static int get_invariant_sys_reg(u64 id, void __user *uaddr)
+ static int get_invariant_sys_reg(u64 id, u64 __user *uaddr)
  {
-       struct sys_reg_params params;
        const struct sys_reg_desc *r;
  
-       r = find_reg_by_id(id, &params, invariant_sys_regs,
-                          ARRAY_SIZE(invariant_sys_regs));
+       r = get_reg_by_id(id, invariant_sys_regs,
+                         ARRAY_SIZE(invariant_sys_regs));
        if (!r)
                return -ENOENT;
  
-       return reg_to_user(uaddr, &r->val, id);
+       return put_user(r->val, uaddr);
  }
  
- static int set_invariant_sys_reg(u64 id, void __user *uaddr)
+ static int set_invariant_sys_reg(u64 id, u64 __user *uaddr)
  {
-       struct sys_reg_params params;
        const struct sys_reg_desc *r;
-       int err;
-       u64 val = 0; /* Make sure high bits are 0 for 32-bit regs */
+       u64 val;
  
-       r = find_reg_by_id(id, &params, invariant_sys_regs,
-                          ARRAY_SIZE(invariant_sys_regs));
+       r = get_reg_by_id(id, invariant_sys_regs,
+                         ARRAY_SIZE(invariant_sys_regs));
        if (!r)
                return -ENOENT;
  
-       err = reg_from_user(&val, uaddr, id);
-       if (err)
-               return err;
+       if (get_user(val, uaddr))
+               return -EFAULT;
  
        /* This is what we mean by invariant: you can't change it. */
        if (r->val != val)
@@@ -2839,54 -2753,86 +2753,86 @@@ static int demux_c15_set(u64 id, void _
        }
  }
  
- int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
+ int kvm_sys_reg_get_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
+                        const struct sys_reg_desc table[], unsigned int num)
  {
+       u64 __user *uaddr = (u64 __user *)(unsigned long)reg->addr;
        const struct sys_reg_desc *r;
+       u64 val;
+       int ret;
+       r = id_to_sys_reg_desc(vcpu, reg->id, table, num);
+       if (!r)
+               return -ENOENT;
+       if (r->get_user) {
+               ret = (r->get_user)(vcpu, r, &val);
+       } else {
+               val = __vcpu_sys_reg(vcpu, r->reg);
+               ret = 0;
+       }
+       if (!ret)
+               ret = put_user(val, uaddr);
+       return ret;
+ }
+ int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
+ {
        void __user *uaddr = (void __user *)(unsigned long)reg->addr;
+       int err;
  
        if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_DEMUX)
                return demux_c15_get(reg->id, uaddr);
  
-       if (KVM_REG_SIZE(reg->id) != sizeof(__u64))
-               return -ENOENT;
+       err = get_invariant_sys_reg(reg->id, uaddr);
+       if (err != -ENOENT)
+               return err;
  
-       r = index_to_sys_reg_desc(vcpu, reg->id);
-       if (!r)
-               return get_invariant_sys_reg(reg->id, uaddr);
+       return kvm_sys_reg_get_user(vcpu, reg,
+                                   sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
+ }
  
-       /* Check for regs disabled by runtime config */
-       if (sysreg_hidden(vcpu, r))
+ int kvm_sys_reg_set_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
+                        const struct sys_reg_desc table[], unsigned int num)
+ {
+       u64 __user *uaddr = (u64 __user *)(unsigned long)reg->addr;
+       const struct sys_reg_desc *r;
+       u64 val;
+       int ret;
+       if (get_user(val, uaddr))
+               return -EFAULT;
+       r = id_to_sys_reg_desc(vcpu, reg->id, table, num);
+       if (!r)
                return -ENOENT;
  
-       if (r->get_user)
-               return (r->get_user)(vcpu, r, reg, uaddr);
+       if (r->set_user) {
+               ret = (r->set_user)(vcpu, r, val);
+       } else {
+               __vcpu_sys_reg(vcpu, r->reg) = val;
+               ret = 0;
+       }
  
-       return reg_to_user(uaddr, &__vcpu_sys_reg(vcpu, r->reg), reg->id);
+       return ret;
  }
  
  int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
  {
-       const struct sys_reg_desc *r;
        void __user *uaddr = (void __user *)(unsigned long)reg->addr;
+       int err;
  
        if ((reg->id & KVM_REG_ARM_COPROC_MASK) == KVM_REG_ARM_DEMUX)
                return demux_c15_set(reg->id, uaddr);
  
-       if (KVM_REG_SIZE(reg->id) != sizeof(__u64))
-               return -ENOENT;
-       r = index_to_sys_reg_desc(vcpu, reg->id);
-       if (!r)
-               return set_invariant_sys_reg(reg->id, uaddr);
-       /* Check for regs disabled by runtime config */
-       if (sysreg_hidden(vcpu, r))
-               return -ENOENT;
-       if (r->set_user)
-               return (r->set_user)(vcpu, r, reg, uaddr);
+       err = set_invariant_sys_reg(reg->id, uaddr);
+       if (err != -ENOENT)
+               return err;
  
-       return reg_from_user(&__vcpu_sys_reg(vcpu, r->reg), uaddr, reg->id);
+       return kvm_sys_reg_set_user(vcpu, reg,
+                                   sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
  }
  
  static unsigned int num_demux_regs(void)
@@@ -14,6 -14,7 +14,7 @@@
  #include <linux/slab.h>
  #include <linux/export.h>
  #include <linux/nmi.h>
+ #include <linux/kvm_host.h>
  
  #include <asm/cpufeature.h>
  #include <asm/hardirq.h>
@@@ -2852,6 -2853,47 +2853,47 @@@ static void intel_pmu_reset(void
        local_irq_restore(flags);
  }
  
+ /*
+  * We may be running with guest PEBS events created by KVM, and the
+  * PEBS records are logged into the guest's DS and invisible to host.
+  *
+  * In the case of guest PEBS overflow, we only trigger a fake event
+  * to emulate the PEBS overflow PMI for guest PEBS counters in KVM.
+  * The guest will then vm-entry and check the guest DS area to read
+  * the guest PEBS records.
+  *
+  * The contents and other behavior of the guest event do not matter.
+  */
+ static void x86_pmu_handle_guest_pebs(struct pt_regs *regs,
+                                     struct perf_sample_data *data)
+ {
+       struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
+       u64 guest_pebs_idxs = cpuc->pebs_enabled & ~cpuc->intel_ctrl_host_mask;
+       struct perf_event *event = NULL;
+       int bit;
+       if (!unlikely(perf_guest_state()))
+               return;
+       if (!x86_pmu.pebs_ept || !x86_pmu.pebs_active ||
+           !guest_pebs_idxs)
+               return;
+       for_each_set_bit(bit, (unsigned long *)&guest_pebs_idxs,
+                        INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed) {
+               event = cpuc->events[bit];
+               if (!event->attr.precise_ip)
+                       continue;
+               perf_sample_data_init(data, 0, event->hw.last_period);
+               if (perf_event_overflow(event, data, regs))
+                       x86_pmu_stop(event, 0);
+               /* Inject one fake event is enough. */
+               break;
+       }
+ }
  static int handle_pmi_common(struct pt_regs *regs, u64 status)
  {
        struct perf_sample_data data;
         * counters from the GLOBAL_STATUS mask and we always process PEBS
         * events via drain_pebs().
         */
-       if (x86_pmu.flags & PMU_FL_PEBS_ALL)
-               status &= ~cpuc->pebs_enabled;
-       else
-               status &= ~(cpuc->pebs_enabled & PEBS_COUNTER_MASK);
+       status &= ~(cpuc->pebs_enabled & x86_pmu.pebs_capable);
  
        /*
         * PEBS overflow sets bit 62 in the global status register
                u64 pebs_enabled = cpuc->pebs_enabled;
  
                handled++;
+               x86_pmu_handle_guest_pebs(regs, &data);
                x86_pmu.drain_pebs(regs, &data);
                status &= intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
  
@@@ -3930,40 -3970,98 +3970,98 @@@ static int intel_pmu_hw_config(struct p
        return 0;
  }
  
- static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr)
+ /*
+  * Currently, the only caller of this function is the atomic_switch_perf_msrs().
+  * The host perf conext helps to prepare the values of the real hardware for
+  * a set of msrs that need to be switched atomically in a vmx transaction.
+  *
+  * For example, the pseudocode needed to add a new msr should look like:
+  *
+  * arr[(*nr)++] = (struct perf_guest_switch_msr){
+  *    .msr = the hardware msr address,
+  *    .host = the value the hardware has when it doesn't run a guest,
+  *    .guest = the value the hardware has when it runs a guest,
+  * };
+  *
+  * These values have nothing to do with the emulated values the guest sees
+  * when it uses {RD,WR}MSR, which should be handled by the KVM context,
+  * specifically in the intel_pmu_{get,set}_msr().
+  */
+ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data)
  {
        struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
        struct perf_guest_switch_msr *arr = cpuc->guest_switch_msrs;
+       struct kvm_pmu *kvm_pmu = (struct kvm_pmu *)data;
        u64 intel_ctrl = hybrid(cpuc->pmu, intel_ctrl);
+       u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
+       int global_ctrl, pebs_enable;
+       *nr = 0;
+       global_ctrl = (*nr)++;
+       arr[global_ctrl] = (struct perf_guest_switch_msr){
+               .msr = MSR_CORE_PERF_GLOBAL_CTRL,
+               .host = intel_ctrl & ~cpuc->intel_ctrl_guest_mask,
+               .guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
+       };
  
-       arr[0].msr = MSR_CORE_PERF_GLOBAL_CTRL;
-       arr[0].host = intel_ctrl & ~cpuc->intel_ctrl_guest_mask;
-       arr[0].guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask;
-       if (x86_pmu.flags & PMU_FL_PEBS_ALL)
-               arr[0].guest &= ~cpuc->pebs_enabled;
-       else
-               arr[0].guest &= ~(cpuc->pebs_enabled & PEBS_COUNTER_MASK);
-       *nr = 1;
+       if (!x86_pmu.pebs)
+               return arr;
  
-       if (x86_pmu.pebs && x86_pmu.pebs_no_isolation) {
-               /*
-                * If PMU counter has PEBS enabled it is not enough to
-                * disable counter on a guest entry since PEBS memory
-                * write can overshoot guest entry and corrupt guest
-                * memory. Disabling PEBS solves the problem.
-                *
-                * Don't do this if the CPU already enforces it.
-                */
-               arr[1].msr = MSR_IA32_PEBS_ENABLE;
-               arr[1].host = cpuc->pebs_enabled;
-               arr[1].guest = 0;
-               *nr = 2;
+       /*
+        * If PMU counter has PEBS enabled it is not enough to
+        * disable counter on a guest entry since PEBS memory
+        * write can overshoot guest entry and corrupt guest
+        * memory. Disabling PEBS solves the problem.
+        *
+        * Don't do this if the CPU already enforces it.
+        */
+       if (x86_pmu.pebs_no_isolation) {
+               arr[(*nr)++] = (struct perf_guest_switch_msr){
+                       .msr = MSR_IA32_PEBS_ENABLE,
+                       .host = cpuc->pebs_enabled,
+                       .guest = 0,
+               };
+               return arr;
+       }
+       if (!kvm_pmu || !x86_pmu.pebs_ept)
+               return arr;
+       arr[(*nr)++] = (struct perf_guest_switch_msr){
+               .msr = MSR_IA32_DS_AREA,
+               .host = (unsigned long)cpuc->ds,
+               .guest = kvm_pmu->ds_area,
+       };
+       if (x86_pmu.intel_cap.pebs_baseline) {
+               arr[(*nr)++] = (struct perf_guest_switch_msr){
+                       .msr = MSR_PEBS_DATA_CFG,
+                       .host = cpuc->pebs_data_cfg,
+                       .guest = kvm_pmu->pebs_data_cfg,
+               };
+       }
+       pebs_enable = (*nr)++;
+       arr[pebs_enable] = (struct perf_guest_switch_msr){
+               .msr = MSR_IA32_PEBS_ENABLE,
+               .host = cpuc->pebs_enabled & ~cpuc->intel_ctrl_guest_mask,
+               .guest = pebs_mask & ~cpuc->intel_ctrl_host_mask,
+       };
+       if (arr[pebs_enable].host) {
+               /* Disable guest PEBS if host PEBS is enabled. */
+               arr[pebs_enable].guest = 0;
+       } else {
+               /* Disable guest PEBS for cross-mapped PEBS counters. */
+               arr[pebs_enable].guest &= ~kvm_pmu->host_cross_mapped_mask;
+               /* Set hw GLOBAL_CTRL bits for PEBS counter when it runs for guest */
+               arr[global_ctrl].guest |= arr[pebs_enable].guest;
        }
  
        return arr;
  }
  
- static struct perf_guest_switch_msr *core_guest_get_msrs(int *nr)
+ static struct perf_guest_switch_msr *core_guest_get_msrs(int *nr, void *data)
  {
        struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
        struct perf_guest_switch_msr *arr = cpuc->guest_switch_msrs;
@@@ -4141,8 -4239,6 +4239,8 @@@ tnt_get_event_constraints(struct cpu_hw
  {
        struct event_constraint *c;
  
 +      c = intel_get_event_constraints(cpuc, idx, event);
 +
        /*
         * :ppp means to do reduced skid PEBS,
         * which is available on PMC0 and fixed counter 0.
                return &counter0_constraint;
        }
  
 -      c = intel_get_event_constraints(cpuc, idx, event);
 -
        return c;
  }
  
@@@ -5650,6 -5748,7 +5748,7 @@@ __init int intel_pmu_init(void
        x86_pmu.events_mask_len         = eax.split.mask_length;
  
        x86_pmu.max_pebs_events         = min_t(unsigned, MAX_PEBS_EVENTS, x86_pmu.num_counters);
+       x86_pmu.pebs_capable            = PEBS_COUNTER_MASK;
  
        /*
         * Quirk: v2 perfmon does not report fixed-purpose events, so
                x86_pmu.pebs_aliases = NULL;
                x86_pmu.pebs_prec_dist = true;
                x86_pmu.lbr_pt_coexist = true;
+               x86_pmu.pebs_capable = ~0ULL;
                x86_pmu.flags |= PMU_FL_HAS_RSP_1;
                x86_pmu.flags |= PMU_FL_PEBS_ALL;
                x86_pmu.get_event_constraints = glp_get_event_constraints;
  
        case INTEL_FAM6_ICELAKE_X:
        case INTEL_FAM6_ICELAKE_D:
+               x86_pmu.pebs_ept = 1;
                pmem = true;
                fallthrough;
        case INTEL_FAM6_ICELAKE_L:
                x86_pmu.pebs_aliases = NULL;
                x86_pmu.pebs_prec_dist = true;
                x86_pmu.pebs_block = true;
+               x86_pmu.pebs_capable = ~0ULL;
                x86_pmu.flags |= PMU_FL_HAS_RSP_1;
                x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
                x86_pmu.flags |= PMU_FL_PEBS_ALL;
                x86_pmu.pebs_aliases = NULL;
                x86_pmu.pebs_prec_dist = true;
                x86_pmu.pebs_block = true;
+               x86_pmu.pebs_capable = ~0ULL;
                x86_pmu.flags |= PMU_FL_HAS_RSP_1;
                x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
                x86_pmu.flags |= PMU_FL_PEBS_ALL;
                x86_pmu.flags |= PMU_FL_INSTR_LATENCY;
                x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX;
                x86_pmu.lbr_pt_coexist = true;
 -              intel_pmu_pebs_data_source_skl(false);
 +              intel_pmu_pebs_data_source_adl();
 +              x86_pmu.pebs_latency_data = adl_latency_data_small;
                x86_pmu.num_topdown_events = 8;
                x86_pmu.update_topdown_event = adl_update_topdown_event;
                x86_pmu.set_topdown_event_period = adl_set_topdown_event_period;
                                          x86_pmu.intel_ctrl);
        /*
         * Access LBR MSR may cause #GP under certain circumstances.
-        * E.g. KVM doesn't support LBR MSR
-        * Check all LBT MSR here.
+        * Check all LBR MSR here.
         * Disable LBR access if any LBR MSRs can not be accessed.
         */
        if (x86_pmu.lbr_tos && !check_msr(x86_pmu.lbr_tos, 0x3UL))
@@@ -84,7 -84,6 +84,7 @@@ static inline bool constraint_match(str
  #define PERF_X86_EVENT_TOPDOWN                0x04000 /* Count Topdown slots/metrics events */
  #define PERF_X86_EVENT_PEBS_STLAT     0x08000 /* st+stlat data address sampling */
  #define PERF_X86_EVENT_AMD_BRS                0x10000 /* AMD Branch Sampling */
 +#define PERF_X86_EVENT_PEBS_LAT_HYBRID        0x20000 /* ld and st lat for hybrid */
  
  static inline bool is_topdown_count(struct perf_event *event)
  {
@@@ -137,8 -136,7 +137,8 @@@ struct amd_nb 
        PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \
        PERF_SAMPLE_TRANSACTION | PERF_SAMPLE_PHYS_ADDR | \
        PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER | \
 -      PERF_SAMPLE_PERIOD | PERF_SAMPLE_CODE_PAGE_SIZE)
 +      PERF_SAMPLE_PERIOD | PERF_SAMPLE_CODE_PAGE_SIZE | \
 +      PERF_SAMPLE_WEIGHT_TYPE)
  
  #define PEBS_GP_REGS                  \
        ((1ULL << PERF_REG_X86_AX)    | \
@@@ -462,10 -460,6 +462,10 @@@ struct cpu_hw_events 
        __EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \
                          HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_ST)
  
 +#define INTEL_HYBRID_LAT_CONSTRAINT(c, n)     \
 +      __EVENT_CONSTRAINT(c, n, INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \
 +                        HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_LAT_HYBRID)
 +
  /* Event constraint, but match on all event flags too. */
  #define INTEL_FLAGS_EVENT_CONSTRAINT(c, n) \
        EVENT_CONSTRAINT(c, n, ARCH_PERFMON_EVENTSEL_EVENT|X86_ALL_EVENT_FLAGS)
@@@ -644,8 -638,6 +644,8 @@@ enum 
        x86_lbr_exclusive_max,
  };
  
 +#define PERF_PEBS_DATA_SOURCE_MAX     0x10
 +
  struct x86_hybrid_pmu {
        struct pmu                      pmu;
        const char                      *name;
        unsigned int                    late_ack        :1,
                                        mid_ack         :1,
                                        enabled_ack     :1;
 +
 +      u64                             pebs_data_source[PERF_PEBS_DATA_SOURCE_MAX];
  };
  
  static __always_inline struct x86_hybrid_pmu *hybrid_pmu(struct pmu *pmu)
@@@ -828,16 -818,17 +828,18 @@@ struct x86_pmu 
                        pebs_prec_dist          :1,
                        pebs_no_tlb             :1,
                        pebs_no_isolation       :1,
-                       pebs_block              :1;
+                       pebs_block              :1,
+                       pebs_ept                :1;
        int             pebs_record_size;
        int             pebs_buffer_size;
        int             max_pebs_events;
        void            (*drain_pebs)(struct pt_regs *regs, struct perf_sample_data *data);
        struct event_constraint *pebs_constraints;
        void            (*pebs_aliases)(struct perf_event *event);
 +      u64             (*pebs_latency_data)(struct perf_event *event, u64 status);
        unsigned long   large_pebs_flags;
        u64             rtm_abort_event;
+       u64             pebs_capable;
  
        /*
         * Intel LBR
        /*
         * Intel host/guest support (KVM)
         */
-       struct perf_guest_switch_msr *(*guest_get_msrs)(int *nr);
+       struct perf_guest_switch_msr *(*guest_get_msrs)(int *nr, void *data);
  
        /*
         * Check period value for PERF_EVENT_IOC_PERIOD ioctl.
@@@ -1403,8 -1394,6 +1405,8 @@@ void intel_pmu_disable_bts(void)
  
  int intel_pmu_drain_bts_buffer(void);
  
 +u64 adl_latency_data_small(struct perf_event *event, u64 status);
 +
  extern struct event_constraint intel_core2_pebs_event_constraints[];
  
  extern struct event_constraint intel_atom_pebs_event_constraints[];
@@@ -1512,8 -1501,6 +1514,8 @@@ void intel_pmu_pebs_data_source_nhm(voi
  
  void intel_pmu_pebs_data_source_skl(bool pmem);
  
 +void intel_pmu_pebs_data_source_adl(void);
 +
  int intel_pmu_setup_lbr_filter(struct perf_event *event);
  
  void intel_pt_interrupt(void);
  #define X86_FEATURE_IBRS              ( 7*32+25) /* Indirect Branch Restricted Speculation */
  #define X86_FEATURE_IBPB              ( 7*32+26) /* Indirect Branch Prediction Barrier */
  #define X86_FEATURE_STIBP             ( 7*32+27) /* Single Thread Indirect Branch Predictors */
 -#define X86_FEATURE_ZEN                       ( 7*32+28) /* "" CPU is AMD family 0x17 or above (Zen) */
 +#define X86_FEATURE_ZEN                       (7*32+28) /* "" CPU based on Zen microarchitecture */
  #define X86_FEATURE_L1TF_PTEINV               ( 7*32+29) /* "" L1TF workaround PTE inversion */
  #define X86_FEATURE_IBRS_ENHANCED     ( 7*32+30) /* Enhanced IBRS */
  #define X86_FEATURE_MSR_IA32_FEAT_CTL ( 7*32+31) /* "" MSR IA32_FEAT_CTL configured */
  #define X86_FEATURE_AVIC              (15*32+13) /* Virtual Interrupt Controller */
  #define X86_FEATURE_V_VMSAVE_VMLOAD   (15*32+15) /* Virtual VMSAVE VMLOAD */
  #define X86_FEATURE_VGIF              (15*32+16) /* Virtual GIF */
+ #define X86_FEATURE_X2AVIC            (15*32+18) /* Virtual x2apic */
  #define X86_FEATURE_V_SPEC_CTRL               (15*32+20) /* Virtual SPEC_CTRL */
  #define X86_FEATURE_SVME_ADDR_CHK     (15*32+28) /* "" SVME addr check */
  
  #define PERF_CAP_PT_IDX                       16
  
  #define MSR_PEBS_LD_LAT_THRESHOLD     0x000003f6
+ #define PERF_CAP_PEBS_TRAP             BIT_ULL(6)
+ #define PERF_CAP_ARCH_REG              BIT_ULL(7)
+ #define PERF_CAP_PEBS_FORMAT           0xf00
+ #define PERF_CAP_PEBS_BASELINE         BIT_ULL(14)
+ #define PERF_CAP_PEBS_MASK    (PERF_CAP_PEBS_TRAP | PERF_CAP_ARCH_REG | \
+                                PERF_CAP_PEBS_FORMAT | PERF_CAP_PEBS_BASELINE)
  
  #define MSR_IA32_RTIT_CTL             0x00000570
  #define RTIT_CTL_TRACEEN              BIT(0)
  #define MSR_TURBO_ACTIVATION_RATIO    0x0000064C
  
  #define MSR_PLATFORM_ENERGY_STATUS    0x0000064D
 +#define MSR_SECONDARY_TURBO_RATIO_LIMIT       0x00000650
  
  #define MSR_PKG_WEIGHTED_CORE_C0_RES  0x00000658
  #define MSR_PKG_ANY_CORE_C0_RES               0x00000659
  #define MSR_IA32_VMX_TRUE_EXIT_CTLS      0x0000048f
  #define MSR_IA32_VMX_TRUE_ENTRY_CTLS     0x00000490
  #define MSR_IA32_VMX_VMFUNC             0x00000491
+ #define MSR_IA32_VMX_PROCBASED_CTLS3  0x00000492
  
  /* VMX_BASIC bits and bitmasks */
  #define VMX_BASIC_VMCS_SIZE_SHIFT     32
  #define AMD64_RAW_EVENT_MASK_NB               \
        (AMD64_EVENTSEL_EVENT        |  \
         ARCH_PERFMON_EVENTSEL_UMASK)
 +
 +#define AMD64_PERFMON_V2_EVENTSEL_EVENT_NB    \
 +      (AMD64_EVENTSEL_EVENT   |               \
 +       GENMASK_ULL(37, 36))
 +
 +#define AMD64_PERFMON_V2_EVENTSEL_UMASK_NB    \
 +      (ARCH_PERFMON_EVENTSEL_UMASK    |       \
 +       GENMASK_ULL(27, 24))
 +
 +#define AMD64_PERFMON_V2_RAW_EVENT_MASK_NB            \
 +      (AMD64_PERFMON_V2_EVENTSEL_EVENT_NB     |       \
 +       AMD64_PERFMON_V2_EVENTSEL_UMASK_NB)
 +
  #define AMD64_NUM_COUNTERS                            4
  #define AMD64_NUM_COUNTERS_CORE                               6
  #define AMD64_NUM_COUNTERS_NB                         4
@@@ -207,9 -194,6 +207,9 @@@ union cpuid_0x80000022_ebx 
        struct {
                /* Number of Core Performance Counters */
                unsigned int    num_core_pmc:4;
 +              unsigned int    reserved:6;
 +              /* Number of Data Fabric Counters */
 +              unsigned int    num_df_pmc:6;
        } split;
        unsigned int            full;
  };
@@@ -222,6 -206,7 +222,7 @@@ struct x86_pmu_capability 
        int             bit_width_fixed;
        unsigned int    events_mask;
        int             events_mask_len;
+       unsigned int    pebs_ept        :1;
  };
  
  /*
@@@ -520,6 -505,7 +521,7 @@@ struct x86_pmu_lbr 
  };
  
  extern void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap);
+ extern u64 perf_get_hw_event_config(int hw_event);
  extern void perf_check_microcode(void);
  extern void perf_clear_dirty_counters(void);
  extern int x86_perf_rdpmc_index(struct perf_event *event);
@@@ -529,15 -515,20 +531,20 @@@ static inline void perf_get_x86_pmu_cap
        memset(cap, 0, sizeof(*cap));
  }
  
+ static inline u64 perf_get_hw_event_config(int hw_event)
+ {
+       return 0;
+ }
  static inline void perf_events_lapic_init(void)       { }
  static inline void perf_check_microcode(void) { }
  #endif
  
  #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL)
- extern struct perf_guest_switch_msr *perf_guest_get_msrs(int *nr);
+ extern struct perf_guest_switch_msr *perf_guest_get_msrs(int *nr, void *data);
  extern int x86_perf_get_lbr(struct x86_pmu_lbr *lbr);
  #else
- struct perf_guest_switch_msr *perf_guest_get_msrs(int *nr);
+ struct perf_guest_switch_msr *perf_guest_get_msrs(int *nr, void *data);
  static inline int x86_perf_get_lbr(struct x86_pmu_lbr *lbr)
  {
        return -1;
@@@ -198,13 -198,13 +198,13 @@@ struct kvm_msrs 
        __u32 nmsrs; /* number of msrs in entries */
        __u32 pad;
  
 -      struct kvm_msr_entry entries[0];
 +      struct kvm_msr_entry entries[];
  };
  
  /* for KVM_GET_MSR_INDEX_LIST */
  struct kvm_msr_list {
        __u32 nmsrs; /* number of msrs in entries */
 -      __u32 indices[0];
 +      __u32 indices[];
  };
  
  /* Maximum size of any access bitmap in bytes */
@@@ -241,7 -241,7 +241,7 @@@ struct kvm_cpuid_entry 
  struct kvm_cpuid {
        __u32 nent;
        __u32 padding;
 -      struct kvm_cpuid_entry entries[0];
 +      struct kvm_cpuid_entry entries[];
  };
  
  struct kvm_cpuid_entry2 {
  struct kvm_cpuid2 {
        __u32 nent;
        __u32 padding;
 -      struct kvm_cpuid_entry2 entries[0];
 +      struct kvm_cpuid_entry2 entries[];
  };
  
  /* for KVM_GET_PIT and KVM_SET_PIT */
@@@ -306,7 -306,8 +306,8 @@@ struct kvm_pit_state 
        struct kvm_pit_channel_state channels[3];
  };
  
- #define KVM_PIT_FLAGS_HPET_LEGACY  0x00000001
+ #define KVM_PIT_FLAGS_HPET_LEGACY     0x00000001
+ #define KVM_PIT_FLAGS_SPEAKER_DATA_ON 0x00000002
  
  struct kvm_pit_state2 {
        struct kvm_pit_channel_state channels[3];
@@@ -325,6 -326,7 +326,7 @@@ struct kvm_reinject_control 
  #define KVM_VCPUEVENT_VALID_SHADOW    0x00000004
  #define KVM_VCPUEVENT_VALID_SMM               0x00000008
  #define KVM_VCPUEVENT_VALID_PAYLOAD   0x00000010
+ #define KVM_VCPUEVENT_VALID_TRIPLE_FAULT      0x00000020
  
  /* Interrupt shadow states */
  #define KVM_X86_SHADOW_INT_MOV_SS     0x01
@@@ -359,7 -361,10 +361,10 @@@ struct kvm_vcpu_events 
                __u8 smm_inside_nmi;
                __u8 latched_init;
        } smi;
-       __u8 reserved[27];
+       struct {
+               __u8 pending;
+       } triple_fault;
+       __u8 reserved[26];
        __u8 exception_has_payload;
        __u64 exception_payload;
  };
@@@ -389,7 -394,7 +394,7 @@@ struct kvm_xsave 
         * the contents of CPUID leaf 0xD on the host.
         */
        __u32 region[1024];
 -      __u32 extra[0];
 +      __u32 extra[];
  };
  
  #define KVM_MAX_XCRS  16
@@@ -434,6 -439,7 +439,7 @@@ struct kvm_sync_regs 
  #define KVM_X86_QUIRK_OUT_7E_INC_RIP          (1 << 3)
  #define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT    (1 << 4)
  #define KVM_X86_QUIRK_FIX_HYPERCALL_INSN      (1 << 5)
+ #define KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS   (1 << 6)
  
  #define KVM_STATE_NESTED_FORMAT_VMX   0
  #define KVM_STATE_NESTED_FORMAT_SVM   1
@@@ -516,7 -522,7 +522,7 @@@ struct kvm_pmu_event_filter 
        __u32 fixed_counter_bitmap;
        __u32 flags;
        __u32 pad[4];
 -      __u64 events[0];
 +      __u64 events[];
  };
  
  #define KVM_PMU_EVENT_ALLOW 0
@@@ -10,7 -10,6 +10,7 @@@
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  
 +#include <linux/aperture.h>
  #include <linux/device.h>
  #include <linux/eventfd.h>
  #include <linux/file.h>
@@@ -317,10 -316,14 +317,14 @@@ int vfio_pci_core_enable(struct vfio_pc
                pci_write_config_word(pdev, PCI_COMMAND, cmd);
        }
  
-       ret = vfio_config_init(vdev);
+       ret = vfio_pci_zdev_open_device(vdev);
        if (ret)
                goto out_free_state;
  
+       ret = vfio_config_init(vdev);
+       if (ret)
+               goto out_free_zdev;
        msix_pos = pdev->msix_cap;
        if (msix_pos) {
                u16 flags;
  
        return 0;
  
+ out_free_zdev:
+       vfio_pci_zdev_close_device(vdev);
  out_free_state:
        kfree(vdev->pci_saved_state);
        vdev->pci_saved_state = NULL;
@@@ -419,6 -424,8 +425,8 @@@ void vfio_pci_core_disable(struct vfio_
  
        vdev->needs_reset = true;
  
+       vfio_pci_zdev_close_device(vdev);
        /*
         * If we have saved state, restore it.  If we can reset the device,
         * even better.  Resetting with current state seems better than
@@@ -1794,10 -1801,6 +1802,10 @@@ static int vfio_pci_vga_init(struct vfi
        if (!vfio_pci_is_vga(pdev))
                return 0;
  
 +      ret = aperture_remove_conflicting_pci_devices(pdev, vdev->vdev.ops->name);
 +      if (ret)
 +              return ret;
 +
        ret = vga_client_register(pdev, vfio_pci_set_decode);
        if (ret)
                return ret;
diff --combined include/uapi/linux/kvm.h
@@@ -270,6 -270,8 +270,8 @@@ struct kvm_xen_exit 
  #define KVM_EXIT_X86_BUS_LOCK     33
  #define KVM_EXIT_XEN              34
  #define KVM_EXIT_RISCV_SBI        35
+ #define KVM_EXIT_RISCV_CSR        36
+ #define KVM_EXIT_NOTIFY           37
  
  /* For KVM_EXIT_INTERNAL_ERROR */
  /* Emulate instruction failed. */
@@@ -496,6 -498,18 +498,18 @@@ struct kvm_run 
                        unsigned long args[6];
                        unsigned long ret[2];
                } riscv_sbi;
+               /* KVM_EXIT_RISCV_CSR */
+               struct {
+                       unsigned long csr_num;
+                       unsigned long new_value;
+                       unsigned long write_mask;
+                       unsigned long ret_value;
+               } riscv_csr;
+               /* KVM_EXIT_NOTIFY */
+               struct {
+ #define KVM_NOTIFY_CONTEXT_INVALID    (1 << 0)
+                       __u32 flags;
+               } notify;
                /* Fix the size of the union. */
                char padding[256];
        };
@@@ -542,7 -556,7 +556,7 @@@ struct kvm_coalesced_mmio 
  
  struct kvm_coalesced_mmio_ring {
        __u32 first, last;
 -      struct kvm_coalesced_mmio coalesced_mmio[0];
 +      struct kvm_coalesced_mmio coalesced_mmio[];
  };
  
  #define KVM_COALESCED_MMIO_MAX \
@@@ -621,7 -635,7 +635,7 @@@ struct kvm_clear_dirty_log 
  /* for KVM_SET_SIGNAL_MASK */
  struct kvm_signal_mask {
        __u32 len;
 -      __u8  sigset[0];
 +      __u8  sigset[];
  };
  
  /* for KVM_TPR_ACCESS_REPORTING */
@@@ -1157,6 -1171,12 +1171,12 @@@ struct kvm_ppc_resize_hpt 
  #define KVM_CAP_VM_TSC_CONTROL 214
  #define KVM_CAP_SYSTEM_EVENT_DATA 215
  #define KVM_CAP_ARM_SYSTEM_SUSPEND 216
+ #define KVM_CAP_S390_PROTECTED_DUMP 217
+ #define KVM_CAP_X86_TRIPLE_FAULT_EVENT 218
+ #define KVM_CAP_X86_NOTIFY_VMEXIT 219
+ #define KVM_CAP_VM_DISABLE_NX_HUGE_PAGES 220
+ #define KVM_CAP_S390_ZPCI_OP 221
+ #define KVM_CAP_S390_CPU_TOPOLOGY 222
  
  #ifdef KVM_CAP_IRQ_ROUTING
  
@@@ -1221,7 -1241,7 +1241,7 @@@ struct kvm_irq_routing_entry 
  struct kvm_irq_routing {
        __u32 nr;
        __u32 flags;
 -      struct kvm_irq_routing_entry entries[0];
 +      struct kvm_irq_routing_entry entries[];
  };
  
  #endif
@@@ -1341,7 -1361,7 +1361,7 @@@ struct kvm_dirty_tlb 
  
  struct kvm_reg_list {
        __u64 n; /* number of regs */
 -      __u64 reg[0];
 +      __u64 reg[];
  };
  
  struct kvm_one_reg {
@@@ -1660,6 -1680,55 +1680,55 @@@ struct kvm_s390_pv_unp 
        __u64 tweak;
  };
  
+ enum pv_cmd_dmp_id {
+       KVM_PV_DUMP_INIT,
+       KVM_PV_DUMP_CONFIG_STOR_STATE,
+       KVM_PV_DUMP_COMPLETE,
+       KVM_PV_DUMP_CPU,
+ };
+ struct kvm_s390_pv_dmp {
+       __u64 subcmd;
+       __u64 buff_addr;
+       __u64 buff_len;
+       __u64 gaddr;            /* For dump storage state */
+       __u64 reserved[4];
+ };
+ enum pv_cmd_info_id {
+       KVM_PV_INFO_VM,
+       KVM_PV_INFO_DUMP,
+ };
+ struct kvm_s390_pv_info_dump {
+       __u64 dump_cpu_buffer_len;
+       __u64 dump_config_mem_buffer_per_1m;
+       __u64 dump_config_finalize_len;
+ };
+ struct kvm_s390_pv_info_vm {
+       __u64 inst_calls_list[4];
+       __u64 max_cpus;
+       __u64 max_guests;
+       __u64 max_guest_addr;
+       __u64 feature_indication;
+ };
+ struct kvm_s390_pv_info_header {
+       __u32 id;
+       __u32 len_max;
+       __u32 len_written;
+       __u32 reserved;
+ };
+ struct kvm_s390_pv_info {
+       struct kvm_s390_pv_info_header header;
+       union {
+               struct kvm_s390_pv_info_dump dump;
+               struct kvm_s390_pv_info_vm vm;
+       };
+ };
  enum pv_cmd_id {
        KVM_PV_ENABLE,
        KVM_PV_DISABLE,
        KVM_PV_VERIFY,
        KVM_PV_PREP_RESET,
        KVM_PV_UNSHARE_ALL,
+       KVM_PV_INFO,
+       KVM_PV_DUMP,
  };
  
  struct kvm_pv_cmd {
@@@ -2119,4 -2190,41 +2190,41 @@@ struct kvm_stats_desc 
  /* Available with KVM_CAP_XSAVE2 */
  #define KVM_GET_XSAVE2                  _IOR(KVMIO,  0xcf, struct kvm_xsave)
  
+ /* Available with KVM_CAP_S390_PROTECTED_DUMP */
+ #define KVM_S390_PV_CPU_COMMAND       _IOWR(KVMIO, 0xd0, struct kvm_pv_cmd)
+ /* Available with KVM_CAP_X86_NOTIFY_VMEXIT */
+ #define KVM_X86_NOTIFY_VMEXIT_ENABLED         (1ULL << 0)
+ #define KVM_X86_NOTIFY_VMEXIT_USER            (1ULL << 1)
+ /* Available with KVM_CAP_S390_ZPCI_OP */
+ #define KVM_S390_ZPCI_OP         _IOW(KVMIO,  0xd1, struct kvm_s390_zpci_op)
+ struct kvm_s390_zpci_op {
+       /* in */
+       __u32 fh;               /* target device */
+       __u8  op;               /* operation to perform */
+       __u8  pad[3];
+       union {
+               /* for KVM_S390_ZPCIOP_REG_AEN */
+               struct {
+                       __u64 ibv;      /* Guest addr of interrupt bit vector */
+                       __u64 sb;       /* Guest addr of summary bit */
+                       __u32 flags;
+                       __u32 noi;      /* Number of interrupts */
+                       __u8 isc;       /* Guest interrupt subclass */
+                       __u8 sbo;       /* Offset of guest summary bit vector */
+                       __u16 pad;
+               } reg_aen;
+               __u64 reserved[8];
+       } u;
+ };
+ /* types for kvm_s390_zpci_op->op */
+ #define KVM_S390_ZPCIOP_REG_AEN                0
+ #define KVM_S390_ZPCIOP_DEREG_AEN      1
+ /* flags for kvm_s390_zpci_op->u.reg_aen.flags */
+ #define KVM_S390_ZPCIOP_REGAEN_HOST    (1 << 0)
  #endif /* __LINUX_KVM_H */
@@@ -4,6 -4,7 +4,6 @@@ include ../../../build/Build.includ
  all:
  
  top_srcdir = ../../../..
 -KSFT_KHDR_INSTALL := 1
  
  # For cross-builds to work, UNAME_M has to map to ARCH and arch specific
  # directories and targets in this Makefile. "uname -m" doesn't map to
@@@ -69,6 -70,10 +69,10 @@@ LIBKVM_s390x += lib/s390x/ucall.
  LIBKVM_riscv += lib/riscv/processor.c
  LIBKVM_riscv += lib/riscv/ucall.c
  
+ # Non-compiled test targets
+ TEST_PROGS_x86_64 += x86_64/nx_huge_pages_test.sh
+ # Compiled test targets
  TEST_GEN_PROGS_x86_64 = x86_64/cpuid_test
  TEST_GEN_PROGS_x86_64 += x86_64/cr4_cpuid_sync_test
  TEST_GEN_PROGS_x86_64 += x86_64/get_msr_index_features
@@@ -82,7 -87,7 +86,7 @@@ TEST_GEN_PROGS_x86_64 += x86_64/hyperv_
  TEST_GEN_PROGS_x86_64 += x86_64/kvm_clock_test
  TEST_GEN_PROGS_x86_64 += x86_64/kvm_pv_test
  TEST_GEN_PROGS_x86_64 += x86_64/mmio_warning_test
- TEST_GEN_PROGS_x86_64 += x86_64/mmu_role_test
+ TEST_GEN_PROGS_x86_64 += x86_64/monitor_mwait_test
  TEST_GEN_PROGS_x86_64 += x86_64/platform_info_test
  TEST_GEN_PROGS_x86_64 += x86_64/pmu_event_filter_test
  TEST_GEN_PROGS_x86_64 += x86_64/set_boot_cpu_id
@@@ -92,14 -97,17 +96,17 @@@ TEST_GEN_PROGS_x86_64 += x86_64/state_t
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_preemption_timer_test
  TEST_GEN_PROGS_x86_64 += x86_64/svm_vmcall_test
  TEST_GEN_PROGS_x86_64 += x86_64/svm_int_ctl_test
+ TEST_GEN_PROGS_x86_64 += x86_64/svm_nested_soft_inject_test
  TEST_GEN_PROGS_x86_64 += x86_64/tsc_scaling_sync
  TEST_GEN_PROGS_x86_64 += x86_64/sync_regs_test
+ TEST_GEN_PROGS_x86_64 += x86_64/ucna_injection_test
  TEST_GEN_PROGS_x86_64 += x86_64/userspace_io_test
  TEST_GEN_PROGS_x86_64 += x86_64/userspace_msr_exit_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_apic_access_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_close_while_nested_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_dirty_log_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_exception_with_invalid_guest_state
+ TEST_GEN_PROGS_x86_64 += x86_64/vmx_msrs_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_invalid_nested_guest_state
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_set_nested_state_test
  TEST_GEN_PROGS_x86_64 += x86_64/vmx_tsc_adjust_test
@@@ -114,6 -122,8 +121,8 @@@ TEST_GEN_PROGS_x86_64 += x86_64/xen_shi
  TEST_GEN_PROGS_x86_64 += x86_64/xen_vmcall_test
  TEST_GEN_PROGS_x86_64 += x86_64/sev_migrate_tests
  TEST_GEN_PROGS_x86_64 += x86_64/amx_test
+ TEST_GEN_PROGS_x86_64 += x86_64/max_vcpuid_cap_test
+ TEST_GEN_PROGS_x86_64 += x86_64/triple_fault_event_test
  TEST_GEN_PROGS_x86_64 += access_tracking_perf_test
  TEST_GEN_PROGS_x86_64 += demand_paging_test
  TEST_GEN_PROGS_x86_64 += dirty_log_test
@@@ -130,6 -140,9 +139,9 @@@ TEST_GEN_PROGS_x86_64 += steal_tim
  TEST_GEN_PROGS_x86_64 += kvm_binary_stats_test
  TEST_GEN_PROGS_x86_64 += system_counter_offset_test
  
+ # Compiled outputs used by test targets
+ TEST_GEN_PROGS_EXTENDED_x86_64 += x86_64/nx_huge_pages_test
  TEST_GEN_PROGS_aarch64 += aarch64/arch_timer
  TEST_GEN_PROGS_aarch64 += aarch64/debug-exceptions
  TEST_GEN_PROGS_aarch64 += aarch64/get-reg-list
@@@ -169,7 -182,9 +181,9 @@@ TEST_GEN_PROGS_riscv += kvm_page_table_
  TEST_GEN_PROGS_riscv += set_memory_region_test
  TEST_GEN_PROGS_riscv += kvm_binary_stats_test
  
+ TEST_PROGS += $(TEST_PROGS_$(UNAME_M))
  TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(UNAME_M))
+ TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(UNAME_M))
  LIBKVM += $(LIBKVM_$(UNAME_M))
  
  INSTALL_HDR_PATH = $(top_srcdir)/usr
@@@ -216,6 -231,7 +230,7 @@@ $(LIBKVM_S_OBJ): $(OUTPUT)/%.o: %.
  
  x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS))))
  $(TEST_GEN_PROGS): $(LIBKVM_OBJS)
+ $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS)
  
  cscope: include_paths = $(LINUX_TOOL_INCLUDE) $(LINUX_HDR_PATH) include lib ..
  cscope: