1. 11 Mar, 2024 2 commits
    • Paolo Bonzini's avatar
      Merge tag 'kvmarm-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD · 961e2bfc
      Paolo Bonzini authored
      KVM/arm64 updates for 6.9
      
       - Infrastructure for building KVM's trap configuration based on the
         architectural features (or lack thereof) advertised in the VM's ID
         registers
      
       - Support for mapping vfio-pci BARs as Normal-NC (vaguely similar to
         x86's WC) at stage-2, improving the performance of interacting with
         assigned devices that can tolerate it
      
       - Conversion of KVM's representation of LPIs to an xarray, utilized to
         address serialization some of the serialization on the LPI injection
         path
      
       - Support for _architectural_ VHE-only systems, advertised through the
         absence of FEAT_E2H0 in the CPU's ID register
      
       - Miscellaneous cleanups, fixes, and spelling corrections to KVM and
         selftests
      961e2bfc
    • Paolo Bonzini's avatar
      Merge tag 'loongarch-kvm-6.9' of... · 233d0bc4
      Paolo Bonzini authored
      Merge tag 'loongarch-kvm-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD
      
      LoongArch KVM changes for v6.9
      
      * Set reserved bits as zero in CPUCFG.
      * Start SW timer only when vcpu is blocking.
      * Do not restart SW timer when it is expired.
      * Remove unnecessary CSR register saving during enter guest.
      233d0bc4
  2. 09 Mar, 2024 1 commit
    • Paolo Bonzini's avatar
      Merge tag 'kvm-x86-guest_memfd_fixes-6.8' of https://github.com/kvm-x86/linux into HEAD · 7d8942d8
      Paolo Bonzini authored
      KVM GUEST_MEMFD fixes for 6.8:
      
       - Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY to
         avoid creating ABI that KVM can't sanely support.
      
       - Update documentation for KVM_SW_PROTECTED_VM to make it abundantly
         clear that such VMs are purely a development and testing vehicle, and
         come with zero guarantees.
      
       - Limit KVM_SW_PROTECTED_VM guests to the TDP MMU, as the long term plan
         is to support confidential VMs with deterministic private memory (SNP
         and TDX) only in the TDP MMU.
      
       - Fix a bug in a GUEST_MEMFD negative test that resulted in false passes
         when verifying that KVM_MEM_GUEST_MEMFD memslots can't be dirty logged.
      7d8942d8
  3. 07 Mar, 2024 6 commits
    • Oliver Upton's avatar
      Merge branch kvm-arm64/kerneldoc into kvmarm/next · 4a09ddb8
      Oliver Upton authored
      * kvm-arm64/kerneldoc:
        : kerneldoc warning fixes, courtesy of Randy Dunlap
        :
        : Fixes addressing the widespread misuse of kerneldoc-style comments
        : throughout KVM/arm64.
        KVM: arm64: vgic: fix a kernel-doc warning
        KVM: arm64: vgic-its: fix kernel-doc warnings
        KVM: arm64: vgic-init: fix a kernel-doc warning
        KVM: arm64: sys_regs: fix kernel-doc warnings
        KVM: arm64: PMU: fix kernel-doc warnings
        KVM: arm64: mmu: fix a kernel-doc warning
        KVM: arm64: vhe: fix a kernel-doc warning
        KVM: arm64: hyp/aarch32: fix kernel-doc warnings
        KVM: arm64: guest: fix kernel-doc warnings
        KVM: arm64: debug: fix kernel-doc warnings
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      4a09ddb8
    • Oliver Upton's avatar
      Merge branch kvm-arm64/vfio-normal-nc into kvmarm/next · 9bd8d7df
      Oliver Upton authored
      * kvm-arm64/vfio-normal-nc:
        : Normal-NC support for vfio-pci @ stage-2, courtesy of Ankit Agrawal
        :
        : KVM's policy to date has been that any and all MMIO mapping at stage-2
        : is treated as Device-nGnRE. This is primarily done due to concerns of
        : the guest triggering uncontainable failures in the system if they manage
        : to tickle the device / memory system the wrong way, though this is
        : unnecessarily restrictive for devices that can be reasoned as 'safe'.
        :
        : Unsurprisingly, the Device-* mapping can really hurt the performance of
        : assigned devices that can handle Gathering, and can be an outright
        : correctness issue if the guest driver does unaligned accesses.
        :
        : Rather than opening the floodgates to the full ecosystem of devices that
        : can be exposed to VMs, take the conservative approach and allow PCI
        : devices to be mapped as Normal-NC since it has been determined to be
        : 'safe'.
        vfio: Convey kvm that the vfio-pci device is wc safe
        KVM: arm64: Set io memory s2 pte as normalnc for vfio pci device
        mm: Introduce new flag to indicate wc safe
        KVM: arm64: Introduce new flag for non-cacheable IO memory
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      9bd8d7df
    • Oliver Upton's avatar
      Merge branch kvm-arm64/lpi-xarray into kvmarm/next · 8dbc4110
      Oliver Upton authored
      * kvm-arm64/lpi-xarray:
        : xarray-based representation of vgic LPIs
        :
        : KVM's linked-list of LPI state has proven to be a bottleneck in LPI
        : injection paths, due to lock serialization when acquiring / releasing a
        : reference on an IRQ.
        :
        : Start the tedious process of reworking KVM's LPI injection by replacing
        : the LPI linked-list with an xarray, leveraging this to allow RCU readers
        : to walk it outside of the spinlock.
        KVM: arm64: vgic: Don't acquire the lpi_list_lock in vgic_put_irq()
        KVM: arm64: vgic: Ensure the irq refcount is nonzero when taking a ref
        KVM: arm64: vgic: Rely on RCU protection in vgic_get_lpi()
        KVM: arm64: vgic: Free LPI vgic_irq structs in an RCU-safe manner
        KVM: arm64: vgic: Use atomics to count LPIs
        KVM: arm64: vgic: Get rid of the LPI linked-list
        KVM: arm64: vgic-its: Walk the LPI xarray in vgic_copy_lpi_list()
        KVM: arm64: vgic-v3: Iterate the xarray to find pending LPIs
        KVM: arm64: vgic: Use xarray to find LPI in vgic_get_lpi()
        KVM: arm64: vgic: Store LPIs in an xarray
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      8dbc4110
    • Oliver Upton's avatar
      Merge branch kvm-arm64/vm-configuration into kvmarm/next · 0d874858
      Oliver Upton authored
      * kvm-arm64/vm-configuration: (29 commits)
        : VM configuration enforcement, courtesy of Marc Zyngier
        :
        : Userspace has gained the ability to control the features visible
        : through the ID registers, yet KVM didn't take this into account as the
        : effective feature set when determing trap / emulation behavior. This
        : series adds:
        :
        :  - Mechanism for testing the presence of a particular CPU feature in the
        :    guest's ID registers
        :
        :  - Infrastructure for computing the effective value of VNCR-backed
        :    registers, taking into account the RES0 / RES1 bits for a particular
        :    VM configuration
        :
        :  - Implementation of 'fine-grained UNDEF' controls that shadow the FGT
        :    register definitions.
        KVM: arm64: Don't initialize idreg debugfs w/ preemption disabled
        KVM: arm64: Fail the idreg iterator if idregs aren't initialized
        KVM: arm64: Make build-time check of RES0/RES1 bits optional
        KVM: arm64: Add debugfs file for guest's ID registers
        KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking
        KVM: arm64: Make FEAT_MOPS UNDEF if not advertised to the guest
        KVM: arm64: Make AMU sysreg UNDEF if FEAT_AMU is not advertised to the guest
        KVM: arm64: Make PIR{,E0}_EL1 UNDEF if S1PIE is not advertised to the guest
        KVM: arm64: Make TLBI OS/Range UNDEF if not advertised to the guest
        KVM: arm64: Streamline save/restore of HFG[RW]TR_EL2
        KVM: arm64: Move existing feature disabling over to FGU infrastructure
        KVM: arm64: Propagate and handle Fine-Grained UNDEF bits
        KVM: arm64: Add Fine-Grained UNDEF tracking information
        KVM: arm64: Rename __check_nv_sr_forward() to triage_sysreg_trap()
        KVM: arm64: Use the xarray as the primary sysreg/sysinsn walker
        KVM: arm64: Register AArch64 system register entries with the sysreg xarray
        KVM: arm64: Always populate the trap configuration xarray
        KVM: arm64: nv: Move system instructions to their own sys_reg_desc array
        KVM: arm64: Drop the requirement for XARRAY_MULTI
        KVM: arm64: nv: Turn encoding ranges into discrete XArray stores
        ...
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      0d874858
    • Oliver Upton's avatar
      Merge branch kvm-arm64/misc into kvmarm/next · a040adfb
      Oliver Upton authored
      * kvm-arm64/misc:
        : Miscellaneous updates
        :
        :  - Fix handling of features w/ nonzero safe values in set_id_regs
        :    selftest
        :
        :  - Cleanup the unused kern_hyp_va() asm macro
        :
        :  - Differentiate nVHE and hVHE in boot-time message
        :
        :  - Several selftests cleanups
        :
        :  - Drop bogus return value from kvm_arch_create_vm_debugfs()
        :
        :  - Make save/restore of SPE and TRBE control registers affect EL1 state
        :    in hVHE mode
        :
        :  - Typos
        KVM: arm64: Fix TRFCR_EL1/PMSCR_EL1 access in hVHE mode
        KVM: selftests: aarch64: Remove unused functions from vpmu test
        KVM: arm64: Fix typos
        KVM: Get rid of return value from kvm_arch_create_vm_debugfs()
        KVM: selftests: Print timer ctl register in ISTATUS assertion
        KVM: selftests: Fix GUEST_PRINTF() format warnings in ARM code
        KVM: arm64: removed unused kern_hyp_va asm macro
        KVM: arm64: add comments to __kern_hyp_va
        KVM: arm64: print Hyp mode
        KVM: arm64: selftests: Handle feature fields with nonzero minimum value correctly
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      a040adfb
    • Oliver Upton's avatar
      Merge branch kvm-arm64/feat_e2h0 into kvmarm/next · 262cd16e
      Oliver Upton authored
      * kvm-arm64/feat_e2h0:
        : Support for FEAT_E2H0, courtesy of Marc Zyngier
        :
        : As described in the cover letter:
        :
        :   Since ARMv8.1, the architecture has grown the VHE feature, which makes
        :   EL2 a superset of EL1. With ARMv9.5 (and retroactively allowed from
        :   ARMv8.1), the architecture allows implementations to have VHE as the
        :   *only* implemented behaviour, meaning that HCR_EL2.E2H can be
        :   implemented as RES1. As a follow-up, HCR_EL2.NV1 can also be
        :   implemented as RES0, making the VHE-ness of the architecture
        :   recursive.
        :
        : This series adds support for detecting the architectural feature of E2H
        : being RES1, leveraging the existing infrastructure for handling
        : out-of-spec CPUs that are VHE-only. Additionally, the (incomplete) NV
        : infrastructure in KVM is updated to enforce E2H=1 for guest hypervisors
        : on implementations that do not support NV1.
        arm64: cpufeatures: Fix FEAT_NV check when checking for FEAT_NV1
        arm64: cpufeatures: Only check for NV1 if NV is present
        arm64: cpufeatures: Add missing ID_AA64MMFR4_EL1 to __read_sysreg_by_encoding()
        KVM: arm64: Handle Apple M2 as not having HCR_EL2.NV1 implemented
        KVM: arm64: Force guest's HCR_EL2.E2H RES1 when NV1 is not implemented
        KVM: arm64: Expose ID_AA64MMFR4_EL1 to guests
        arm64: Treat HCR_EL2.E2H as RES1 when ID_AA64MMFR4_EL1.E2H0 is negative
        arm64: cpufeature: Detect HCR_EL2.NV1 being RES0
        arm64: cpufeature: Add ID_AA64MMFR4_EL1 handling
        arm64: sysreg: Add layout for ID_AA64MMFR4_EL1
        arm64: cpufeature: Correctly display signed override values
        arm64: cpufeatures: Correctly handle signed values
        arm64: Add macro to compose a sysreg field value
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      262cd16e
  4. 06 Mar, 2024 4 commits
  5. 03 Mar, 2024 5 commits
    • Linus Torvalds's avatar
      Linux 6.8-rc7 · 90d35da6
      Linus Torvalds authored
      90d35da6
    • Linus Torvalds's avatar
      Merge tag 'phy-fixes2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · 58c806d8
      Linus Torvalds authored
      Pull phy fixes from Vinod Koul:
      
        - qcom: m31 pointer err fix, eusb2 fix redundant zero-out loop and v3
          offset fix on qmp-usb
      
        - freescale: fix for dphy alias
      
      * tag 'phy-fixes2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
        phy: qcom-qmp-usb: fix v3 offsets data
        phy: qualcomm: eusb2-repeater: Rework init to drop redundant zero-out loop
        phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()
        phy: freescale: phy-fsl-imx8-mipi-dphy: Fix alias name to use dashes
      58c806d8
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · d57dd2d2
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
      
       - dw-edma fixes to improve driver and remote HDMA setup
      
       - fsl-edma fixes for SoC hange, irq init and byte calculations and
         sparse fixes
      
       - idxd: safe user copy of completion record fix
      
       - ptdma: consistent DMA mask fix
      
      * tag 'dmaengine-fix2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
        dmaengine: ptdma: use consistent DMA masks
        dmaengine: fsl-qdma: add __iomem and struct in union to fix sparse warning
        dmaengine: idxd: Ensure safe user copy of completion record
        dmaengine: fsl-edma: correct max_segment_size setting
        dmaengine: idxd: Remove shadow Event Log head stored in idxd
        dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario
        dmaengine: fsl-qdma: init irq after reg initialization
        dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read
        dmaengine: dw-edma: eDMA: Add sync read before starting the DMA transfer in remote setup
        dmaengine: dw-edma: HDMA: Add sync read before starting the DMA transfer in remote setup
        dmaengine: dw-edma: Add HDMA remote interrupt configuration
        dmaengine: dw-edma: HDMA_V0_REMOTEL_STOP_INT_EN typo fix
        dmaengine: dw-edma: Fix wrong interrupt bit set for HDMA
        dmaengine: dw-edma: Fix the ch_count hdma callback
      d57dd2d2
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · e4f79000
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix IOMMU table initialisation when doing kdump over SR-IOV
      
       - Fix incorrect RTAS function name for resetting TCE tables
      
       - Fix fpu_signal selftest failures since a recent change
      
      Thanks to Gaurav Batra and Nathan Lynch.
      
      * tag 'powerpc-6.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Fix fpu_signal failures
        powerpc/rtas: use correct function name for resetting TCE tables
        powerpc/pseries/iommu: IOMMU table is not initialized for kdump over SR-IOV
      e4f79000
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.8_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 73d35f83
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Do not reserve SETUP_RNG_SEED setup data in the e820 map as it should
         be used by kexec only
      
       - Make sure MKTME feature detection happens at an earlier time in the
         boot process so that the physical address size supported by the CPU
         is properly corrected and MTRR masks are programmed properly, leading
         to TDX systems booting without disable_mtrr_cleanup on the cmdline
      
       - Make sure the different address sizes supported by the CPU are read
         out as early as possible
      
      * tag 'x86_urgent_for_v6.8_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/e820: Don't reserve SETUP_RNG_SEED in e820
        x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers
        x86/cpu: Allow reducing x86_phys_bits during early_identify_cpu()
      73d35f83
  6. 02 Mar, 2024 8 commits
  7. 01 Mar, 2024 14 commits