Linux 6.1.84
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.1.84 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/hw-vuln/spectre.rst | 17 Documentation/admin-guide/kernel-parameters.txt | 10 Documentation/userspace-api/media/mediactl/media-types.rst | 11 Documentation/x86/amd-memory-encryption.rst | 16 Makefile | 2 arch/arm/boot/dts/mmp2-brownstone.dts | 2 arch/arm64/boot/dts/qcom/sc7280.dtsi | 12 arch/hexagon/kernel/vmlinux.lds.S | 1 arch/loongarch/include/asm/io.h | 2 arch/loongarch/include/asm/percpu.h | 7 arch/parisc/include/asm/assembly.h | 18 arch/parisc/include/asm/checksum.h | 10 arch/parisc/kernel/unaligned.c | 27 - arch/powerpc/include/asm/reg_fsl_emb.h | 11 arch/powerpc/kernel/prom.c | 12 arch/powerpc/lib/Makefile | 2 arch/sparc/crypto/crop_devid.c | 2 arch/sparc/include/asm/floppy_32.h | 2 arch/sparc/include/asm/floppy_64.h | 2 arch/sparc/include/asm/parport.h | 258 ------------ arch/sparc/include/asm/parport_64.h | 256 +++++++++++ arch/sparc/kernel/apc.c | 2 arch/sparc/kernel/auxio_32.c | 1 arch/sparc/kernel/auxio_64.c | 3 arch/sparc/kernel/central.c | 2 arch/sparc/kernel/chmc.c | 3 arch/sparc/kernel/ioport.c | 2 arch/sparc/kernel/leon_kernel.c | 2 arch/sparc/kernel/leon_pci.c | 3 arch/sparc/kernel/leon_pci_grpci1.c | 3 arch/sparc/kernel/leon_pci_grpci2.c | 4 arch/sparc/kernel/nmi.c | 2 arch/sparc/kernel/of_device_32.c | 2 arch/sparc/kernel/of_device_64.c | 4 arch/sparc/kernel/of_device_common.c | 4 arch/sparc/kernel/pci.c | 3 arch/sparc/kernel/pci_common.c | 3 arch/sparc/kernel/pci_fire.c | 3 arch/sparc/kernel/pci_impl.h | 1 arch/sparc/kernel/pci_msi.c | 2 arch/sparc/kernel/pci_psycho.c | 4 arch/sparc/kernel/pci_sun4v.c | 3 arch/sparc/kernel/pmc.c | 2 arch/sparc/kernel/power.c | 3 arch/sparc/kernel/prom_irqtrans.c | 1 arch/sparc/kernel/psycho_common.c | 1 arch/sparc/kernel/sbus.c | 3 arch/sparc/kernel/time_32.c | 1 arch/sparc/mm/io-unit.c | 3 arch/sparc/mm/iommu.c | 5 arch/sparc/vdso/vma.c | 7 arch/x86/Kconfig | 13 arch/x86/boot/compressed/efi_mixed.S | 29 + arch/x86/coco/core.c | 20 arch/x86/coco/tdx/tdx.c | 2 arch/x86/include/asm/asm.h | 14 arch/x86/include/asm/coco.h | 10 arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/mem_encrypt.h | 15 arch/x86/include/asm/msr-index.h | 2 arch/x86/include/asm/sev.h | 4 arch/x86/include/asm/suspend_32.h | 10 arch/x86/include/asm/x86_init.h | 3 arch/x86/kernel/cpu/amd.c | 10 arch/x86/kernel/cpu/bugs.c | 138 +++--- arch/x86/kernel/cpu/common.c | 19 arch/x86/kernel/cpu/mshyperv.c | 2 arch/x86/kernel/eisa.c | 3 arch/x86/kernel/fpu/xstate.c | 5 arch/x86/kernel/fpu/xstate.h | 14 arch/x86/kernel/kprobes/core.c | 11 arch/x86/kernel/probe_roms.c | 10 arch/x86/kernel/setup.c | 3 arch/x86/kernel/sev-shared.c | 12 arch/x86/kernel/sev.c | 31 - arch/x86/kernel/x86_init.c | 2 arch/x86/kvm/cpuid.c | 29 + arch/x86/kvm/lapic.c | 5 arch/x86/kvm/reverse_cpuid.h | 42 + arch/x86/kvm/svm/sev.c | 16 arch/x86/kvm/x86.c | 10 arch/x86/kvm/xen.c | 2 arch/x86/kvm/xen.h | 18 arch/x86/mm/mem_encrypt_amd.c | 18 arch/x86/mm/mem_encrypt_identity.c | 38 - block/bio.c | 11 block/blk-mq.c | 33 + block/blk-settings.c | 4 block/mq-deadline.c | 3 drivers/accessibility/speakup/synth.c | 4 drivers/ata/ahci.c | 5 drivers/ata/libata-eh.c | 5 drivers/ata/libata-scsi.c | 9 drivers/base/power/wakeirq.c | 4 drivers/clk/qcom/gcc-ipq6018.c | 2 drivers/clk/qcom/gcc-ipq8074.c | 2 drivers/clk/qcom/gcc-sdm845.c | 1 drivers/clk/qcom/mmcc-apq8084.c | 2 drivers/clk/qcom/mmcc-msm8974.c | 2 drivers/clocksource/arm_global_timer.c | 2 drivers/cpufreq/amd-pstate.c | 2 drivers/cpufreq/brcmstb-avs-cpufreq.c | 5 drivers/cpufreq/cpufreq-dt.c | 2 drivers/crypto/qat/qat_common/adf_aer.c | 23 - drivers/firmware/efi/efi.c | 2 drivers/firmware/efi/libstub/randomalloc.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 12 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c | 3 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 12 drivers/gpu/drm/drm_panel.c | 17 drivers/gpu/drm/drm_probe_helper.c | 7 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 9 drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 drivers/gpu/drm/exynos/exynos_hdmi.c | 4 drivers/gpu/drm/i915/display/intel_bios.c | 3 drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 3 drivers/gpu/drm/i915/gt/intel_engine_pm.c | 3 drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 3 drivers/gpu/drm/imx/parallel-display.c | 4 drivers/gpu/drm/nouveau/nouveau_dmem.c | 12 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 15 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 14 drivers/hwmon/amc6821.c | 11 drivers/i2c/busses/i2c-i801.c | 4 drivers/iio/accel/adxl367.c | 8 drivers/iio/accel/adxl367_i2c.c | 2 drivers/iommu/dma-iommu.c | 9 drivers/iommu/iommu.c | 3 drivers/irqchip/irq-renesas-rzg2l.c | 93 +++- drivers/md/dm-raid.c | 2 drivers/md/dm-snap.c | 4 drivers/md/raid5.c | 14 drivers/media/mc/mc-entity.c | 93 +++- drivers/media/tuners/xc4000.c | 4 drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 21 drivers/misc/mei/hw-me-regs.h | 2 drivers/misc/mei/pci-me.c | 2 drivers/mmc/core/block.c | 14 drivers/mmc/host/sdhci-omap.c | 3 drivers/mmc/host/tmio_mmc_core.c | 2 drivers/mtd/nand/raw/meson_nand.c | 2 drivers/mtd/ubi/fastmap.c | 7 drivers/mtd/ubi/vtbl.c | 6 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_trace.h | 8 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_trace.h | 8 drivers/net/ethernet/xilinx/ll_temac_main.c | 2 drivers/net/wireguard/netlink.c | 10 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 15 drivers/nvmem/meson-efuse.c | 25 - drivers/pci/controller/dwc/pcie-designware-ep.c | 7 drivers/pci/controller/dwc/pcie-qcom.c | 153 +++---- drivers/pci/controller/pci-hyperv.c | 3 drivers/pci/pci-driver.c | 7 drivers/pci/pcie/err.c | 20 drivers/pci/quirks.c | 2 drivers/phy/tegra/xusb.c | 13 drivers/platform/x86/p2sb.c | 25 - drivers/pwm/pwm-img.c | 4 drivers/remoteproc/remoteproc_virtio.c | 6 drivers/s390/crypto/zcrypt_api.c | 2 drivers/scsi/hosts.c | 7 drivers/scsi/libsas/sas_expander.c | 51 +- drivers/scsi/lpfc/lpfc_bsg.c | 4 drivers/scsi/lpfc/lpfc_nvmet.c | 2 drivers/scsi/qla2xxx/qla_attr.c | 14 drivers/scsi/qla2xxx/qla_def.h | 2 drivers/scsi/qla2xxx/qla_gbl.h | 2 drivers/scsi/qla2xxx/qla_init.c | 128 +++-- drivers/scsi/qla2xxx/qla_iocb.c | 68 ++- drivers/scsi/qla2xxx/qla_mbx.c | 2 drivers/scsi/qla2xxx/qla_os.c | 2 drivers/scsi/qla2xxx/qla_target.c | 10 drivers/scsi/scsi_scan.c | 34 + drivers/scsi/sd.c | 25 - drivers/slimbus/core.c | 4 drivers/soc/fsl/qbman/qman.c | 25 - drivers/staging/media/ipu3/ipu3-v4l2.c | 16 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 5 drivers/tee/optee/device.c | 3 drivers/thermal/devfreq_cooling.c | 2 drivers/tty/serial/8250/8250_port.c | 6 drivers/tty/serial/fsl_lpuart.c | 7 drivers/tty/serial/imx.c | 22 - drivers/tty/serial/max310x.c | 7 drivers/tty/serial/serial_core.c | 12 drivers/tty/vt/vt.c | 2 drivers/usb/class/cdc-wdm.c | 6 drivers/usb/core/hub.c | 23 - drivers/usb/core/hub.h | 2 drivers/usb/core/port.c | 43 +- drivers/usb/core/sysfs.c | 16 drivers/usb/dwc2/core.h | 14 drivers/usb/dwc2/core_intr.c | 72 ++- drivers/usb/dwc2/gadget.c | 10 drivers/usb/dwc2/hcd.c | 49 +- drivers/usb/dwc2/hcd_ddma.c | 17 drivers/usb/dwc2/hw.h | 2 drivers/usb/dwc2/platform.c | 2 drivers/usb/dwc3/dwc3-am62.c | 90 +--- drivers/usb/gadget/function/f_ncm.c | 2 drivers/usb/gadget/udc/core.c | 4 drivers/usb/gadget/udc/tegra-xudc.c | 39 + drivers/usb/host/xhci.c | 2 drivers/usb/phy/phy-generic.c | 7 drivers/usb/serial/cp210x.c | 4 drivers/usb/serial/ftdi_sio.c | 2 drivers/usb/serial/ftdi_sio_ids.h | 6 drivers/usb/serial/option.c | 6 drivers/usb/storage/isd200.c | 23 - drivers/usb/storage/uas.c | 28 - drivers/usb/typec/class.c | 7 drivers/usb/typec/ucsi/ucsi.c | 46 +- drivers/usb/typec/ucsi/ucsi.h | 4 drivers/usb/typec/ucsi/ucsi_acpi.c | 75 +-- drivers/vfio/container.c | 2 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 7 drivers/vfio/pci/vfio_pci_config.c | 6 drivers/vfio/pci/vfio_pci_core.c | 7 drivers/vfio/pci/vfio_pci_igd.c | 2 drivers/vfio/pci/vfio_pci_intrs.c | 206 +++++---- drivers/vfio/pci/vfio_pci_rdwr.c | 2 drivers/vfio/platform/vfio_platform_irq.c | 106 +++- drivers/vfio/virqfd.c | 23 + fs/aio.c | 8 fs/btrfs/block-group.c | 3 fs/btrfs/qgroup.c | 10 fs/btrfs/scrub.c | 12 fs/btrfs/volumes.c | 2 fs/exec.c | 1 fs/ext4/mballoc.c | 17 fs/ext4/resize.c | 3 fs/f2fs/f2fs.h | 1 fs/f2fs/segment.c | 4 fs/fat/nfs.c | 6 fs/fuse/dir.c | 4 fs/fuse/fuse_i.h | 1 fs/fuse/inode.c | 7 fs/nfs/direct.c | 11 fs/nfs/write.c | 2 fs/nfsd/trace.h | 2 fs/nilfs2/btree.c | 9 fs/nilfs2/direct.c | 9 fs/nilfs2/inode.c | 2 fs/smb/client/cached_dir.c | 3 fs/smb/server/smb2pdu.c | 10 fs/ubifs/file.c | 13 include/drm/drm_modeset_helper_vtables.h | 3 include/linux/cpufreq.h | 15 include/linux/gfp.h | 9 include/linux/hyperv.h | 22 - include/linux/libata.h | 1 include/linux/minmax.h | 17 include/linux/nfs_fs.h | 1 include/linux/phy/tegra/xusb.h | 1 include/linux/ring_buffer.h | 1 include/linux/timer.h | 18 include/linux/vfio.h | 2 include/media/media-entity.h | 2 include/net/cfg802154.h | 1 include/scsi/scsi_driver.h | 1 include/scsi/scsi_host.h | 1 init/Kconfig | 6 init/initramfs.c | 2 io_uring/net.c | 3 kernel/bounds.c | 2 kernel/dma/swiotlb.c | 11 kernel/entry/common.c | 8 kernel/power/suspend.c | 1 kernel/printk/printk.c | 27 + kernel/time/timer.c | 164 ++++--- kernel/trace/ring_buffer.c | 233 ++++++---- kernel/trace/trace.c | 21 lib/pci_iomap.c | 2 mm/compaction.c | 7 mm/kasan/kasan_test.c | 3 mm/memtest.c | 4 mm/migrate.c | 6 mm/page_alloc.c | 10 mm/swapfile.c | 25 - mm/vmscan.c | 5 net/bluetooth/hci_core.c | 6 net/bluetooth/hci_sync.c | 5 net/mac80211/cfg.c | 5 net/mac802154/llsec.c | 18 net/netfilter/nf_tables_api.c | 7 net/tls/tls_sw.c | 60 ++ net/xfrm/xfrm_user.c | 3 scripts/Makefile.extrawarn | 2 security/landlock/syscalls.c | 18 security/smack/smack_lsm.c | 12 sound/pci/hda/patch_realtek.c | 13 sound/sh/aica.c | 17 sound/soc/amd/yc/acp6x-mach.c | 7 tools/include/linux/btf_ids.h | 2 tools/testing/selftests/mqueue/setting | 1 tools/testing/selftests/net/mptcp/diag.sh | 6 virt/kvm/async_pf.c | 31 + 303 files changed, 2970 insertions(+), 1661 deletions(-)
Adamos Ttofari (1):
x86/fpu: Keep xfd_state in sync with MSR_IA32_XFD
Alan Stern (4):
USB: usb-storage: Prevent divide-by-0 error in isd200_ata_command
USB: core: Add hub_get() and hub_put() routines
USB: core: Fix deadlock in port "disable" sysfs attribute
USB: core: Fix deadlock in usb_deauthorize_interface()
Alex Deucher (1):
drm/amd/display: handle range offsets in VRR ranges
Alex Williamson (7):
vfio/pci: Lock external INTx masking ops vfio/platform: Disable virqfds on cleanup vfio/pci: Disable auto-enable of exclusive INTx IRQ
vfio: Introduce interface to flush virqfd inject workqueue vfio/pci: Create persistent INTx handler vfio/platform: Create persistent IRQ handlers vfio/fsl-mc: Block calling interrupt handler without trigger
Alexander Stein (1):
Revert "usb: phy: generic: Get the vbus supply"
Alexander Usyskin (2):
mei: me: add arrow lake point S DID
mei: me: add arrow lake point H DID
Amit Pundir (1):
clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd
Andrey Jr. Melnikov (1):
ahci: asm1064: correct count of reported ports
André Rösti (1):
entry: Respect changes to system call number by trace_sys_enter()
Andy Chi (1):
ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook
Anton Altaparmakov (1):
x86/pm: Work around false positive kmemleak report in msr_build_context()
Ard Biesheuvel (4):
x86/efistub: Call mixed mode boot services on the firmware's stack x86/sev: Fix position dependent variable references in startup code x86/efistub: Add missing boot_params for mixed mode compat entry efi/libstub: Cast away type warning in use of max()
Arnd Bergmann (2):
kasan/test: avoid gcc warning for intentional overflow
staging: vc04_services: changen strncpy() to strscpy_pad()
Arseniy Krasnov (1):
mtd: rawnand: meson: fix scrambling mode value in command macro
Aurélien Jacobs (1):
USB: serial: option: add MeiG Smart SLM320 product
Baokun Li (1):
ext4: correct best extent lstart adjustment logic
Bart Van Assche (2):
Revert "block/mq-deadline: use correct way to throttling write requests" fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion
Biju Das (4):
irqchip/renesas-rzg2l: Flush posted write in irq_eoi() irqchip/renesas-rzg2l: Rename rzg2l_tint_eoi() irqchip/renesas-rzg2l: Rename rzg2l_irq_eoi() irqchip/renesas-rzg2l: Prevent spurious interrupts when setting trigger type
Bikash Hazarika (1):
scsi: qla2xxx: Update manufacturer detail
Borislav Petkov (1):
x86/bugs: Use sysfs_emit()
Borislav Petkov (AMD) (4):
x86/CPU/AMD: Update the Zenbleed microcode revisions x86/coco: Export cc_vendor
x86/coco: Get rid of accessor functions x86/Kconfig: Remove CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
Cameron Williams (1):
USB: serial: add device ID for VeriFone adapter
Charan Teja Kalla (1):
iommu: Avoid races around default domain allocations
Chengming Zhou (1):
blk-mq: release scheduler resource when request completes
Chris Wilson (1):
drm/i915/gt: Reset queue_priority_hint on parking
Christian A. Ehrhardt (4):
usb: typec: ucsi: Clear EVENT_PENDING under PPM lock
usb: typec: ucsi: Ack unsupported commands
usb: typec: ucsi_acpi: Refactor and fix DELL quirk
usb: typec: ucsi: Clear UCSI_CCI_RESET_COMPLETE before reset
Christian Gmeiner (1):
drm/etnaviv: Restore some id values
Christian Häggström (1):
USB: serial: cp210x: add ID for MGP Instruments PDS100
Christophe JAILLET (1):
slimbus: core: Remove usage of the deprecated ida_simple_xx() API
Claudiu Beznea (2):
irqchip/renesas-rzg2l: Implement restriction when writing ISCR register irqchip/renesas-rzg2l: Add macro to retrieve TITSR register offset based on register's index
Claus Hansen Ries (1):
net: ll_temac: platform_get_resource replaced by wrong function
Conrad Kostecki (1):
ahci: asm1064: asm1166: don't limit reported ports
Cosmin Tanislav (2):
iio: accel: adxl367: fix DEVID read after reset
iio: accel: adxl367: fix I2C FIFO data register
Damian Muszynski (1):
crypto: qat - resolve race condition during AER recovery
Damien Le Moal (3):
block: Clear zone limits for a non-zoned stacked queue
block: Do not force full zone append completion in req_bio_endio()
scsi: sd: Fix TCG OPAL unlock on system resume
Dan Carpenter (1):
staging: vc04_services: fix information leak in create_component()
Daniel Vogelbacher (1):
USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB
David Laight (1):
minmax: add umin(a, b) and umax(a, b)
David Woodhouse (1):
KVM: x86/xen: inject vCPU upcall vector when local APIC is enabled
Dominique Martinet (1):
mmc: core: Fix switch on gp3 partition
Duje Mihanović (1):
arm: dts: marvell: Fix maxium->maxim typo in brownstone dts
Duoming Zhou (2):
nouveau/dmem: handle kcalloc() allocation failure
ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs
Eric Huang (1):
drm/amdkfd: fix TLB flush after unmap for GFX9.4.2
Eugene Korenevsky (1):
cifs: open_cached_dir(): add FILE_READ_EA to desired access
Fedor Pchelkin (1):
mac802154: fix llsec key resources release in mac802154_llsec_key_del
Felix Fietkau (1):
wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes
Filipe Manana (1):
btrfs: fix off-by-one chunk length calculation at contains_pending_extent()
Gabor Juhos (4):
clk: qcom: gcc-ipq6018: fix terminating of frequency table arrays
clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays
clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays
clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays
Geliang Tang (1):
selftests: mptcp: diag: return KSFT_FAIL not test_cnt
Greg Kroah-Hartman (2):
cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" Linux 6.1.84
Guenter Roeck (5):
parisc/unaligned: Rewrite 64-bit inline assembly of emulate_ldd()
parisc: Fix ip_fast_csum
parisc: Fix csum_ipv6_magic on 32-bit systems
parisc: Fix csum_ipv6_magic on 64-bit systems
parisc: Strip upper 32 bit of sum in csum_ipv6_magic for 64-bit builds
Gui-Dong Han (2):
media: xc4000: Fix atomicity violation in xc4000_get_frequency md/raid5: fix atomicity violation in raid5_cache_count
Guilherme G. Piccoli (1):
scsi: core: Fix unremoved procfs host directory regression
Hans de Goede (2):
platform/x86: p2sb: On Goldmont only cache P2SB and SPI devfn BAR
misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume
Harald Freudenberger (1):
s390/zcrypt: fix reference counting on zcrypt card objects
Heiner Kallweit (1):
i2c: i801: Avoid potential double call to gpiod_remove_lookup_table
Hidenori Kobayashi (1):
media: staging: ipu3-imgu: Set fields before media_entity_pads_init()
Huacai Chen (2):
LoongArch: Change __my_cpu_offset definition to avoid mis-optimization
LoongArch: Define the __io_aw() hook as mmiowb()
Huang Ying (1):
swap: comments get_swap_device() with usage rule
Hugo Villeneuve (1):
serial: max310x: fix NULL pointer dereference in I2C instantiation
Jakub Kicinski (2):
tls: fix race between tx work scheduling and socket close
net: tls: handle backlogging of crypto requests
Jameson Thies (1):
usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros
Jan Kara (1):
fat: fix uninitialized field in nostale filehandles
Jani Nikula (5):
drm/probe-helper: warn about negative .get_modes() drm/panel: do not return negative error codes from drm_panel_get_modes() drm/exynos: do not return negative values from .get_modes() drm/imx/ipuv3: do not return negative values from .get_modes() drm/vc4: hdmi: do not return negative values from .get_modes()
Jason A. Donenfeld (2):
wireguard: netlink: check for dangling peer via is_dead instead of empty list
wireguard: netlink: access device through ctx instead of peer
Jason Gunthorpe (1):
vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations
Jens Axboe (1):
io_uring/net: correctly handle multishot recvmsg retry setup
Jerome Brunet (1):
nvmem: meson-efuse: fix function pointer type mismatch
Jiawei Wang (1):
ASoC: amd: yc: Revert "Fix non-functional mic on Lenovo 21J2"
Jim Mattson (2):
KVM: x86: Advertise CPUID.(EAX=7,ECX=2):EDX[5:0] to userspace
KVM: x86: Use a switch statement and macros in __feature_translate()
Joakim Zhang (1):
remoteproc: virtio: Fix wdg cannot recovery remote processor
Jocelyn Falempe (1):
drm/vmwgfx: Create debugfs ttm_resource_manager entry only if needed
Johannes Berg (1):
wifi: iwlwifi: fw: don't always use FW dump trig
Johannes Thumshirn (2):
btrfs: zoned: don't skip block groups with 100% zone unusable
btrfs: zoned: use zone aware sb location for scrub
John David Anglin (1):
parisc: Avoid clobbering the C/B bits in the PSW with tophys and tovirt macros
John Ogness (1):
printk: Update @console_may_schedule in console_trylock_spinning()
John Sperbeck (1):
init: open /initrd.image with O_LARGEFILE
Josef Bacik (1):
nfs: fix UAF in direct writes
Josua Mayer (1):
hwmon: (amc6821) add of_match table
KONDO KAZUMA(近藤 和真) (1):
efi/libstub: fix efi_random_alloc() to allocate memory at alloc_min or higher address
Kailang Yang (2):
ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform
ALSA: hda/realtek - Add Headset Mic supported Acer NB platform
Kees Cook (1):
init/Kconfig: lower GCC version check for -Warray-bounds
Kevin Loughlin (1):
x86/sev: Skip ROM range scans and validation for SEV-SNP guests
Kim Phillips (2):
x86/cpu: Support AMD Automatic IBRS
x86/cpu: Enable STIBP on AMD if Automatic IBRS is enabled
Krishna Kurapati (1):
usb: gadget: ncm: Fix handling of zero block length packets
Krishna chaitanya chundru (1):
arm64: dts: qcom: sc7280: Add additional MSI interrupts
Kyle Tso (1):
usb: typec: Return size of buffer if pd_set operation succeeds
Ladislav Michl (1):
usb: dwc3-am62: Rename private data
Laurent Pinchart (5):
media: mc: Add local pad to pipeline regardless of the link state
media: mc: Fix flags handling when creating pad links
media: mc: Add num_links flag to media_pad
media: mc: Rename pad variable to clarify intent
media: mc: Expand MUST_CONNECT flag to always require an enabled link
Leo Ma (1):
drm/amd/display: Fix noise issue on HDMI AV mute
Luiz Augusto von Dentz (1):
Bluetooth: hci_sync: Fix not checking error on hci_cmd_sync_cancel_sync
Ma Jun (1):
drm/amdgpu/pm: Fix the error of pwm1_enable setting
Manivannan Sadhasivam (2):
PCI: qcom: Rename qcom_pcie_config_sid_sm8250() to reflect IP version
PCI: qcom: Enable BDF to SID translation properly
Marek Szyprowski (1):
cpufreq: dt: always allocate zeroed cpumask
Marios Makassikis (1):
ksmbd: retrieve number of blocks using vfs_getattr in set_file_allocation_info
Martin Blumenstingl (1):
clocksource/drivers/arm_global_timer: Fix maximum prescaler value
Masami Hiramatsu (Google) (1):
kprobes/x86: Use copy_from_kernel_nofault() to read from unsafe address
Mathias Nyman (1):
usb: port: Don't try to peer unused USB ports based on location
Matthew Wilcox (Oracle) (2):
bounds: support non-power-of-two CONFIG_NR_CPUS
ubifs: Set page uptodate in the correct place
Maulik Shah (1):
PM: suspend: Set mem_sleep_current during kernel command line setup
Max Filippov (1):
exec: Fix NOMMU linux_binprm::exec in transfer_args_to_stack()
Maximilian Heyne (1):
ext4: fix corruption during on-line resize
Michael Ellerman (3):
powerpc/smp: Adjust nr_cpu_ids to cover all threads of a core powerpc/smp: Increase nr_cpu_ids to include the boot CPU powerpc/fsl: Fix mfpmr build errors with newer binutils
Michael Kelley (2):
PCI: hv: Fix ring buffer size calculation
Drivers: hv: vmbus: Calculate ring buffer size for more efficient use of memory
Mickaël Salaün (1):
landlock: Warn once if a Landlock action is requested while disabled
Mikko Rapeli (2):
mmc: core: Initialize mmc_blk_ioc_data
mmc: core: Avoid negative index with array access
Miklos Szeredi (2):
fuse: fix root lookup with nonzero generation
fuse: don't unhash root
Mikulas Patocka (1):
dm snapshot: fix lockup in dm_exception_table_exit
Minas Harutyunyan (5):
usb: dwc2: host: Fix remote wakeup from hibernation
usb: dwc2: host: Fix hibernation flow
usb: dwc2: host: Fix ISOC flow in DDMA mode
usb: dwc2: gadget: Fix exiting from clock gating
usb: dwc2: gadget: LPM flow fix
Muhammad Usama Anjum (2):
scsi: lpfc: Correct size for cmdwqe/rspwqe for memset()
scsi: lpfc: Correct size for wqe for memset()
Natanael Copa (1):
tools/resolve_btfids: fix build with musl libc
Nathan Chancellor (4):
powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1
xfrm: Avoid clang fortify warning in copy_to_user_tmpl()
hexagon: vmlinux.lds.S: handle attributes section
Nicolas Pitre (1):
vt: fix unicode buffer corruption when deleting characters
Nicolin Chen (1):
iommu/dma: Force swiotlb_max_mapping_size on an untrusted device
Niklas Cassel (1):
PCI: dwc: endpoint: Fix advertised resizable BAR size
Nirmoy Das (1):
drm/i915: Check before removing mm notifier
Oleksandr Tymoshenko (1):
efi: fix panic in kdump kernel
Oliver Neukum (1):
usb: cdc-wdm: close race between read and workqueue
Pablo Neira Ayuso (3):
netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout
netfilter: nf_tables: disallow anonymous set with timeout flag
netfilter: nf_tables: reject constant set with timeout
Paul Menzel (1):
PCI/DPC: Quirk PIO log size for Intel Raptor Lake Root Ports
Peter Collingbourne (1):
serial: Lock console when calling into driver before registration
Philip Yang (1):
drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
Philipp Stanner (1):
pci_iounmap(): Fix MMIO mapping leak
Prashanth K (1):
usb: xhci: Add error handling in xhci_map_urb_for_dma
Qiang Zhang (1):
memtest: use {READ,WRITE}_ONCE in memory scanning
Qingliang Li (1):
PM: sleep: wakeirq: fix wake irq warning in system suspend
Qu Wenruo (1):
btrfs: qgroup: always free reserved space for extent records
Quinn Tran (6):
scsi: qla2xxx: Prevent command send on chip reset
scsi: qla2xxx: Fix N2N stuck connection
scsi: qla2xxx: Split FCE|EFT trace control
scsi: qla2xxx: NVME|FCP prefer flag not being honored
scsi: qla2xxx: Fix command flush on cable pull
scsi: qla2xxx: Delay I/O Abort on PCI error
Rafael J. Wysocki (1):
PCI/PM: Drain runtime-idle callbacks before driver removal
Randy Dunlap (2):
sparc64: NMI watchdog: fix return value of __setup handler
sparc: vDSO: fix return value of __setup handler
Reinette Chatre (2):
vfio/pci: Consolidate irq cleanup on MSI/MSI-X disable vfio/pci: Remove negative check on unsigned vector
Richard Weinberger (1):
ubi: Check for too small LEB size in VTBL code
Rickard x Andersson (1):
tty: serial: imx: Fix broken RS485
Rob Herring (1):
sparc: Explicitly include correct DT includes
Roberto Sassu (2):
smack: Set SMACK64TRANSMUTE only for dirs in smack_inode_setxattr()
smack: Handle SMACK64TRANSMUTE in smack_inode_setsecurity()
Rodrigo Siqueira (1):
drm/amd/display: Return the correct HDCP error code
Roger Quadros (1):
usb: dwc3-am62: fix module unload/reload behavior
Romain Naour (1):
mmc: sdhci-omap: re-tuning is needed after a pm transition to support emmc HS200 mode
Ryan Roberts (1):
mm: swap: fix race between free_swap_and_cache() and swapoff()
Ryusuke Konishi (2):
nilfs2: fix failure to detect DAT corruption in btree and direct mappings
nilfs2: prevent kernel bug at submit_bh_wbc()
Sabrina Dubroca (1):
tls: fix use-after-free on failed backlog decryption
Sam Ravnborg (1):
sparc32: Fix parport build with sparc32
Samuel Thibault (1):
speakup: Fix 8bit characters from direct synth
Saurav Kashyap (2):
scsi: qla2xxx: Fix double free of fcport
scsi: qla2xxx: Change debug message during driver unload
Sean Anderson (2):
soc: fsl: qbman: Always disable interrupts when taking cgr_lock
soc: fsl: qbman: Use raw spinlock for cgr_lock
Sean Christopherson (4):
KVM: x86: Update KVM-only leaf handling to allow for 100% KVM-only leafs
KVM: Always flush async #PF workqueue when vCPU is being destroyed
KVM: x86: Mark target gfn of emulated atomic instruction as dirty
KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region()
SeongJae Park (1):
selftests/mqueue: Set timeout to 180 seconds
Sherry Sun (1):
tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled
Shivnandan Kumar (1):
cpufreq: Limit resolving a frequency to policy min/max
Stanislaw Gruszka (1):
PCI/AER: Block runtime suspend when handling errors
Steven Rostedt (Google) (8):
ring-buffer: Fix waking up ring buffer readers
ring-buffer: Do not set shortest_full when full target is hit
ring-buffer: Fix resetting of shortest_full
ring-buffer: Fix full_waiters_pending in poll
ring-buffer: Use wait_event_interruptible() in ring_buffer_wait()
NFSD: Fix nfsd_clid_class use of __string_len() macro
net: hns3: tracing: fix hclgevf trace event strings
tracing: Use .flush() call to wake up readers
Sumit Garg (1):
tee: optee: Fix kernel panic caused by incorrect error handling
Sunmin Jeong (2):
f2fs: mark inode dirty for FI_ATOMIC_COMMITTED flag
f2fs: truncate page cache before clearing flags when aborting atomic write
Svyatoslav Pankratov (1):
crypto: qat - fix double free during reset
Thomas Gleixner (3):
timers: Update kernel-doc for various functions
timers: Use del_timer_sync() even on UP
timers: Rename del_timer_sync() to timer_delete_sync()
Tony Battersby (1):
block: Fix page refcounts for unaligned buffers in __bio_release_pages()
Tor Vic (1):
cpufreq: amd-pstate: Fix min_perf assignment in amd_pstate_adjust_perf()
Toru Katagiri (1):
USB: serial: cp210x: add pid/vid for TDK NC0110013M and MM0110113M
Ville Syrjälä (1):
drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()
Vlastimil Babka (1):
mm, vmscan: prevent infinite loop for costly GFP_NOIO | __GFP_RETRY_MAYFAIL allocations
Wayne Chang (2):
phy: tegra: xusb: Add API to retrieve the port number of phy
usb: gadget: tegra-xudc: Fix USB3 PHY retrieval logic
Weitao Wang (1):
USB: UAS: return ENODEV when submit urbs fail with device not attached
Will Deacon (1):
swiotlb: Fix alignment checks when both allocation and DMA masks are present
Wolfram Sang (1):
mmc: tmio: avoid concurrent runs of mmc_request_done()
Xingui Yang (2):
scsi: libsas: Add a helper sas_get_sas_addr_and_dev_type()
scsi: libsas: Fix disk not being scanned in after being removed
Ye Zhang (1):
thermal: devfreq_cooling: Fix perf state when calculate dfc res_util
Yu Kuai (1):
dm-raid: fix lockdep waring in "pers->hot_add_disk"
Zack Rusin (1):
drm/vmwgfx: Fix possible null pointer derefence with invalid contexts
Zhang Yi (1):
ubi: correct the calculation of fastmap size
Zheng Wang (1):
wifi: brcmfmac: Fix use-after-free bug in brcmf_cfg80211_detach
Zi Yan (1):
mm/migrate: set swap entry values of THP tail pages properly.
Zoltan HERPAI (1):
pwm: img: fix pwm clock lookup
yuan linyu (1):
usb: udc: remove warning when queue disabled ep
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/hw-vuln/spectre.rst +10 -7
@@ -484,11 +484,14 @@ Spectre variant 2 Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at boot, by setting the IBRS bit, and they're automatically protected against - Spectre v2 variant attacks, including cross-thread branch target injections - on SMT systems (STIBP). In other words, eIBRS enables STIBP too. + Spectre v2 variant attacks. - Legacy IBRS systems clear the IBRS bit on exit to userspace and - therefore explicitly enable STIBP for that + On Intel's enhanced IBRS systems, this includes cross-thread branch target + injections on SMT systems (STIBP). In other words, Intel eIBRS enables + STIBP, too. + + AMD Automatic IBRS does not protect userspace, and Legacy IBRS systems clear + the IBRS bit on exit to userspace, therefore both explicitly enable STIBP. The retpoline mitigation is turned on by default on vulnerable CPUs. It can be forced on or off by the administrator
@@ -621,9 +624,9 @@ kernel command line. retpoline,generic Retpolines retpoline,lfence LFENCE; indirect branch retpoline,amd alias for retpoline,lfence - eibrs enhanced IBRS - eibrs,retpoline enhanced IBRS + Retpolines - eibrs,lfence enhanced IBRS + LFENCE + eibrs Enhanced/Auto IBRS + eibrs,retpoline Enhanced/Auto IBRS + Retpolines + eibrs,lfence Enhanced/Auto IBRS + LFENCE ibrs use IBRS to protect kernel Not specifying this option is equivalent to
Documentation/admin-guide/kernel-parameters.txt +4 -6
@@ -3206,9 +3206,7 @@ mem_encrypt= [X86-64] AMD Secure Memory Encryption (SME) control Valid arguments: on, off - Default (depends on kernel configuration option): - on (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y) - off (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n) + Default: off mem_encrypt=on: Activate SME mem_encrypt=off: Do not activate SME
@@ -5765,9 +5763,9 @@ retpoline,generic - Retpolines retpoline,lfence - LFENCE; indirect branch retpoline,amd - alias for retpoline,lfence - eibrs - enhanced IBRS - eibrs,retpoline - enhanced IBRS + Retpolines - eibrs,lfence - enhanced IBRS + LFENCE + eibrs - Enhanced/Auto IBRS + eibrs,retpoline - Enhanced/Auto IBRS + Retpolines + eibrs,lfence - Enhanced/Auto IBRS + LFENCE ibrs - use IBRS to protect kernel Not specifying this option is equivalent to
Documentation/userspace-api/media/mediactl/media-types.rst +5 -6
@@ -375,12 +375,11 @@ Types and flags used to represent the media graph elements are origins of links. * - ``MEDIA_PAD_FL_MUST_CONNECT`` - - If this flag is set and the pad is linked to any other pad, then - at least one of those links must be enabled for the entity to be - able to stream. There could be temporary reasons (e.g. device - configuration dependent) for the pad to need enabled links even - when this flag isn't set; the absence of the flag doesn't imply - there is none. + - If this flag is set, then for this pad to be able to stream, it must + be connected by at least one enabled link. There could be temporary + reasons (e.g. device configuration dependent) for the pad to need + enabled links even when this flag isn't set; the absence of the flag + doesn't imply there is none. One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
Documentation/x86/amd-memory-encryption.rst +8 -8
@@ -87,14 +87,14 @@ The state of SME in the Linux kernel can be documented as follows: kernel is non-zero). SME can also be enabled and activated in the BIOS. If SME is enabled and -activated in the BIOS, then all memory accesses will be encrypted and it will -not be necessary to activate the Linux memory encryption support. If the BIOS -merely enables SME (sets bit 23 of the MSR_AMD64_SYSCFG), then Linux can activate -memory encryption by default (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y) or -by supplying mem_encrypt=on on the kernel command line. However, if BIOS does -not enable SME, then Linux will not be able to activate memory encryption, even -if configured to do so by default or the mem_encrypt=on command line parameter -is specified. +activated in the BIOS, then all memory accesses will be encrypted and it +will not be necessary to activate the Linux memory encryption support. + +If the BIOS merely enables SME (sets bit 23 of the MSR_AMD64_SYSCFG), +then memory encryption can be enabled by supplying mem_encrypt=on on the +kernel command line. However, if BIOS does not enable SME, then Linux +will not be able to activate memory encryption, even if configured to do +so by default or the mem_encrypt=on command line parameter is specified. Secure Nested Paging (SNP) ==========================
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 83 +SUBLEVEL = 84 EXTRAVERSION = NAME = Curry Ramen
arch/arm/boot/dts/mmp2-brownstone.dts +1 -1
@@ -28,7 +28,7 @@ &uart3 { &twsi1 { status = "okay"; pmic: max8925@3c { - compatible = "maxium,max8925"; + compatible = "maxim,max8925"; reg = <0x3c>; interrupts = <1>; interrupt-parent = <&intcmux4>;
arch/arm64/boot/dts/qcom/sc7280.dtsi +10 -2
@@ -2028,8 +2028,16 @@ pcie1: pci@1c08000 { ranges = <0x01000000 0x0 0x00000000 0x0 0x40200000 0x0 0x100000>, <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>; - interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "msi"; + interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi0", "msi1", "msi2", "msi3", + "msi4", "msi5", "msi6", "msi7"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>,
arch/hexagon/kernel/vmlinux.lds.S +1 -0
@@ -64,6 +64,7 @@ SECTIONS STABS_DEBUG DWARF_DEBUG ELF_DETAILS + .hexagon.attributes 0 : { *(.hexagon.attributes) } DISCARDS }
arch/loongarch/include/asm/io.h +2 -0
@@ -72,6 +72,8 @@ extern void __memcpy_fromio(void *to, const volatile void __iomem *from, size_t#define memcpy_fromio (a, c, l) __memcpy_fromio((a), (c), (l))#define memcpy_toio (c, a, l) __memcpy_toio((c), (a), (l)) +#define __io_aw () mmiowb() +#include <asm-generic/io.h> #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
arch/loongarch/include/asm/percpu.h +6 -1
@@ -25,7 +25,12 @@ static inline void set_my_cpu_offset(unsigned long off) __my_cpu_offset = off;csr_write64 (off,PERCPU_BASE_KS ); } -#define __my_cpu_offset __my_cpu_offset + +#define __my_cpu_offset \ +({ \ + __asm__ __volatile__("":"+r"(__my_cpu_offset)); \ + __my_cpu_offset; \ +})#define PERCPU_OP (op, asm_op, c_op) \ static __always_inline unsigned long __percpu_##op(void *ptr, \
arch/parisc/include/asm/assembly.h +10 -8
@@ -97,26 +97,28 @@* version takes two arguments: a src and destination register. * However, the source and destination registers can not be * the same register. +* +* We use add,l to avoid clobbering the C/B bits in the PSW. */ .macro tophys grvirt, grphys - ldil L%(__PAGE_OFFSET), \grphys - sub \grvirt, \grphys, \grphys + ldil L%(-__PAGE_OFFSET), \grphys + addl \grvirt, \grphys, \grphys .endm - + .macro tovirt grphys, grvirt ldil L%(__PAGE_OFFSET), \grvirt - add \grphys, \grvirt, \grvirt + addl \grphys, \grvirt, \grvirt .endm .macro tophys_r1 gr - ldil L%(__PAGE_OFFSET), %r1 - sub \gr, %r1, \gr + ldil L%(-__PAGE_OFFSET), %r1 + addl \gr, %r1, \gr .endm - + .macro tovirt_r1 gr ldil L%(__PAGE_OFFSET), %r1 - add \gr, %r1, \gr + addl \gr, %r1, \gr .endm .macro delay value
arch/parisc/include/asm/checksum.h +6 -4
@@ -40,7 +40,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)" addc %0, %5, %0\n" " addc %0, %3, %0\n" "1: ldws,ma 4(%1), %3\n" -" addib,< 0, %2, 1b\n" +" addib,> -1, %2, 1b\n" " addc %0, %3, %0\n" "\n" " extru %0, 31, 16, %4\n"
@@ -126,6 +126,7 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,** Try to keep 4 registers with "live" values ahead of the ALU. */ +" depdi 0, 31, 32, %0\n" /* clear upper half of incoming checksum */ " ldd,ma 8(%1), %4\n" /* get 1st saddr word */ " ldd,ma 8(%2), %5\n" /* get 1st daddr word */ " add %4, %0, %0\n"
@@ -137,8 +138,8 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr," add,dc %3, %0, %0\n" /* fold in proto+len | carry bit */ " extrd,u %0, 31, 32, %4\n" /* copy upper half down */ " depdi 0, 31, 32, %0\n" /* clear upper half */ -" add %4, %0, %0\n" /* fold into 32-bits */ -" addc 0, %0, %0\n" /* add carry */ +" add,dc %4, %0, %0\n" /* fold into 32-bits, plus carry */ +" addc 0, %0, %0\n" /* add final carry */ #else
@@ -163,7 +164,8 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr," ldw,ma 4(%2), %7\n" /* 4th daddr */ " addc %6, %0, %0\n" " addc %7, %0, %0\n" -" addc %3, %0, %0\n" /* fold in proto+len, catch carry */ +" addc %3, %0, %0\n" /* fold in proto+len */ +" addc 0, %0, %0\n" /* add carry */ #endif : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len),
arch/parisc/kernel/unaligned.c +12 -15
@@ -167,6 +167,7 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)static int emulate_ldd (struct pt_regs *regs,int toreg,int flop) {unsigned long saddr = regs->ior; +unsigned long shift, temp1;__u64 val =0 ;ASM_EXCEPTIONTABLE_VAR (ret);
@@ -178,25 +179,22 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)#ifdef CONFIG_64BIT __asm__ __volatile__ ( -" depd,z %3,60,3,%%r19\n" /* r19=(ofs&7)*8 */ -" mtsp %4, %%sr1\n" -" depd %%r0,63,3,%3\n" -"1: ldd 0(%%sr1,%3),%0\n" -"2: ldd 8(%%sr1,%3),%%r20\n" -" subi 64,%%r19,%%r19\n" -" mtsar %%r19\n" -" shrpd %0,%%r20,%%sar,%0\n" +" depd,z %2,60,3,%3\n" /* shift=(ofs&7)*8 */ +" mtsp %5, %%sr1\n" +" depd %%r0,63,3,%2\n" +"1: ldd 0(%%sr1,%2),%0\n" +"2: ldd 8(%%sr1,%2),%4\n" +" subi 64,%3,%3\n" +" mtsar %3\n" +" shrpd %0,%4,%%sar,%0\n" "3: \n" ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 3b, "%1") ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 3b, "%1") - : "=r" (val), "+r" (ret) - : "0" (val), "r" (saddr), "r" (regs->isr) - : "r19", "r20" ); + : "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1) + : "r" (regs->isr) );#else - { -unsigned long shift, temp1; __asm__ __volatile__ ( -" zdep %2,29,2,%3\n" /* r19=(ofs&3)*8 */ +" zdep %2,29,2,%3\n" /* shift=(ofs&3)*8 */ " mtsp %5, %%sr1\n" " dep %%r0,31,2,%2\n" "1: ldw 0(%%sr1,%2),%0\n"
@@ -212,7 +210,6 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) ASM_EXCEPTIONTABLE_ENTRY_EFAULT(3b, 4b, "%1") : "+r" (val), "+r" (ret), "+r" (saddr), "=&r" (shift), "=&r" (temp1) : "r" (regs->isr) ); - }#endif DPRINTF ("val = 0x%llx\n" , val);
arch/powerpc/include/asm/reg_fsl_emb.h +9 -2
@@ -12,9 +12,16 @@#ifndef __ASSEMBLY__/* Performance Monitor Registers */ #define mfpmr (rn) ({unsigned int rval; \ - asm volatile("mfpmr %0," __stringify(rn) \ + asm volatile(".machine push; " \ + ".machine e300; " \ + "mfpmr %0," __stringify(rn) ";" \ + ".machine pop; " \ : "=r" (rval)); rval;}) -#define mtpmr (rn, v) asm volatile("mtpmr " __stringify(rn) ",%0" : : "r" (v)) +#define mtpmr (rn, v) asm volatile(".machine push; " \ + ".machine e300; " \ + "mtpmr " __stringify(rn) ",%0; " \ + ".machine pop; " \ + : : "r" (v))#endif /* __ASSEMBLY__ */ /* Freescale Book E Performance Monitor APU Registers */
arch/powerpc/kernel/prom.c +12 -0
@@ -369,6 +369,18 @@ static int __init early_init_dt_scan_cpus(unsigned long node,if (IS_ENABLED (CONFIG_PPC64 )) boot_cpu_hwid =be32_to_cpu (intserv[found_thread]); +if (nr_cpu_ids % nthreads !=0 ) { +set_nr_cpu_ids (ALIGN (nr_cpu_ids, nthreads)); +pr_warn ("nr_cpu_ids was not a multiple of threads_per_core, adjusted to %d\n" , + nr_cpu_ids); + } + +if (boot_cpuid >= nr_cpu_ids) { +set_nr_cpu_ids (min (CONFIG_NR_CPUS ,ALIGN (boot_cpuid +1 , nthreads))); +pr_warn ("Boot CPU %d >= nr_cpu_ids, adjusted nr_cpu_ids to %d\n" , + boot_cpuid, nr_cpu_ids); + } +/* * PAPR defines "logical" PVR values for cpus that * meet various levels of the architecture:
arch/powerpc/lib/Makefile +1 -1
@@ -72,7 +72,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o obj-$(CONFIG_ALTIVEC) += xor_vmx.o xor_vmx_glue.o -CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec) +CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec) # Enable <altivec.h> CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
arch/sparc/crypto/crop_devid.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> /* This is a dummy device table linked into all of the crypto * opcode drivers. It serves to trigger the module autoloading
arch/sparc/include/asm/floppy_32.h +1 -1
@@ -8,7 +8,7 @@#define __ASM_SPARC_FLOPPY_H#include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/pgtable.h> #include <asm/idprom.h>
arch/sparc/include/asm/floppy_64.h +1 -1
@@ -11,7 +11,7 @@#define __ASM_SPARC64_FLOPPY_H#include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/dma-mapping.h> #include <asm/auxio.h>
arch/sparc/include/asm/parport.h +7 -251
262 lines not on this page · raw message
arch/sparc/include/asm/parport_64.h new file +256 -0
256 lines not on this page · raw message
arch/sparc/kernel/apc.c +1 -1
@@ -13,7 +13,7 @@#include <linux/miscdevice.h> #include <linux/pm.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/module.h> #include <asm/io.h>
arch/sparc/kernel/auxio_32.c +0 -1
@@ -8,7 +8,6 @@#include <linux/init.h> #include <linux/spinlock.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/export.h> #include <asm/oplib.h>
arch/sparc/kernel/auxio_64.c +2 -1
@@ -10,7 +10,8 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/ioport.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/prom.h> #include <asm/io.h>
arch/sparc/kernel/central.c +1 -1
@@ -10,7 +10,7 @@#include <linux/export.h> #include <linux/string.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <asm/fhc.h>
arch/sparc/kernel/chmc.c +2 -1
@@ -15,7 +15,8 @@#include <linux/errno.h> #include <linux/init.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/spitfire.h> #include <asm/chmctrl.h> #include <asm/cpudata.h>
arch/sparc/kernel/ioport.c +1 -1
@@ -39,7 +39,7 @@#include <linux/seq_file.h> #include <linux/scatterlist.h> #include <linux/dma-map-ops.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/io.h> #include <asm/vaddrs.h>
arch/sparc/kernel/leon_kernel.c +0 -2
@@ -8,9 +8,7 @@#include <linux/errno.h> #include <linux/mutex.h> #include <linux/of.h> -#include <linux/of_platform.h> #include <linux/interrupt.h> -#include <linux/of_device.h> #include <linux/clocksource.h> #include <linux/clockchips.h>
arch/sparc/kernel/leon_pci.c +2 -1
@@ -7,7 +7,8 @@* Code is partially derived from pcic.c */ -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/export.h>
arch/sparc/kernel/leon_pci_grpci1.c +2 -1
@@ -13,10 +13,11 @@* Contributors: Daniel Hellstrom <[email protected]> */ -#include <linux/of_device.h> #include <linux/export.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/of_irq.h> +#include <linux/platform_device.h> #include <linux/delay.h> #include <linux/pci.h>
arch/sparc/kernel/leon_pci_grpci2.c +3 -1
@@ -6,12 +6,14 @@* */ -#include <linux/of_device.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/slab.h> #include <linux/delay.h> #include <linux/export.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <asm/io.h> #include <asm/leon.h> #include <asm/vaddrs.h>
arch/sparc/kernel/nmi.c +1 -1
@@ -274,7 +274,7 @@ static int __init setup_nmi_watchdog(char *str)if (!strncmp (str,"panic" ,5 )) panic_on_timeout =1 ; -return 0 ; +return 1 ; }__setup ("nmi_watchdog=" , setup_nmi_watchdog);
arch/sparc/kernel/of_device_32.c +1 -1
@@ -7,8 +7,8 @@#include <linux/slab.h> #include <linux/errno.h> #include <linux/irq.h> -#include <linux/of_device.h> #include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <asm/leon.h> #include <asm/leon_amba.h>
arch/sparc/kernel/of_device_64.c +2 -2
@@ -1,7 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/string.h> #include <linux/kernel.h> -#include <linux/of.h> #include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/export.h>
@@ -9,8 +8,9 @@#include <linux/slab.h> #include <linux/errno.h> #include <linux/irq.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/spitfire.h> #include "of_device_common.h"
arch/sparc/kernel/of_device_common.c +2 -2
@@ -1,15 +1,15 @@// SPDX-License-Identifier: GPL-2.0-only #include <linux/string.h> #include <linux/kernel.h> -#include <linux/of.h> #include <linux/export.h> #include <linux/mod_devicetable.h> #include <linux/errno.h> #include <linux/irq.h> +#include <linux/of.h> #include <linux/of_platform.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/platform_device.h> #include "of_device_common.h"
arch/sparc/kernel/pci.c +2 -1
@@ -20,8 +20,9 @@#include <linux/irq.h> #include <linux/init.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/pgtable.h> +#include <linux/platform_device.h> #include <linux/uaccess.h> #include <asm/irq.h>
arch/sparc/kernel/pci_common.c +2 -1
@@ -8,7 +8,8 @@#include <linux/slab.h> #include <linux/pci.h> #include <linux/device.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/prom.h> #include <asm/oplib.h>
arch/sparc/kernel/pci_fire.c +2 -1
@@ -10,7 +10,8 @@#include <linux/msi.h> #include <linux/export.h> #include <linux/irq.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/numa.h> #include <asm/prom.h>
arch/sparc/kernel/pci_impl.h +0 -1
@@ -11,7 +11,6 @@#include <linux/spinlock.h> #include <linux/pci.h> #include <linux/msi.h> -#include <linux/of_device.h> #include <asm/io.h> #include <asm/prom.h> #include <asm/iommu.h>
arch/sparc/kernel/pci_msi.c +2 -0
@@ -5,6 +5,8 @@*/ #include <linux/kernel.h> #include <linux/interrupt.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/irq.h>
arch/sparc/kernel/pci_psycho.c +3 -1
@@ -13,7 +13,9 @@#include <linux/export.h> #include <linux/slab.h> #include <linux/interrupt.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/iommu.h> #include <asm/irq.h>
arch/sparc/kernel/pci_sun4v.c +2 -1
@@ -15,7 +15,8 @@#include <linux/msi.h> #include <linux/export.h> #include <linux/log2.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/dma-map-ops.h> #include <asm/iommu-common.h>
arch/sparc/kernel/pmc.c +1 -1
@@ -11,7 +11,7 @@#include <linux/init.h> #include <linux/pm.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/module.h> #include <asm/io.h>
arch/sparc/kernel/power.c +2 -1
@@ -9,7 +9,8 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/reboot.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/prom.h> #include <asm/io.h>
arch/sparc/kernel/prom_irqtrans.c +1 -0
@@ -4,6 +4,7 @@#include <linux/init.h> #include <linux/of.h> #include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/oplib.h> #include <asm/prom.h>
arch/sparc/kernel/psycho_common.c +1 -0
@@ -6,6 +6,7 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/numa.h> +#include <linux/platform_device.h> #include <asm/upa.h>
arch/sparc/kernel/sbus.c +2 -1
@@ -14,7 +14,8 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/numa.h> #include <asm/page.h>
arch/sparc/kernel/time_32.c +0 -1
@@ -33,7 +33,6 @@#include <linux/ioport.h> #include <linux/profile.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <asm/mc146818rtc.h>
arch/sparc/mm/io-unit.c +2 -1
@@ -13,7 +13,8 @@#include <linux/bitops.h> #include <linux/dma-map-ops.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/io-unit.h>
arch/sparc/mm/iommu.c +3 -2
@@ -7,14 +7,15 @@* Copyright (C) 1996 Eddie C. Dost ([email protected]) * Copyright (C) 1997,1998 Jakub Jelinek ([email protected]) */ - +#include <linux/kernel.h> #include <linux/init.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/dma-map-ops.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/mxcc.h>
arch/sparc/vdso/vma.c +3 -4
@@ -449,9 +449,8 @@ static __init int vdso_setup(char *s)unsigned long val; err =kstrtoul (s,10 , &val); -if (err) -return err; - vdso_enabled = val; -return 0 ; +if (!err) + vdso_enabled = val; +return 1 ; }__setup ("vdso=" , vdso_setup);
arch/x86/Kconfig +0 -13
@@ -1553,19 +1553,6 @@ config AMD_MEM_ENCRYPT This requires an AMD processor that supports Secure Memory Encryption (SME). -config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT - bool "Activate AMD Secure Memory Encryption (SME) by default" - depends on AMD_MEM_ENCRYPT - help - Say yes to have system memory encrypted by default if running on - an AMD processor that supports Secure Memory Encryption (SME). - - If set to Y, then the encryption of system memory can be - deactivated with the mem_encrypt=off command line option. - - If set to N, then the encryption of system memory can be - activated with the mem_encrypt=on command line option. - # Common NUMA Features config NUMA bool "NUMA Memory Allocation and Scheduler Support"
arch/x86/boot/compressed/efi_mixed.S +24 -5
@@ -15,10 +15,12 @@ */ #include <linux/linkage.h> +#include <asm/asm-offsets.h> #include <asm/msr.h> #include <asm/page_types.h> #include <asm/processor-flags.h> #include <asm/segment.h> +#include <asm/setup.h> .code64 .text
@@ -49,6 +51,11 @@ SYM_FUNC_START(startup_64_mixed_mode) lea efi32_boot_args(%rip), %rdx mov 0(%rdx), %edi mov 4(%rdx), %esi + + /* Switch to the firmware's stack */ + movl efi32_boot_sp(%rip), %esp + andl $~7, %esp + #ifdef CONFIG_EFI_HANDOVER_PROTOCOL mov 8(%rdx), %edx // saved bootparams pointer test %edx, %edx
@@ -150,6 +157,7 @@ SYM_FUNC_END(__efi64_thunk) SYM_FUNC_START(efi32_stub_entry) call 1f 1: popl %ecx + leal (efi32_boot_args - 1b)(%ecx), %ebx /* Clear BSS */ xorl %eax, %eax
@@ -164,6 +172,7 @@ SYM_FUNC_START(efi32_stub_entry) popl %ecx popl %edx popl %esi + movl %esi, 8(%ebx) jmp efi32_entry SYM_FUNC_END(efi32_stub_entry) #endif
@@ -240,8 +249,6 @@ SYM_FUNC_END(efi_enter32) * * Arguments: %ecx image handle * %edx EFI system table pointer - * %esi struct bootparams pointer (or NULL when not using - * the EFI handover protocol) * * Since this is the point of no return for ordinary execution, no registers * are considered live except for the function parameters. [Note that the EFI
@@ -260,13 +267,25 @@ SYM_FUNC_START_LOCAL(efi32_entry) /* Store firmware IDT descriptor */ sidtl (efi32_boot_idt - 1b)(%ebx) + /* Store firmware stack pointer */ + movl %esp, (efi32_boot_sp - 1b)(%ebx) + /* Store boot arguments */ leal (efi32_boot_args - 1b)(%ebx), %ebx movl %ecx, 0(%ebx) movl %edx, 4(%ebx) - movl %esi, 8(%ebx) movb $0x0, 12(%ebx) // efi_is64 + /* + * Allocate some memory for a temporary struct boot_params, which only + * needs the minimal pieces that startup_32() relies on. + */ + subl $PARAM_SIZE, %esp + movl %esp, %esi + movl $PAGE_SIZE, BP_kernel_alignment(%esi) + movl $_end - 1b, BP_init_size(%esi) + subl $startup_32 - 1b, BP_init_size(%esi) + /* Disable paging */ movl %cr0, %eax btrl $X86_CR0_PG_BIT, %eax
@@ -292,8 +311,7 @@ SYM_FUNC_START(efi32_pe_entry) movl 8(%ebp), %ecx // image_handle movl 12(%ebp), %edx // sys_table - xorl %esi, %esi - jmp efi32_entry // pass %ecx, %edx, %esi + jmp efi32_entry // pass %ecx, %edx // no other registers remain live 2: popl %edi // restore callee-save registers
@@ -324,5 +342,6 @@ SYM_DATA_END(efi32_boot_idt) SYM_DATA_LOCAL(efi32_boot_cs, .word 0) SYM_DATA_LOCAL(efi32_boot_ds, .word 0) +SYM_DATA_LOCAL(efi32_boot_sp, .long 0) SYM_DATA_LOCAL(efi32_boot_args, .long 0, 0, 0) SYM_DATA(efi_is64, .byte 1)
arch/x86/coco/core.c +5 -15
@@ -13,8 +13,8 @@#include <asm/coco.h> #include <asm/processor.h> -static enum cc_vendor vendor__ro_after_init ; -static u64 cc_mask__ro_after_init ; +enum cc_vendor cc_vendor__ro_after_init =CC_VENDOR_NONE ; +u64 cc_mask__ro_after_init ;static bool intel_cc_platform_has (enum cc_attr attr) {
@@ -83,7 +83,7 @@ static bool hyperv_cc_platform_has(enum cc_attr attr)bool cc_platform_has (enum cc_attr attr) { -switch (vendor) { +switch (cc_vendor) {case CC_VENDOR_AMD :return amd_cc_platform_has (attr);case CC_VENDOR_INTEL :
@@ -105,7 +105,7 @@ u64 cc_mkenc(u64 val)* - for AMD, bit *set* means the page is encrypted * - for Intel *clear* means encrypted. */ -switch (vendor) { +switch (cc_vendor) {case CC_VENDOR_AMD :return val | cc_mask;case CC_VENDOR_INTEL :
@@ -118,7 +118,7 @@ u64 cc_mkenc(u64 val)u64 cc_mkdec (u64 val) {/* See comment in cc_mkenc() */ -switch (vendor) { +switch (cc_vendor) {case CC_VENDOR_AMD :return val & ~cc_mask;case CC_VENDOR_INTEL :
@@ -128,13 +128,3 @@ u64 cc_mkdec(u64 val) } }EXPORT_SYMBOL_GPL (cc_mkdec); - -__init void cc_set_vendor (enum cc_vendor v) -{ - vendor = v; -} - -__init void cc_set_mask (u64 mask) -{ - cc_mask = mask; -}
arch/x86/coco/tdx/tdx.c +1 -1
@@ -793,7 +793,7 @@ void __init tdx_early_init(void)setup_force_cpu_cap (X86_FEATURE_TDX_GUEST ); -cc_set_vendor (CC_VENDOR_INTEL ); + cc_vendor =CC_VENDOR_INTEL ;tdx_parse_tdinfo (&cc_mask);cc_set_mask (cc_mask);
arch/x86/include/asm/asm.h +14 -0
@@ -113,6 +113,20 @@#endif +#ifndef __ASSEMBLY__ +#ifndef __pic__ +static __always_inline __pure void *rip_rel_ptr(void *p) +{ + asm("leaq %c1(%%rip), %0" :"=r" (p) :"i" (p)); + +return p; +} +#define RIP_REL_REF (var) (*(typeof(&(var)))rip_rel_ptr(&(var))) +#else +#define RIP_REL_REF (var) (var) +#endif +#endif +/* * Macros to generate condition code outputs from inline assembly, * The output operand must be type "bool".
arch/x86/include/asm/coco.h +8 -2
@@ -2,6 +2,7 @@#ifndef _ASM_X86_COCO_H#define _ASM_X86_COCO_H +#include <asm/asm.h> #include <asm/types.h> enum cc_vendor {
@@ -11,10 +12,15 @@ enum cc_vendor { CC_VENDOR_INTEL, }; -void cc_set_vendor (enum cc_vendor v); -void cc_set_mask (u64 mask); +extern enum cc_vendor cc_vendor; +extern u64 cc_mask;#ifdef CONFIG_ARCH_HAS_CC_PLATFORM +static inline void cc_set_mask (u64 mask) +{ +RIP_REL_REF (cc_mask) = mask; +} +u64 cc_mkenc (u64 val);u64 cc_mkdec (u64 val);#else
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -427,6 +427,7 @@#define X86_FEATURE_V_TSC_AUX (19*32+ 9)/* "" Virtual TSC_AUX */ #define X86_FEATURE_SME_COHERENT (19*32+10)/* "" AMD hardware-enforced cache coherency */ +#define X86_FEATURE_AUTOIBRS (20*32+ 8)/* "" Automatic IBRS */ #define X86_FEATURE_SBPB (20*32+27)/* "" Selective Branch Prediction Barrier */ #define X86_FEATURE_IBPB_BRTYPE (20*32+28)/* "" MSR_PRED_CMD[IBPB] flushes all branch type predictions */ #define X86_FEATURE_SRSO_NO (20*32+29)/* "" CPU is not affected by SRSO */
arch/x86/include/asm/mem_encrypt.h +9 -6
@@ -15,7 +15,8 @@#include <linux/init.h> #include <linux/cc_platform.h> -#include <asm/bootparam.h> +#include <asm/asm.h> +struct boot_params ;#ifdef CONFIG_X86_MEM_ENCRYPT void __init mem_encrypt_init (void );
@@ -57,6 +58,11 @@ void __init mem_encrypt_free_decrypted_mem(void);void __init sev_es_init_vc_handling (void ); +static inline u64 sme_get_me_mask (void ) +{ +return RIP_REL_REF (sme_me_mask); +} +#define __bss_decrypted __section(".bss..decrypted")#else /* !CONFIG_AMD_MEM_ENCRYPT */
@@ -88,6 +94,8 @@ early_set_mem_enc_dec_hypercall(unsigned long vaddr, unsigned long size, bool enstatic inline void mem_encrypt_free_decrypted_mem (void ) { } +static inline u64 sme_get_me_mask (void ) {return 0 ; } +#define __bss_decrypted#endif /* CONFIG_AMD_MEM_ENCRYPT */
@@ -105,11 +113,6 @@ void add_encrypt_protection_map(void);extern char __start_bss_decrypted[], __end_bss_decrypted[], __start_bss_decrypted_unused[]; -static inline u64 sme_get_me_mask (void ) -{ -return sme_me_mask; -} -#endif /* __ASSEMBLY__ */ #endif /* __X86_MEM_ENCRYPT_H__ */
arch/x86/include/asm/msr-index.h +2 -0
@@ -30,6 +30,7 @@#define _EFER_SVME 12/* Enable virtualization */ #define _EFER_LMSLE 13/* Long Mode Segment Limit Enable */ #define _EFER_FFXSR 14/* Enable Fast FXSAVE/FXRSTOR */ +#define _EFER_AUTOIBRS 21/* Enable Automatic IBRS */ #define EFER_SCE (1<<_EFER_SCE)#define EFER_LME (1<<_EFER_LME)
@@ -38,6 +39,7 @@#define EFER_SVME (1<<_EFER_SVME)#define EFER_LMSLE (1<<_EFER_LMSLE)#define EFER_FFXSR (1<<_EFER_FFXSR) +#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS)/* Intel MSRs. Some also available on other CPUs */
arch/x86/include/asm/sev.h +2 -2
@@ -196,12 +196,12 @@ void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long padd unsigned long npages);void __init early_snp_set_memory_shared (unsigned long vaddr,unsigned long paddr,unsigned long npages); -void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op);void snp_set_memory_shared (unsigned long vaddr,unsigned long npages);void snp_set_memory_private (unsigned long vaddr,unsigned long npages);void snp_set_wakeup_secondary_cpu (void );bool snp_init (struct boot_params *bp);void __init __noreturn snp_abort (void ); +void snp_dmi_setup (void );int snp_issue_guest_request (u64 exit_code,struct snp_req_data *input,struct snp_guest_request_ioctl *rio);u64 snp_get_unsupported_features (u64 status);u64 sev_get_status (void );
@@ -219,12 +219,12 @@ static inline void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr, unsigned long npages) { }static inline void __init early_snp_set_memory_shared (unsigned long vaddr,unsigned long paddr,unsigned long npages) { } -static inline void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op) { }static inline void snp_set_memory_shared (unsigned long vaddr,unsigned long npages) { }static inline void snp_set_memory_private (unsigned long vaddr,unsigned long npages) { }static inline void snp_set_wakeup_secondary_cpu (void ) { }static inline bool snp_init (struct boot_params *bp) {return false; }static inline void snp_abort (void ) { } +static inline void snp_dmi_setup (void ) { }static inline int snp_issue_guest_request (u64 exit_code,struct snp_req_data *input,struct snp_guest_request_ioctl *rio) {return -ENOTTY ;
arch/x86/include/asm/suspend_32.h +5 -5
@@ -12,11 +12,6 @@/* image of the saved processor state */ struct saved_context { -/* -* On x86_32, all segment registers except gs are saved at kernel -* entry in pt_regs. -*/ -u16 gs;unsigned long cr0, cr2, cr3, cr4;u64 misc_enable;struct saved_msrs saved_msrs;
@@ -27,6 +22,11 @@ struct saved_context {unsigned long tr;unsigned long safety;unsigned long return_address; +/* +* On x86_32, all segment registers except gs are saved at kernel +* entry in pt_regs. +*/ +u16 gs;bool misc_enable_saved; } __attribute__((packed));
arch/x86/include/asm/x86_init.h +2 -1
@@ -30,12 +30,13 @@ struct x86_init_mpparse {* @reserve_resources: reserve the standard resources for the * platform * @memory_setup: platform specific memory setup -* +* @dmi_setup: platform specific DMI setup */ struct x86_init_resources {void (*probe_roms)(void );void (*reserve_resources)(void );char *(*memory_setup)(void ); +void (*dmi_setup)(void ); };/**
arch/x86/kernel/cpu/amd.c +5 -5
@@ -997,11 +997,11 @@ static bool cpu_has_zenbleed_microcode(void)u32 good_rev =0 ;switch (boot_cpu_data.x86_model) { - case 0x30 ... 0x3f: good_rev = 0x0830107a; break; - case 0x60 ... 0x67: good_rev = 0x0860010b; break; - case 0x68 ... 0x6f: good_rev = 0x08608105; break; - case 0x70 ... 0x7f: good_rev = 0x08701032; break; - case 0xa0 ... 0xaf: good_rev = 0x08a00008; break; + case 0x30 ... 0x3f: good_rev = 0x0830107b; break; + case 0x60 ... 0x67: good_rev = 0x0860010c; break; + case 0x68 ... 0x6f: good_rev = 0x08608107; break; + case 0x70 ... 0x7f: good_rev = 0x08701033; break; + case 0xa0 ... 0xaf: good_rev = 0x08a00009; break;default :return false;
arch/x86/kernel/cpu/bugs.c +72 -66
284 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +11 -8
@@ -1212,8 +1212,8 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {VULNWL_AMD (0x12 ,NO_MELTDOWN |NO_SSB |NO_L1TF |NO_MDS |NO_SWAPGS |NO_ITLB_MULTIHIT |NO_MMIO ),/* FAMILY_ANY must be last, otherwise 0x0f - 0x12 matches won't work */ -VULNWL_AMD (X86_FAMILY_ANY ,NO_MELTDOWN |NO_L1TF |NO_MDS |NO_SWAPGS |NO_ITLB_MULTIHIT |NO_MMIO ), -VULNWL_HYGON (X86_FAMILY_ANY ,NO_MELTDOWN |NO_L1TF |NO_MDS |NO_SWAPGS |NO_ITLB_MULTIHIT |NO_MMIO ), +VULNWL_AMD (X86_FAMILY_ANY ,NO_MELTDOWN |NO_L1TF |NO_MDS |NO_SWAPGS |NO_ITLB_MULTIHIT |NO_MMIO |NO_EIBRS_PBRSB ), +VULNWL_HYGON (X86_FAMILY_ANY ,NO_MELTDOWN |NO_L1TF |NO_MDS |NO_SWAPGS |NO_ITLB_MULTIHIT |NO_MMIO |NO_EIBRS_PBRSB ),/* Zhaoxin Family 7 */ VULNWL(CENTAUR, 7, X86_MODEL_ANY, NO_SPECTRE_V2 | NO_SWAPGS | NO_MMIO),
@@ -1362,8 +1362,16 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c) !cpu_has(c, X86_FEATURE_AMD_SSB_NO))setup_force_cpu_bug (X86_BUG_SPEC_STORE_BYPASS ); -if (ia32_cap &ARCH_CAP_IBRS_ALL ) +/* +* AMD's AutoIBRS is equivalent to Intel's eIBRS - use the Intel feature +* flag and protect from vendor-specific bugs via the whitelist. +*/ +if ((ia32_cap &ARCH_CAP_IBRS_ALL ) ||cpu_has (c,X86_FEATURE_AUTOIBRS )) {setup_force_cpu_cap (X86_FEATURE_IBRS_ENHANCED ); +if (!cpu_matches (cpu_vuln_whitelist,NO_EIBRS_PBRSB ) && + !(ia32_cap &ARCH_CAP_PBRSB_NO )) +setup_force_cpu_bug (X86_BUG_EIBRS_PBRSB ); + }if (!cpu_matches (cpu_vuln_whitelist,NO_MDS ) && !(ia32_cap &ARCH_CAP_MDS_NO )) {
@@ -1425,11 +1433,6 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)setup_force_cpu_bug (X86_BUG_RETBLEED ); } -if (cpu_has (c,X86_FEATURE_IBRS_ENHANCED ) && - !cpu_matches (cpu_vuln_whitelist,NO_EIBRS_PBRSB ) && - !(ia32_cap &ARCH_CAP_PBRSB_NO )) -setup_force_cpu_bug (X86_BUG_EIBRS_PBRSB ); -if (cpu_matches (cpu_vuln_blacklist,SMT_RSB ))setup_force_cpu_bug (X86_BUG_SMT_RSB );
arch/x86/kernel/cpu/mshyperv.c +1 -1
@@ -344,7 +344,7 @@ static void __init ms_hyperv_init_platform(void)/* Isolation VMs are unenlightened SEV-based VMs, thus this check: */ if (IS_ENABLED (CONFIG_AMD_MEM_ENCRYPT )) {if (hv_get_isolation_type () !=HV_ISOLATION_TYPE_NONE ) -cc_set_vendor (CC_VENDOR_HYPERV ); + cc_vendor =CC_VENDOR_HYPERV ; } }
arch/x86/kernel/eisa.c +2 -1
@@ -2,6 +2,7 @@/* * EISA specific code */ +#include <linux/cc_platform.h> #include <linux/ioport.h> #include <linux/eisa.h> #include <linux/io.h>
@@ -12,7 +13,7 @@ static __init int eisa_bus_probe(void) {void __iomem *p; -if (xen_pv_domain () && !xen_initial_domain ()) +if ((xen_pv_domain () && !xen_initial_domain ()) ||cc_platform_has (CC_ATTR_GUEST_SEV_SNP ))return 0 ; p =ioremap (0x0FFFD9 ,4 );
arch/x86/kernel/fpu/xstate.c +3 -2
@@ -177,10 +177,11 @@ void fpu__init_cpu_xstate(void)* Must happen after CR4 setup and before xsetbv() to allow KVM * lazy passthrough. Write independent of the dynamic state static * key as that does not work on the boot CPU. This also ensures -* that any stale state is wiped out from XFD. +* that any stale state is wiped out from XFD. Reset the per CPU +* xfd cache too. */ if (cpu_feature_enabled (X86_FEATURE_XFD )) -wrmsrl (MSR_IA32_XFD , init_fpstate.xfd); +xfd_set_state (init_fpstate.xfd);/* * XCR_XFEATURE_ENABLED_MASK (aka. XCR0) sets user features
arch/x86/kernel/fpu/xstate.h +10 -4
@@ -148,20 +148,26 @@ static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rs#endif #ifdef CONFIG_X86_64 +static inline void xfd_set_state (u64 xfd) +{ +wrmsrl (MSR_IA32_XFD , xfd); +__this_cpu_write (xfd_state, xfd); +} +static inline void xfd_update_state (struct fpstate *fpstate) {if (fpu_state_size_dynamic ()) {u64 xfd = fpstate->xfd; -if (__this_cpu_read (xfd_state) != xfd) { -wrmsrl (MSR_IA32_XFD , xfd); -__this_cpu_write (xfd_state, xfd); - } +if (__this_cpu_read (xfd_state) != xfd) +xfd_set_state (xfd); } }extern int __xfd_enable_feature (u64 which,struct fpu_guest *guest_fpu);#else +static inline void xfd_set_state (u64 xfd) { } +static inline void xfd_update_state (struct fpstate *fpstate) { }static inline int __xfd_enable_feature (u64 which,struct fpu_guest *guest_fpu) {
arch/x86/kernel/kprobes/core.c +10 -1
@@ -301,7 +301,16 @@ static int can_probe(unsigned long paddr)kprobe_opcode_t *arch_adjust_kprobe_addr (unsigned long addr,unsigned long offset,bool *on_func_entry) { -if (is_endbr (*(u32 *)addr)) { +u32 insn; + +/* +* Since 'addr' is not guaranteed to be safe to access, use +* copy_from_kernel_nofault() to read the instruction: +*/ +if (copy_from_kernel_nofault (&insn, (void *)addr,sizeof (u32))) +return NULL ; + +if (is_endbr (insn)) { *on_func_entry = !offset || offset ==4 ;if (*on_func_entry) offset =4 ;
arch/x86/kernel/probe_roms.c +0 -10
@@ -203,16 +203,6 @@ void __init probe_roms(void)unsigned char c;int i; -/* -* The ROM memory range is not part of the e820 table and is therefore not -* pre-validated by BIOS. The kernel page table maps the ROM region as encrypted -* memory, and SNP requires encrypted memory to be validated before access. -* Do that here. -*/ -snp_prep_memory (video_rom_resource.start, - ((system_rom_resource.end +1 ) - video_rom_resource.start), -SNP_PAGE_STATE_PRIVATE ); -/* video rom */ upper = adapter_rom_resources[0 ].start;for (start = video_rom_resource.start; start < upper; start +=2048 ) {
arch/x86/kernel/setup.c +1 -2
@@ -9,7 +9,6 @@#include <linux/console.h> #include <linux/crash_dump.h> #include <linux/dma-map-ops.h> -#include <linux/dmi.h> #include <linux/efi.h> #include <linux/ima.h> #include <linux/init_ohci1394_dma.h>
@@ -1032,7 +1031,7 @@ void __init setup_arch(char **cmdline_p)if (efi_enabled (EFI_BOOT ))efi_init (); -dmi_setup (); + x86_init.resources.dmi_setup ();/* * VMware detection requires dmi to be available, so this
arch/x86/kernel/sev-shared.c +6 -6
@@ -553,9 +553,9 @@ static int snp_cpuid(struct ghcb *ghcb, struct es_em_ctxt *ctxt, struct cpuid_le leaf->eax = leaf->ebx = leaf->ecx = leaf->edx =0 ;/* Skip post-processing for out-of-range zero leafs. */ -if (!(leaf->fn <= cpuid_std_range_max || - (leaf->fn >=0x40000000 && leaf->fn <= cpuid_hyp_range_max) || - (leaf->fn >=0x80000000 && leaf->fn <= cpuid_ext_range_max))) +if (!(leaf->fn <=RIP_REL_REF (cpuid_std_range_max) || + (leaf->fn >=0x40000000 && leaf->fn <=RIP_REL_REF (cpuid_hyp_range_max)) || + (leaf->fn >=0x80000000 && leaf->fn <=RIP_REL_REF (cpuid_ext_range_max))))return 0 ; }
@@ -1060,10 +1060,10 @@ static void __init setup_cpuid_table(const struct cc_blob_sev_info *cc_info)const struct snp_cpuid_fn *fn = &cpuid_table->fn[i];if (fn->eax_in ==0x0 ) - cpuid_std_range_max = fn->eax; +RIP_REL_REF (cpuid_std_range_max) = fn->eax;else if (fn->eax_in ==0x40000000 ) - cpuid_hyp_range_max = fn->eax; +RIP_REL_REF (cpuid_hyp_range_max) = fn->eax;else if (fn->eax_in ==0x80000000 ) - cpuid_ext_range_max = fn->eax; +RIP_REL_REF (cpuid_ext_range_max) = fn->eax; } }
arch/x86/kernel/sev.c +14 -17
@@ -23,6 +23,7 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/psp-sev.h> +#include <linux/dmi.h> #include <uapi/linux/sev-guest.h> #include <asm/cpu_entry_area.h>
@@ -736,7 +737,7 @@ void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long padd* This eliminates worries about jump tables or checking boot_cpu_data * in the cc_platform_has() function. */ -if (!(sev_status &MSR_AMD64_SEV_SNP_ENABLED )) +if (!(RIP_REL_REF (sev_status) &MSR_AMD64_SEV_SNP_ENABLED ))return ;/*
@@ -758,7 +759,7 @@ void __init early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddr* This eliminates worries about jump tables or checking boot_cpu_data * in the cc_platform_has() function. */ -if (!(sev_status &MSR_AMD64_SEV_SNP_ENABLED )) +if (!(RIP_REL_REF (sev_status) &MSR_AMD64_SEV_SNP_ENABLED ))return ;/* Invalidate the memory pages before they are marked shared in the RMP table. */
@@ -768,21 +769,6 @@ void __init early_snp_set_memory_shared(unsigned long vaddr, unsigned long paddrearly_set_pages_state (paddr, npages,SNP_PAGE_STATE_SHARED ); } -void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op) -{ -unsigned long vaddr, npages; - - vaddr = (unsigned long )__va (paddr); - npages =PAGE_ALIGN (sz) >>PAGE_SHIFT ; - -if (op ==SNP_PAGE_STATE_PRIVATE ) -early_snp_set_memory_private (vaddr, paddr, npages); -else if (op ==SNP_PAGE_STATE_SHARED ) -early_snp_set_memory_shared (vaddr, paddr, npages); -else -WARN (1 ,"invalid memory op %d\n" , op); -} -static int vmgexit_psc (struct snp_psc_desc *desc) {int cur_entry, end_entry, ret =0 ;
@@ -2152,6 +2138,17 @@ void __init __noreturn snp_abort(void)sev_es_terminate (SEV_TERM_SET_GEN ,GHCB_SNP_UNSUPPORTED ); } +/* +* SEV-SNP guests should only execute dmi_setup() if EFI_CONFIG_TABLES are +* enabled, as the alternative (fallback) logic for DMI probing in the legacy +* ROM region can cause a crash since this region is not pre-validated. +*/ +void __init snp_dmi_setup (void ) +{ +if (efi_enabled (EFI_CONFIG_TABLES )) +dmi_setup (); +} +static void dump_cpuid_table (void ) {const struct snp_cpuid_table *cpuid_table =snp_cpuid_get_table ();
arch/x86/kernel/x86_init.c +2 -0
@@ -3,6 +3,7 @@* * For licencing details see kernel-base/COPYING */ +#include <linux/dmi.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/export.h>
@@ -66,6 +67,7 @@ struct x86_init_ops x86_init __initdata = { .probe_roms = probe_roms, .reserve_resources = reserve_standard_io_resources, .memory_setup = e820__memory_setup_default, + .dmi_setup = dmi_setup, }, .mpparse = {
arch/x86/kvm/cpuid.c +22 -7
@@ -535,9 +535,9 @@ static __always_inline void __kvm_cpu_cap_mask(unsigned int leaf) }static __always_inline -void kvm_cpu_cap_init_scattered(enum kvm_only_cpuid_leafs leaf, u32 mask) +void kvm_cpu_cap_init_kvm_defined(enum kvm_only_cpuid_leafs leaf, u32 mask) { -/* Use kvm_cpu_cap_mask for non-scattered leafs. */ +/* Use kvm_cpu_cap_mask for leafs that aren't KVM-only. */ BUILD_BUG_ON (leaf <NCAPINTS ); kvm_cpu_caps[leaf] = mask;
@@ -547,7 +547,7 @@ void kvm_cpu_cap_init_scattered(enum kvm_only_cpuid_leafs leaf, u32 mask) static __always_inline void kvm_cpu_cap_mask(enum cpuid_leafs leaf, u32 mask) { -/* Use kvm_cpu_cap_init_scattered for scattered leafs. */ +/* Use kvm_cpu_cap_init_kvm_defined for KVM-only leafs. */ BUILD_BUG_ON (leaf >=NCAPINTS ); kvm_cpu_caps[leaf] &= mask;
@@ -652,11 +652,16 @@ void kvm_set_cpu_caps(void)F (AVX_VNNI ) |F (AVX512_BF16 ) ); +kvm_cpu_cap_init_kvm_defined (CPUID_7_2_EDX , +F (INTEL_PSFD ) |F (IPRED_CTRL ) |F (RRSBA_CTRL ) |F (DDPD_U ) | +F (BHI_CTRL ) |F (MCDT_NO ) + ); +kvm_cpu_cap_mask (CPUID_D_1_EAX ,F (XSAVEOPT ) |F (XSAVEC ) |F (XGETBV1 ) |F (XSAVES ) | f_xfd ); -kvm_cpu_cap_init_scattered (CPUID_12_EAX , +kvm_cpu_cap_init_kvm_defined (CPUID_12_EAX ,SF (SGX1 ) |SF (SGX2 ) );
@@ -902,13 +907,13 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)break ;/* function 7 has additional index. */ case 7 : - entry->eax =min (entry->eax,1u ); + max_idx = entry->eax =min (entry->eax,2u );cpuid_entry_override (entry,CPUID_7_0_EBX );cpuid_entry_override (entry,CPUID_7_ECX );cpuid_entry_override (entry,CPUID_7_EDX ); -/* KVM only supports 0x7.0 and 0x7.1, capped above via min(). */ -if (entry->eax ==1 ) { +/* KVM only supports up to 0x7.2, capped above via min(). */ +if (max_idx >=1 ) { entry =do_host_cpuid (array, function,1 );if (!entry) goto out;
@@ -918,6 +923,16 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) entry->ecx =0 ; entry->edx =0 ; } +if (max_idx >=2 ) { + entry =do_host_cpuid (array, function,2 ); +if (!entry) + goto out; + +cpuid_entry_override (entry,CPUID_7_2_EDX ); + entry->ecx =0 ; + entry->ebx =0 ; + entry->eax =0 ; + }break ;case 0xa : {/* Architectural Performance Monitoring */ union cpuid10_eax eax;
arch/x86/kvm/lapic.c +4 -1
@@ -40,6 +40,7 @@#include "ioapic.h" #include "trace.h" #include "x86.h" +#include "xen.h" #include "cpuid.h" #include "hyperv.h"
@@ -338,8 +339,10 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val) }/* Check if there are APF page ready requests pending */ -if (enabled) +if (enabled) {kvm_make_request (KVM_REQ_APF_READY , apic->vcpu); +kvm_xen_sw_enable_lapic (apic->vcpu); + } }static inline void kvm_apic_set_xapic_id (struct kvm_lapic *apic,u8 id)
arch/x86/kvm/reverse_cpuid.h +34 -8
75 lines not on this page · raw message
arch/x86/kvm/svm/sev.c +9 -7
@@ -1958,20 +1958,22 @@ int sev_mem_enc_register_region(struct kvm *kvm, goto e_free; } - region->uaddr = range->addr; - region->size = range->size; - -list_add_tail (®ion->list, &sev->regions_list); -mutex_unlock (&kvm->lock); -/* * The guest may change the memory encryption attribute from C=0 -> C=1 * or vice versa for this memory range. Lets make sure caches are * flushed to ensure that guest data gets written into memory with -* correct C-bit. +* correct C-bit. Note, this must be done before dropping kvm->lock, +* as region and its array of pages can be freed by a different task +* once kvm->lock is released. */ sev_clflush_pages (region->pages, region->npages); + region->uaddr = range->addr; + region->size = range->size; + +list_add_tail (®ion->list, &sev->regions_list); +mutex_unlock (&kvm->lock); +return ret; e_free:
arch/x86/kvm/x86.c +10 -0
@@ -7758,6 +7758,16 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt,if (r <0 )return X86EMUL_UNHANDLEABLE ; + +/* +* Mark the page dirty _before_ checking whether or not the CMPXCHG was +* successful, as the old value is written back on failure. Note, for +* live migration, this is unnecessarily conservative as CMPXCHG writes +* back the original value and the access is atomic, but KVM's ABI is +* that all writes are dirty logged, regardless of the value written. +*/ +kvm_vcpu_mark_page_dirty (vcpu,gpa_to_gfn (gpa)); +if (r)return X86EMUL_CMPXCHG_FAILED ;
arch/x86/kvm/xen.c +1 -1
@@ -314,7 +314,7 @@ void kvm_xen_update_runstate_guest(struct kvm_vcpu *v, int state)mark_page_dirty_in_slot (v->kvm, gpc->memslot, gpc->gpa >>PAGE_SHIFT ); } -static void kvm_xen_inject_vcpu_vector (struct kvm_vcpu *v) +void kvm_xen_inject_vcpu_vector (struct kvm_vcpu *v) {struct kvm_lapic_irq irq = { };int r;
arch/x86/kvm/xen.h +18 -0
@@ -16,6 +16,7 @@ extern struct static_key_false_deferred kvm_xen_enabled;int __kvm_xen_has_interrupt (struct kvm_vcpu *vcpu);void kvm_xen_inject_pending_events (struct kvm_vcpu *vcpu); +void kvm_xen_inject_vcpu_vector (struct kvm_vcpu *vcpu);int kvm_xen_vcpu_set_attr (struct kvm_vcpu *vcpu,struct kvm_xen_vcpu_attr *data);int kvm_xen_vcpu_get_attr (struct kvm_vcpu *vcpu,struct kvm_xen_vcpu_attr *data);int kvm_xen_hvm_set_attr (struct kvm *kvm,struct kvm_xen_hvm_attr *data);
@@ -33,6 +34,19 @@ int kvm_xen_setup_evtchn(struct kvm *kvm,struct kvm_kernel_irq_routing_entry *e, const struct kvm_irq_routing_entry *ue); +static inline void kvm_xen_sw_enable_lapic (struct kvm_vcpu *vcpu) +{ +/* +* The local APIC is being enabled. If the per-vCPU upcall vector is +* set and the vCPU's evtchn_upcall_pending flag is set, inject the +* interrupt. +*/ +if (static_branch_unlikely (&kvm_xen_enabled.key) && + vcpu->arch.xen.vcpu_info_cache.active && + vcpu->arch.xen.upcall_vector &&__kvm_xen_has_interrupt (vcpu)) +kvm_xen_inject_vcpu_vector (vcpu); +} +static inline bool kvm_xen_msr_enabled (struct kvm *kvm) { return static_branch_unlikely(&kvm_xen_enabled.key) &&
@@ -98,6 +112,10 @@ static inline void kvm_xen_destroy_vcpu(struct kvm_vcpu *vcpu) { } +static inline void kvm_xen_sw_enable_lapic (struct kvm_vcpu *vcpu) +{ +} +static inline bool kvm_xen_msr_enabled (struct kvm *kvm) {return false;
arch/x86/mm/mem_encrypt_amd.c +18 -0
@@ -513,6 +513,24 @@ void __init sme_early_init(void)*/ if (sev_status &MSR_AMD64_SEV_ENABLED )ia32_disable (); + +/* +* Override init functions that scan the ROM region in SEV-SNP guests, +* as this memory is not pre-validated and would thus cause a crash. +*/ +if (sev_status &MSR_AMD64_SEV_SNP_ENABLED ) { + x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.pci.init_irq = x86_init_noop; + x86_init.resources.probe_roms = x86_init_noop; + +/* +* DMI setup behavior for SEV-SNP guests depends on +* efi_enabled(EFI_CONFIG_TABLES), which hasn't been +* parsed yet. snp_dmi_setup() will run after that +* parsing has happened. +*/ + x86_init.resources.dmi_setup = snp_dmi_setup; + } }void __init mem_encrypt_free_decrypted_mem (void )
arch/x86/mm/mem_encrypt_identity.c +13 -25
@@ -97,7 +97,6 @@ static char sme_workarea[2 * PMD_PAGE_SIZE] __section(".init.scratch");static char sme_cmdline_arg[]__initdata ="mem_encrypt" ;static char sme_cmdline_on[]__initdata ="on" ; -static char sme_cmdline_off[]__initdata ="off" ;static void __init sme_clear_pgd (struct sme_populate_pgd_data *ppd) {
@@ -305,7 +304,8 @@ void __init sme_encrypt_kernel(struct boot_params *bp)* instrumentation or checking boot_cpu_data in the cc_platform_has() * function. */ -if (!sme_get_me_mask () || sev_status &MSR_AMD64_SEV_ENABLED ) +if (!sme_get_me_mask () || +RIP_REL_REF (sev_status) &MSR_AMD64_SEV_ENABLED )return ;/*
@@ -504,7 +504,7 @@ void __init sme_encrypt_kernel(struct boot_params *bp)void __init sme_enable (struct boot_params *bp) { -const char *cmdline_ptr, *cmdline_arg, *cmdline_on, *cmdline_off; +const char *cmdline_ptr, *cmdline_arg, *cmdline_on;unsigned int eax, ebx, ecx, edx;unsigned long feature_mask;unsigned long me_mask;
@@ -542,11 +542,11 @@ void __init sme_enable(struct boot_params *bp) me_mask =1UL << (ebx &0x3f );/* Check the SEV MSR whether SEV or SME is enabled */ - sev_status =__rdmsr (MSR_AMD64_SEV ); - feature_mask = (sev_status &MSR_AMD64_SEV_ENABLED ) ?AMD_SEV_BIT :AMD_SME_BIT ; +RIP_REL_REF (sev_status) = msr =__rdmsr (MSR_AMD64_SEV ); + feature_mask = (msr &MSR_AMD64_SEV_ENABLED ) ?AMD_SEV_BIT :AMD_SME_BIT ;/* The SEV-SNP CC blob should never be present unless SEV-SNP is enabled. */ -if (snp && !(sev_status &MSR_AMD64_SEV_SNP_ENABLED )) +if (snp && !(msr &MSR_AMD64_SEV_SNP_ENABLED ))snp_abort ();/* Check if memory encryption is enabled */
@@ -572,7 +572,6 @@ void __init sme_enable(struct boot_params *bp)return ; }else {/* SEV state cannot be controlled by a command line option */ - sme_me_mask = me_mask; goto out; }
@@ -587,28 +586,17 @@ void __init sme_enable(struct boot_params *bp) asm ("lea sme_cmdline_on(%%rip), %0" :"=r" (cmdline_on) :"p" (sme_cmdline_on)); - asm ("lea sme_cmdline_off(%%rip), %0" - :"=r" (cmdline_off) - :"p" (sme_cmdline_off)); - -if (IS_ENABLED (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT )) - sme_me_mask = me_mask; cmdline_ptr = (const char *)((u64 )bp->hdr.cmd_line_ptr | ((u64 )bp->ext_cmd_line_ptr <<32 )); -if (cmdline_find_option (cmdline_ptr, cmdline_arg, buffer,sizeof (buffer)) <0 ) - goto out; - -if (!strncmp (buffer, cmdline_on,sizeof (buffer))) - sme_me_mask = me_mask; -else if (!strncmp (buffer, cmdline_off,sizeof (buffer))) - sme_me_mask =0 ; +if (cmdline_find_option (cmdline_ptr, cmdline_arg, buffer,sizeof (buffer)) <0 || +strncmp (buffer, cmdline_on,sizeof (buffer))) +return ; out: -if (sme_me_mask) { - physical_mask &= ~sme_me_mask; -cc_set_vendor (CC_VENDOR_AMD ); -cc_set_mask (sme_me_mask); - } +RIP_REL_REF (sme_me_mask) = me_mask; + physical_mask &= ~me_mask; + cc_vendor =CC_VENDOR_AMD ; +cc_set_mask (me_mask); }
block/bio.c +4 -7
@@ -1112,19 +1112,16 @@ void __bio_release_pages(struct bio *bio, bool mark_dirty)struct folio_iter fi;bio_for_each_folio_all (fi, bio) { -struct page *page; -size_t done =0 ; +size_t nr_pages;if (mark_dirty) {folio_lock (fi.folio);folio_mark_dirty (fi.folio);folio_unlock (fi.folio); } - page =folio_page (fi.folio, fi.offset /PAGE_SIZE ); -do { -folio_put (fi.folio); - done +=PAGE_SIZE ; - }while (done < fi.length); + nr_pages = (fi.offset + fi.length -1 ) /PAGE_SIZE - + fi.offset /PAGE_SIZE +1 ; +folio_put_refs (fi.folio, nr_pages); } }EXPORT_SYMBOL_GPL (__bio_release_pages);
block/blk-mq.c +23 -10
@@ -675,6 +675,22 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, }EXPORT_SYMBOL_GPL (blk_mq_alloc_request_hctx); +static void blk_mq_finish_request (struct request *rq) +{ +struct request_queue *q = rq->q; + +if ((rq->rq_flags &RQF_ELVPRIV ) && + q->elevator->type->ops.finish_request) { + q->elevator->type->ops.finish_request (rq); +/* +* For postflush request that may need to be +* completed twice, we should clear this flag +* to avoid double finish_request() on the rq. +*/ + rq->rq_flags &= ~RQF_ELVPRIV ; + } +} +static void __blk_mq_free_request (struct request *rq) {struct request_queue *q = rq->q;
@@ -701,9 +717,7 @@ void blk_mq_free_request(struct request *rq) {struct request_queue *q = rq->q; -if ((rq->rq_flags &RQF_ELVPRIV ) && - q->elevator->type->ops.finish_request) - q->elevator->type->ops.finish_request (rq); +blk_mq_finish_request (rq);if (unlikely (laptop_mode && !blk_rq_is_passthrough (rq)))laptop_io_completion (q->disk->bdi);
@@ -747,16 +761,11 @@ static void req_bio_endio(struct request *rq, struct bio *bio,/* * Partial zone append completions cannot be supported as the * BIO fragments may end up not being written sequentially. -* For such case, force the completed nbytes to be equal to -* the BIO size so that bio_advance() sets the BIO remaining -* size to 0 and we end up calling bio_endio() before returning. */ -if (bio->bi_iter.bi_size != nbytes) { +if (bio->bi_iter.bi_size != nbytes) bio->bi_status =BLK_STS_IOERR ; - nbytes = bio->bi_iter.bi_size; - }else { +else bio->bi_iter.bi_sector = rq->__sector; - } }bio_advance (bio, nbytes);
@@ -1025,6 +1034,8 @@ inline void __blk_mq_end_request(struct request *rq, blk_status_t error)if (blk_mq_need_time_stamp (rq))__blk_mq_end_request_acct (rq,ktime_get_ns ()); +blk_mq_finish_request (rq); +if (rq->end_io) {rq_qos_done (rq->q, rq);if (rq->end_io (rq, error) ==RQ_END_IO_FREE )
@@ -1079,6 +1090,8 @@ void blk_mq_end_request_batch(struct io_comp_batch *iob)if (iob->need_ts)__blk_mq_end_request_acct (rq, now); +blk_mq_finish_request (rq); +rq_qos_done (rq->q, rq);/*
block/blk-settings.c +4 -0
@@ -680,6 +680,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, t->zone_write_granularity =max (t->zone_write_granularity, b->zone_write_granularity); t->zoned =max (t->zoned, b->zoned); +if (!t->zoned) { + t->zone_write_granularity =0 ; + t->max_zone_append_sectors =0 ; + }return ret; }EXPORT_SYMBOL (blk_stack_limits);
block/mq-deadline.c +1 -2
@@ -622,9 +622,8 @@ static void dd_depth_updated(struct blk_mq_hw_ctx *hctx)struct request_queue *q = hctx->queue;struct deadline_data *dd = q->elevator->elevator_data;struct blk_mq_tags *tags = hctx->sched_tags; -unsigned int shift = tags->bitmap_tags.sb.shift; - dd->async_depth =max (1U ,3 * (1U << shift) /4 ); + dd->async_depth =max (1UL ,3 * q->nr_requests /4 );sbitmap_queue_min_shallow_depth (&tags->bitmap_tags, dd->async_depth); }
drivers/accessibility/speakup/synth.c +3 -1
@@ -208,8 +208,10 @@ void spk_do_flush(void)wake_up_process (speakup_task); } -void synth_write (const char *buf,size_t count) +void synth_write (const char *_buf,size_t count) { +const unsigned char *buf = (const unsigned char *) _buf; +while (count--)synth_buffer_add (*buf++);synth_start ();
drivers/ata/ahci.c +0 -5
@@ -671,11 +671,6 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");static void ahci_pci_save_initial_config (struct pci_dev *pdev,struct ahci_host_priv *hpriv) { -if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==0x1166 ) { -dev_info (&pdev->dev,"ASM1166 has only six ports\n" ); - hpriv->saved_port_map =0x3f ; - } -if (pdev->vendor ==PCI_VENDOR_ID_JMICRON && pdev->device ==0x2361 ) {dev_info (&pdev->dev,"JMB361 has only one port\n" ); hpriv->saved_port_map =1 ;
drivers/ata/libata-eh.c +4 -1
@@ -711,8 +711,10 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap) ehc->saved_ncq_enabled |=1 << devno;/* If we are resuming, wake up the device */ -if (ap->pflags &ATA_PFLAG_RESUMING ) +if (ap->pflags &ATA_PFLAG_RESUMING ) { + dev->flags |=ATA_DFLAG_RESUMING ; ehc->i.dev_action[devno] |=ATA_EH_SET_ACTIVE ; + } } }
@@ -3089,6 +3091,7 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,return 0 ; err: + dev->flags &= ~ATA_DFLAG_RESUMING ; *r_failed_dev = dev;return rc; }
drivers/ata/libata-scsi.c +9 -0
@@ -4652,6 +4652,7 @@ void ata_scsi_dev_rescan(struct work_struct *work)struct ata_link *link;struct ata_device *dev;unsigned long flags; +bool do_resume;int ret =0 ;mutex_lock (&ap->scsi_scan_mutex);
@@ -4673,7 +4674,15 @@ void ata_scsi_dev_rescan(struct work_struct *work)if (scsi_device_get (sdev))continue ; + do_resume = dev->flags &ATA_DFLAG_RESUMING ; +spin_unlock_irqrestore (ap->lock, flags); +if (do_resume) { + ret =scsi_resume_device (sdev); +if (ret == -EWOULDBLOCK ) + goto unlock; + dev->flags &= ~ATA_DFLAG_RESUMING ; + } ret =scsi_rescan_device (sdev);scsi_device_put (sdev);spin_lock_irqsave (ap->lock, flags);
drivers/base/power/wakeirq.c +3 -1
@@ -362,8 +362,10 @@ void dev_pm_enable_wake_irq_complete(struct device *dev)return ;if (wirq->status &WAKE_IRQ_DEDICATED_MANAGED && - wirq->status &WAKE_IRQ_DEDICATED_REVERSE ) + wirq->status &WAKE_IRQ_DEDICATED_REVERSE ) {enable_irq (wirq->irq); + wirq->status |=WAKE_IRQ_DEDICATED_ENABLED ; + } }/**
drivers/clk/qcom/gcc-ipq6018.c +2 -0
@@ -1557,6 +1557,7 @@ static struct clk_regmap_div nss_ubi0_div_clk_src = {static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {F (24000000 ,P_XO ,1 ,0 ,0 ), + { } };static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk[] = {
@@ -1737,6 +1738,7 @@ static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] = {F (160000000 ,P_GPLL0 ,5 ,0 ,0 ),F (216000000 ,P_GPLL6 ,5 ,0 ,0 ), F(308570000, P_GPLL6, 3.5, 0, 0), + { } }; static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_div2[] = {
drivers/clk/qcom/gcc-ipq8074.c +2 -0
@@ -973,6 +973,7 @@ static struct clk_rcg2 pcie0_axi_clk_src = {static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {F (19200000 ,P_XO ,1 ,0 ,0 ), + { } };static struct clk_rcg2 pcie0_aux_clk_src = {
@@ -1078,6 +1079,7 @@ static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] = {F (19200000 ,P_XO ,1 ,0 ,0 ),F (160000000 ,P_GPLL0 ,5 ,0 ,0 ), F(308570000, P_GPLL6, 3.5, 0, 0), + { } }; static struct clk_rcg2 sdcc1_ice_core_clk_src = {
drivers/clk/qcom/gcc-sdm845.c +1 -0
@@ -4038,3 +4038,4 @@ module_exit(gcc_sdm845_exit);MODULE_DESCRIPTION ("QTI GCC SDM845 Driver" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("platform:gcc-sdm845" ); +MODULE_SOFTDEP ("pre: rpmhpd" );
drivers/clk/qcom/mmcc-apq8084.c +2 -0
@@ -334,6 +334,7 @@ static struct freq_tbl ftbl_mmss_axi_clk[] = {F (333430000 ,P_MMPLL1 ,3.5 ,0 ,0 ),F (400000000 ,P_MMPLL0 ,2 ,0 ,0 ), F(466800000, P_MMPLL1, 2.5, 0, 0), + { } }; static struct clk_rcg2 mmss_axi_clk_src = {
@@ -358,6 +359,7 @@ static struct freq_tbl ftbl_ocmemnoc_clk[] = {F (150000000 ,P_GPLL0 ,4 ,0 ,0 ),F (228570000 ,P_MMPLL0 ,3.5 ,0 ,0 ), F(320000000, P_MMPLL0, 2.5, 0, 0), + { } }; static struct clk_rcg2 ocmemnoc_clk_src = {
drivers/clk/qcom/mmcc-msm8974.c +2 -0
@@ -279,6 +279,7 @@ static struct freq_tbl ftbl_mmss_axi_clk[] = {F (291750000 ,P_MMPLL1 ,4 ,0 ,0 ),F (400000000 ,P_MMPLL0 ,2 ,0 ,0 ), F(466800000, P_MMPLL1, 2.5, 0, 0), + { } }; static struct clk_rcg2 mmss_axi_clk_src = {
@@ -303,6 +304,7 @@ static struct freq_tbl ftbl_ocmemnoc_clk[] = {F (150000000 ,P_GPLL0 ,4 ,0 ,0 ),F (291750000 ,P_MMPLL1 ,4 ,0 ,0 ), F(400000000, P_MMPLL0, 2, 0, 0), + { } }; static struct clk_rcg2 ocmemnoc_clk_src = {
drivers/clocksource/arm_global_timer.c +1 -1
@@ -32,7 +32,7 @@#define GT_CONTROL_IRQ_ENABLE BIT(2)/* banked */ #define GT_CONTROL_AUTO_INC BIT(3)/* banked */ #define GT_CONTROL_PRESCALER_SHIFT 8 -#define GT_CONTROL_PRESCALER_MAX 0xF +#define GT_CONTROL_PRESCALER_MAX 0xFF#define GT_CONTROL_PRESCALER_MASK (GT_CONTROL_PRESCALER_MAX << \ GT_CONTROL_PRESCALER_SHIFT)
drivers/cpufreq/amd-pstate.c +1 -1
@@ -320,7 +320,7 @@ static void amd_pstate_adjust_perf(unsigned int cpu,if (target_perf < capacity) des_perf =DIV_ROUND_UP (cap_perf * target_perf, capacity); - min_perf =READ_ONCE (cpudata->highest_perf); + min_perf =READ_ONCE (cpudata->lowest_perf);if (_min_perf < capacity) min_perf =DIV_ROUND_UP (cap_perf * _min_perf, capacity);
drivers/cpufreq/brcmstb-avs-cpufreq.c +3 -2
@@ -481,10 +481,11 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)static unsigned int brcm_avs_cpufreq_get (unsigned int cpu) {struct cpufreq_policy *policy =cpufreq_cpu_get (cpu); +struct private_data *priv; +if (!policy)return 0 ; -struct private_data *priv = policy->driver_data; - + priv = policy->driver_data;cpufreq_cpu_put (policy);return brcm_avs_get_frequency (priv->base);
drivers/cpufreq/cpufreq-dt.c +1 -1
@@ -208,7 +208,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu)if (!priv)return -ENOMEM ; -if (!alloc_cpumask_var (&priv->cpus,GFP_KERNEL )) +if (!zalloc_cpumask_var (&priv->cpus,GFP_KERNEL ))return -ENOMEM ;cpumask_set_cpu (cpu, priv->cpus);
drivers/crypto/qat/qat_common/adf_aer.c +17 -6
@@ -95,18 +95,28 @@ static void adf_device_reset_worker(struct work_struct *work)if (adf_dev_init (accel_dev) ||adf_dev_start (accel_dev)) {/* The device hanged and we can't restart it so stop here */ dev_err (&GET_DEV (accel_dev),"Restart device failed\n" ); -kfree (reset_data); +if (reset_data->mode ==ADF_DEV_RESET_ASYNC || +completion_done (&reset_data->compl)) +kfree (reset_data);WARN (1 ,"QAT: device restart failed. Device is unusable\n" );return ; }adf_dev_restarted_notify (accel_dev);clear_bit (ADF_STATUS_RESTARTING , &accel_dev->status); -/* The dev is back alive. Notify the caller if in sync mode */ -if (reset_data->mode ==ADF_DEV_RESET_SYNC ) -complete (&reset_data->compl); -else +/* +* The dev is back alive. Notify the caller if in sync mode +* +* If device restart will take a more time than expected, +* the schedule_reset() function can timeout and exit. This can be +* detected by calling the completion_done() function. In this case +* the reset_data structure needs to be freed here. +*/ +if (reset_data->mode ==ADF_DEV_RESET_ASYNC || +completion_done (&reset_data->compl))kfree (reset_data); +else +complete (&reset_data->compl); } static int adf_dev_aer_schedule_reset(struct adf_accel_dev *accel_dev,
@@ -139,8 +149,9 @@ static int adf_dev_aer_schedule_reset(struct adf_accel_dev *accel_dev,dev_err (&GET_DEV (accel_dev),"Reset device timeout expired\n" ); ret = -EFAULT ; + }else { +kfree (reset_data); } -kfree (reset_data);return ret; }return 0 ;
drivers/firmware/efi/efi.c +2 -0
@@ -194,6 +194,8 @@ static bool generic_ops_supported(void) name_size =sizeof (name); +if (!efi.get_next_variable) +return false; status = efi.get_next_variable (&name_size, &name, &guid);if (status ==EFI_UNSUPPORTED )return false;
drivers/firmware/efi/libstub/randomalloc.c +1 -1
@@ -119,7 +119,7 @@ efi_status_t efi_random_alloc(unsigned long size,continue ; } - target =round_up (md->phys_addr, align) + target_slot * align; + target =round_up (max_t (u64, md->phys_addr, alloc_min), align) + target_slot * align; pages = size /EFI_PAGE_SIZE ; status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS,
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -0
@@ -838,6 +838,7 @@ static void amdgpu_ttm_gart_bind(struct amdgpu_device *adev,amdgpu_gart_bind (adev, gtt->offset, ttm->num_pages, gtt->ttm.dma_address, flags); } + gtt->bound = true; }/*
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +1 -1
@@ -1349,7 +1349,7 @@ void kfd_flush_tlb(struct kfd_process_device *pdd, enum TLB_FLUSH_TYPE type);static inline bool kfd_flush_tlb_after_unmap (struct kfd_dev *dev) { -return KFD_GC_VERSION (dev) >IP_VERSION (9 ,4 ,2 ) || +return KFD_GC_VERSION (dev) >=IP_VERSION (9 ,4 ,2 ) || (KFD_GC_VERSION (dev) ==IP_VERSION (9 ,4 ,1 ) && dev->sdma_fw_version >=18 ) ||KFD_GC_VERSION (dev) ==IP_VERSION (9 ,4 ,0 ); }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +14 -5
@@ -10503,14 +10503,23 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (range->flags !=1 )continue ; - amdgpu_dm_connector->min_vfreq = range->min_vfreq; - amdgpu_dm_connector->max_vfreq = range->max_vfreq; - amdgpu_dm_connector->pixel_clock_mhz = - range->pixel_clock_mhz *10 ; - connector->display_info.monitor_range.min_vfreq = range->min_vfreq; connector->display_info.monitor_range.max_vfreq = range->max_vfreq; +if (edid->revision >=4 ) { +if (data->pad2 &DRM_EDID_RANGE_OFFSET_MIN_VFREQ ) + connector->display_info.monitor_range.min_vfreq +=255 ; +if (data->pad2 &DRM_EDID_RANGE_OFFSET_MAX_VFREQ ) + connector->display_info.monitor_range.max_vfreq +=255 ; + } + + amdgpu_dm_connector->min_vfreq = + connector->display_info.monitor_range.min_vfreq; + amdgpu_dm_connector->max_vfreq = + connector->display_info.monitor_range.max_vfreq; + amdgpu_dm_connector->pixel_clock_mhz = + range->pixel_clock_mhz *10 ; +break ; }
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +11 -1
@@ -651,10 +651,20 @@ void dcn30_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)if (pipe_ctx ==NULL )return ; -if (dc_is_hdmi_signal (pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc !=NULL ) +if (dc_is_hdmi_signal (pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc !=NULL ) { pipe_ctx->stream_res.stream_enc->funcs->set_avmute ( pipe_ctx->stream_res.stream_enc, enable); + +/* Wait for two frame to make sure AV mute is sent out */ +if (enable) { + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VBLANK ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VBLANK ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + } + } }void dcn30_update_info_frame (struct pipe_ctx *pipe_ctx)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c +3 -0
@@ -513,6 +513,9 @@ enum mod_hdcp_status mod_hdcp_hdcp2_create_session(struct mod_hdcp *hdcp) hdcp_cmd = (struct ta_hdcp_shared_memory *)psp->hdcp_context.context.mem_context.shared_buf;memset (hdcp_cmd,0 ,sizeof (struct ta_hdcp_shared_memory )); +if (!display) +return MOD_HDCP_STATUS_DISPLAY_NOT_FOUND ; + hdcp_cmd->in_msg.hdcp2_create_session_v2.display_handle = display->index;if (hdcp->connection.link.adjust.hdcp2.force_type ==MOD_HDCP_FORCE_TYPE_0 )
drivers/gpu/drm/amd/pm/amdgpu_pm.c +11 -1
@@ -2344,6 +2344,7 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev, {struct amdgpu_device *adev =dev_get_drvdata (dev);int err, ret; +u32 pwm_mode;int value;if (amdgpu_in_reset (adev))
@@ -2355,13 +2356,22 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev,if (err)return err; +if (value ==0 ) + pwm_mode =AMD_FAN_CTRL_NONE ; +else if (value ==1 ) + pwm_mode =AMD_FAN_CTRL_MANUAL ; +else if (value ==2 ) + pwm_mode =AMD_FAN_CTRL_AUTO ; +else +return -EINVAL ; + ret =pm_runtime_get_sync (adev_to_drm (adev)->dev);if (ret <0 ) {pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);return ret; } - ret =amdgpu_dpm_set_fan_control_mode (adev, value); + ret =amdgpu_dpm_set_fan_control_mode (adev, pwm_mode);pm_runtime_mark_last_busy (adev_to_drm (adev)->dev);pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);
drivers/gpu/drm/drm_panel.c +11 -6
@@ -207,19 +207,24 @@ EXPORT_SYMBOL(drm_panel_disable);* The modes probed from the panel are automatically added to the connector * that the panel is attached to. * -* Return: The number of modes available from the panel on success or a -* negative error code on failure. +* Return: The number of modes available from the panel on success, or 0 on +* failure (no modes). */ int drm_panel_get_modes (struct drm_panel *panel,struct drm_connector *connector) {if (!panel) -return -EINVAL ; +return 0 ; -if (panel->funcs && panel->funcs->get_modes) -return panel->funcs->get_modes (panel, connector); +if (panel->funcs && panel->funcs->get_modes) { +int num; -return -EOPNOTSUPP ; + num = panel->funcs->get_modes (panel, connector); +if (num >0 ) +return num; + } + +return 0 ; }EXPORT_SYMBOL (drm_panel_get_modes);
drivers/gpu/drm/drm_probe_helper.c +7 -0
@@ -362,6 +362,13 @@ static int drm_helper_probe_get_modes(struct drm_connector *connector) count = connector_funcs->get_modes (connector); +/* The .get_modes() callback should not return negative values. */ +if (count <0 ) { +drm_err (connector->dev,".get_modes() returned %pe\n" , +ERR_PTR (count)); + count =0 ; + } +/* * Fallback for when DDC probe failed in drm_get_edid() and thus skipped * override/firmware EDID.
drivers/gpu/drm/etnaviv/etnaviv_drv.c +1 -1
@@ -488,7 +488,7 @@ static const struct drm_driver etnaviv_drm_driver = { .desc = "etnaviv DRM", .date = "20151214", .major = 1, - .minor = 3, + .minor = 4, };/*
drivers/gpu/drm/etnaviv/etnaviv_hwdb.c +9 -0
@@ -135,6 +135,9 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {bool etnaviv_fill_identity_from_hwdb (struct etnaviv_gpu *gpu) {struct etnaviv_chip_identity *ident = &gpu->identity; +const u32 product_id = ident->product_id; +const u32 customer_id = ident->customer_id; +const u32 eco_id = ident->eco_id;int i;for (i =0 ; i <ARRAY_SIZE (etnaviv_chip_identities); i++) {
@@ -148,6 +151,12 @@ bool etnaviv_fill_identity_from_hwdb(struct etnaviv_gpu *gpu) etnaviv_chip_identities[i].eco_id == ~0U)) {memcpy (ident, &etnaviv_chip_identities[i],sizeof (*ident)); + +/* Restore some id values as ~0U aka 'don't care' might been used. */ + ident->product_id = product_id; + ident->customer_id = customer_id; + ident->eco_id = eco_id; +return true; } }
drivers/gpu/drm/exynos/exynos_drm_vidi.c +2 -2
@@ -316,14 +316,14 @@ static int vidi_get_modes(struct drm_connector *connector)*/ if (!ctx->raw_edid) {DRM_DEV_DEBUG_KMS (ctx->dev,"raw_edid is null.\n" ); -return -EFAULT ; +return 0 ; } edid_len = (1 + ctx->raw_edid->extensions) *EDID_LENGTH ; edid =kmemdup (ctx->raw_edid, edid_len,GFP_KERNEL );if (!edid) {DRM_DEV_DEBUG_KMS (ctx->dev,"failed to allocate edid\n" ); -return -ENOMEM ; +return 0 ; }drm_connector_update_edid_property (connector, edid);
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -2
@@ -887,11 +887,11 @@ static int hdmi_get_modes(struct drm_connector *connector)int ret;if (!hdata->ddc_adpt) -return -ENODEV ; +return 0 ; edid =drm_get_edid (connector, hdata->ddc_adpt);if (!edid) -return -ENODEV ; +return 0 ; hdata->dvi_mode = !connector->display_info.is_hdmi; DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
drivers/gpu/drm/i915/display/intel_bios.c +3 -0
@@ -3413,6 +3413,9 @@ static bool intel_bios_encoder_supports_dp_dual_mode(const struct intel_bios_enc {const struct child_device_config *child = &devdata->child; +if (!devdata) +return false; +if (!intel_bios_encoder_supports_dp (devdata) || !intel_bios_encoder_supports_hdmi (devdata))return false;
drivers/gpu/drm/i915/gem/i915_gem_userptr.c +3 -0
@@ -378,6 +378,9 @@ i915_gem_userptr_release(struct drm_i915_gem_object *obj) {GEM_WARN_ON (obj->userptr.page_ref); +if (!obj->userptr.notifier.mm) +return ; +mmu_interval_notifier_remove (&obj->userptr.notifier); obj->userptr.notifier.mm =NULL ; }
drivers/gpu/drm/i915/gt/intel_engine_pm.c +0 -3
@@ -253,9 +253,6 @@ static int __engine_park(struct intel_wakeref *wf)intel_engine_park_heartbeat (engine);intel_breadcrumbs_park (engine->breadcrumbs); -/* Must be reset upon idling, or we may miss the busy wakeup. */ -GEM_BUG_ON (engine->sched_engine->queue_priority_hint !=INT_MIN ); -if (engine->park) engine->park (engine);
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +3 -0
@@ -3270,6 +3270,9 @@ static void execlists_park(struct intel_engine_cs *engine) {cancel_timer (&engine->execlists.timer);cancel_timer (&engine->execlists.preempt); + +/* Reset upon idling, or we may delay the busy wakeup. */ +WRITE_ONCE (engine->sched_engine->queue_priority_hint,INT_MIN ); }static void add_to_engine (struct i915_request *rq)
drivers/gpu/drm/imx/parallel-display.c +2 -2
@@ -72,14 +72,14 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)int ret;if (!mode) -return -EINVAL ; +return 0 ; ret =of_get_drm_display_mode (np, &imxpd->mode, &imxpd->bus_flags,OF_USE_NATIVE_MODE );if (ret) {drm_mode_destroy (connector->dev, mode); -return ret; +return 0 ; }drm_mode_copy (mode, &imxpd->mode);
drivers/gpu/drm/nouveau/nouveau_dmem.c +6 -6
@@ -379,9 +379,9 @@ nouveau_dmem_evict_chunk(struct nouveau_dmem_chunk *chunk)dma_addr_t *dma_addrs;struct nouveau_fence *fence; - src_pfns =kcalloc (npages,sizeof (*src_pfns),GFP_KERNEL ); - dst_pfns =kcalloc (npages,sizeof (*dst_pfns),GFP_KERNEL ); - dma_addrs =kcalloc (npages,sizeof (*dma_addrs),GFP_KERNEL ); + src_pfns =kvcalloc (npages,sizeof (*src_pfns),GFP_KERNEL | __GFP_NOFAIL); + dst_pfns =kvcalloc (npages,sizeof (*dst_pfns),GFP_KERNEL | __GFP_NOFAIL); + dma_addrs =kvcalloc (npages,sizeof (*dma_addrs),GFP_KERNEL | __GFP_NOFAIL);migrate_device_range (src_pfns, chunk->pagemap.range.start >>PAGE_SHIFT , npages);
@@ -407,11 +407,11 @@ nouveau_dmem_evict_chunk(struct nouveau_dmem_chunk *chunk)migrate_device_pages (src_pfns, dst_pfns, npages);nouveau_dmem_fence_done (&fence);migrate_device_finalize (src_pfns, dst_pfns, npages); -kfree (src_pfns); -kfree (dst_pfns); +kvfree (src_pfns); +kvfree (dst_pfns);for (i =0 ; i < npages; i++)dma_unmap_page (chunk->drm->dev->dev, dma_addrs[i],PAGE_SIZE ,DMA_BIDIRECTIONAL ); -kfree (dma_addrs); +kvfree (dma_addrs); }
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +11 -3
Lines of this file are not shown. View the raw message.
drivers/irqchip/irq-renesas-rzg2l.c +67 -26
93 lines not on this page · raw message
drivers/media/mc/mc-entity.c +69 -24
93 lines not on this page · raw message
drivers/misc/lis3lv02d/lis3lv02d_i2c.c +13 -8
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_trace.h +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_trace.h +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +8 -7
Lines of this file are not shown. View the raw message.
drivers/pci/controller/dwc/pcie-designware-ep.c +6 -1
Lines of this file are not shown. View the raw message.
drivers/pci/controller/dwc/pcie-qcom.c +81 -72
153 lines not on this page · raw message
drivers/scsi/libsas/sas_expander.c +34 -17
51 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_init.c +65 -63
128 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_iocb.c +44 -24
68 lines not on this page · raw message
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/usb/core/port.c +37 -6
43 lines not on this page · raw message
drivers/usb/dwc2/core_intr.c +48 -24
72 lines not on this page · raw message
drivers/usb/dwc2/hcd.c +40 -9
49 lines not on this page · raw message
drivers/usb/dwc3/dwc3-am62.c +41 -49
90 lines not on this page · raw message
drivers/usb/typec/ucsi/ucsi.c +42 -4
46 lines not on this page · raw message
drivers/usb/typec/ucsi/ucsi_acpi.c +33 -42
75 lines not on this page · raw message
drivers/vfio/pci/vfio_pci_intrs.c +124 -82
206 lines not on this page · raw message
drivers/vfio/platform/vfio_platform_irq.c +72 -34
106 lines not on this page · raw message
include/drm/drm_modeset_helper_vtables.h +2 -1
Lines of this file are not shown. View the raw message.
kernel/time/timer.c +97 -67
164 lines not on this page · raw message
kernel/trace/ring_buffer.c +140 -93
233 lines not on this page · raw message
net/tls/tls_sw.c +43 -17
60 lines not on this page · raw message
tools/testing/selftests/mqueue/setting new file +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/diag.sh +3 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.