Merge tag 'android15-6.6.87_r00' into android15-6.6

This merges the android15-6.6.87_r00 tag into the android15-6.6 branch,
catching it up with the latest LTS releases.

It contains the following commits:

* 9eb342a040 Revert "tracing: Allow creating instances with specified system events"
* 87e6b94674 Revert "tracing: Switch trace_events_hist.c code over to use guard()"
* ef68e40e85 Revert "tracing/hist: Add poll(POLLIN) support on hist file"
* 2b3836f83d Revert "tracing/hist: Support POLLPRI event for poll on histogram"
* 4c08c7ca07 Revert "tracing: Correct the refcount if the hist/hist_debug file fails to open"
* 6702b1e277 Revert "of: property: Increase NR_FWNODE_REFERENCE_ARGS"
* 9efb6d85ce Revert "RDMA/core: Don't expose hw_counters outside of init net namespace"
* 8d5ae9a696 Revert "can: statistics: use atomic access in hot path"
*   17c7ed1563 Merge 6.6.87 into android15-6.6-lts
|\
| * 814637ca25 Linux 6.6.87
| * 47ee832819 tracing: Do not use PERF enums when perf is not defined
| * 661f09d39a NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up
| * 9a81cde8c7 nfsd: put dl_stid if fail to queue dl_recall
| * 15483afb93 media: streamzap: fix race between device disconnection and urb callback
| * 753a620a7f exec: fix the racy usage of fs_struct->in_exec
| * 72a3b5c3d1 jfs: add index corruption check to DT_GETPAGE()
| * a8c3180892 jfs: fix slab-out-of-bounds read in ea_get()
| * 52a5509ab1 ext4: fix OOB read when checking dotdot dir
| * d12a601628 ext4: don't over-report free space or inodes in statvfs
| * 617a4b0084 arm64: Don't call NULL in do_compat_alignment_fixup()
| * 77029c613f tracing/osnoise: Fix possible recursive locking for cpus_read_lock()
| * fad52c9ae5 tracing: Fix synth event printk format for str fields
| * fc128e85cf tracing: Ensure module defining synth event cannot be unloaded while tracing
| * 099ef33858 tracing: Fix use-after-free in print_graph_function_flags during tracer switching
| * 0e36a3e080 ksmbd: validate zero num_subauth before sub_auth is accessed
| * 3980770cb1 ksmbd: fix session use-after-free in multichannel connection
| * a8a8ae303a ksmbd: fix use-after-free in ksmbd_sessions_deregister()
| * 60b7207893 ksmbd: add bounds check for create lease context
| * 8d4848c459 ksmbd: add bounds check for durable handle context
| * 68d64f7329 mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD
| * d8d7b50586 mmc: sdhci-pxav3: set NEED_RSP_BUSY capability
| * 261f51775e mmc: omap: Fix memory leak in mmc_omap_new_slot
| * 90bcdefe22 ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP
| * c90402d2a2 acpi: nfit: fix narrowing conversion in acpi_nfit_ctl
| * 7085895c59 x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs
| * e329d137b0 x86/tsc: Always save/restore TSC sched_clock() on suspend/resume
| * 67e4ca7ddc btrfs: handle errors from btrfs_dec_ref() properly
| * 99ddb9c585 kunit/overflow: Fix UB in overflow_allocation_test
| * e7f6922c8a perf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read
| * 79159fbd13 perf/x86/intel: Apply static call for drain_pebs
| * 2e6df032a0 ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk()
| * 3820d20d51 platform/x86: ISST: Correct command storage data length
| * b1a673850c ACPI: x86: Extend Lenovo Yoga Tab 3 quirk with skip GPIO event-handlers
| * 763f4d638f x86/microcode/AMD: Fix __apply_microcode_amd()'s return value
| * 10edc4ceca x86/hyperv: Fix check of return value from snp_set_vmsa()
| * 7cf8fe2b2b LoongArch: BPF: Use move_addr() for BPF_PSEUDO_FUNC
| * 7df2696256 LoongArch: BPF: Don't override subprog's return value
| * b3ffad2f02 LoongArch: BPF: Fix off-by-one error in build_prologue()
| * 279ec25c2d LoongArch: Increase ARCH_DMA_MINALIGN up to 16
| * acacd48a37 usbnet:fix NPE during rx_complete
| * 032c5407a6 drm/amd/display: Check link_index before accessing dc->links[]
| * 41a2c7abc3 tracing: Correct the refcount if the hist/hist_debug file fails to open
| * d24e5e6318 tracing/hist: Support POLLPRI event for poll on histogram
| * 13edaf9979 tracing/hist: Add poll(POLLIN) support on hist file
| * 77b7dbd342 tracing: Switch trace_events_hist.c code over to use guard()
| * f568fbe8c6 tracing: Allow creating instances with specified system events
| * 1913adb58b perf/core: Fix child_total_time_enabled accounting bug at task exit
| * 40316f29b0 drm/amdgpu/gfx11: fix num_mec
| * 1e458c292f net: ibmveth: make veth_pool_store stop hanging
| * ececf8eff6 arcnet: Add NULL check in com20020pci_probe()
| * fa2f9fc35f ipv6: Do not consider link down nexthops in path selection
| * 21f678f672 ipv6: Start path selection from the first nexthop
| * 5a2976cc4d net: fix geneve_opt length integer overflow
| * 0ae509b075 net: dsa: mv88e6xxx: propperly shutdown PPU re-enable timer on destroy
| * fbab7bbf72 ipv6: fix omitted netlink attributes when using RTEXT_FILTER_SKIP_STATS
| * 28d88ee1e1 netfilter: nft_tunnel: fix geneve_opt type confusion addition
| * ccc331fd5b net: decrease cached dst counters in dst_release
| * 8586953246 tunnels: Accept PACKET_HOST in skb_tunnel_check_pmtu().
| * b0a1055e0a vsock: avoid timeout during connect() if the socket is closing
| * aeef645669 udp: Fix memory accounting leak.
| * 5b0ae1723a net: mvpp2: Prevent parser TCAM memory corruption
| * 864ca690ff net_sched: skbprio: Remove overly strict queue assertions
| * 1927d0bcd5 netlabel: Fix NULL pointer exception caused by CALIPSO on IPv4 sockets
| * 6134d1ea1e netfilter: nf_tables: don't unregister hook when table is dormant
| * 073b04796c netfilter: nft_set_hash: GC reaps elements with conncount for dynamic sets only
| * aff1860507 e1000e: change k1 configuration on MTP and later platforms
| * e283a5bf43 ASoC: imx-card: Add NULL check in imx_card_probe()
| * 8db65e4432 riscv: Fix hugetlb retrieval of number of ptes in case of !present pte
| * 992678427e ASoC: codecs: rt5665: Fix some error handling paths in rt5665_probe()
| * a59594c370 x86/uaccess: Improve performance by aligning writes to 8 bytes in copy_user_generic(), on non-FSRM/ERMS CPUs
| * f7a53d32cc RISC-V: errata: Use medany for relocatable builds
| * b52e13bfd6 ALSA: hda/realtek: Fix built-in mic breakage on ASUS VivoBook X515JA
| * c37616f152 firmware: cs_dsp: Ensure cs_dsp_load[_coeff]() returns 0 on success
| * 830169a5ce ntb: intel: Fix using link status DB's
| * c61a3f2df1 ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans
| * 2174fa133d riscv: ftrace: Add parentheses in macro definitions of make_call_t0 and make_call_ra
| * 239ea3c346 spufs: fix a leak in spufs_create_context()
| * 324f280806 spufs: fix gang directory lifetimes
| * 90d1b276d1 spufs: fix a leak on spufs_new_file() failure
| * 6e75137ac8 hwmon: (nct6775-core) Fix out of bounds access for NCT679{8,9}
| * aaf534ad07 memory: omap-gpmc: drop no compatible check
| * 68adc6f17a can: statistics: use atomic access in hot path
| * 2a435a8cb8 ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx
| * 05413508bc drm/amd: Keep display off while going into S4
| * 5272e986ea nvme-pci: fix stuck reset on concurrent DPC and HP
| * d276f40500 x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled
| * 83fa62a06e x86/hyperv: Fix output argument to hypercall that changes page visibility
| * e7d8c57032 locking/semaphore: Use wake_q to wake up processes outside lock critical section
| * e87b8f209c wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state
| * c0863207c0 x86/hyperv/vtl: Stop kernel from probing VTL0 low memory
| * 0ada804832 sched/deadline: Use online cpus for validating runtime
| * 264f9a797c ALSA: hda/realtek: Add support for ASUS Zenbook UM3406KA Laptops using CS35L41 HDA
| * b9fa3901b6 ALSA: hda/realtek: Add support for ASUS ROG Strix G614 Laptops using CS35L41 HDA
| * 4c88653318 HID: i2c-hid: improve i2c_hid_get_report error message
| * 64f9744661 platform/x86/intel/vsec: Add Diamond Rapids support
| * 84d6da6738 platform/x86: intel-hid: fix volume buttons on Microsoft Surface Go 4 tablet
| * fa19b53716 cifs: fix incorrect validation for num_aces field of smb_acl
| * 68ee6f71a2 perf/core: Fix perf_pmu_register() vs. perf_init_event()
| * 11e2ae4fe0 ALSA: hda: Fix speakers on ASUS EXPERTBOOK P5405CSA 1.0
| * fc42413859 ALSA: hda/realtek: Fix Asus Z13 2025 audio
| * 54fd5a5b75 affs: don't write overlarge OFS data block size fields
| * 9fcab9c721 affs: generate OFS sequence numbers starting at 1
| * ec7315e68d wifi: brcmfmac: keep power during suspend if board requires it
| * d9189555fb nvme-pci: skip CMB blocks incompatible with PCI P2P DMA
| * a74dad107e nvme-pci: clean up CMBMSC when registering CMB fails
| * 9ca8c6f6a2 nvme-tcp: fix possible UAF in nvme_tcp_poll
| * 60856e6cdb wifi: iwlwifi: mvm: use the right version of the rate API
| * aadb8a9a90 wifi: iwlwifi: fw: allocate chained SG tables for dump
| * a3160e7f6d rcu-tasks: Always inline rcu_irq_work_resched()
| * 0a0813d127 context_tracking: Always inline ct_{nmi,irq}_{enter,exit}()
| * 698243234d sched/smt: Always inline sched_smt_active()
| * 7ae00d2903 objtool: Fix verbose disassembly if CROSS_COMPILE isn't set
| * 08796bd238 octeontx2-af: Free NIX_AF_INT_VEC_GEN irq
| * aa042c4532 octeontx2-af: Fix mbox INTR handler when num VFs > 64
| * f9b61f837e ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid
| * d32f20470c LoongArch: Rework the arch_kgdb_breakpoint() implementation
| * 37319d6d85 LoongArch: Fix help text of CMDLINE_EXTEND in Kconfig
| * 8f77c286d5 objtool: Fix segfault in ignore_unreachable_insn()
| * de37b82be6 ring-buffer: Fix bytes_dropped calculation issue
| * 17e3c520ae net/mlx5e: SHAMPO, Make reserved size independent of page size
| * 4790bcb269 ksmbd: fix r_count dec/increment mismatch
| * a32086cc64 ksmbd: fix multichannel connection failure
| * 1de7fec4d3 ksmbd: use aead_request_free to match aead_request_alloc
| * 8857aadaec rndis_host: Flag RNDIS modems as WWAN devices
| * 15f150771e rtnetlink: Allocate vfinfo size for VF GUIDs when supported
| * af089264d1 exfat: fix the infinite loop in exfat_find_last_cluster()
| * c6b6b8dcef smb: client: Fix netns refcount imbalance causing leaks and use-after-free
| * d7ca0969bf NFS: Shut down the nfs_client only after all the superblocks
| * 75b42dfe87 objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
| * f2dc3c3b1b perf tools: annotate asm_pure_loop.S
| * e6fe7f82f3 fs/procfs: fix the comment above proc_pid_wchan()
| * 0a3bf3bc34 tty: n_tty: use uint for space returned by tty_write_room()
| * 357c1a3deb staging: rtl8723bs: select CONFIG_CRYPTO_LIB_AES
| * 769a0f187b perf python: Check if there is space to copy all the event
| * 88f5dd0002 perf python: Don't keep a raw_data pointer to consumed ring buffer space
| * 6bc0c3e758 perf python: Decrement the refcount of just created event on failure
| * b8e2e2cfa3 perf python: Fixup description of sample.id event member
| * 9c764db179 i3c: master: svc: Fix missing the IBI rules
| * 4ee8160c47 um: hostfs: avoid issues on inode number reuse by host
| * c9a6cf3fe6 um: remove copy_from_kernel_nofault_allowed
| * 5e06e6412a selftests/mm/cow: fix the incorrect error handling
| * db75d49a41 fuse: fix dax truncate/punch_hole fault path
| * 4e2a03d766 NFSv4: Don't trigger uneccessary scans for return-on-close delegations
| * d03ce46090 arch/powerpc: drop GENERIC_PTDUMP from mpc885_ads_defconfig
| * 3d012ba440 ocfs2: validate l_tree_depth to avoid out-of-bounds access
| * 8c69e83028 kexec: initialize ELF lowest address to ULONG_MAX
| * 4159cb408f kernel/events/uprobes: handle device-exclusive entries correctly in __replace_page()
| * fa55abb99d perf units: Fix insufficient array space
| * 8a832ed0f6 perf evlist: Add success path to evlist__create_syswide_maps
| * 1f562f8efa iio: adc: ad7124: Fix comparison of channel configs
| * a2ae5afa08 iio: adc: ad4130: Fix comparison of channel setups
| * cb7687e377 dmaengine: fsl-edma: cleanup chan after dma_async_device_unregister
| * f6d44b1aa4 fs/ntfs3: Prevent integer overflow in hdr_first_de()
| * 0dfe700fbd fs/ntfs3: Fix a couple integer overflows on 32bit systems
| * 0566a11d5e usb: xhci: correct debug message page size calculation
| * fe2ada4ed4 perf bench: Fix perf bench syscall loop count
| * 31ebc5701a perf arm-spe: Fix load-store operation checking
| * d3f0bad2c4 iio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails.
| * 2d8c171e62 iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio
| * 1287c788f3 ucsi_ccg: Don't show failed to get FW build information error
| * d2b1ee18c1 perf pmu: Don't double count common sysfs and json events
| * a8b3879b2e coresight-etm4x: add isb() before reading the TRCSTATR
| * 2b34bdc42d vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
| * 01592ce191 coresight: catu: Fix number of pages while using 64k pages
| * b302c4d3f4 soundwire: slave: fix an OF node reference leak in soundwire slave device
| * 98fa452d0c isofs: fix KMSAN uninit-value bug in do_isofs_readdir()
| * 6258b8ac58 perf stat: Fix find_stat for mixed legacy/non-legacy events
| * a7bae9f766 clk: qcom: mmcc-sdm660: fix stuck video_subcore0 clock
| * f2176ab4b3 pinctrl: intel: Fix wrong bypass assignment in intel_pinctrl_probe_pwm()
| * 75f095daf6 crypto: hisilicon/sec2 - fix for aead auth key length
| * b6fc1fdd3e x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment
| * 966fdfc453 leds: Fix LED_OFF brightness race
| * d6f517e8d8 mfd: sm501: Switch to BIT() to mitigate integer overflows
| * 7d8e0ac233 pinctrl: renesas: rzv2m: Fix missing of_node_put() call
| * 7c51a6964b RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow
| * c4db297e88 crypto: nx - Fix uninitialised hv_nxc on error
| * a278a4164b power: supply: max77693: Fix wrong conversion of charge input threshold value
| * 02586692ac x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1
| * 3d39022704 clk: amlogic: g12a: fix mmc A peripheral clock
| * c6f63ae9b5 clk: clk-imx8mp-audiomix: fix dsp/ocram_a clock parents
| * 48e5f4fdad selftests/bpf: Select NUMA_NO_NODE to create map
| * 7061afacc8 clk: amlogic: gxbb: drop non existing 32k clock parent
| * b36254e8f8 clk: amlogic: g12b: fix cluster A parent data
| * 4dc2256238 pinctrl: tegra: Set SFIO mode to Mux Register
| * 5fa3bfd3d0 IB/mad: Check available slots before posting receive WRs
| * 1b2641d161 remoteproc: qcom_q6v5_mss: Handle platforms with one power domain
| * 667a628ab6 RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
| * 68438629de RDMA/mlx5: Fix calculation of total invalidated pages
| * 0cf80f924a RDMA/core: Don't expose hw_counters outside of init net namespace
| * 02527e62d7 clk: rockchip: rk3328: fix wrong clk_ref_usb3otg parent
| * 622d52c99a pinctrl: renesas: rzg2l: Fix missing of_node_put() call
| * 182ae87e14 pinctrl: renesas: rza2: Fix missing of_node_put() call
| * 77461377d3 lib: 842: Improve error handling in sw842_compress()
| * 43681d603f bpf: Use preempt_count() directly in bpf_send_signal_common()
| * 8e3e21129c remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
| * b32da6cf9d RDMA/mana_ib: Ensure variable err is initialized
| * db6f0b88d7 clk: qcom: gcc-msm8953: fix stuck venus0_core0 clock
| * 4d29a6dcb5 clk: samsung: Fix UBSAN panic in samsung_clk_init()
| * b07398e8a5 x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()
| * 22280deb31 selftests/bpf: Fix string read in strncmp benchmark
| * b55c470275 libbpf: Fix hypothetical STT_SECTION extern NULL deref case
| * 5db897802c remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
| * ba1a885c90 of: property: Increase NR_FWNODE_REFERENCE_ARGS
| * 7c6bb82a6f remoteproc: core: Clear table_sz when rproc_shutdown
| * 8594bbffc2 crypto: hisilicon/sec2 - fix for sec spec check
| * 0aafd0ec51 crypto: hisilicon/sec2 - fix for aead authsize alignment
| * 2ff09de2c8 clk: amlogic: gxbb: drop incorrect flag on 32k clock
| * ce88afbc09 fbdev: sm501fb: Add some geometry checks.
| * 6ed70f3dc6 mdacon: rework dependency list
| * 88ebc63d6a fbdev: au1100fb: Move a variable assignment behind a null pointer check
| * f6c1a08e91 PCI: pciehp: Don't enable HPIE when resuming in poll mode
| * cbcb02cc0e PCI: histb: Fix an error handling path in histb_pcie_probe()
| * b3a93a2407 drm/amd/display: avoid NPD when ASIC does not support DMUB
| * 390304035b drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer()
| * 13ec849fd2 drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr
| * 48b5e31bc3 PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe
| * 745783303c PCI: Remove stray put_device() in pci_register_host_bridge()
| * d5563f1205 drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters()
| * 431f51068a PCI: Avoid reset when disabled via sysfs
| * 0aad0d2916 PCI/portdrv: Only disable pciehp interrupts early when needed
| * eeeac24b42 PCI: brcmstb: Fix potential premature regulator disabling
| * eedd054834 PCI: brcmstb: Fix error path after a call to regulator_bulk_get()
| * 8b2853fd6e PCI: brcmstb: Use internal register to change link capability
| * 17a37367d0 PCI: cadence-ep: Fix the driver to send MSG TLP for INTx without data payload
| * 0f88894aa6 drm/amdkfd: Fix Circular Locking Dependency in 'svm_range_cpu_invalidate_pagetables'
| * a984e6108c drm/msm/dsi: Set PHY usescase (and mode) before registering DSI host
| * 7570e56930 drm/msm/dsi: Use existing per-interface slice count in DSC timing
| * 45e03341d2 drm/msm/dpu: don't use active in atomic_check()
| * 8b930ddc20 PCI/ASPM: Fix link state exit during switch upstream function removal
| * 9c44e29cfd drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member
| * 34c1720a38 drm/mediatek: mtk_hdmi: Unregister audio platform device on failure
| * 347641b02f PCI: Use downstream bridges for distributing resources
| * 561fc0c5cf drm/vkms: Fix use after free and double free on init error
| * e2b3107173 drm: xlnx: zynqmp: Fix max dma segment size
| * d360c02cde drm/bridge: it6505: fix HDCP V match check is not performed correctly
| * c3b8e7c680 drm/dp_mst: Fix drm RAD print
| * 8830a2a324 drm/bridge: ti-sn65dsi86: Fix multiple instances
| * 1b5f3dc474 ASoC: ti: j721e-evm: Fix clock configuration for ti,j7200-cpb-audio compatible
| * a589f15d40 ALSA: hda/realtek: Always honor no_shutup_pins
| * f8e2e91bae dt-bindings: vendor-prefixes: add GOcontroll
| * ba65e56f71 HID: remove superfluous (and wrong) Makefile entry for CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER
| * 20bbf66ab4 ASoC: cs35l41: check the return value from spi_setup()
| * 756945c13f platform/x86: dell-ddv: Fix temperature calculation
| * 693b38ee7c media: platform: allgro-dvt: unregister v4l2_device on the error path
| * 57e257d974 media: verisilicon: HEVC: Initialize start_bit field
| * 63a0b0d052 x86/fpu/xstate: Fix inconsistencies in guest FPU xfeatures
| * 4c94efdc51 x86/traps: Make exc_double_fault() consistently noreturn
| * 36aee8100e perf/ring_buffer: Allow the EPOLLRDNORM flag for poll
| * 477b6882f1 lockdep: Don't disable interrupts on RT in disable_irq_nosync_lockdep.*()
| * 01c5ab2924 PM: sleep: Fix handling devices with direct_complete set on errors
| * ac2eb73783 thermal: int340x: Add NULL check for adev
| * 12c5e76acf EDAC/ie31200: Fix the error path order of ie31200_init()
| * 9ca0c34ac1 EDAC/ie31200: Fix the DIMM size mask for several SoCs
| * a26d5a100a EDAC/ie31200: Fix the size of EDAC_MC_LAYER_CHIP_SELECT layer
| * 06ca76e7e3 selinux: Chain up tool resolving errors in install_policy.sh
| * b9ad6385ca RISC-V: KVM: Disable the kernel perf counter during configure
| * 3c64a5bacb PM: sleep: Adjust check before setting power.must_resume
| * 913b739cd2 lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock
| * 71fc439af5 x86/sev: Add missing RIP_REL_REF() invocations during sme_enable()
| * 7c376f91f2 x86/platform: Only allow CONFIG_EISA for 32-bit
| * 2541b0d1ce x86/fpu: Avoid copying dynamic FP state from init_task in arch_dup_task_struct()
| * b58c6545db x86/fpu: Fix guest FPU state buffer allocation size
| * f2d51d45a5 EDAC/{skx_common,i10nm}: Fix some missing error reports on Emerald Rapids
| * 62173b2fc2 cpufreq: governor: Fix negative 'idle_time' handling in dbs_update()
| * f7a1e1c2d6 smack: dont compile ipv6 code unless ipv6 is configured
| * e4b3585ad9 cpufreq: scpi: compare kHz instead of Hz
| * b8db5776f0 x86/mm/pat: cpa-test: fix length for CPA_ARRAY test
| * 6dafa27764 watch_queue: fix pipe accounting mismatch
* | 259b5bf0c3 Merge 6.6.86 into android15-6.6-lts
|\|
| * 3fa1ea3ede Linux 6.6.86
| * 72a68d2bed usb: gadget: uvc: Fix ERR_PTR dereference in uvc_v4l2.c
| * 367a281315 serial: 8250_dma: terminate correct DMA in tx_dma_flush()
| * 6186fb2cd3 memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove
| * 2beb999f73 net: usb: usbnet: restore usb%d name exception for local mac addresses
| * 3007115c2e net: usb: qmi_wwan: add Telit Cinterion FE990B composition
| * ad43b150e1 net: usb: qmi_wwan: add Telit Cinterion FN990B composition
| * 5ec93d7720 tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers
| * fe14cfba6c tty: serial: 8250: Add Brainboxes XC devices
| * be28a3dabd tty: serial: 8250: Add some more device IDs
| * 52eed361c2 counter: microchip-tcb-capture: Fix undefined counter channel state on probe
| * fa15592e9d counter: stm32-lptimer-cnt: fix error handling when enabling
| * 835807f54f ALSA: hda/realtek: Support mute LED on HP Laptop 15s-du3xxx
| * 5251041573 netfilter: socket: Lookup orig tuple for IPv6 SNAT
| * f16a097047 scsi: ufs: qcom: Only free platform MSIs when ESI is enabled
| * 3918b2016d reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
| * 790d30578f mm/page_alloc: fix memory accept before watermarks gets initialized
| * 404d85a71d drm/amd/display: Don't write DP_MSTM_CTRL after LT
| * 5f57a96e92 drm/dp_mst: Add a helper to queue a topology probe
| * 93ccb0fb36 drm/dp_mst: Factor out function to queue a topology probe work
| * b9264aa24f drm/amd/display: Check denominator crb_pipes before used
| * ad0410346c ARM: Remove address checking for MMUless devices
| * 1809cabfe0 ARM: 9351/1: fault: Add "cut here" line for prefetch aborts
| * fe17c8aaa9 ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()
| * 9da6b6340d atm: Fix NULL pointer dereference
| * f99afc594a HID: hid-plantronics: Add mic mute mapping and generalize quirks
| * 8ecdc85b5c ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names
* | f071db89e9 Merge 6.6.85 into android15-6.6-lts
|\|
| * d57a7c6169 Linux 6.6.85
| * fa81cb19f5 netfilter: nft_counter: Use u64_stats_t for statistic.
| * 35afffaddb wifi: iwlwifi: mvm: ensure offloading TID queue exists
| * fd82d29c4c wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
| * 7f306c651f bnxt_en: Fix receive ring space parameters when XDP is active
| * 9dff3e36ea btrfs: make sure that WRITTEN is set on all metadata blocks
| * 690597da35 Revert "sched/core: Reduce cost of sched_move_task when config autogroup"
| * 04cd1dc3df arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S
* | 49de710f52 Merge 7d56696294 ("KVM: arm64: Eagerly switch ZCR_EL{1,2}") into android15-6.6-lts
|\|
| * 7d56696294 KVM: arm64: Eagerly switch ZCR_EL{1,2}
| * 93074abede KVM: arm64: Mark some header functions as inline
| * 2afe039450 KVM: arm64: Refactor exit handlers
| * 30253b3eb6 KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
| * 88adb7a007 KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
| * 73f64c676a KVM: arm64: Remove host FPSIMD saving for non-protected KVM
| * 806d5c1e1d KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
| * 20c6561c49 KVM: arm64: Calculate cptr_el2 traps on activating traps
* | 7c28850f8f Merge b44a378248 ("mptcp: Fix data stream corruption in the address announcement") into android15-6.6-lts
|\|
| * b44a378248 mptcp: Fix data stream corruption in the address announcement
| * d0f8737062 ksmbd: fix incorrect validation for num_aces field of smb_acl
| * 5e0f5166e2 drm/amd/display: Use HW lock mgr for PSR1 when only one eDP
| * 7803ca3859 drm/amd/display: should support dmub hw lock on Replay
| * 28780816ca drm/amdgpu: Fix JPEG video caps max size for navi1x and raven
| * e66a1a616f drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size
| * c76bd3c992 drm/sched: Fix fence reference count leak
| * 3ce08215ca drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse()
| * f2bbfd50e9 soc: qcom: pdr: Fix the potential deadlock
| * 6e38b4a4b3 batman-adv: Ignore own maximum aggregation size during RX
| * b7b4be1fa4 xsk: fix an integer overflow in xp_create_and_assign_umem()
| * 19f4e715f6 efi/libstub: Avoid physical address 0x0 when doing random allocation
| * 0baa10cf97 ARM: shmobile: smp: Enforce shmobile_smp_* alignment
| * d6274b9472 ARM: dts: imx6qdl-apalis: Fix poweroff on Apalis iMX6
| * 63b53198af proc: fix UAF in proc_get_inode()
| * 29124ae980 mm/migrate: fix shmem xarray update during migration
| * 9efb6b5021 mm: fix error handling in __filemap_get_folio() with FGP_NOWAIT
| * f42c361843 mmc: atmel-mci: Add missing clk_disable_unprepare()
| * 6d2f8c5974 mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops
| * db59b24b38 arm64: dts: rockchip: fix pinmux of UART0 for PX30 Ringneck on Haikou
| * 3db71cf022 arm64: dts: freescale: imx8mm-verdin-dahlia: add Microphone Jack to sound card
| * 62b5b2eca3 arm64: dts: freescale: imx8mp-verdin-dahlia: add Microphone Jack to sound card
| * 4b2a170c25 accel/qaic: Fix integer overflow in qaic_validate_req()
| * 998b1aae22 regulator: check that dummy regulator has been probed before using it
| * e26f24ca4f regulator: dummy: force synchronous probing
| * f793c0fdaa riscv: dts: starfive: Fix a typo in StarFive JH7110 pin function definitions
| * 7cd375d46a drm/v3d: Don't run jobs that have errors flagged in its fence
| * c8eebc9d5b can: flexcan: disable transceiver during system PM
| * 6f5481d4ed can: flexcan: only change CAN state when link up in system PM
| * cc29775a8a can: ucan: fix out of bound read in strscpy() source
| * e5e6bd8e0d can: rcar_canfd: Fix page entries in the AFL list
| * b202afc54e i2c: omap: fix IRQ storms
| * f0372a4cf2 Revert "gre: Fix IPv6 link-local address generation."
| * ae2ec5a51f net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES
| * e4f6de68de net: lwtunnel: fix recursion loops
| * 9566f6ee13 net: atm: fix use after free in lec_send()
| * a235ec29c9 ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create().
| * 119dcafe36 ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().
| * 1e842b4590 ARM: davinci: da850: fix selecting ARCH_DAVINCI_DA8XX
| * 3d123ec74d accel/qaic: Fix possible data corruption in BOs > 2G
| * 59b683594f Bluetooth: hci_event: Fix connection regression between LE and non-LE adapters
| * ecd06ad082 Bluetooth: Fix error code in chan_alloc_skb_cb()
| * 9524af5844 RDMA/hns: Fix wrong value of max_sge_rd
| * 0edfba91b7 RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()
| * 5df88c3837 RDMA/hns: Fix unmatched condition in error path of alloc_user_qp_db()
| * 975355faba RDMA/hns: Fix soft lockup during bt pages loop
| * dba5577d8e RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path
| * 1e8d0765da ARM: dts: bcm2711: Don't mark timer regs unconfigured
| * e68954ecf8 ARM: OMAP1: select CONFIG_GENERIC_IRQ_CHIP
| * 0e6aa61b54 RDMA/mlx5: Handle errors returned from mlx5r_ib_rate()
| * 6a788e32f6 RDMA/bnxt_re: Add missing paranthesis in map_qp_id_to_tbl_indx
| * 25be7f9bde arm64: dts: rockchip: Remove undocumented sdmmc property from lubancat-1
| * 61820187b3 ARM: dts: bcm2711: PL011 UARTs are actually r1p5
| * 1b7b036685 soc: imx8m: Unregister cpufreq and soc dev in cleanup path
| * 4a58a332ee soc: imx8m: Use devm_* to simplify probe failure handling
| * d1fb2e767e soc: imx8m: Remove global soc_uid
| * 8e1704e5b2 xfrm_output: Force software GSO only in tunnel mode
| * bfb9b9404a xfrm: fix tunnel mode TX datapath in packet offload mode
| * e432cb123d arm64: dts: freescale: tqma8mpql: Fix vqmmc-supply
| * 555f05de6f firmware: imx-scu: fix OF node leak in .probe()
* | 3120fc52ed Merge 6.6.84 into android15-6.6-lts
|\|
| * 4b6a8fa777 Linux 6.6.84
| * a561c6a034 netfilter: nf_tables: allow clone callbacks to sleep
| * f6de68e154 netfilter: nf_tables: bail out if stateful expression provides no .clone
| * 7fa2e2960f netfilter: nf_tables: use timestamp to check for set element timeout
| * 50b22a98c1 rust: lockdep: Remove support for dynamically allocated LockClassKeys
| * 812080b01d nvme-tcp: Fix a C2HTermReq error message
| * 6248573705 HID: apple: disable Fn key handling on the Omoton KB066
| * a09e085ba8 nvme-fc: rely on state transitions to handle connectivity loss
| * efc30877bd Bluetooth: L2CAP: Fix corrupted list in hci_chan_del
| * fb0800cbea smb: client: Fix match_session bug preventing session reuse
| * 7dc9abfa00 smb3: add support for IAKerb
| * 643607a53f stmmac: loongson: Pass correct arg to PCI function
| * 6653927733 i2c: sis630: Fix an error handling path in sis630_probe()
| * 9e3bef10e4 i2c: ali15x3: Fix an error handling path in ali15x3_probe()
| * beb68cfcb3 i2c: ali1535: Fix an error handling path in ali1535_probe()
| * 10cbae84fe cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point()
| * 474c08712d cifs: Validate content of WSL reparse point buffers
| * 6c13fcb7cf cifs: Fix integer overflow while processing closetimeo mount option
| * d5fff81c43 cifs: Fix integer overflow while processing actimeo mount option
| * 9e438d0410 cifs: Fix integer overflow while processing acdirmax mount option
| * 0252c33cc9 cifs: Fix integer overflow while processing acregmax mount option
| * d3f9fdc298 scripts: generate_rust_analyzer: add missing macros deps
| * a70259447d ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
| * 69a9004809 ASoC: rt722-sdca: add missing readable registers
| * 2592a62874 rust: init: add missing newline to pr_info! calls
| * f69b8f4289 ASoC: cs42l43: Fix maximum ADC Volume
| * b05b5627f0 drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data()
| * 5da54be469 rust: error: add missing newline to pr_warn! calls
| * 5440553295 ASoC: ops: Consistently treat platform_max as control value
| * 86d97d49f1 mm: split critical region in remap_file_pages() and invoke LSMs in between
| * b2fe954a4d lib/buildid: Handle memfd_secret() files in build_id_parse()
| * aa4d9b54f1 rust: init: fix `Zeroable` implementation for `Option<NonNull<T>>` and `Option<KBox<T>>`
| * b78467d3ba rust: Disallow BTF generation with Rust + LTO
| * d026392e3f smb: client: fix regression with guest option
| * 2bff992a55 qlcnic: fix memory leak issues in qlcnic_sriov_common.c
| * 7b2c29b7ea arm64: mm: Populate vmemmap at the page level if not section aligned
| * 818330f756 dm-flakey: Fix memory corruption in optional corrupt_bio_byte feature
| * cfae6a5dad ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model
| * 4f6c0f7529 clk: samsung: update PLL locktime for PLL142XX used on FSD platform
| * 09aeab6803 ksmbd: prevent connection release during oplock break notification
| * fb776765bf ksmbd: fix use-after-free in ksmbd_free_work_struct
| * 378b361e2e drm/amd/display: Fix slab-use-after-free on hdcp_work
| * a8f77e1658 drm/amd/display: Assign normalized_pix_clk when color depth = 14
| * 8e91a61678 drm/amd/display: Restore correct backlight brightness after a GPU reset
| * 8082ca0dd2 drm/amd/display: Disable unneeded hpd interrupts during dm_init
| * b5c2835015 drm/dp_mst: Fix locking when skipping CSN before topology probing
| * b3ddebaece drm/atomic: Filter out redundant DPMS calls
| * 6736975ee3 drm/i915/cdclk: Do cdclk post plane programming later
| * e686349cc1 x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes
| * ab0f6e770d USB: serial: option: match on interface class for Telit FN990B
| * 61e540094f USB: serial: option: fix Telit Cinterion FE990A name
| * e1bfbf0f18 USB: serial: option: add Telit Cinterion FE990B compositions
| * 528ac20485 USB: serial: ftdi_sio: add support for Altera USB Blaster 3
| * 392e9b2976 Input: i8042 - swap old quirk combination with new quirk for more devices
| * e7c95c0106 Input: i8042 - swap old quirk combination with new quirk for several devices
| * e690d0c52c Input: i8042 - add required quirks for missing old boardnames
| * 105a211637 Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ
| * d639d5531a Input: xpad - rename QH controller to Legion Go S
| * 0c4484cdcb Input: xpad - add support for TECNO Pocket Go
| * dc9839dcc2 Input: xpad - add support for ZOTAC Gaming Zone
| * 8cf88f390e Input: xpad - add multiple supported devices
| * 5184e44bef Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers
| * 0b5b6512f6 Input: iqs7222 - preserve system status register
| * cbd68fca88 Input: ads7846 - fix gpiod allocation
| * 78aefac7ef io_uring: fix error pbuf checking
| * 1fdb9c9eb2 io_uring: use unpin_user_pages() where appropriate
* | e9a9efc514 ANDROID: GKI: allow abi break in struct io_ring_ctx
* | 6e54d27253 Merge 46b1b3d81a ("io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring") into android15-6.6-lts
|\|
| * 46b1b3d81a io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring
* | 82f1bb9ad5 Merge af8f27ef1a ("io_uring/kbuf: vmap pinned buffer ring") into android15-6.6-lts
|\|
| * af8f27ef1a io_uring/kbuf: vmap pinned buffer ring
* | 5e5e14ff2d Merge 6168ec87bf ("io_uring: unify io_pin_pages()") into android15-6.6-lts
|\|
| * 6168ec87bf io_uring: unify io_pin_pages()
* | ad8b6d5efb Merge 719e745ee3 ("io_uring: use vmap() for ring mapping") into android15-6.6-lts
|\|
| * 719e745ee3 io_uring: use vmap() for ring mapping
* | cdba56b89a Merge b89f95b94c ("io_uring: fix corner case forgetting to vunmap") into android15-6.6-lts
|\|
| * b89f95b94c io_uring: fix corner case forgetting to vunmap
* | ddc7771964 Merge a0b21f2aca ("io_uring: don't attempt to mmap larger than what the user asks for") into android15-6.6-lts
|\|
| * a0b21f2aca io_uring: don't attempt to mmap larger than what the user asks for
* | 2ccdc4d5e3 Merge 2905c4fe7e ("io_uring: get rid of remap_pfn_range() for mapping rings/sqes") into android15-6.6-lts
|\|
| * 2905c4fe7e io_uring: get rid of remap_pfn_range() for mapping rings/sqes
* | a41ceb1f42 Merge b6690a4172 ("mm: add nommu variant of vm_insert_pages()") into android15-6.6-lts
|\|
| * b6690a4172 mm: add nommu variant of vm_insert_pages()
| * 0446d86819 block: fix 'kmem_cache of name 'bio-108' already exists'
| * 474cebf297 net: Handle napi_schedule() calls from non-interrupt
| * deb9982c4d drm/nouveau: Do not override forced connector status
| * 47f4272207 mptcp: safety check before fallback
| * bb41ef3190 x86/irq: Define trace events conditionally
| * cdf7658ea2 perf/x86/intel: Use better start period for frequency mode
| * 791eaeaa09 drm/vkms: Round fixp2int conversion in lerp_u16
| * fcfb7ea1f4 fuse: don't truncate cached, mutated symlink
| * 08ee4f873b ASoC: tas2764: Set the SDOUT polarity correctly
| * 6c703ceaf6 ASoC: tas2764: Fix power control mask
| * 8f677fb436 ASoC: tas2770: Fix volume scale
| * f33c090855 nvme: only allow entering LIVE from CONNECTING state
| * 6df3939d93 sctp: Fix undefined behavior in left shift operation
| * d3ca799203 cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes
| * 492be1cd9e apple-nvme: Release power domains when probe fails
| * bf78e63235 nvmet-rdma: recheck queue state is LIVE in state lock in recv done
| * e9764289d7 nvme-tcp: add basic support for the C2HTermReq PDU
| * aca3cdc3a6 nvme-pci: quirk Acer FA100 for non-uniqueue identifiers
| * 570f4d6e94 io-wq: backoff when retrying worker creation
| * f3288ffd33 net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors
| * f623c04f7a ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE
| * a4859a07c3 ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module
| * 7e97147479 ASoC: arizona/madera: use fsleep() in up/down DAPM event delays.
| * 544f38b43f ASoC: rsnd: adjust convert rate limitation
| * 7fe470e618 ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime()
| * fa51c91340 ASoC: rsnd: indicate unsupported clock rate
| * aa2e824505 ALSA: hda/realtek: Limit mic boost on Positivo ARN50
| * 9f303c35f9 ASoC: simple-card-utils.c: add missing dlc->of_node
| * dfbaf8a6ae selftests/bpf: Fix invalid flag of recv()
| * c96cce8535 Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd
| * 45a5d06e7e Xen/swiotlb: mark xen_swiotlb_fixup() __init
| * f225a79bd2 thermal/cpufreq_cooling: Remove structure member documentation
| * 051a7980f7 s390/cio: Fix CHPID "configure" attribute caching
| * 194dc8c7ac platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles
| * 7f417bd96a platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e
| * 265c03699e sched: Clarify wake_up_q()'s write to task->wake_q.next
| * 5b1c48532f objtool: Ignore dangling jump table entries
| * be2051f81b HID: apple: fix up the F6 key on the Omoton KB066 keyboard
| * 68eddb06f0 HID: hid-apple: Apple Magic Keyboard a3203 USB-C support
| * 9451660346 HID: topre: Fix n-key rollover on Realforce R3S TKL boards
| * 490eb24d66 usb: phy: generic: Use proper helper for property detection
| * 7a7ada3387 HID: ignore non-functional sensor in HP 5MP Camera
| * 2a11cee9a9 HID: intel-ish-hid: Send clock sync message immediately after reset
| * cc4c96f1fd HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell
| * 5d01a4ec46 vboxsf: fix building with GCC 15
| * 52df961953 alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support
| * dd33c1a385 smb: client: fix noisy when tree connecting to DFS interlink targets
| * 1b9cd0404e ACPI: resource: IRQ override for Eluktronics MECH-17
| * ea371d1cde scsi: qla1280: Fix kernel oops when debug level > 2
| * caa3832264 scsi: ufs: core: Fix error return with query response
| * e9d4044f4b scsi: core: Use GFP_NOIO to avoid circular locking dependency
| * c79ac6a812 platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show()
| * 6c8b1efdc4 sched/debug: Provide slice length for fair tasks
| * 2d1eef2481 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic()
| * a470f80ef3 powercap: call put_device() on an error path in powercap_register_control_type()
| * a625ad9b5b hrtimers: Mark is_migration_base() with __always_inline
| * fa5bfdd93f nvme-fc: do not ignore connectivity loss during connecting
| * aef373bb9a nvme-fc: go straight to connecting state when initializing
| * 885b727981 net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices
| * bd7e3a4280 net/mlx5: Bridge, fix the crash caused by LAG state check
| * 4e79d865f0 net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch
| * 4b1a0ee616 net: openvswitch: remove misbehaving actions length check
| * ecc19a9380 gre: Fix IPv6 link-local address generation.
| * 181b68fa55 netfilter: nft_exthdr: fix offset with ipv4_find_option()
| * 78533c4a29 net_sched: Prevent creation of classes with TC_H_ROOT
| * 1bd2a8bb1c ipvs: prevent integer overflow in do_ip_vs_get_ctl()
| * fda50302a1 netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()
| * 6e4edd9e2d bonding: fix incorrect MAC address setting to receive NS messages
| * 1f7d051814 net: switchdev: Convert blocking notification chain to a raw one
| * ee086c8e77 eth: bnxt: do not update checksum in bnxt_xdp_build_skb()
| * 637105ef0d net/mlx5: handle errors in mlx5_chains_create_table()
| * 466ae740f8 Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio()
| * ad27b4a514 drm/hyperv: Fix address space leak when Hyper-V DRM device is removed
| * 9d1966bdaf netpoll: hold rcu read lock in __netpoll_send_skb()
| * 6c5bb3f7ac net: mctp i2c: Copy headers if cloned
| * 78f83ea6b8 net: dsa: mv88e6xxx: Verify after ATU Load ops
| * 20b6672853 net/mlx5: Fill out devlink dev info only for PFs
| * 5e8ce74fb0 Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context"
| * 7e8cd2bc09 Bluetooth: hci_event: Fix enabling passive scanning
| * 75d262ad3c wifi: cfg80211: cancel wiphy_work before freeing wiphy
| * 0f0a152957 sched: address a potential NULL pointer dereference in the GRED scheduler.
| * 0a9f0cfd2a netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around
| * 5d30d25666 ice: fix memory leak in aRFS after reset
| * 29bde9751c netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template.
| * 21e65f1fef pinctrl: bcm281xx: Fix incorrect regmap max_registers value
| * c198157ae1 fbdev: hyperv_fb: iounmap() the correct memory when removing a device
| * 372df1f205 tcp: fix forever orphan socket caused by tcp_abort
| * abadaa3557 tcp: fix races in tcp_abort()
| * f9543375d9 bpf: Use raw_spinlock_t in ringbuf
| * 472173544e hrtimer: Use and report correct timerslack values for realtime tasks
| * c7ee791e53 zram: fix NULL pointer in comp_algorithm_show()
| * 6e0447fa7d sched/isolation: Prevent boot crash when the boot CPU is nohz_full
| * de47f33dde clockevents/drivers/i8253: Fix stop sequence for timer 0
* | b0678c2bd2 Merge 6.6.83 into android15-6.6-lts
|\|
| * 594a1dd513 Linux 6.6.83
| * d5285e088b kbuild: userprogs: use correct lld when linking through clang
| * 79a955ea4a pfifo_tail_enqueue: Drop new packet when sch->limit == 0
| * f9825c3f50 spi-mxs: Fix chipselect glitch
| * aa6ef9ceab x86/boot: Sanitize boot params before parsing command line
| * c59843e877 x86/boot: Rename conflicting 'boot_params' pointer to 'boot_params_ptr'
| * 5b6eac63d1 ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr
| * bb44254987 x86/mm: Don't disable PCID when INVLPG has been fixed by microcode
| * eff00c5e29 uprobes: Fix race in uprobe_free_utask
| * 53402e17b1 drm/i915/dsi: Use TRANS_DDI_FUNC_CTL's own port width macro
| * 03f1b76fcd Revert "KVM: PPC: e500: Mark "struct page" dirty in kvmppc_e500_shadow_map()"
| * e4c6eff5a3 Revert "KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock"
| * 36f688adf4 Revert "KVM: PPC: e500: Use __kvm_faultin_pfn() to handle page faults"
| * 9e4b27250f Revert "KVM: e500: always restore irqs"
| * 52fffb4a1f riscv: Fix enabling cbo.zero when running in M-mode
| * 76c9f76d4a ALSA: hda: realtek: fix incorrect IS_REACHABLE() usage
| * 128962f5ab kbuild: hdrcheck: fix cross build with clang
| * 62112e7f5c arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes
* | b7c385b165 Merge branch 'android15-6.6' into android15-6.6-lts
* | 3cabdd839b Merge c04035ce80 ("mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()") into android15-6.6-lts
|\|
| * c04035ce80 mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()
* | d38affcc8c Merge 11f0e95d63 ("iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value") into android15-6.6-lts
|/
* 11f0e95d63 iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value
* 12012d4324 iio: dac: ad3552r: clear reset status flag
* 82d94af456 iio: filter: admv8818: Force initialization of SDO
* d7e5031fe3 drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl
* 47aa0f5c63 eeprom: digsy_mtc: Make GPIO lookup table match the device
* 1f9eb7078b bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock
* faac8e8940 slimbus: messaging: Free transaction ID in delayed interrupt scenario
* e49700a7d6 drivers: core: fix device leak in __fw_devlink_relax_cycles()
* d43b3f6466 char: misc: deallocate static minor in error path
* a5e10461de intel_th: pci: Add Panther Lake-P/U support
* d66d16c32a intel_th: pci: Add Panther Lake-H support
* 9d3c428e3e intel_th: pci: Add Arrow Lake support
* 693958465a mei: me: add panther lake P DID
* d7b339bbc8 cdx: Fix possible UAF error in driver_override_show()
* 4f1ca393ea KVM: x86: Explicitly zero EAX and EBX when PERFMON_V2 isn't supported by KVM
* 33bf2b75c1 KVM: SVM: Suppress DEBUGCTL.BTF on AMD
* 978df364a3 KVM: SVM: Drop DEBUGCTL[5:2] from guest's effective value
* c401b1b4b8 usb: xhci: Enable the TRB overfetch quirk on VIA VL805
* af091756c4 xhci: pci: Fix indentation in the PCI device ID definitions
* 2c271df318 usb: gadget: Check bmAttributes only if configuration is valid
* 0af020298b usb: gadget: Fix setting self-powered state on suspend
* b7768bba6a usb: gadget: Set self-powered based on MaxPower and bmAttributes
* 68f7ef440a usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality
* 8233c63fca usb: typec: ucsi: increase timeout for PPM reset operations
* 656a99b581 usb: dwc3: gadget: Prevent irq storm when TH re-executes
* 13f9b888ad usb: dwc3: Set SUSPENDENABLE soon after phy init
* a0475a885d usb: atm: cxacru: fix a flaw in existing endpoint checks
* 0f6850613f usb: gadget: u_ether: Set is_suspend flag if remote wakeup fails
* d50f5c0cd9 usb: renesas_usbhs: Flush the notify_hotplug_work
* 46fba7be16 usb: typec: ucsi: Fix NULL pointer access
* 7f0441af6c usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader
* 7817af8b0b usb: hub: lack of clearing xHC resources
* ef08202904 usb: renesas_usbhs: Use devm_usb_get_phy()
* d72f447571 usb: renesas_usbhs: Call clk_put()
* 3cae0b7e96 Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection"
* 897b7b76f0 gpio: rcar: Fix missing of_node_put() call
* 9ff13800d6 net: ipv6: fix missing dst ref drop in ila lwtunnel
* 925933d2cc net: ipv6: fix dst ref loop in ila lwtunnel
* 88afbcb450 net: dsa: mt7530: Fix traffic flooding for MMIO devices
* 9cc7f00186 sched/fair: Fix potential memory corruption in child_cfs_rq_on_list
* c6292a2ac3 ublk: set_params: properly check if parameters can be applied
* 04ab4df09d net-timestamp: support TCP GSO case for a few missing flags
* 747de766f8 exfat: fix soft lockup in exfat_clear_bitmap
* 4705372634 x86/sgx: Fix size overflows in sgx_encl_create()
* 3561442599 vlan: enforce underlying device type
* 1eacd47636 ppp: Fix KMSAN uninit-value warning with bpf
* 65dcc3af02 net: ipa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7
* 5dc8312162 net: ipa: Fix QSB data for v4.7
* b9a3f30b30 net: ipa: Fix v4.7 resource group names
* 026714ec75 HID: hid-steam: Fix use-after-free when detaching device
* 2c04e507f3 net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error
* 41d731e792 be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink
* 4f5cc62f9a drm/sched: Fix preprocessor guard
* b1e17ebd82 hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()
* 416e8b4c20 llc: do not use skb_get() before dev_queue_xmit()
* 8c48c26f5f ALSA: usx2y: validate nrpacks module parameter on probe
* 2efd6cc2c7 tracing: probe-events: Remove unused MAX_ARG_BUF_LEN macro
* c3dafdf77b hwmon: (ad7314) Validate leading zero bits and return error
* b5cc1496a0 hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table
* 395c28f3c0 hwmon: (pmbus) Initialise page count in pmbus_identify()
* 7c823e4c30 perf/core: Fix pmus_lock vs. pmus_srcu ordering
* 90d302619e caif_virtio: fix wrong pointer check in cfv_probe()
* 01a8323764 net: gso: fix ownership in __udp_gso_segment
* 84cce23da4 nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch
* 127c8905ea bluetooth: btusb: Initialize .owner field of force_poll_sync_fops
* 560f4d1299 HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()
* d0ef5f19b6 HID: google: fix unused variable warning under !CONFIG_ACPI
* b02f8d5a71 wifi: iwlwifi: limit printed string from FW file
* 5c18fae580 mm: don't skip arch_sync_kernel_mappings() in error paths
* b56b6cfdc7 mm/page_alloc: fix uninitialized variable
* f4e39e0ffb block: fix conversion of GPT partition name to 7-bit
* ab0727d6e2 NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback
* 272abd47f7 s390/traps: Fix test_monitor_call() inline assembly
* 18519478b9 dma: kmsan: export kmsan_handle_dma() for modules
* 2537f01d57 rapidio: fix an API misues when rio_add_net() fails
* e6411c3b95 rapidio: add check for rio_add_net() in rio_scan_alloc_net()
* ebebbb0ede wifi: nl80211: reject cooked mode if it is set along with other flags
* 35ef07112b wifi: cfg80211: regulatory: improve invalid hints checking
* bdb1805c24 Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()
* c5845c73cb Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name()
* f3fcdb2de9 mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr
* bd8dd64611 x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63
* 672bc566cf x86/cpu: Validate CPUID leaf 0x2 EDX output
* db79249be1 x86/cacheinfo: Validate CPUID leaf 0x2 EDX output
* 8d1fcb467e platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e
* c9dbc5c774 drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M
* 3b3c2be58d drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params
* c144d19958 hwmon: (peci/dimmtemp) Do not provide fake thresholds data
* 8e507b3798 ALSA: hda/realtek: update ALC222 depop optimize
* 0b60d5b2f8 ALSA: hda/realtek - add supported Mic Mute LED for Lenovo platform
* 3f63e8fe7b ALSA: hda: intel: Add Dell ALC3271 to power_save denylist
* 5e1b3bf727 ALSA: seq: Avoid module auto-load handling at event delivery
* d99dc8f7ea gpio: aggregator: protect driver attr handlers against module unload
* c10365031f gpio: rcar: Use raw_spinlock to protect register access
* 8994f0ce82 ksmbd: fix bug on trap in smb2_lock
* 8573571060 ksmbd: fix use-after-free in smb2_lock
* c1569dbbe2 ksmbd: fix out-of-bounds in parse_sec_desc()
* 76861630b2 ksmbd: fix type confusion via race condition when using ipc_msg_send_request
* fc69e2c321 HID: appleir: Fix potential NULL dereference at raw event handle
* 8a998a8033 LoongArch: Set max_pfn with the PFN of the last page
* abf16e748a LoongArch: Use polling play_dead() when resuming from hibernation
* 7929d36233 LoongArch: Convert unreachable() to BUG()
* 35415b915a tracing: tprobe-events: Fix a memory leak when tprobe with $retval
* a9704893ee Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"
* 2d62d8f3fc x86/microcode/AMD: Add some forgotten models to the SHA check
* dd8aad26c5 riscv: signal: fix signal_minsigstksz
* 1b0a08a4fd RISC-V: Enable cbo.zero in usermode
* 19c9976b81 riscv: cacheinfo: Use of_property_present() for non-boolean properties
* 80aec5a855 riscv: Prevent a bad reference count on CPU nodes
* ebccacb0b5 riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT
* e1f99e0bae riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init()
* 017df7c714 NFS: O_DIRECT writes must check and adjust the file length
* 6e954923b7 x86/speculation: Add __update_spec_ctrl() helper
* 1748531839 net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC
* f22f7ba83f net: enetc: Replace ifdef with IS_ENABLED
* 54e0f2d2d3 net: enetc: Remove setting of RX software timestamp
* 2a3f4e270d drm/amdgpu: disable BAR resize on Dell G5 SE
* c18438959b drm/amdgpu: Check extended configuration space register when system uses large bar
* 4d2a7df718 ibmvnic: Inspect header requirements before using scrq direct
* 6511585ed6 ibmvnic: Perform tx CSO during send scrq direct
* 2c55d67184 smb: client: fix chmod(2) regression with ATTR_READONLY
* 75cc3357a3 arm64: dts: rockchip: add rs485 support on uart5 of px30-ringneck-haikou
* 9afdcba948 drm/i915/ddi: Fix HDMI port width programming in DDI_BUF_CTL
* dbae718671 drm/i915/xe2lpd: Move D2D enable/disable
* ea3f0b362d efi: Don't map the entire mokvar table to determine its size
* 8f43ba5ee4 x86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range()

Change-Id: I35af7a7b541f920069d66adf939c5e86e0fa43ce
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-04-16 16:25:46 +00:00
committed by Treehugger Robot
652 changed files with 6166 additions and 3486 deletions

View File

@@ -524,6 +524,8 @@ patternProperties:
description: GlobalTop Technology, Inc.
"^gmt,.*":
description: Global Mixed-mode Technology, Inc.
"^gocontroll,.*":
description: GOcontroll Modular Embedded Electronics B.V.
"^goldelico,.*":
description: Golden Delicious Computers GmbH & Co. KG
"^goodix,.*":

View File

@@ -129,11 +129,8 @@ adaptive-tick CPUs: At least one non-adaptive-tick CPU must remain
online to handle timekeeping tasks in order to ensure that system
calls like gettimeofday() returns accurate values on adaptive-tick CPUs.
(This is not an issue for CONFIG_NO_HZ_IDLE=y because there are no running
user processes to observe slight drifts in clock rate.) Therefore, the
boot CPU is prohibited from entering adaptive-ticks mode. Specifying a
"nohz_full=" mask that includes the boot CPU will result in a boot-time
error message, and the boot CPU will be removed from the mask. Note that
this means that your system must have at least two CPUs in order for
user processes to observe slight drifts in clock rate.) Note that this
means that your system must have at least two CPUs in order for
CONFIG_NO_HZ_FULL=y to do anything for you.
Finally, adaptive-ticks CPUs must have their RCU callbacks offloaded.

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 82
SUBLEVEL = 87
EXTRAVERSION =
NAME = Pinguïn Aangedreven
@@ -1087,6 +1087,11 @@ endif
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
# userspace programs are linked via the compiler, use the correct linker
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
KBUILD_USERLDFLAGS += $(call cc-option, --ld-path=$(LD))
endif
# make the checker run with the right architecture
CHECKFLAGS += --arch=$(ARCH)

View File

@@ -60134,10 +60134,10 @@ member {
offset: 448
}
member {
id: 0x66f24875
id: 0x66f2436e
name: "buf_data"
type_id: 0x28eba3b0
offset: 8704
offset: 8640
}
member {
id: 0x07ec5f42
@@ -77161,10 +77161,10 @@ member {
offset: 5696
}
member {
id: 0x314442bf
id: 0x31444ff8
name: "defer_list"
type_id: 0xd3c80119
offset: 11840
offset: 11776
}
member {
id: 0x3192c2ff
@@ -85284,10 +85284,10 @@ member {
offset: 12288
}
member {
id: 0x5272c8bb
id: 0x5272cd8b
name: "dummy_ubuf"
type_id: 0x2abdbda9
offset: 8576
offset: 8512
}
member {
id: 0x0a5f5371
@@ -89909,10 +89909,10 @@ member {
offset: 448
}
member {
id: 0xd2c00490
id: 0xd2c00657
name: "evfd_last_cq_tail"
type_id: 0x4585663f
offset: 12000
offset: 11936
}
member {
id: 0xfeed687e
@@ -90386,10 +90386,10 @@ member {
offset: 576
}
member {
id: 0xcbce18b4
id: 0xcbce1232
name: "exit_work"
type_id: 0x1f3c8679
offset: 10816
offset: 10752
}
member {
id: 0x154265da
@@ -91599,16 +91599,16 @@ member {
offset: 10824
}
member {
id: 0x2bc8f15d
id: 0x2bc8f1fc
name: "fallback_llist"
type_id: 0x0bf3e543
offset: 9664
offset: 9600
}
member {
id: 0xfa3add3c
id: 0xfa3add12
name: "fallback_work"
type_id: 0xf1159c31
offset: 9728
offset: 9664
}
member {
id: 0x5261b953
@@ -93948,10 +93948,10 @@ member {
offset: 1536
}
member {
id: 0xf7f7e8d0
id: 0xf7f7e137
name: "file_data"
type_id: 0x28eba3b0
offset: 8640
offset: 8576
}
member {
id: 0x9c77ac0d
@@ -104979,10 +104979,10 @@ member {
type_id: 0x92233392
}
member {
id: 0xdd1ec315
id: 0xdd1ec3a9
name: "hash_map"
type_id: 0x3e2fe44b
offset: 9472
offset: 9408
}
member {
id: 0xa31adc19
@@ -115173,12 +115173,6 @@ member {
type_id: 0x200a0749
offset: 2112
}
member {
id: 0x738e74f3
name: "io_buf_list"
type_id: 0x5e8dc7f4
offset: 8128
}
member {
id: 0x65b939c8
name: "io_buffers_cache"
@@ -115192,10 +115186,10 @@ member {
offset: 6912
}
member {
id: 0xd2b7f307
id: 0xd2b7fd92
name: "io_buffers_pages"
type_id: 0xd3c80119
offset: 9344
offset: 9280
}
member {
id: 0x9009fe4b
@@ -116089,16 +116083,16 @@ member {
offset: 320
}
member {
id: 0x3dd4834c
id: 0x3dd48a69
name: "iowq_limits"
type_id: 0x5eeb4a25
offset: 11584
offset: 11520
}
member {
id: 0x15478a00
id: 0x154785d1
name: "iowq_limits_set"
type_id: 0x6d7f5ff6
offset: 11648
offset: 11584
}
member {
id: 0xd364d156
@@ -134753,10 +134747,10 @@ member {
offset: 1536
}
member {
id: 0xf2c3c11d
id: 0xf2c3cf33
name: "mm_account"
type_id: 0x1b36c7a2
offset: 9600
offset: 9536
}
member {
id: 0x8a013a8c
@@ -138127,10 +138121,10 @@ member {
offset: 128
}
member {
id: 0xffaa3768
id: 0xffaa3d1f
name: "n_ring_pages"
type_id: 0xc93e017b
offset: 12032
offset: 11968
}
member {
id: 0xeebfc981
@@ -138162,10 +138156,10 @@ member {
offset: 248
}
member {
id: 0x3543bf95
id: 0x3543bcc4
name: "n_sqe_pages"
type_id: 0xc93e017b
offset: 12048
offset: 11984
}
member {
id: 0x998218ab
@@ -158164,16 +158158,16 @@ member {
offset: 33664
}
member {
id: 0xdb88cb35
id: 0xdb88c152
name: "poll_wq"
type_id: 0x76e1f83e
offset: 8192
offset: 8128
}
member {
id: 0xff5479bb
id: 0xff547a0a
name: "poll_wq_task_work"
type_id: 0xe3222f5b
offset: 11712
offset: 11648
}
member {
id: 0xb9f073d3
@@ -169108,10 +169102,10 @@ member {
offset: 1728
}
member {
id: 0x859f0429
id: 0x859f0bea
name: "ref_comp"
type_id: 0x3fcbf304
offset: 11328
offset: 11264
}
member {
id: 0x53e1405b
@@ -174241,10 +174235,10 @@ member {
bitsize: 1
}
member {
id: 0x5c36e0f1
id: 0x5c36ed20
name: "restrictions"
type_id: 0x796260d9
offset: 8384
offset: 8320
}
member {
id: 0x072f3975
@@ -175263,10 +175257,10 @@ member {
type_id: 0xc9082b19
}
member {
id: 0x44db61ec
id: 0x44db6b5b
name: "ring_pages"
type_id: 0x0b30ee00
offset: 12096
offset: 12032
}
member {
id: 0x9481d6fb
@@ -176238,28 +176232,28 @@ member {
offset: 576
}
member {
id: 0xd839b833
id: 0xd839be76
name: "rsrc_node_cache"
type_id: 0xa2b31df2
offset: 8896
offset: 8832
}
member {
id: 0x8a3d008a
id: 0x8a3d02c2
name: "rsrc_quiesce"
type_id: 0x4585663f
offset: 9280
offset: 9216
}
member {
id: 0xea108c15
id: 0xea108544
name: "rsrc_quiesce_wq"
type_id: 0x76e1f83e
offset: 9088
offset: 9024
}
member {
id: 0xd965dd4e
id: 0xd965dfdf
name: "rsrc_ref_list"
type_id: 0xd3c80119
offset: 8768
offset: 8704
}
member {
id: 0xb34e26c9
@@ -189585,10 +189579,10 @@ member {
offset: 832
}
member {
id: 0x1d068d59
id: 0x1d068f7c
name: "sq_thread_idle"
type_id: 0x4585663f
offset: 11968
offset: 11904
}
member {
id: 0xfd9d6eca
@@ -189633,10 +189627,10 @@ member {
offset: 64
}
member {
id: 0xce1781b8
id: 0xce1784eb
name: "sqe_pages"
type_id: 0x0b30ee00
offset: 12160
offset: 12096
}
member {
id: 0xe005dc93
@@ -199057,10 +199051,10 @@ member {
offset: 256
}
member {
id: 0x366057a9
id: 0x3660559d
name: "tctx_list"
type_id: 0xd3c80119
offset: 11200
offset: 11136
}
member {
id: 0xbec15b04
@@ -209923,18 +209917,18 @@ member {
type_id: 0x181ee594
offset: 256
}
member {
id: 0x042a2066
name: "user"
type_id: 0x181ee594
offset: 9472
}
member {
id: 0x042a2210
name: "user"
type_id: 0x181ee594
offset: 1408
}
member {
id: 0x042a2253
name: "user"
type_id: 0x181ee594
offset: 9536
}
member {
id: 0x042a2402
name: "user"
@@ -249736,35 +249730,34 @@ struct_union {
member_id: 0xbf23b534
member_id: 0xfaf212cd
member_id: 0x65b939c8
member_id: 0x738e74f3
member_id: 0xdb88cb35
member_id: 0x5c36e0f1
member_id: 0x5272c8bb
member_id: 0xf7f7e8d0
member_id: 0x66f24875
member_id: 0xd965dd4e
member_id: 0xd839b833
member_id: 0xea108c15
member_id: 0x8a3d008a
member_id: 0xd2b7f307
member_id: 0xdd1ec315
member_id: 0x042a2253
member_id: 0xf2c3c11d
member_id: 0x2bc8f15d
member_id: 0xfa3add3c
member_id: 0xcbce18b4
member_id: 0x366057a9
member_id: 0x859f0429
member_id: 0x3dd4834c
member_id: 0x15478a00
member_id: 0xff5479bb
member_id: 0x314442bf
member_id: 0x1d068d59
member_id: 0xd2c00490
member_id: 0xffaa3768
member_id: 0x3543bf95
member_id: 0x44db61ec
member_id: 0xce1781b8
member_id: 0xdb88c152
member_id: 0x5c36ed20
member_id: 0x5272cd8b
member_id: 0xf7f7e137
member_id: 0x66f2436e
member_id: 0xd965dfdf
member_id: 0xd839be76
member_id: 0xea108544
member_id: 0x8a3d02c2
member_id: 0xd2b7fd92
member_id: 0xdd1ec3a9
member_id: 0x042a2066
member_id: 0xf2c3cf33
member_id: 0x2bc8f1fc
member_id: 0xfa3add12
member_id: 0xcbce1232
member_id: 0x3660559d
member_id: 0x859f0bea
member_id: 0x3dd48a69
member_id: 0x154785d1
member_id: 0xff547a0a
member_id: 0x31444ff8
member_id: 0x1d068f7c
member_id: 0xd2c00657
member_id: 0xffaa3d1f
member_id: 0x3543bcc4
member_id: 0x44db6b5b
member_id: 0xce1784eb
}
}
struct_union {

View File

@@ -121,3 +121,8 @@ type 'struct pkvm_module_ops' changed
member 'u64 android_kabi_reserved5' was removed
member 'union { int(* guest_stage2_pa)(pkvm_handle_t, u64, phys_addr_t*); struct { u64 android_kabi_reserved5; }; union { }; }' was added
type 'struct io_ring_ctx' changed
member 'struct hlist_head io_buf_list' was removed
28 members ('struct wait_queue_head poll_wq' .. 'struct page** sqe_pages') changed
offset changed by -64

View File

@@ -74,7 +74,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
#define elf_check_arch(x) (((x)->e_machine == EM_ALPHA) && !((x)->e_flags & EF_ALPHA_32BIT))
/*
* These are used to set parameters in the core dumps.
@@ -139,10 +139,6 @@ extern int dump_elf_task(elf_greg_t *dest, struct task_struct *task);
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
})
#define SET_PERSONALITY(EX) \
set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
? PER_LINUX_32BIT : PER_LINUX)
extern int alpha_l1i_cacheshape;
extern int alpha_l1d_cacheshape;
extern int alpha_l2_cacheshape;

View File

@@ -360,7 +360,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
extern void paging_init(void);
/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */
/* We have our own get_unmapped_area */
#define HAVE_ARCH_UNMAPPED_AREA
#endif /* _ALPHA_PGTABLE_H */

View File

@@ -8,23 +8,19 @@
#ifndef __ASM_ALPHA_PROCESSOR_H
#define __ASM_ALPHA_PROCESSOR_H
#include <linux/personality.h> /* for ADDR_LIMIT_32BIT */
/*
* We have a 42-bit user address space: 4TB user VM...
*/
#define TASK_SIZE (0x40000000000UL)
#define STACK_TOP \
(current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
#define STACK_TOP (0x00120000000UL)
#define STACK_TOP_MAX 0x00120000000UL
/* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE \
((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
#define TASK_UNMAPPED_BASE (TASK_SIZE / 2)
/* This is dead. Everything has been moved to thread_info. */
struct thread_struct { };

View File

@@ -1211,8 +1211,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
return ret;
}
/* Get an address range which is currently unmapped. Similar to the
generic version except that we know how to honor ADDR_LIMIT_32BIT. */
/* Get an address range which is currently unmapped. */
static unsigned long
arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
@@ -1234,13 +1233,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
unsigned long limit;
/* "32 bit" actually means 31 bit, since pointers sign extend. */
if (current->personality & ADDR_LIMIT_32BIT)
limit = 0x80000000;
else
limit = TASK_SIZE;
unsigned long limit = TASK_SIZE;
if (len > limit)
return -ENOMEM;

View File

@@ -134,7 +134,7 @@
clocks = <&clocks BCM2835_CLOCK_UART>,
<&clocks BCM2835_CLOCK_VPU>;
clock-names = "uartclk", "apb_pclk";
arm,primecell-periphid = <0x00241011>;
arm,primecell-periphid = <0x00341011>;
status = "disabled";
};
@@ -145,7 +145,7 @@
clocks = <&clocks BCM2835_CLOCK_UART>,
<&clocks BCM2835_CLOCK_VPU>;
clock-names = "uartclk", "apb_pclk";
arm,primecell-periphid = <0x00241011>;
arm,primecell-periphid = <0x00341011>;
status = "disabled";
};
@@ -156,7 +156,7 @@
clocks = <&clocks BCM2835_CLOCK_UART>,
<&clocks BCM2835_CLOCK_VPU>;
clock-names = "uartclk", "apb_pclk";
arm,primecell-periphid = <0x00241011>;
arm,primecell-periphid = <0x00341011>;
status = "disabled";
};
@@ -167,7 +167,7 @@
clocks = <&clocks BCM2835_CLOCK_UART>,
<&clocks BCM2835_CLOCK_VPU>;
clock-names = "uartclk", "apb_pclk";
arm,primecell-periphid = <0x00241011>;
arm,primecell-periphid = <0x00341011>;
status = "disabled";
};
@@ -451,8 +451,6 @@
IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
IRQ_TYPE_LEVEL_LOW)>;
/* This only applies to the ARMv7 stub */
arm,cpu-registers-not-fw-configured;
};
cpus: cpus {
@@ -1155,6 +1153,7 @@
};
&uart0 {
arm,primecell-periphid = <0x00341011>;
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
};

View File

@@ -101,6 +101,11 @@
};
};
poweroff {
compatible = "regulator-poweroff";
cpu-supply = <&vgen2_reg>;
};
reg_module_3v3: regulator-module-3v3 {
compatible = "regulator-fixed";
regulator-always-on;
@@ -220,10 +225,6 @@
status = "disabled";
};
&clks {
fsl,pmic-stby-poweroff;
};
/* Apalis SPI1 */
&ecspi1 {
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
@@ -511,7 +512,6 @@
pmic: pmic@8 {
compatible = "fsl,pfuze100";
fsl,pmic-stby-poweroff;
reg = <0x08>;
regulators {

View File

@@ -27,6 +27,7 @@ config ARCH_DAVINCI_DA830
config ARCH_DAVINCI_DA850
bool "DA850/OMAP-L138/AM18x based system"
select ARCH_DAVINCI_DA8XX
select DAVINCI_CP_INTC
config ARCH_DAVINCI_DA8XX

View File

@@ -9,6 +9,7 @@ menuconfig ARCH_OMAP1
select ARCH_OMAP
select CLKSRC_MMIO
select FORCE_PCI if PCCARD
select GENERIC_IRQ_CHIP
select GPIOLIB
help
Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)

View File

@@ -136,6 +136,7 @@ ENDPROC(shmobile_smp_sleep)
.long shmobile_smp_arg - 1b
.bss
.align 2
.globl shmobile_smp_mpidr
shmobile_smp_mpidr:
.space NR_CPUS * 4

View File

@@ -27,6 +27,13 @@
#ifdef CONFIG_MMU
bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
{
unsigned long addr = (unsigned long)unsafe_src;
return addr >= TASK_SIZE && ULONG_MAX - addr >= size;
}
/*
* This is useful to dump out the page tables associated with
* 'addr' in mm 'mm'.
@@ -556,6 +563,7 @@ do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
return;
pr_alert("8<--- cut here ---\n");
pr_alert("Unhandled prefetch abort: %s (0x%03x) at 0x%08lx\n",
inf->name, ifsr, addr);

View File

@@ -16,10 +16,10 @@
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"Headphone Jack", "MICBIAS",
"IN1L", "Headphone Jack";
"Microphone Jack", "MICBIAS",
"IN1L", "Microphone Jack";
simple-audio-card,widgets =
"Microphone", "Headphone Jack",
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack",
"Line", "Line In Jack";

View File

@@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2021-2022 TQ-Systems GmbH
* Author: Alexander Stein <alexander.stein@tq-group.com>
* Copyright 2021-2025 TQ-Systems GmbH <linux@ew.tq-group.com>,
* D-82229 Seefeld, Germany.
* Author: Alexander Stein
*/
#include "imx8mp.dtsi"
@@ -23,15 +24,6 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
/* e-MMC IO, needed for HS modes */
reg_vcc1v8: regulator-vcc1v8 {
compatible = "regulator-fixed";
regulator-name = "VCC1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
};
&A53_0 {
@@ -193,7 +185,7 @@
no-sd;
no-sdio;
vmmc-supply = <&reg_vcc3v3>;
vqmmc-supply = <&reg_vcc1v8>;
vqmmc-supply = <&buck5_reg>;
status = "okay";
};

View File

@@ -16,10 +16,10 @@
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"Headphone Jack", "MICBIAS",
"IN1L", "Headphone Jack";
"Microphone Jack", "MICBIAS",
"IN1L", "Microphone Jack";
simple-audio-card,widgets =
"Microphone", "Headphone Jack",
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack",
"Line", "Line In Jack";

View File

@@ -221,11 +221,14 @@
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer>;
status = "okay";
};
&uart5 {
pinctrl-0 = <&uart5_xfer>;
rts-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
status = "okay";
};

View File

@@ -117,7 +117,7 @@
};
&u2phy1_host {
status = "disabled";
phy-supply = <&vdd_5v>;
};
&uart0 {

View File

@@ -513,7 +513,6 @@
&sdmmc0 {
max-frequency = <150000000>;
supports-sd;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;

View File

@@ -34,8 +34,8 @@ extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t pte, int dirty);
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
extern pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep);
extern pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, unsigned long sz);
#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
extern void huge_ptep_set_wrprotect(struct mm_struct *mm,
unsigned long addr, pte_t *ptep);

View File

@@ -368,6 +368,8 @@ int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs)
return 1;
}
if (!handler)
return 1;
type = handler(addr, instr, regs);
if (type == TYPE_ERROR || type == TYPE_FAULT)

View File

@@ -121,20 +121,11 @@ static int find_num_contig(struct mm_struct *mm, unsigned long addr,
static inline int num_contig_ptes(unsigned long size, size_t *pgsize)
{
int contig_ptes = 0;
int contig_ptes = 1;
*pgsize = size;
switch (size) {
#ifndef __PAGETABLE_PMD_FOLDED
case PUD_SIZE:
if (pud_sect_supported())
contig_ptes = 1;
break;
#endif
case PMD_SIZE:
contig_ptes = 1;
break;
case CONT_PMD_SIZE:
*pgsize = PMD_SIZE;
contig_ptes = CONT_PMDS;
@@ -143,6 +134,8 @@ static inline int num_contig_ptes(unsigned long size, size_t *pgsize)
*pgsize = PAGE_SIZE;
contig_ptes = CONT_PTES;
break;
default:
WARN_ON(!__hugetlb_valid_size(size));
}
return contig_ptes;
@@ -184,24 +177,23 @@ static pte_t get_clear_contig(struct mm_struct *mm,
unsigned long pgsize,
unsigned long ncontig)
{
pte_t orig_pte = __ptep_get(ptep);
unsigned long i;
pte_t pte, tmp_pte;
bool present;
for (i = 0; i < ncontig; i++, addr += pgsize, ptep++) {
pte_t pte = __ptep_get_and_clear(mm, addr, ptep);
/*
* If HW_AFDBM is enabled, then the HW could turn on
* the dirty or accessed bit for any page in the set,
* so check them all.
*/
if (pte_dirty(pte))
orig_pte = pte_mkdirty(orig_pte);
if (pte_young(pte))
orig_pte = pte_mkyoung(orig_pte);
pte = __ptep_get_and_clear(mm, addr, ptep);
present = pte_present(pte);
while (--ncontig) {
ptep++;
addr += pgsize;
tmp_pte = __ptep_get_and_clear(mm, addr, ptep);
if (present) {
if (pte_dirty(tmp_pte))
pte = pte_mkdirty(pte);
if (pte_young(tmp_pte))
pte = pte_mkyoung(pte);
}
}
return orig_pte;
return pte;
}
static pte_t get_clear_contig_flush(struct mm_struct *mm,
@@ -403,18 +395,13 @@ void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
__pte_clear(mm, addr, ptep);
}
pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, unsigned long sz)
{
int ncontig;
size_t pgsize;
pte_t orig_pte = __ptep_get(ptep);
if (!pte_cont(orig_pte))
return __ptep_get_and_clear(mm, addr, ptep);
ncontig = find_num_contig(mm, addr, ptep, &pgsize);
ncontig = num_contig_ptes(sz, &pgsize);
return get_clear_contig(mm, addr, ptep, pgsize, ncontig);
}
@@ -556,6 +543,8 @@ bool __init arch_hugetlb_valid_size(unsigned long size)
pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
{
unsigned long psize = huge_page_size(hstate_vma(vma));
if (IS_ENABLED(CONFIG_ARM64_ERRATUM_2645198) &&
cpus_have_const_cap(ARM64_WORKAROUND_2645198)) {
/*
@@ -566,7 +555,7 @@ pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr
if (pte_user_exec(__ptep_get(ptep)))
return huge_ptep_clear_flush(vma, addr, ptep);
}
return huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
return huge_ptep_get_and_clear(vma->vm_mm, addr, ptep, psize);
}
void huge_ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep,

View File

@@ -1150,8 +1150,11 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
struct vmem_altmap *altmap)
{
WARN_ON((start < VMEMMAP_START) || (end > VMEMMAP_END));
/* [start, end] should be within one section */
WARN_ON_ONCE(end - start > PAGES_PER_SECTION * sizeof(struct page));
if (!IS_ENABLED(CONFIG_ARM64_4K_PAGES))
if (!IS_ENABLED(CONFIG_ARM64_4K_PAGES) ||
(end - start < PAGES_PER_SECTION * sizeof(struct page)))
return vmemmap_populate_basepages(start, end, node, altmap);
else
return vmemmap_populate_hugepages(start, end, node, altmap);

View File

@@ -356,8 +356,8 @@ config CMDLINE_BOOTLOADER
config CMDLINE_EXTEND
bool "Use built-in to extend bootloader kernel arguments"
help
The command-line arguments provided during boot will be
appended to the built-in command line. This is useful in
The built-in command line will be appended to the command-
line arguments provided during boot. This is useful in
cases where the provided arguments are insufficient and
you don't want to or cannot modify them.

View File

@@ -8,6 +8,8 @@
#define L1_CACHE_SHIFT CONFIG_L1_CACHE_SHIFT
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
#define ARCH_DMA_MINALIGN (16)
#define __read_mostly __section(".data..read_mostly")
#endif /* _ASM_CACHE_H */

View File

@@ -41,7 +41,8 @@ static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
unsigned long addr, pte_t *ptep,
unsigned long sz)
{
pte_t clear;
pte_t pte = *ptep;
@@ -56,8 +57,9 @@ static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
pte_t pte;
unsigned long sz = huge_page_size(hstate_vma(vma));
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep, sz);
flush_tlb_page(vma, addr);
return pte;
}

View File

@@ -8,6 +8,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/kdebug.h>
#include <linux/kgdb.h>
#include <linux/objtool.h>
#include <linux/processor.h>
#include <linux/ptrace.h>
#include <linux/sched.h>
@@ -224,13 +225,13 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
regs->csr_era = pc;
}
void arch_kgdb_breakpoint(void)
noinline void arch_kgdb_breakpoint(void)
{
__asm__ __volatile__ ( \
".globl kgdb_breakinst\n\t" \
"nop\n" \
"kgdb_breakinst:\tbreak 2\n\t"); /* BRK_KDB = 2 */
}
STACK_FRAME_NON_STANDARD(arch_kgdb_breakpoint);
/*
* Calls linux_debug_hook before the kernel dies. If KGDB is enabled,

View File

@@ -126,14 +126,14 @@ void kexec_reboot(void)
/* All secondary cpus go to kexec_smp_wait */
if (smp_processor_id() > 0) {
relocated_kexec_smp_wait(NULL);
unreachable();
BUG();
}
#endif
do_kexec = (void *)reboot_code_buffer;
do_kexec(efi_boot, cmdline_ptr, systable_ptr, start_addr, first_ind_entry);
unreachable();
BUG();
}

View File

@@ -400,6 +400,9 @@ static void __init check_kernel_sections_mem(void)
*/
static void __init arch_mem_init(char **cmdline_p)
{
/* Recalculate max_low_pfn for "mem=xxx" */
max_pfn = max_low_pfn = PHYS_PFN(memblock_end_of_DRAM());
if (usermem)
pr_info("User-defined physical RAM map overwrite\n");

View File

@@ -18,6 +18,7 @@
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/export.h>
#include <linux/suspend.h>
#include <linux/syscore_ops.h>
#include <linux/time.h>
#include <linux/tracepoint.h>
@@ -388,7 +389,7 @@ void loongson_cpu_die(unsigned int cpu)
mb();
}
void __noreturn arch_cpu_idle_dead(void)
static void __noreturn idle_play_dead(void)
{
register uint64_t addr;
register void (*init_fn)(void);
@@ -412,6 +413,50 @@ void __noreturn arch_cpu_idle_dead(void)
BUG();
}
#ifdef CONFIG_HIBERNATION
static void __noreturn poll_play_dead(void)
{
register uint64_t addr;
register void (*init_fn)(void);
idle_task_exit();
__this_cpu_write(cpu_state, CPU_DEAD);
__smp_mb();
do {
__asm__ __volatile__("nop\n\t");
addr = iocsr_read64(LOONGARCH_IOCSR_MBUF0);
} while (addr == 0);
init_fn = (void *)TO_CACHE(addr);
iocsr_write32(0xffffffff, LOONGARCH_IOCSR_IPI_CLEAR);
init_fn();
BUG();
}
#endif
static void (*play_dead)(void) = idle_play_dead;
void __noreturn arch_cpu_idle_dead(void)
{
play_dead();
BUG(); /* play_dead() doesn't return */
}
#ifdef CONFIG_HIBERNATION
int hibernate_resume_nonboot_cpu_disable(void)
{
int ret;
play_dead = poll_play_dead;
ret = suspend_disable_secondary_cpus();
play_dead = idle_play_dead;
return ret;
}
#endif
#endif
/*

View File

@@ -142,6 +142,8 @@ static void build_prologue(struct jit_ctx *ctx)
*/
if (seen_tail_call(ctx) && seen_call(ctx))
move_reg(ctx, TCC_SAVED, REG_TCC);
else
emit_insn(ctx, nop);
ctx->stack_size = stack_adjust;
}
@@ -842,7 +844,10 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
move_addr(ctx, t1, func_addr);
emit_insn(ctx, jirl, LOONGARCH_GPR_RA, t1, 0);
move_reg(ctx, regmap[BPF_REG_0], LOONGARCH_GPR_A0);
if (insn->src_reg != BPF_PSEUDO_CALL)
move_reg(ctx, regmap[BPF_REG_0], LOONGARCH_GPR_A0);
break;
/* tail call */
@@ -867,7 +872,10 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
{
const u64 imm64 = (u64)(insn + 1)->imm << 32 | (u32)insn->imm;
move_imm(ctx, dst, imm64, is32);
if (bpf_pseudo_func(insn))
move_addr(ctx, dst, imm64);
else
move_imm(ctx, dst, imm64, is32);
return 1;
}

View File

@@ -27,6 +27,11 @@ struct jit_data {
struct jit_ctx ctx;
};
static inline void emit_nop(union loongarch_instruction *insn)
{
insn->word = INSN_NOP;
}
#define emit_insn(ctx, func, ...) \
do { \
if (ctx->image != NULL) { \

View File

@@ -32,7 +32,8 @@ static inline int prepare_hugepage_range(struct file *file,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
unsigned long addr, pte_t *ptep,
unsigned long sz)
{
pte_t clear;
pte_t pte = *ptep;
@@ -47,13 +48,14 @@ static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
pte_t pte;
unsigned long sz = huge_page_size(hstate_vma(vma));
/*
* clear the huge pte entry firstly, so that the other smp threads will
* not get old pte entry after finishing flush_tlb_page and before
* setting new huge pte entry
*/
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep, sz);
flush_tlb_page(vma, addr);
return pte;
}

View File

@@ -10,7 +10,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep);
pte_t *ptep, unsigned long sz);
/*
* If the arch doesn't supply something else, assume that hugepage

View File

@@ -147,7 +147,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep)
pte_t *ptep, unsigned long sz)
{
pte_t entry;

View File

@@ -78,4 +78,4 @@ CONFIG_DEBUG_VM_PGTABLE=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_BDI_SWITCH=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_GENERIC_PTDUMP=y
CONFIG_PTDUMP_DEBUGFS=y

View File

@@ -46,7 +46,8 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
unsigned long addr, pte_t *ptep,
unsigned long sz)
{
return __pte(pte_update(mm, addr, ptep, ~0UL, 0, 1));
}
@@ -56,8 +57,9 @@ static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
pte_t pte;
unsigned long sz = huge_page_size(hstate_vma(vma));
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep, sz);
flush_hugetlb_page(vma, addr);
return pte;
}

View File

@@ -242,7 +242,7 @@ static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe)
return tlbe->mas7_3 & (MAS3_SW|MAS3_UW);
}
static inline bool kvmppc_e500_ref_setup(struct tlbe_ref *ref,
static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref,
struct kvm_book3e_206_tlb_entry *gtlbe,
kvm_pfn_t pfn, unsigned int wimg)
{
@@ -252,7 +252,11 @@ static inline bool kvmppc_e500_ref_setup(struct tlbe_ref *ref,
/* Use guest supplied MAS2_G and MAS2_E */
ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg;
return tlbe_is_writable(gtlbe);
/* Mark the page accessed */
kvm_set_pfn_accessed(pfn);
if (tlbe_is_writable(gtlbe))
kvm_set_pfn_dirty(pfn);
}
static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
@@ -322,7 +326,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
{
struct kvm_memory_slot *slot;
unsigned long pfn = 0; /* silence GCC warning */
struct page *page = NULL;
unsigned long hva;
int pfnmap = 0;
int tsize = BOOK3E_PAGESZ_4K;
@@ -334,7 +337,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
unsigned int wimg = 0;
pgd_t *pgdir;
unsigned long flags;
bool writable = false;
/* used to check for invalidations in progress */
mmu_seq = kvm->mmu_invalidate_seq;
@@ -444,7 +446,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
if (likely(!pfnmap)) {
tsize_pages = 1UL << (tsize + 10 - PAGE_SHIFT);
pfn = __kvm_faultin_pfn(slot, gfn, FOLL_WRITE, NULL, &page);
pfn = gfn_to_pfn_memslot(slot, gfn);
if (is_error_noslot_pfn(pfn)) {
if (printk_ratelimit())
pr_err("%s: real page not found for gfn %lx\n",
@@ -479,6 +481,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
if (pte_present(pte)) {
wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) &
MAS2_WIMGE_MASK;
local_irq_restore(flags);
} else {
local_irq_restore(flags);
pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n",
@@ -487,9 +490,8 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
goto out;
}
}
local_irq_restore(flags);
kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize,
ref, gvaddr, stlbe);
@@ -497,8 +499,11 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
kvmppc_mmu_flush_icache(pfn);
out:
kvm_release_faultin_page(kvm, page, !!ret, writable);
spin_unlock(&kvm->mmu_lock);
/* Drop refcount on page, so that mmu notifiers can clear it */
kvm_release_pfn_clean(pfn);
return ret;
}

View File

@@ -25,6 +25,7 @@ struct spu_gang *alloc_spu_gang(void)
mutex_init(&gang->aff_mutex);
INIT_LIST_HEAD(&gang->list);
INIT_LIST_HEAD(&gang->aff_list_head);
gang->alive = 1;
out:
return gang;

View File

@@ -191,13 +191,32 @@ static int spufs_fill_dir(struct dentry *dir,
return -ENOMEM;
ret = spufs_new_file(dir->d_sb, dentry, files->ops,
files->mode & mode, files->size, ctx);
if (ret)
if (ret) {
dput(dentry);
return ret;
}
files++;
}
return 0;
}
static void unuse_gang(struct dentry *dir)
{
struct inode *inode = dir->d_inode;
struct spu_gang *gang = SPUFS_I(inode)->i_gang;
if (gang) {
bool dead;
inode_lock(inode); // exclusion with spufs_create_context()
dead = !--gang->alive;
inode_unlock(inode);
if (dead)
simple_recursive_removal(dir, NULL);
}
}
static int spufs_dir_close(struct inode *inode, struct file *file)
{
struct inode *parent;
@@ -212,6 +231,7 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
inode_unlock(parent);
WARN_ON(ret);
unuse_gang(dir->d_parent);
return dcache_dir_close(inode, file);
}
@@ -404,7 +424,7 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
{
int ret;
int affinity;
struct spu_gang *gang;
struct spu_gang *gang = SPUFS_I(inode)->i_gang;
struct spu_context *neighbor;
struct path path = {.mnt = mnt, .dentry = dentry};
@@ -419,11 +439,15 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
return -ENODEV;
gang = NULL;
if (gang) {
if (!gang->alive)
return -ENOENT;
gang->alive++;
}
neighbor = NULL;
affinity = flags & (SPU_CREATE_AFFINITY_MEM | SPU_CREATE_AFFINITY_SPU);
if (affinity) {
gang = SPUFS_I(inode)->i_gang;
if (!gang)
return -EINVAL;
mutex_lock(&gang->aff_mutex);
@@ -435,8 +459,11 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
}
ret = spufs_mkdir(inode, dentry, flags, mode & 0777);
if (ret)
if (ret) {
if (neighbor)
put_spu_context(neighbor);
goto out_aff_unlock;
}
if (affinity) {
spufs_set_affinity(flags, SPUFS_I(d_inode(dentry))->i_ctx,
@@ -452,6 +479,8 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
out_aff_unlock:
if (affinity)
mutex_unlock(&gang->aff_mutex);
if (ret && gang)
gang->alive--; // can't reach 0
return ret;
}
@@ -481,6 +510,7 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode)
inode->i_fop = &simple_dir_operations;
d_instantiate(dentry, inode);
dget(dentry);
inc_nlink(dir);
inc_nlink(d_inode(dentry));
return ret;
@@ -491,6 +521,21 @@ out:
return ret;
}
static int spufs_gang_close(struct inode *inode, struct file *file)
{
unuse_gang(file->f_path.dentry);
return dcache_dir_close(inode, file);
}
static const struct file_operations spufs_gang_fops = {
.open = dcache_dir_open,
.release = spufs_gang_close,
.llseek = dcache_dir_lseek,
.read = generic_read_dir,
.iterate_shared = dcache_readdir,
.fsync = noop_fsync,
};
static int spufs_gang_open(const struct path *path)
{
int ret;
@@ -510,7 +555,7 @@ static int spufs_gang_open(const struct path *path)
return PTR_ERR(filp);
}
filp->f_op = &simple_dir_operations;
filp->f_op = &spufs_gang_fops;
fd_install(ret, filp);
return ret;
}
@@ -525,10 +570,8 @@ static int spufs_create_gang(struct inode *inode,
ret = spufs_mkgang(inode, dentry, mode & 0777);
if (!ret) {
ret = spufs_gang_open(&path);
if (ret < 0) {
int err = simple_rmdir(inode, dentry);
WARN_ON(err);
}
if (ret < 0)
unuse_gang(dentry);
}
return ret;
}

View File

@@ -151,6 +151,8 @@ struct spu_gang {
int aff_flags;
struct spu *aff_ref_spu;
atomic_t aff_sched_count;
int alive;
};
/* Flag bits for spu_gang aff_flags */

View File

@@ -89,7 +89,7 @@
#define GPOUT_SYS_SDIO1_DATA1 59
#define GPOUT_SYS_SDIO1_DATA2 60
#define GPOUT_SYS_SDIO1_DATA3 61
#define GPOUT_SYS_SDIO1_DATA4 63
#define GPOUT_SYS_SDIO1_DATA4 62
#define GPOUT_SYS_SDIO1_DATA5 63
#define GPOUT_SYS_SDIO1_DATA6 64
#define GPOUT_SYS_SDIO1_DATA7 65

View File

@@ -1,5 +1,9 @@
ifdef CONFIG_RELOCATABLE
KBUILD_CFLAGS += -fno-pie
# We can't use PIC/PIE when handling early-boot errata parsing, as the kernel
# doesn't have a GOT setup at that point. So instead just use medany: it's
# usually position-independent, so it should be good enough for the errata
# handling.
KBUILD_CFLAGS += -fno-pie -mcmodel=medany
endif
obj-$(CONFIG_ERRATA_ANDES) += andes/

View File

@@ -31,5 +31,6 @@ DECLARE_PER_CPU(long, misaligned_access_speed);
extern struct riscv_isainfo hart_isa[NR_CPUS];
void check_unaligned_access(int cpu);
void riscv_user_isa_enable(void);
#endif

View File

@@ -275,6 +275,7 @@
#define CSR_SIE 0x104
#define CSR_STVEC 0x105
#define CSR_SCOUNTEREN 0x106
#define CSR_SENVCFG 0x10a
#define CSR_SSCRATCH 0x140
#define CSR_SEPC 0x141
#define CSR_SCAUSE 0x142
@@ -397,6 +398,7 @@
# define CSR_STATUS CSR_MSTATUS
# define CSR_IE CSR_MIE
# define CSR_TVEC CSR_MTVEC
# define CSR_ENVCFG CSR_MENVCFG
# define CSR_SCRATCH CSR_MSCRATCH
# define CSR_EPC CSR_MEPC
# define CSR_CAUSE CSR_MCAUSE
@@ -421,6 +423,7 @@
# define CSR_STATUS CSR_SSTATUS
# define CSR_IE CSR_SIE
# define CSR_TVEC CSR_STVEC
# define CSR_ENVCFG CSR_SENVCFG
# define CSR_SCRATCH CSR_SSCRATCH
# define CSR_EPC CSR_SEPC
# define CSR_CAUSE CSR_SCAUSE

View File

@@ -103,7 +103,7 @@ struct dyn_arch_ftrace {
#define make_call_t0(caller, callee, call) \
do { \
unsigned int offset = \
(unsigned long) callee - (unsigned long) caller; \
(unsigned long) (callee) - (unsigned long) (caller); \
call[0] = to_auipc_t0(offset); \
call[1] = to_jalr_t0(offset); \
} while (0)
@@ -119,7 +119,7 @@ do { \
#define make_call_ra(caller, callee, call) \
do { \
unsigned int offset = \
(unsigned long) callee - (unsigned long) caller; \
(unsigned long) (callee) - (unsigned long) (caller); \
call[0] = to_auipc_ra(offset); \
call[1] = to_jalr_ra(offset); \
} while (0)

View File

@@ -28,7 +28,8 @@ void set_huge_pte_at(struct mm_struct *mm,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep);
unsigned long addr, pte_t *ptep,
unsigned long sz);
#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,

View File

@@ -94,6 +94,7 @@
#ifndef __ASSEMBLY__
#include <linux/jump_label.h>
#include <asm/cpufeature.h>
unsigned long riscv_get_elf_hwcap(void);
@@ -163,6 +164,21 @@ l_yes:
return true;
}
static __always_inline bool riscv_cpu_has_extension_likely(int cpu, const unsigned long ext)
{
if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE) && riscv_has_extension_likely(ext))
return true;
return __riscv_isa_extension_available(hart_isa[cpu].isa, ext);
}
static __always_inline bool riscv_cpu_has_extension_unlikely(int cpu, const unsigned long ext)
{
if (IS_ENABLED(CONFIG_RISCV_ALTERNATIVE) && riscv_has_extension_unlikely(ext))
return true;
return __riscv_isa_extension_available(hart_isa[cpu].isa, ext);
}
#endif
#endif /* _ASM_RISCV_HWCAP_H */

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2017 SiFive
*/
#include <linux/acpi.h>
#include <linux/cpu.h>
#include <linux/of.h>
#include <asm/cacheinfo.h>
@@ -64,7 +65,6 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type)
}
static void ci_leaf_init(struct cacheinfo *this_leaf,
struct device_node *node,
enum cache_type type, unsigned int level)
{
this_leaf->level = level;
@@ -75,16 +75,40 @@ int populate_cache_leaves(unsigned int cpu)
{
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
struct cacheinfo *this_leaf = this_cpu_ci->info_list;
struct device_node *np = of_cpu_device_node_get(cpu);
struct device_node *prev = NULL;
struct device_node *np, *prev;
int levels = 1, level = 1;
if (of_property_read_bool(np, "cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
if (of_property_read_bool(np, "i-cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level);
if (of_property_read_bool(np, "d-cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level);
if (!acpi_disabled) {
int ret, fw_levels, split_levels;
ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels);
if (ret)
return ret;
BUG_ON((split_levels > fw_levels) ||
(split_levels + fw_levels > this_cpu_ci->num_leaves));
for (; level <= this_cpu_ci->num_levels; level++) {
if (level <= split_levels) {
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
} else {
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
}
}
return 0;
}
np = of_cpu_device_node_get(cpu);
if (!np)
return -ENOENT;
if (of_property_present(np, "cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
if (of_property_present(np, "i-cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
if (of_property_present(np, "d-cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
prev = np;
while ((np = of_find_next_cache_node(np))) {
@@ -96,12 +120,12 @@ int populate_cache_leaves(unsigned int cpu)
break;
if (level <= levels)
break;
if (of_property_read_bool(np, "cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level);
if (of_property_read_bool(np, "i-cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level);
if (of_property_read_bool(np, "d-cache-size"))
ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level);
if (of_property_present(np, "cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level);
if (of_property_present(np, "i-cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
if (of_property_present(np, "d-cache-size"))
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
levels = level;
}
of_node_put(np);

View File

@@ -815,6 +815,12 @@ static int check_unaligned_access_boot_cpu(void)
arch_initcall(check_unaligned_access_boot_cpu);
void riscv_user_isa_enable(void)
{
if (riscv_cpu_has_extension_unlikely(smp_processor_id(), RISCV_ISA_EXT_ZICBOZ))
csr_set(CSR_ENVCFG, ENVCFG_CBZE);
}
#ifdef CONFIG_RISCV_ALTERNATIVE
/*
* Alternative patch sites consider 48 bits when determining when to patch

View File

@@ -26,6 +26,7 @@
#include <asm/acpi.h>
#include <asm/alternative.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
#include <asm/cpu_ops.h>
#include <asm/early_ioremap.h>
#include <asm/pgtable.h>
@@ -305,12 +306,15 @@ void __init setup_arch(char **cmdline_p)
riscv_init_cbo_blocksizes();
riscv_fill_hwcap();
init_rt_signal_env();
apply_boot_alternatives();
init_rt_signal_env();
if (IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM) &&
riscv_isa_extension_available(NULL, ZICBOM))
riscv_noncoherent_supported();
riscv_set_dma_cache_alignment();
riscv_user_isa_enable();
}
static int __init topology_init(void)

View File

@@ -25,6 +25,8 @@
#include <linux/of.h>
#include <linux/sched/task_stack.h>
#include <linux/sched/mm.h>
#include <asm/cpufeature.h>
#include <asm/cpu_ops.h>
#include <asm/cpufeature.h>
#include <asm/irq.h>
@@ -253,6 +255,8 @@ asmlinkage __visible void smp_callin(void)
elf_hwcap &= ~COMPAT_HWCAP_ISA_V;
}
riscv_user_isa_enable();
/*
* Remote TLB flushes are ignored while the CPU is offline, so emit
* a local TLB flush right now just in case.

View File

@@ -468,6 +468,7 @@ int kvm_riscv_vcpu_pmu_ctr_cfg_match(struct kvm_vcpu *vcpu, unsigned long ctr_ba
.type = etype,
.size = sizeof(struct perf_event_attr),
.pinned = true,
.disabled = true,
/*
* It should never reach here if the platform doesn't support the sscofpmf
* extension as mode filtering won't work without it.

View File

@@ -148,22 +148,25 @@ unsigned long hugetlb_mask_last_page(struct hstate *h)
static pte_t get_clear_contig(struct mm_struct *mm,
unsigned long addr,
pte_t *ptep,
unsigned long pte_num)
unsigned long ncontig)
{
pte_t orig_pte = ptep_get(ptep);
unsigned long i;
pte_t pte, tmp_pte;
bool present;
for (i = 0; i < pte_num; i++, addr += PAGE_SIZE, ptep++) {
pte_t pte = ptep_get_and_clear(mm, addr, ptep);
if (pte_dirty(pte))
orig_pte = pte_mkdirty(orig_pte);
if (pte_young(pte))
orig_pte = pte_mkyoung(orig_pte);
pte = ptep_get_and_clear(mm, addr, ptep);
present = pte_present(pte);
while (--ncontig) {
ptep++;
addr += PAGE_SIZE;
tmp_pte = ptep_get_and_clear(mm, addr, ptep);
if (present) {
if (pte_dirty(tmp_pte))
pte = pte_mkdirty(pte);
if (pte_young(tmp_pte))
pte = pte_mkyoung(pte);
}
}
return orig_pte;
return pte;
}
static pte_t get_clear_contig_flush(struct mm_struct *mm,
@@ -212,6 +215,26 @@ static void clear_flush(struct mm_struct *mm,
flush_tlb_range(&vma, saddr, addr);
}
static int num_contig_ptes_from_size(unsigned long sz, size_t *pgsize)
{
unsigned long hugepage_shift;
if (sz >= PGDIR_SIZE)
hugepage_shift = PGDIR_SHIFT;
else if (sz >= P4D_SIZE)
hugepage_shift = P4D_SHIFT;
else if (sz >= PUD_SIZE)
hugepage_shift = PUD_SHIFT;
else if (sz >= PMD_SIZE)
hugepage_shift = PMD_SHIFT;
else
hugepage_shift = PAGE_SHIFT;
*pgsize = 1 << hugepage_shift;
return sz >> hugepage_shift;
}
/*
* When dealing with NAPOT mappings, the privileged specification indicates that
* "if an update needs to be made, the OS generally should first mark all of the
@@ -226,22 +249,10 @@ void set_huge_pte_at(struct mm_struct *mm,
pte_t pte,
unsigned long sz)
{
unsigned long hugepage_shift, pgsize;
size_t pgsize;
int i, pte_num;
if (sz >= PGDIR_SIZE)
hugepage_shift = PGDIR_SHIFT;
else if (sz >= P4D_SIZE)
hugepage_shift = P4D_SHIFT;
else if (sz >= PUD_SIZE)
hugepage_shift = PUD_SHIFT;
else if (sz >= PMD_SIZE)
hugepage_shift = PMD_SHIFT;
else
hugepage_shift = PAGE_SHIFT;
pte_num = sz >> hugepage_shift;
pgsize = 1 << hugepage_shift;
pte_num = num_contig_ptes_from_size(sz, &pgsize);
if (!pte_present(pte)) {
for (i = 0; i < pte_num; i++, ptep++, addr += pgsize)
@@ -293,15 +304,16 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr,
pte_t *ptep)
pte_t *ptep, unsigned long sz)
{
size_t pgsize;
pte_t orig_pte = ptep_get(ptep);
int pte_num;
if (!pte_napot(orig_pte))
return ptep_get_and_clear(mm, addr, ptep);
pte_num = napot_pte_num(napot_cont_order(orig_pte));
pte_num = num_contig_ptes_from_size(sz, &pgsize);
return get_clear_contig(mm, addr, ptep, pte_num);
}
@@ -351,6 +363,7 @@ void huge_pte_clear(struct mm_struct *mm,
pte_t *ptep,
unsigned long sz)
{
size_t pgsize;
pte_t pte = ptep_get(ptep);
int i, pte_num;
@@ -359,8 +372,9 @@ void huge_pte_clear(struct mm_struct *mm,
return;
}
pte_num = napot_pte_num(napot_cont_order(pte));
for (i = 0; i < pte_num; i++, addr += PAGE_SIZE, ptep++)
pte_num = num_contig_ptes_from_size(sz, &pgsize);
for (i = 0; i < pte_num; i++, addr += pgsize, ptep++)
pte_clear(mm, addr, ptep);
}

View File

@@ -20,8 +20,15 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte);
pte_t huge_ptep_get(pte_t *ptep);
pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep);
pte_t __huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep);
static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep,
unsigned long sz)
{
return __huge_ptep_get_and_clear(mm, addr, ptep);
}
/*
* If the arch doesn't supply something else, assume that hugepage
@@ -57,7 +64,7 @@ static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long address, pte_t *ptep)
{
return huge_ptep_get_and_clear(vma->vm_mm, address, ptep);
return __huge_ptep_get_and_clear(vma->vm_mm, address, ptep);
}
static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
@@ -66,7 +73,7 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
{
int changed = !pte_same(huge_ptep_get(ptep), pte);
if (changed) {
huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
__huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
__set_huge_pte_at(vma->vm_mm, addr, ptep, pte);
}
return changed;
@@ -75,7 +82,7 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
{
pte_t pte = huge_ptep_get_and_clear(mm, addr, ptep);
pte_t pte = __huge_ptep_get_and_clear(mm, addr, ptep);
__set_huge_pte_at(mm, addr, ptep, pte_wrprotect(pte));
}

View File

@@ -276,10 +276,10 @@ static void __init test_monitor_call(void)
return;
asm volatile(
" mc 0,0\n"
"0: xgr %0,%0\n"
"0: lhi %[val],0\n"
"1:\n"
EX_TABLE(0b,1b)
: "+d" (val));
EX_TABLE(0b, 1b)
: [val] "+d" (val));
if (!val)
panic("Monitor call doesn't work!\n");
}

View File

@@ -174,8 +174,8 @@ pte_t huge_ptep_get(pte_t *ptep)
return __rste_to_pte(pte_val(*ptep));
}
pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
pte_t __huge_ptep_get_and_clear(struct mm_struct *mm,
unsigned long addr, pte_t *ptep)
{
pte_t pte = huge_ptep_get(ptep);
pmd_t *pmdp = (pmd_t *) ptep;

View File

@@ -20,7 +20,7 @@ void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep);
pte_t *ptep, unsigned long sz);
#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,

View File

@@ -371,7 +371,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
}
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep)
pte_t *ptep, unsigned long sz)
{
unsigned int i, nptes, orig_shift, shift;
unsigned long size;

View File

@@ -211,7 +211,6 @@ extern int os_protect_memory(void *addr, unsigned long len,
extern int os_unmap_memory(void *addr, int len);
extern int os_drop_memory(void *addr, int length);
extern int can_drop_memory(void);
extern int os_mincore(void *addr, unsigned long len);
/* execvp.c */
extern int execvp_noalloc(char *buf, const char *file, char *const argv[]);

View File

@@ -17,7 +17,7 @@ extra-y := vmlinux.lds
obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
physmem.o process.o ptrace.o reboot.o sigio.o \
signal.o sysrq.o time.o tlb.o trap.o \
um_arch.o umid.o maccess.o kmsg_dump.o capflags.o skas/
um_arch.o umid.o kmsg_dump.o capflags.o skas/
obj-y += load_file.o
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o

View File

@@ -1,19 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 Richard Weinberger <richrd@nod.at>
*/
#include <linux/uaccess.h>
#include <linux/kernel.h>
#include <os.h>
bool copy_from_kernel_nofault_allowed(const void *src, size_t size)
{
void *psrc = (void *)rounddown((unsigned long)src, PAGE_SIZE);
if ((unsigned long)src < PAGE_SIZE || size <= 0)
return false;
if (os_mincore(psrc, size + src - psrc) <= 0)
return false;
return true;
}

View File

@@ -223,57 +223,6 @@ out:
return ok;
}
static int os_page_mincore(void *addr)
{
char vec[2];
int ret;
ret = mincore(addr, UM_KERN_PAGE_SIZE, vec);
if (ret < 0) {
if (errno == ENOMEM || errno == EINVAL)
return 0;
else
return -errno;
}
return vec[0] & 1;
}
int os_mincore(void *addr, unsigned long len)
{
char *vec;
int ret, i;
if (len <= UM_KERN_PAGE_SIZE)
return os_page_mincore(addr);
vec = calloc(1, (len + UM_KERN_PAGE_SIZE - 1) / UM_KERN_PAGE_SIZE);
if (!vec)
return -ENOMEM;
ret = mincore(addr, UM_KERN_PAGE_SIZE, vec);
if (ret < 0) {
if (errno == ENOMEM || errno == EINVAL)
ret = 0;
else
ret = -errno;
goto out;
}
for (i = 0; i < ((len + UM_KERN_PAGE_SIZE - 1) / UM_KERN_PAGE_SIZE); i++) {
if (!(vec[i] & 1)) {
ret = 0;
goto out;
}
}
ret = 1;
out:
free(vec);
return ret;
}
void init_new_thread_signals(void)
{
set_handler(SIGSEGV);

View File

@@ -215,7 +215,7 @@ config X86
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if X86_64
select HAVE_EBPF_JIT
select HAVE_EFFICIENT_UNALIGNED_ACCESS
select HAVE_EISA
select HAVE_EISA if X86_32
select HAVE_EXIT_THREAD
select HAVE_FAST_GUP
select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE

View File

@@ -30,13 +30,13 @@ __efi_get_rsdp_addr(unsigned long cfg_tbl_pa, unsigned int cfg_tbl_len)
* Search EFI system tables for RSDP. Preferred is ACPI_20_TABLE_GUID to
* ACPI_TABLE_GUID because it has more features.
*/
rsdp_addr = efi_find_vendor_table(boot_params, cfg_tbl_pa, cfg_tbl_len,
rsdp_addr = efi_find_vendor_table(boot_params_ptr, cfg_tbl_pa, cfg_tbl_len,
ACPI_20_TABLE_GUID);
if (rsdp_addr)
return (acpi_physical_address)rsdp_addr;
/* No ACPI_20_TABLE_GUID found, fallback to ACPI_TABLE_GUID. */
rsdp_addr = efi_find_vendor_table(boot_params, cfg_tbl_pa, cfg_tbl_len,
rsdp_addr = efi_find_vendor_table(boot_params_ptr, cfg_tbl_pa, cfg_tbl_len,
ACPI_TABLE_GUID);
if (rsdp_addr)
return (acpi_physical_address)rsdp_addr;
@@ -56,15 +56,15 @@ static acpi_physical_address efi_get_rsdp_addr(void)
enum efi_type et;
int ret;
et = efi_get_type(boot_params);
et = efi_get_type(boot_params_ptr);
if (et == EFI_TYPE_NONE)
return 0;
systab_pa = efi_get_system_table(boot_params);
systab_pa = efi_get_system_table(boot_params_ptr);
if (!systab_pa)
error("EFI support advertised, but unable to locate system table.");
ret = efi_get_conf_table(boot_params, &cfg_tbl_pa, &cfg_tbl_len);
ret = efi_get_conf_table(boot_params_ptr, &cfg_tbl_pa, &cfg_tbl_len);
if (ret || !cfg_tbl_pa)
error("EFI config table not found.");
@@ -156,7 +156,7 @@ acpi_physical_address get_rsdp_addr(void)
{
acpi_physical_address pa;
pa = boot_params->acpi_rsdp_addr;
pa = boot_params_ptr->acpi_rsdp_addr;
if (!pa)
pa = efi_get_rsdp_addr();
@@ -210,7 +210,7 @@ static unsigned long get_acpi_srat_table(void)
rsdp = (struct acpi_table_rsdp *)get_cmdline_acpi_rsdp();
if (!rsdp)
rsdp = (struct acpi_table_rsdp *)(long)
boot_params->acpi_rsdp_addr;
boot_params_ptr->acpi_rsdp_addr;
if (!rsdp)
return 0;

View File

@@ -14,9 +14,9 @@ static inline char rdfs8(addr_t addr)
#include "../cmdline.c"
unsigned long get_cmd_line_ptr(void)
{
unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr;
unsigned long cmd_line_ptr = boot_params_ptr->hdr.cmd_line_ptr;
cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32;
cmd_line_ptr |= (u64)boot_params_ptr->ext_cmd_line_ptr << 32;
return cmd_line_ptr;
}

View File

@@ -159,8 +159,9 @@ void initialize_identity_maps(void *rmode)
* or does not touch all the pages covering them.
*/
kernel_add_identity_map((unsigned long)_head, (unsigned long)_end);
boot_params = rmode;
kernel_add_identity_map((unsigned long)boot_params, (unsigned long)(boot_params + 1));
boot_params_ptr = rmode;
kernel_add_identity_map((unsigned long)boot_params_ptr,
(unsigned long)(boot_params_ptr + 1));
cmdline = get_cmd_line_ptr();
kernel_add_identity_map(cmdline, cmdline + COMMAND_LINE_SIZE);
@@ -168,7 +169,7 @@ void initialize_identity_maps(void *rmode)
* Also map the setup_data entries passed via boot_params in case they
* need to be accessed by uncompressed kernel via the identity mapping.
*/
sd = (struct setup_data *)boot_params->hdr.setup_data;
sd = (struct setup_data *)boot_params_ptr->hdr.setup_data;
while (sd) {
unsigned long sd_addr = (unsigned long)sd;

View File

@@ -63,7 +63,7 @@ static unsigned long get_boot_seed(void)
unsigned long hash = 0;
hash = rotate_xor(hash, build_str, sizeof(build_str));
hash = rotate_xor(hash, boot_params, sizeof(*boot_params));
hash = rotate_xor(hash, boot_params_ptr, sizeof(*boot_params_ptr));
return hash;
}
@@ -383,7 +383,7 @@ static void handle_mem_options(void)
static void mem_avoid_init(unsigned long input, unsigned long input_size,
unsigned long output)
{
unsigned long init_size = boot_params->hdr.init_size;
unsigned long init_size = boot_params_ptr->hdr.init_size;
u64 initrd_start, initrd_size;
unsigned long cmd_line, cmd_line_size;
@@ -395,10 +395,10 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
mem_avoid[MEM_AVOID_ZO_RANGE].size = (output + init_size) - input;
/* Avoid initrd. */
initrd_start = (u64)boot_params->ext_ramdisk_image << 32;
initrd_start |= boot_params->hdr.ramdisk_image;
initrd_size = (u64)boot_params->ext_ramdisk_size << 32;
initrd_size |= boot_params->hdr.ramdisk_size;
initrd_start = (u64)boot_params_ptr->ext_ramdisk_image << 32;
initrd_start |= boot_params_ptr->hdr.ramdisk_image;
initrd_size = (u64)boot_params_ptr->ext_ramdisk_size << 32;
initrd_size |= boot_params_ptr->hdr.ramdisk_size;
mem_avoid[MEM_AVOID_INITRD].start = initrd_start;
mem_avoid[MEM_AVOID_INITRD].size = initrd_size;
/* No need to set mapping for initrd, it will be handled in VO. */
@@ -413,8 +413,8 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
}
/* Avoid boot parameters. */
mem_avoid[MEM_AVOID_BOOTPARAMS].start = (unsigned long)boot_params;
mem_avoid[MEM_AVOID_BOOTPARAMS].size = sizeof(*boot_params);
mem_avoid[MEM_AVOID_BOOTPARAMS].start = (unsigned long)boot_params_ptr;
mem_avoid[MEM_AVOID_BOOTPARAMS].size = sizeof(*boot_params_ptr);
/* We don't need to set a mapping for setup_data. */
@@ -447,7 +447,7 @@ static bool mem_avoid_overlap(struct mem_vector *img,
}
/* Avoid all entries in the setup_data linked list. */
ptr = (struct setup_data *)(unsigned long)boot_params->hdr.setup_data;
ptr = (struct setup_data *)(unsigned long)boot_params_ptr->hdr.setup_data;
while (ptr) {
struct mem_vector avoid;
@@ -706,7 +706,7 @@ static inline bool memory_type_is_free(efi_memory_desc_t *md)
static bool
process_efi_entries(unsigned long minimum, unsigned long image_size)
{
struct efi_info *e = &boot_params->efi_info;
struct efi_info *e = &boot_params_ptr->efi_info;
bool efi_mirror_found = false;
struct mem_vector region;
efi_memory_desc_t *md;
@@ -777,8 +777,8 @@ static void process_e820_entries(unsigned long minimum,
struct boot_e820_entry *entry;
/* Verify potential e820 positions, appending to slots list. */
for (i = 0; i < boot_params->e820_entries; i++) {
entry = &boot_params->e820_table[i];
for (i = 0; i < boot_params_ptr->e820_entries; i++) {
entry = &boot_params_ptr->e820_table[i];
/* Skip non-RAM entries. */
if (entry->type != E820_TYPE_RAM)
continue;
@@ -852,7 +852,7 @@ void choose_random_location(unsigned long input,
return;
}
boot_params->hdr.loadflags |= KASLR_FLAG;
boot_params_ptr->hdr.loadflags |= KASLR_FLAG;
if (IS_ENABLED(CONFIG_X86_32))
mem_limit = KERNEL_IMAGE_SIZE;

View File

@@ -54,17 +54,17 @@ bool init_unaccepted_memory(void)
enum efi_type et;
int ret;
et = efi_get_type(boot_params);
et = efi_get_type(boot_params_ptr);
if (et == EFI_TYPE_NONE)
return false;
ret = efi_get_conf_table(boot_params, &cfg_table_pa, &cfg_table_len);
ret = efi_get_conf_table(boot_params_ptr, &cfg_table_pa, &cfg_table_len);
if (ret) {
warn("EFI config table not found.");
return false;
}
table = (void *)efi_find_vendor_table(boot_params, cfg_table_pa,
table = (void *)efi_find_vendor_table(boot_params_ptr, cfg_table_pa,
cfg_table_len, guid);
if (!table)
return false;

View File

@@ -46,7 +46,7 @@ void *memmove(void *dest, const void *src, size_t n);
/*
* This is set up by the setup-routine at boot-time
*/
struct boot_params *boot_params;
struct boot_params *boot_params_ptr;
struct port_io_ops pio_ops;
@@ -132,8 +132,8 @@ void __putstr(const char *s)
if (lines == 0 || cols == 0)
return;
x = boot_params->screen_info.orig_x;
y = boot_params->screen_info.orig_y;
x = boot_params_ptr->screen_info.orig_x;
y = boot_params_ptr->screen_info.orig_y;
while ((c = *s++) != '\0') {
if (c == '\n') {
@@ -154,8 +154,8 @@ void __putstr(const char *s)
}
}
boot_params->screen_info.orig_x = x;
boot_params->screen_info.orig_y = y;
boot_params_ptr->screen_info.orig_x = x;
boot_params_ptr->screen_info.orig_y = y;
pos = (x + cols * y) * 2; /* Update cursor position */
outb(14, vidport);
@@ -396,16 +396,16 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
size_t entry_offset;
/* Retain x86 boot parameters pointer passed from startup_32/64. */
boot_params = rmode;
boot_params_ptr = rmode;
/* Clear flags intended for solely in-kernel use. */
boot_params->hdr.loadflags &= ~KASLR_FLAG;
boot_params_ptr->hdr.loadflags &= ~KASLR_FLAG;
parse_mem_encrypt(&boot_params->hdr);
parse_mem_encrypt(&boot_params_ptr->hdr);
sanitize_boot_params(boot_params);
sanitize_boot_params(boot_params_ptr);
if (boot_params->screen_info.orig_video_mode == 7) {
if (boot_params_ptr->screen_info.orig_video_mode == 7) {
vidmem = (char *) 0xb0000;
vidport = 0x3b4;
} else {
@@ -413,8 +413,8 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
vidport = 0x3d4;
}
lines = boot_params->screen_info.orig_video_lines;
cols = boot_params->screen_info.orig_video_cols;
lines = boot_params_ptr->screen_info.orig_video_lines;
cols = boot_params_ptr->screen_info.orig_video_cols;
init_default_io_ops();
@@ -433,7 +433,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
* so that early debugging output from the RSDP parsing code can be
* collected.
*/
boot_params->acpi_rsdp_addr = get_rsdp_addr();
boot_params_ptr->acpi_rsdp_addr = get_rsdp_addr();
debug_putstr("early console in extract_kernel\n");

View File

@@ -61,7 +61,6 @@ extern memptr free_mem_ptr;
extern memptr free_mem_end_ptr;
void *malloc(int size);
void free(void *where);
extern struct boot_params *boot_params;
void __putstr(const char *s);
void __puthex(unsigned long value);
#define error_putstr(__x) __putstr(__x)

View File

@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "misc.h"
#include <asm/bootparam_utils.h>
#include <asm/e820/types.h>
#include <asm/processor.h>
#include "pgtable.h"
@@ -28,7 +29,6 @@ static char trampoline_save[TRAMPOLINE_32BIT_SIZE];
*/
unsigned long *trampoline_32bit __section(".data");
extern struct boot_params *boot_params;
int cmdline_find_option_bool(const char *option);
static unsigned long find_trampoline_placement(void)
@@ -49,7 +49,7 @@ static unsigned long find_trampoline_placement(void)
*
* Only look for values in the legacy ROM for non-EFI system.
*/
signature = (char *)&boot_params->efi_info.efi_loader_signature;
signature = (char *)&boot_params_ptr->efi_info.efi_loader_signature;
if (strncmp(signature, EFI32_LOADER_SIGNATURE, 4) &&
strncmp(signature, EFI64_LOADER_SIGNATURE, 4)) {
ebda_start = *(unsigned short *)0x40e << 4;
@@ -65,10 +65,10 @@ static unsigned long find_trampoline_placement(void)
bios_start = round_down(bios_start, PAGE_SIZE);
/* Find the first usable memory region under bios_start. */
for (i = boot_params->e820_entries - 1; i >= 0; i--) {
for (i = boot_params_ptr->e820_entries - 1; i >= 0; i--) {
unsigned long new = bios_start;
entry = &boot_params->e820_table[i];
entry = &boot_params_ptr->e820_table[i];
/* Skip all entries above bios_start. */
if (bios_start <= entry->addr)
@@ -107,7 +107,8 @@ asmlinkage void configure_5level_paging(struct boot_params *bp, void *pgtable)
bool l5_required = false;
/* Initialize boot_params. Required for cmdline_find_option_bool(). */
boot_params = bp;
sanitize_boot_params(bp);
boot_params_ptr = bp;
/*
* Check if LA57 is desired and supported.

View File

@@ -618,7 +618,7 @@ void sev_prep_identity_maps(unsigned long top_level_pgt)
* accessed after switchover.
*/
if (sev_snp_enabled()) {
unsigned long cc_info_pa = boot_params->cc_blob_address;
unsigned long cc_info_pa = boot_params_ptr->cc_blob_address;
struct cc_blob_sev_info *cc_info;
kernel_add_identity_map(cc_info_pa, cc_info_pa + sizeof(*cc_info));

View File

@@ -70,6 +70,8 @@ For 32-bit we have the following conventions - kernel is built with
pushq %rsi /* pt_regs->si */
movq 8(%rsp), %rsi /* temporarily store the return address in %rsi */
movq %rdi, 8(%rsp) /* pt_regs->di (overwriting original return address) */
/* We just clobbered the return address - use the IRET frame for unwinding: */
UNWIND_HINT_IRET_REGS offset=3*8
.else
pushq %rdi /* pt_regs->di */
pushq %rsi /* pt_regs->si */

View File

@@ -2720,28 +2720,33 @@ static u64 adl_update_topdown_event(struct perf_event *event)
DEFINE_STATIC_CALL(intel_pmu_update_topdown_event, x86_perf_event_update);
static void intel_pmu_read_topdown_event(struct perf_event *event)
{
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
/* Only need to call update_topdown_event() once for group read. */
if ((cpuc->txn_flags & PERF_PMU_TXN_READ) &&
!is_slots_event(event))
return;
perf_pmu_disable(event->pmu);
static_call(intel_pmu_update_topdown_event)(event);
perf_pmu_enable(event->pmu);
}
static void intel_pmu_read_event(struct perf_event *event)
{
if (event->hw.flags & PERF_X86_EVENT_AUTO_RELOAD)
intel_pmu_auto_reload_read(event);
else if (is_topdown_count(event))
intel_pmu_read_topdown_event(event);
else
x86_perf_event_update(event);
if (event->hw.flags & (PERF_X86_EVENT_AUTO_RELOAD | PERF_X86_EVENT_TOPDOWN)) {
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
bool pmu_enabled = cpuc->enabled;
/* Only need to call update_topdown_event() once for group read. */
if (is_metric_event(event) && (cpuc->txn_flags & PERF_PMU_TXN_READ))
return;
cpuc->enabled = 0;
if (pmu_enabled)
intel_pmu_disable_all();
if (is_topdown_event(event))
static_call(intel_pmu_update_topdown_event)(event);
else
intel_pmu_drain_pebs_buffer();
cpuc->enabled = pmu_enabled;
if (pmu_enabled)
intel_pmu_enable_all(0);
return;
}
x86_perf_event_update(event);
}
static void intel_pmu_enable_fixed(struct perf_event *event)
@@ -3006,7 +3011,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
handled++;
x86_pmu_handle_guest_pebs(regs, &data);
x86_pmu.drain_pebs(regs, &data);
static_call(x86_pmu_drain_pebs)(regs, &data);
status &= intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
/*
@@ -3881,6 +3886,85 @@ static inline bool intel_pmu_has_cap(struct perf_event *event, int idx)
return test_bit(idx, (unsigned long *)&intel_cap->capabilities);
}
static u64 intel_pmu_freq_start_period(struct perf_event *event)
{
int type = event->attr.type;
u64 config, factor;
s64 start;
/*
* The 127 is the lowest possible recommended SAV (sample after value)
* for a 4000 freq (default freq), according to the event list JSON file.
* Also, assume the workload is idle 50% time.
*/
factor = 64 * 4000;
if (type != PERF_TYPE_HARDWARE && type != PERF_TYPE_HW_CACHE)
goto end;
/*
* The estimation of the start period in the freq mode is
* based on the below assumption.
*
* For a cycles or an instructions event, 1GHZ of the
* underlying platform, 1 IPC. The workload is idle 50% time.
* The start period = 1,000,000,000 * 1 / freq / 2.
* = 500,000,000 / freq
*
* Usually, the branch-related events occur less than the
* instructions event. According to the Intel event list JSON
* file, the SAV (sample after value) of a branch-related event
* is usually 1/4 of an instruction event.
* The start period of branch-related events = 125,000,000 / freq.
*
* The cache-related events occurs even less. The SAV is usually
* 1/20 of an instruction event.
* The start period of cache-related events = 25,000,000 / freq.
*/
config = event->attr.config & PERF_HW_EVENT_MASK;
if (type == PERF_TYPE_HARDWARE) {
switch (config) {
case PERF_COUNT_HW_CPU_CYCLES:
case PERF_COUNT_HW_INSTRUCTIONS:
case PERF_COUNT_HW_BUS_CYCLES:
case PERF_COUNT_HW_STALLED_CYCLES_FRONTEND:
case PERF_COUNT_HW_STALLED_CYCLES_BACKEND:
case PERF_COUNT_HW_REF_CPU_CYCLES:
factor = 500000000;
break;
case PERF_COUNT_HW_BRANCH_INSTRUCTIONS:
case PERF_COUNT_HW_BRANCH_MISSES:
factor = 125000000;
break;
case PERF_COUNT_HW_CACHE_REFERENCES:
case PERF_COUNT_HW_CACHE_MISSES:
factor = 25000000;
break;
default:
goto end;
}
}
if (type == PERF_TYPE_HW_CACHE)
factor = 25000000;
end:
/*
* Usually, a prime or a number with less factors (close to prime)
* is chosen as an SAV, which makes it less likely that the sampling
* period synchronizes with some periodic event in the workload.
* Minus 1 to make it at least avoiding values near power of twos
* for the default freq.
*/
start = DIV_ROUND_UP_ULL(factor, event->attr.sample_freq) - 1;
if (start > x86_pmu.max_period)
start = x86_pmu.max_period;
if (x86_pmu.limit_period)
x86_pmu.limit_period(event, &start);
return start;
}
static int intel_pmu_hw_config(struct perf_event *event)
{
int ret = x86_pmu_hw_config(event);
@@ -3892,6 +3976,12 @@ static int intel_pmu_hw_config(struct perf_event *event)
if (ret)
return ret;
if (event->attr.freq && event->attr.sample_freq) {
event->hw.sample_period = intel_pmu_freq_start_period(event);
event->hw.last_period = event->hw.sample_period;
local64_set(&event->hw.period_left, event->hw.sample_period);
}
if (event->attr.precise_ip) {
if ((event->attr.config & INTEL_ARCH_EVENT_MASK) == INTEL_FIXED_VLBR_EVENT)
return -EINVAL;

View File

@@ -843,11 +843,11 @@ unlock:
return 1;
}
static inline void intel_pmu_drain_pebs_buffer(void)
void intel_pmu_drain_pebs_buffer(void)
{
struct perf_sample_data data;
x86_pmu.drain_pebs(NULL, &data);
static_call(x86_pmu_drain_pebs)(NULL, &data);
}
/*
@@ -1965,15 +1965,6 @@ get_next_pebs_record_by_bit(void *base, void *top, int bit)
return NULL;
}
void intel_pmu_auto_reload_read(struct perf_event *event)
{
WARN_ON(!(event->hw.flags & PERF_X86_EVENT_AUTO_RELOAD));
perf_pmu_disable(event->pmu);
intel_pmu_drain_pebs_buffer();
perf_pmu_enable(event->pmu);
}
/*
* Special variant of intel_pmu_save_and_restart() for auto-reload.
*/

View File

@@ -1052,6 +1052,7 @@ extern struct x86_pmu x86_pmu __read_mostly;
DECLARE_STATIC_CALL(x86_pmu_set_period, *x86_pmu.set_period);
DECLARE_STATIC_CALL(x86_pmu_update, *x86_pmu.update);
DECLARE_STATIC_CALL(x86_pmu_drain_pebs, *x86_pmu.drain_pebs);
static __always_inline struct x86_perf_task_context_opt *task_context_opt(void *ctx)
{
@@ -1539,7 +1540,7 @@ void intel_pmu_pebs_disable_all(void);
void intel_pmu_pebs_sched_task(struct perf_event_pmu_context *pmu_ctx, bool sched_in);
void intel_pmu_auto_reload_read(struct perf_event *event);
void intel_pmu_drain_pebs_buffer(void);
void intel_pmu_store_pebs_lbrs(struct lbr_entry *lbr);

View File

@@ -30,6 +30,7 @@ void __init hv_vtl_init_platform(void)
x86_platform.realmode_init = x86_init_noop;
x86_init.irqs.pre_vector_init = x86_init_noop;
x86_init.timers.timer_init = x86_init_noop;
x86_init.resources.probe_roms = x86_init_noop;
/* Avoid searching for BIOS MP tables */
x86_init.mpparse.find_smp_config = x86_init_noop;

View File

@@ -338,7 +338,7 @@ int hv_snp_boot_ap(int cpu, unsigned long start_ip)
vmsa->sev_features = sev_status >> 2;
ret = snp_set_vmsa(vmsa, true);
if (!ret) {
if (ret) {
pr_err("RMPADJUST(%llx) failed: %llx\n", (u64)vmsa, ret);
free_page((u64)vmsa);
return ret;
@@ -464,7 +464,6 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
enum hv_mem_host_visibility visibility)
{
struct hv_gpa_range_for_visibility *input;
u16 pages_processed;
u64 hv_status;
unsigned long flags;
@@ -493,7 +492,7 @@ static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
memcpy((void *)input->gpa_page_list, pfn, count * sizeof(*pfn));
hv_status = hv_do_rep_hypercall(
HVCALL_MODIFY_SPARSE_GPA_PAGE_HOST_VISIBILITY, count,
0, input, &pages_processed);
0, input, NULL);
local_irq_restore(flags);
if (hv_result_success(hv_status))

View File

@@ -86,6 +86,8 @@ extern const unsigned long kernel_total_size;
unsigned long decompress_kernel(unsigned char *outbuf, unsigned long virt_addr,
void (*error)(char *x));
extern struct boot_params *boot_params_ptr;
#endif
#endif /* _ASM_X86_BOOT_H */

View File

@@ -4,6 +4,7 @@
#include <linux/thread_info.h>
#include <asm/nospec-branch.h>
#include <asm/msr.h>
/*
* On VMENTER we must preserve whatever view of the SPEC_CTRL MSR
@@ -76,6 +77,16 @@ static inline u64 ssbd_tif_to_amd_ls_cfg(u64 tifn)
return (tifn & _TIF_SSBD) ? x86_amd_ls_cfg_ssbd_mask : 0ULL;
}
/*
* This can be used in noinstr functions & should only be called in bare
* metal context.
*/
static __always_inline void __update_spec_ctrl(u64 val)
{
__this_cpu_write(x86_spec_ctrl_current, val);
native_wrmsrl(MSR_IA32_SPEC_CTRL, val);
}
#ifdef CONFIG_SMP
extern void speculative_store_bypass_ht_init(void);
#else

View File

@@ -242,7 +242,7 @@ void flush_tlb_multi(const struct cpumask *cpumask,
flush_tlb_mm_range((vma)->vm_mm, start, end, \
((vma)->vm_flags & VM_HUGETLB) \
? huge_page_shift(hstate_vma(vma)) \
: PAGE_SHIFT, false)
: PAGE_SHIFT, true)
extern void flush_tlb_all(void);
extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,

View File

@@ -360,7 +360,6 @@ bool __init early_is_amd_nb(u32 device)
struct resource *amd_get_mmconfig_range(struct resource *res)
{
u32 address;
u64 base, msr;
unsigned int segn_busn_bits;
@@ -368,13 +367,11 @@ struct resource *amd_get_mmconfig_range(struct resource *res)
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
return NULL;
/* assume all cpus from fam10h have mmconfig */
if (boot_cpu_data.x86 < 0x10)
/* Assume CPUs from Fam10h have mmconfig, although not all VMs do */
if (boot_cpu_data.x86 < 0x10 ||
rdmsrl_safe(MSR_FAM10H_MMIO_CONF_BASE, &msr))
return NULL;
address = MSR_FAM10H_MMIO_CONF_BASE;
rdmsrl(address, msr);
/* mmconfig is not enabled */
if (!(msr & FAM10H_MMIO_CONF_ENABLE))
return NULL;

View File

@@ -810,7 +810,7 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
/* If bit 31 is set, this is an unknown format */
for (j = 0 ; j < 3 ; j++)
for (j = 0 ; j < 4 ; j++)
if (regs[j] & (1 << 31))
regs[j] = 0;

View File

@@ -748,26 +748,37 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size)
}
#endif
#define TLB_INST_4K 0x01
#define TLB_INST_4M 0x02
#define TLB_INST_2M_4M 0x03
#define TLB_INST_4K 0x01
#define TLB_INST_4M 0x02
#define TLB_INST_2M_4M 0x03
#define TLB_INST_ALL 0x05
#define TLB_INST_1G 0x06
#define TLB_INST_ALL 0x05
#define TLB_INST_1G 0x06
#define TLB_DATA_4K 0x11
#define TLB_DATA_4M 0x12
#define TLB_DATA_2M_4M 0x13
#define TLB_DATA_4K_4M 0x14
#define TLB_DATA_4K 0x11
#define TLB_DATA_4M 0x12
#define TLB_DATA_2M_4M 0x13
#define TLB_DATA_4K_4M 0x14
#define TLB_DATA_1G 0x16
#define TLB_DATA_1G 0x16
#define TLB_DATA_1G_2M_4M 0x17
#define TLB_DATA0_4K 0x21
#define TLB_DATA0_4M 0x22
#define TLB_DATA0_2M_4M 0x23
#define TLB_DATA0_4K 0x21
#define TLB_DATA0_4M 0x22
#define TLB_DATA0_2M_4M 0x23
#define STLB_4K 0x41
#define STLB_4K_2M 0x42
#define STLB_4K 0x41
#define STLB_4K_2M 0x42
/*
* All of leaf 0x2's one-byte TLB descriptors implies the same number of
* entries for their respective TLB types. The 0x63 descriptor is an
* exception: it implies 4 dTLB entries for 1GB pages 32 dTLB entries
* for 2MB or 4MB pages. Encode descriptor 0x63 dTLB entry count for
* 2MB/4MB pages here, as its count for dTLB 1GB pages is already at the
* intel_tlb_table[] mapping.
*/
#define TLB_0x63_2M_4M_ENTRIES 32
static const struct _tlb_table intel_tlb_table[] = {
{ 0x01, TLB_INST_4K, 32, " TLB_INST 4 KByte pages, 4-way set associative" },
@@ -789,7 +800,8 @@ static const struct _tlb_table intel_tlb_table[] = {
{ 0x5c, TLB_DATA_4K_4M, 128, " TLB_DATA 4 KByte and 4 MByte pages" },
{ 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
{ 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
{ 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
{ 0x63, TLB_DATA_1G_2M_4M, 4, " TLB_DATA 1 GByte pages, 4-way set associative"
" (plus 32 entries TLB_DATA 2 MByte or 4 MByte pages, not encoded here)" },
{ 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
{ 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
{ 0x6d, TLB_DATA_1G, 16, " TLB_DATA 1 GByte pages, fully associative" },
@@ -889,6 +901,12 @@ static void intel_tlb_lookup(const unsigned char desc)
if (tlb_lld_4m[ENTRIES] < intel_tlb_table[k].entries)
tlb_lld_4m[ENTRIES] = intel_tlb_table[k].entries;
break;
case TLB_DATA_1G_2M_4M:
if (tlb_lld_2m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
tlb_lld_2m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
if (tlb_lld_4m[ENTRIES] < TLB_0x63_2M_4M_ENTRIES)
tlb_lld_4m[ENTRIES] = TLB_0x63_2M_4M_ENTRIES;
fallthrough;
case TLB_DATA_1G:
if (tlb_lld_1g[ENTRIES] < intel_tlb_table[k].entries)
tlb_lld_1g[ENTRIES] = intel_tlb_table[k].entries;
@@ -912,7 +930,7 @@ static void intel_detect_tlb(struct cpuinfo_x86 *c)
cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
/* If bit 31 is set, this is an unknown format */
for (j = 0 ; j < 3 ; j++)
for (j = 0 ; j < 4 ; j++)
if (regs[j] & (1 << 31))
regs[j] = 0;

View File

@@ -177,23 +177,29 @@ static bool need_sha_check(u32 cur_rev)
{
switch (cur_rev >> 8) {
case 0x80012: return cur_rev <= 0x800126f; break;
case 0x80082: return cur_rev <= 0x800820f; break;
case 0x83010: return cur_rev <= 0x830107c; break;
case 0x86001: return cur_rev <= 0x860010e; break;
case 0x86081: return cur_rev <= 0x8608108; break;
case 0x87010: return cur_rev <= 0x8701034; break;
case 0x8a000: return cur_rev <= 0x8a0000a; break;
case 0xa0010: return cur_rev <= 0xa00107a; break;
case 0xa0011: return cur_rev <= 0xa0011da; break;
case 0xa0012: return cur_rev <= 0xa001243; break;
case 0xa0082: return cur_rev <= 0xa00820e; break;
case 0xa1011: return cur_rev <= 0xa101153; break;
case 0xa1012: return cur_rev <= 0xa10124e; break;
case 0xa1081: return cur_rev <= 0xa108109; break;
case 0xa2010: return cur_rev <= 0xa20102f; break;
case 0xa2012: return cur_rev <= 0xa201212; break;
case 0xa4041: return cur_rev <= 0xa404109; break;
case 0xa5000: return cur_rev <= 0xa500013; break;
case 0xa6012: return cur_rev <= 0xa60120a; break;
case 0xa7041: return cur_rev <= 0xa704109; break;
case 0xa7052: return cur_rev <= 0xa705208; break;
case 0xa7080: return cur_rev <= 0xa708009; break;
case 0xa70c0: return cur_rev <= 0xa70C009; break;
case 0xaa001: return cur_rev <= 0xaa00116; break;
case 0xaa002: return cur_rev <= 0xaa00218; break;
default: break;
}
@@ -597,7 +603,7 @@ static bool __apply_microcode_amd(struct microcode_amd *mc, u32 *cur_rev,
unsigned long p_addr = (unsigned long)&mc->hdr.data_code;
if (!verify_sha256_digest(mc->hdr.patch_id, *cur_rev, (const u8 *)p_addr, psize))
return -1;
return false;
native_wrmsrl(MSR_AMD64_PATCH_LOADER, p_addr);
@@ -1072,7 +1078,7 @@ static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t siz
if (ret != UCODE_OK)
return ret;
for_each_node(nid) {
for_each_node_with_cpus(nid) {
cpu = cpumask_first(cpumask_of_node(nid));
c = &cpu_data(cpu);

View File

@@ -16,7 +16,6 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kexec.h>
#include <linux/i8253.h>
#include <linux/random.h>
#include <asm/processor.h>
#include <asm/hypervisor.h>
@@ -575,16 +574,6 @@ static void __init ms_hyperv_init_platform(void)
if (efi_enabled(EFI_BOOT))
x86_platform.get_nmi_reason = hv_get_nmi_reason;
/*
* Hyper-V VMs have a PIT emulation quirk such that zeroing the
* counter register during PIT shutdown restarts the PIT. So it
* continues to interrupt @18.2 HZ. Setting i8253_clear_counter
* to false tells pit_shutdown() not to zero the counter so that
* the PIT really is shutdown. Generation 2 VMs don't have a PIT,
* and setting this value has no effect.
*/
i8253_clear_counter_on_shutdown = false;
#if IS_ENABLED(CONFIG_HYPERV)
if ((hv_get_isolation_type() == HV_ISOLATION_TYPE_VBS) ||
ms_hyperv.paravisor_present)

View File

@@ -150,13 +150,15 @@ int __init sgx_drv_init(void)
u64 xfrm_mask;
int ret;
if (!cpu_feature_enabled(X86_FEATURE_SGX_LC))
if (!cpu_feature_enabled(X86_FEATURE_SGX_LC)) {
pr_info("SGX disabled: SGX launch control CPU feature is not available, /dev/sgx_enclave disabled.\n");
return -ENODEV;
}
cpuid_count(SGX_CPUID, 0, &eax, &ebx, &ecx, &edx);
if (!(eax & 1)) {
pr_err("SGX disabled: SGX1 instruction support not available.\n");
pr_info("SGX disabled: SGX1 instruction support not available, /dev/sgx_enclave disabled.\n");
return -ENODEV;
}
@@ -173,8 +175,10 @@ int __init sgx_drv_init(void)
}
ret = misc_register(&sgx_dev_enclave);
if (ret)
if (ret) {
pr_info("SGX disabled: Unable to register the /dev/sgx_enclave driver (%d).\n", ret);
return ret;
}
return 0;
}

View File

@@ -64,6 +64,13 @@ static int sgx_encl_create(struct sgx_encl *encl, struct sgx_secs *secs)
struct file *backing;
long ret;
/*
* ECREATE would detect this too, but checking here also ensures
* that the 'encl_size' calculations below can never overflow.
*/
if (!is_power_of_2(secs->size))
return -EINVAL;
va_page = sgx_encl_grow(encl, true);
if (IS_ERR(va_page))
return PTR_ERR(va_page);

View File

@@ -195,6 +195,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
printk("%sCall Trace:\n", log_lvl);
unwind_start(&state, task, regs, stack);
stack = stack ?: get_stack_pointer(task, regs);
regs = unwind_get_entry_regs(&state, &partial);
/*
@@ -213,9 +214,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
* - hardirq stack
* - entry stack
*/
for (stack = stack ?: get_stack_pointer(task, regs);
stack;
stack = stack_info.next_sp) {
for (; stack; stack = stack_info.next_sp) {
const char *stack_name;
stack = PTR_ALIGN(stack, sizeof(long));

View File

@@ -220,7 +220,7 @@ bool fpu_alloc_guest_fpstate(struct fpu_guest *gfpu)
struct fpstate *fpstate;
unsigned int size;
size = fpu_user_cfg.default_size + ALIGN(offsetof(struct fpstate, regs), 64);
size = fpu_kernel_cfg.default_size + ALIGN(offsetof(struct fpstate, regs), 64);
fpstate = vzalloc(size);
if (!fpstate)
return false;
@@ -232,8 +232,8 @@ bool fpu_alloc_guest_fpstate(struct fpu_guest *gfpu)
fpstate->is_guest = true;
gfpu->fpstate = fpstate;
gfpu->xfeatures = fpu_user_cfg.default_features;
gfpu->perm = fpu_user_cfg.default_features;
gfpu->xfeatures = fpu_kernel_cfg.default_features;
gfpu->perm = fpu_kernel_cfg.default_features;
/*
* KVM sets the FP+SSE bits in the XSAVE header when copying FPU state

View File

@@ -23,8 +23,10 @@
#include <asm/traps.h>
#include <asm/thermal.h>
#if defined(CONFIG_X86_LOCAL_APIC) || defined(CONFIG_X86_THERMAL_VECTOR)
#define CREATE_TRACE_POINTS
#include <asm/trace/irq_vectors.h>
#endif
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
EXPORT_PER_CPU_SYMBOL(irq_stat);

View File

@@ -93,7 +93,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__tss_limit_invalid);
*/
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
{
memcpy(dst, src, arch_task_struct_size);
/* init_task is not dynamically sized (incomplete FPU state) */
if (unlikely(src == &init_task))
memcpy_and_pad(dst, arch_task_struct_size, src, sizeof(init_task), 0);
else
memcpy(dst, src, arch_task_struct_size);
#ifdef CONFIG_VM86
dst->thread.vm86 = NULL;
#endif

View File

@@ -377,6 +377,21 @@ __visible void __noreturn handle_stack_overflow(struct pt_regs *regs,
}
#endif
/*
* Prevent the compiler and/or objtool from marking the !CONFIG_X86_ESPFIX64
* version of exc_double_fault() as noreturn. Otherwise the noreturn mismatch
* between configs triggers objtool warnings.
*
* This is a temporary hack until we have compiler or plugin support for
* annotating noreturns.
*/
#ifdef CONFIG_X86_ESPFIX64
#define always_true() true
#else
bool always_true(void);
bool __weak always_true(void) { return true; }
#endif
/*
* Runs on an IST stack for x86_64 and on a special task stack for x86_32.
*
@@ -512,7 +527,8 @@ DEFINE_IDTENTRY_DF(exc_double_fault)
pr_emerg("PANIC: double fault, error_code: 0x%lx\n", error_code);
die("double fault", regs, error_code);
panic("Machine halted.");
if (always_true())
panic("Machine halted.");
instrumentation_end();
}

View File

@@ -955,7 +955,7 @@ static unsigned long long cyc2ns_suspend;
void tsc_save_sched_clock_state(void)
{
if (!sched_clock_stable())
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
return;
cyc2ns_suspend = sched_clock();
@@ -975,7 +975,7 @@ void tsc_restore_sched_clock_state(void)
unsigned long flags;
int cpu;
if (!sched_clock_stable())
if (!static_branch_likely(&__use_tsc) && !sched_clock_stable())
return;
local_irq_save(flags);

View File

@@ -1307,7 +1307,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
entry->ecx = entry->edx = 0;
if (!enable_pmu || !kvm_cpu_cap_has(X86_FEATURE_PERFMON_V2)) {
entry->eax = entry->ebx;
entry->eax = entry->ebx = 0;
break;
}

View File

@@ -3156,6 +3156,27 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
kvm_pr_unimpl_wrmsr(vcpu, ecx, data);
break;
}
/*
* AMD changed the architectural behavior of bits 5:2. On CPUs
* without BusLockTrap, bits 5:2 control "external pins", but
* on CPUs that support BusLockDetect, bit 2 enables BusLockTrap
* and bits 5:3 are reserved-to-zero. Sadly, old KVM allowed
* the guest to set bits 5:2 despite not actually virtualizing
* Performance-Monitoring/Breakpoint external pins. Drop bits
* 5:2 for backwards compatibility.
*/
data &= ~GENMASK(5, 2);
/*
* Suppress BTF as KVM doesn't virtualize BTF, but there's no
* way to communicate lack of support to the guest.
*/
if (data & DEBUGCTLMSR_BTF) {
kvm_pr_unimpl_wrmsr(vcpu, MSR_IA32_DEBUGCTLMSR, data);
data &= ~DEBUGCTLMSR_BTF;
}
if (data & DEBUGCTL_RESERVED_BITS)
return 1;

View File

@@ -533,7 +533,7 @@ static inline bool is_vnmi_enabled(struct vcpu_svm *svm)
/* svm.c */
#define MSR_INVALID 0xffffffffU
#define DEBUGCTL_RESERVED_BITS (~(0x3fULL))
#define DEBUGCTL_RESERVED_BITS (~DEBUGCTLMSR_LBR)
extern bool dump_invalid_vmcb;

Some files were not shown because too many files have changed in this diff Show More