Merge android12-5.10.21+ (8cf9478
) into msm-5.10
* refs/heads/tmp-8cf9478:
Revert "ANDROID: GKI: Enable bounds sanitizer"
ANDROID: GKI: temporarily disable LTO/CFI
ANDROID: Revert "f2fs: fix to tag FIEMAP_EXTENT_MERGED in f2fs_fiemap()"
FROMLIST: KVM: arm64: Disable FWB in host stage-2
FROMLIST: KVM: arm64: Introduce KVM_PGTABLE_S2_NOFWB Stage-2 flag
FROMLIST: KVM: arm64: Protect the .hyp sections from the host
FROMLIST: KVM: arm64: Disable PMU support in protected mode
FROMLIST: KVM: arm64: Page-align the .hyp sections
FROMLIST: KVM: arm64: Wrap the host with a stage 2
FROMLIST: KVM: arm64: Provide sanitized mmfr* registers at EL2
FROMLIST: KVM: arm64: Add kvm_pgtable_stage2_find_range()
FROMLIST: KVM: arm64: Refactor the *_map_set_prot_attr() helpers
FROMLIST: KVM: arm64: Use page-table to track page ownership
FROMLIST: KVM: arm64: Always zero invalid PTEs
FROMLIST: KVM: arm64: Sort the hypervisor memblocks
FROMLIST: KVM: arm64: Reserve memory for host stage 2
FROMLIST: KVM: arm64: Make memcache anonymous in pgtable allocator
FROMLIST: KVM: arm64: Refactor __populate_fault_info()
FROMLIST: KVM: arm64: Refactor __load_guest_stage2()
FROMLIST: KVM: arm64: Refactor kvm_arm_setup_stage2()
FROMLIST: KVM: arm64: Set host stage 2 using kvm_nvhe_init_params
FROMLIST: KVM: arm64: Use kvm_arch in kvm_s2_mmu
FROMLIST: KVM: arm64: Use kvm_arch for stage 2 pgtable
FROMLIST: KVM: arm64: Elevate hypervisor mappings creation at EL2
FROMLIST: KVM: arm64: Prepare the creation of s1 mappings at EL2
FROMLIST: arm64: asm: Provide set_sctlr_el2 macro
FROMLIST: KVM: arm64: Factor out vector address calculation
FROMLIST: KVM: arm64: Provide __flush_dcache_area at EL2
FROMLIST: KVM: arm64: Enable access to sanitized CPU features at EL2
FROMLIST: KVM: arm64: Introduce a Hyp buddy page allocator
FROMLIST: KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp
FROMLIST: KVM: arm64: Introduce an early Hyp page allocator
FROMLIST: KVM: arm64: Allow using kvm_nvhe_sym() in hyp code
FROMLIST: KVM: arm64: Make kvm_call_hyp() a function call at Hyp
FROMLIST: KVM: arm64: Introduce a BSS section for use at Hyp
FROMLIST: KVM: arm64: Factor memory allocation out of pgtable.c
FROMLIST: KVM: arm64: Avoid free_page() in page-table allocator
FROMLIST: KVM: arm64: Initialize kvm_nvhe_init_params early
FROMLIST: arm64: kvm: Add standalone ticket spinlock implementation for use at hyp
FROMLIST: KVM: arm64: Link position-independent string routines into .hyp.text
FROMLIST: arm64: lib: Annotate {clear, copy}_page() as position-independent
Revert "ANDROID: sched: cpufreq_schedutil: add sugov tracepoints"
ANDROID: Partial revert of 06881e01b5
("ANDROID: sched: Add vendor hooks for override sugov behavior")
Revert "ANDROID: sched: Add vendor hooks for skipping sugov update"
Revert "ANDROID: sched: cpufreq_schedutil: move sugov traces to sched"
ANDROID: thermal: Add logic for filter on-die tz genl event.
ANDROID: mmc: support hardware that takes key directly
UPSTREAM: zram: fix broken page writeback
UPSTREAM: zram: fix return value on writeback_store
ANDROID: sched: Add vendor hook for util_est_update
ANDROID: GKI: Enable DTPM framework
ANDROID: GKI: Add remoteproc framework symbols to symbol list
ANDROID: vendor_hooks: Add hooks for scheduler
FROMGIT: configfs: fix a use-after-free in __configfs_open_file
ANDROID: lib/plist.c: Export plist-related APIs
ANDROID: module: Add vendor hook
ANDROID: bpf: Add vendor hook
ANDROID: kernel: Add vendor hook in creds
ANDROID: security: selinux: Add vendor hook in avc
UPSTREAM: KVM: arm64: Fix exclusive limit for IPA size
UPSTREAM: KVM: arm64: Reject VM creation when the default IPA size is unsupported
ANDROID: GKI: add android_kabi.h
UPSTREAM: MAINTAINERS: add entry for KFENCE
ANDROID: Clang LTO: Comment on symbol visibility workaround
FROMLIST: mm: fs: Invalidate BH LRU during page migration
BACKPORT: FROMLIST: mm: disable LRU pagevec during the migration temporarily
FROMLIST: mm: replace migrate_prep with lru_add_drain_all
UPSTREAM: mm: migrate: initialize err in do_migrate_pages
UPSTREAM: mm: migrate: clean up migrate_prep{_local}
ANDROID: Clang LTO: Only set -fvisibility=hidden for x86
UPSTREAM: usb: typec: tcpci: Refactor tcpc_presenting_cc1_rd macro
ANDROID: mm: build alloc_contig_dump_pages in page_alloc.o
FROMLIST: mm: page_alloc: dump migrate-failed pages
ANDROID: sched: Add vendor hook for uclamp_eff_get
ANDROID: cpu/hotplug: failure to offline 2nd to last cpu
ANDROID: qcom: Add devm_blk_ksm_init to ABI
ANDROID: arm64: add vendor hooks for unusal abort cases
UPSTREAM: powercap/drivers/dtpm: Fix size of object being allocated
UPSTREAM: powercap/drivers/dtpm: Fix an IS_ERR() vs NULL check
UPSTREAM: powercap/drivers/dtpm: Fix some missing unlock bugs
UPSTREAM: powercap/drivers/dtpm: Fix a double shift bug
UPSTREAM: powercap/drivers/dtpm: Fix __udivdi3 and __aeabi_uldivmod unresolved symbols
UPSTREAM: powercap/drivers/dtpm: Add CPU energy model based support
UPSTREAM: powercap/drivers/dtpm: Add API for dynamic thermal power management
UPSTREAM: units: Add Watt units
UPSTREAM: Documentation/powercap/dtpm: Add documentation for dtpm
UPSTREAM: xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state
UPSTREAM: usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing
UPSTREAM: xhci: Improve detection of device initiated wake signal.
UPSTREAM: usb: xhci: do not perform Soft Retry for some xHCI hosts
FROMGIT: rcu/tree: Add a trace event for RCU CPU stall warnings
ANDROID: GKI: Update virtual_device symbol list
ANDROID: usb: host: export additional xhci symbols for ring management
ANDROID: GKI: add fields required to enable CONFIG_READ_ONLY_THP_FOR_FS
ANDROID: vendor_hooks: Add hooks for rwsem and mutex
BACKPORT: usb: dwc3: gadget: Allow runtime suspend if UDC unbinded
FROMGIT: ASoC: codecs: wcd934x: add a sanity check in set channel map
FROMGIT: ASoC: qcom: sdm845: Fix array out of range on rx slim channels
FROMGIT: ASoC: qcom: sdm845: Fix array out of bounds access
FROMGIT: arm64: mte: Map hotplugged memory as Normal Tagged
ANDROID: KVM: arm64: Disable CFI only for nVHE hyp object
FROMGIT: KVM: arm64: Ensure I-cache isolation between vcpus of a same VM
FROMGIT: KVM: arm64: Don't use cbz/adr with external symbols
FROMGIT: KVM: arm64: Fix range alignment when walking page tables
BACKPORT: binder: move structs from core file to header file
ANDROID: dma-buf: add get_each_dmabuf function
FROMLIST: drivers: thermal: Add NULL pointer check before using cooling device stats
ANDROID: GKI: Switch to LTO_FULL
ANDROID: gki_defconfig: set CONFIG_STACK_HASH_ORDER to 12
ANDROID: sched: move vendor hook to check scheduling nice value
ANDROID: qcom: Add __cfi_slowpath
FROMGIT: usb: dwc3: qcom: Honor wakeup enabled/disabled state
FROMGIT: usb: typec: stusb160x: fix return value check in stusb160x_probe()
FROMGIT: usb: typec: tps6598x: Fix return value check in tps6598x_probe()
FROMGIT: usb: typec: tcpm: turn tcpm_ams_finish into void function
FROMGIT: usb: typec: tcpci: Check ROLE_CONTROL while interpreting CC_STATUS
ANDROID: GKI: Update abi_gki_aarch64_qcom for timer hook
ANDROID: Add vendor hooks when syscall prctl finished
ANDROID: cgroup: Add vendor hook to the cgroup
FROMGIT: usb: common: move function's kerneldoc next to its definition
FROMGIT: usb: xhci-mtk: print debug info of endpoint interval
FROMGIT: usb: common: add function to get interval expressed in us unit
FROMGIT: usb: xhci-mtk: support to build xhci-mtk-hcd.ko
FROMGIT: usb: xhci-mtk: remove declaration of xhci_mtk_setup()
FROMGIT: usb: xhci-mtk: add some schedule error number
FROMGIT: usb: xhci-mtk: rebuild the way to get bandwidth domain
FROMGIT: usb: xhci-mtk: use @tt_info to check the FS/LS device is under a HS hub
FROMGIT: usb: xhci-mtk: add a member @speed in mu3h_sch_ep_info struct
FROMGIT: usb: xhci-mtk: use clear type instead of void
FROMGIT: usb: xhci-mtk: remove unnecessary members of mu3h_sch_tt struct
FROMGIT: usb: xhci-mtk: add a function to get bandwidth boundary
FROMGIT: usb: xhci-mtk: add a function to (un)load bandwidth info
FROMGIT: usb: xhci-mtk: use @sch_tt to check whether need do TT schedule
FROMGIT: usb: xhci-mtk: add only one extra CS for FS/LS INTR
FROMGIT: usb: xhci-mtk: get the microframe boundary for ESIT
FROMGIT: usb: xhci-mtk: improve bandwidth scheduling with TT
FROMGIT: usb: xhci-mtk: remove or operator for setting schedule parameters
ANDROID: abi_gki_aarch64_qcom: Add __tracepoint_cpu_frequency_limits
ANDROID: cpufreq: Export cpu_frequency_limits tracepoint
ANDROID: kbuild: Copy out-of-tree kernel headers to INSTALL_HDR_PATH
ANDROID: build.config: Disable LTO for KASAN and Kprobes builds
ANDROID: GKI: arm64: Enable LTO+CFI
Linux 5.10.21
net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips
net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround
ALSA: hda/realtek: Apply dual codec quirks for MSI Godlike X570 board
ALSA: hda/realtek: Add quirk for Intel NUC 10
ALSA: hda/realtek: Add quirk for Clevo NH55RZQ
media: v4l: ioctl: Fix memory leak in video_usercopy
tty: teach the n_tty ICANON case about the new "cookie continuations" too
tty: teach n_tty line discipline about the new "cookie continuations"
tty: clean up legacy leftovers from n_tty line discipline
tty: fix up hung_up_tty_read() conversion
tty: fix up iterate_tty_read() EOVERFLOW handling
powerpc/sstep: Fix incorrect return from analyze_instr()
powerpc/sstep: Check instruction validity against ISA version before emulation
swap: fix swapfile read/write offset
remoteproc/mediatek: Fix kernel test robot warning
zsmalloc: account the number of compacted pages correctly
xen: fix p2m size in dom0 for disabled memory hotplug case
xen-netback: respect gnttab_map_refs()'s return value
Xen/gnttab: handle p2m update errors on a per-slot basis
scsi: iscsi: Verify lengths on passthrough PDUs
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
scsi: iscsi: Restrict sessions and handles to admin capabilities
ASoC: Intel: bytcr_rt5640: Add quirk for the Acer One S1002 tablet
ASoC: Intel: bytcr_rt5651: Add quirk for the Jumper EZpad 7 tablet
ASoC: Intel: bytcr_rt5640: Add quirk for the Voyo Winpad A15 tablet
ASoC: Intel: bytcr_rt5640: Add quirk for the Estar Beauty HD MID 7316R tablet
sched/features: Fix hrtick reprogramming
parisc: Bump 64-bit IRQ stack size to 64 KB
ASoC: Intel: sof_sdw: detect DMIC number based on mach params
ASoC: Intel: sof-sdw: indent and add quirks consistently
perf/x86/kvm: Add Cascade Lake Xeon steppings to isolation_ucodes[]
btrfs: fix error handling in commit_fs_roots
ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr()
nvme-tcp: add clean action for failed reconnection
nvme-rdma: add clean action for failed reconnection
nvme-core: add cancel tagset helpers
f2fs: fix to set/clear I_LINKABLE under i_lock
f2fs: handle unallocated section and zone on pinned/atgc
media: uvcvideo: Allow entities with no pads
drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data
drm/amd/display: Guard against NULL pointer deref when get_i2c_info fails
ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flag
PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse
drm/amdgpu: Add check to prevent IH overflow
fs: make unlazy_walk() error handling consistent
crypto: tcrypt - avoid signed overflow in byte count
drm/hisilicon: Fix use-after-free
brcmfmac: Add DMI nvram filename quirk for Voyo winpad A15 tablet
brcmfmac: Add DMI nvram filename quirk for Predia Basic tablet
staging: bcm2835-audio: Replace unsafe strcpy() with strscpy()
staging: most: sound: add sanity check for function argument
Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data
Bluetooth: Add new HCI_QUIRK_NO_SUSPEND_NOTIFIER quirk
net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant
ath10k: fix wmi mgmt tx queue full due to race condition
pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()
mt76: mt7615: reset token when mac_reset happens
Bluetooth: btusb: fix memory leak on suspend and resume
Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl
wlcore: Fix command execute failure 19 for wl12xx
vt/consolemap: do font sum unsigned
x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk
staging: fwserial: Fix error handling in fwserial_create
EDAC/amd64: Do not load on family 0x15, model 0x13
rsi: Move card interrupt handling to RX thread
rsi: Fix TX EAPOL packet handling against iwlwifi AP
ASoC: qcom: Remove useless debug print
dt-bindings: net: btusb: DT fix s/interrupt-name/interrupt-names/
dt-bindings: ethernet-controller: fix fixed-link specification
net: fix dev_ifsioc_locked() race condition
net: psample: Fix netlink skb length with tunnel info
net: hsr: add support for EntryForgetTime
net: ag71xx: remove unnecessary MTU reservation
net: dsa: tag_rtl4_a: Support also egress tags
net/sched: cls_flower: Reject invalid ct_state flags rules
net: bridge: use switchdev for port flags set through sysfs too
mptcp: do not wakeup listener for MPJ subflows
tcp: fix tcp_rmem documentation
RDMA/rtrs-srv: Do not signal REG_MR
RDMA/rtrs-clt: Use bitmask to check sess->flags
RDMA/rtrs: Do not signal for heatbeat
mm/hugetlb.c: fix unnecessary address expansion of pmd sharing
nbd: handle device refs for DESTROY_ON_DISCONNECT properly
riscv: Get rid of MAX_EARLY_MAPPING_SIZE
net: fix up truesize of cloned skb in skb_prepare_for_shift()
tomoyo: ignore data race while checking quota
smackfs: restrict bytes count in smackfs write functions
net/af_iucv: remove WARN_ONCE on malformed RX packets
xfs: Fix assert failure in xfs_setattr_size()
media: v4l2-ctrls.c: fix shift-out-of-bounds in std_validate
erofs: fix shift-out-of-bounds of blkszbits
media: mceusb: sanity check for prescaler value
udlfb: Fix memory leak in dlfb_usb_probe
sched/core: Allow try_invoke_on_locked_down_task() with irqs disabled
JFS: more checks for invalid superblock
x86/build: Treat R_386_PLT32 relocation as R_386_PC32
drm/virtio: use kvmalloc for large allocations
Input: elan_i2c - add new trackpoint report type 0x5F
Input: elantech - fix protocol errors for some trackpoints in SMBus mode
net: usb: qmi_wwan: support ZTE P685M modem
ANDROID: GKI: Enable bounds sanitizer
ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS
ANDROID: abi_gki_aarch64_qcom: Add cpufreq related symbols
ANDROID: cpufreq: Add a restricted vendor hook for freq transition
ANDROID: scsi: ufs: add hooks to track ufs commands
ANDROID: Fix compilation error when CPU_FREQ is disabled
BACKPORT: kasan, arm64: allow using KUnit tests with HW_TAGS mode
Revert "FROMGIT: kasan, arm64: allow using KUnit tests with HW_TAGS mode"
Revert "BACKPORT: kasan: remove redundant config option"
UPSTREAM: arm/kasan: fix the array size of kasan_early_shadow_pte[]
FROMGIT: KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility
FROMGIT: KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config()
FROMGIT: KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available
FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
FROMGIT: KVM: arm64: Fix nVHE hyp panic host context restore
FROMGIT: KVM: arm64: Avoid corrupting vCPU context register in guest exit
FROMLIST: arm64: cpufeatures: Fix handling of CONFIG_CMDLINE for idreg overrides
Linux 5.10.20
ARM: dts: aspeed: Add LCLK to lpc-snoop
net_sched: fix RTNL deadlock again caused by request_module()
net: qrtr: Fix memory leak in qrtr_tun_open
net: sched: fix police ext initialization
wireguard: queueing: get rid of per-peer ring buffers
wireguard: selftests: test multiple parallel streams
net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
ipv6: silence compilation warning for non-IPV6 builds
kgdb: fix to kill breakpoints on initmem after boot
drm/i915: Reject 446-480MHz HDMI clock on GLK
dm era: only resize metadata in preresume
dm era: Reinitialize bitset cache before digesting a new writeset
dm era: Use correct value size in equality function of writeset tree
dm era: Fix bitset memory leaks
dm era: Verify the data block size hasn't changed
dm era: Update in-core bitset after committing the metadata
dm era: Recover committed writeset after crash
dm writecache: fix writing beyond end of underlying device when shrinking
dm writecache: return the exact table values that were set
dm writecache: fix performance degradation in ssd mode
dm table: fix zoned iterate_devices based device capability checks
dm table: fix DAX iterate_devices based device capability checks
dm table: fix iterate_devices based device capability checks
dm: fix deadlock when swapping to encrypted device
gfs2: Recursive gfs2_quota_hold in gfs2_iomap_end
gfs2: Lock imbalance on error path in gfs2_recover_one
gfs2: Don't skip dlm unlock if glock has an lvb
gfs2: fix glock confusion in function signal_our_withdraw
spi: spi-synquacer: fix set_cs handling
spi: fsl: invert spisel_boot signal on MPC8309
sparc32: fix a user-triggerable oops in clear_user()
f2fs: flush data when enabling checkpoint back
f2fs: enforce the immutable flag on open files
f2fs: fix out-of-repair __setattr_copy()
irqchip/loongson-pch-msi: Use bitmap_zalloc() to allocate bitmap
um: defer killing userspace on page table update failures
um: mm: check more comprehensively for stub changes
virtio/s390: implement virtio-ccw revision 2 correctly
s390/vtime: fix inline assembly clobber list
proc: don't allow async path resolution of /proc/thread-self components
cpufreq: intel_pstate: Get per-CPU max freq via MSR_HWP_CAPABILITIES if available
cpufreq: intel_pstate: Change intel_pstate_get_hwp_max() argument
cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks
thermal: cpufreq_cooling: freq_qos_update_request() returns < 0 on error
kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE
zonefs: Fix file size of zones in full condition
exfat: fix shift-out-of-bounds in exfat_fill_super()
printk: fix deadlock when kernel panic
mfd: gateworks-gsc: Fix interrupt type
gpio: pcf857x: Fix missing first interrupt
mei: me: add adler lake point LP DID
mei: me: add adler lake point S DID
mei: me: emmitsburg workstation DID
mei: fix transfer over dma with extended header
spmi: spmi-pmic-arb: Fix hw_irq overflow
powerpc/32s: Add missing call to kuep_lock on syscall entry
powerpc/kexec_file: fix FDT size estimation for kdump kernel
powerpc/32: Preserve cr1 in exception prolog stack check to fix build error
mmc: sdhci-pci-o2micro: Bug fix for SDR104 HW tuning failure
mmc: sdhci-esdhc-imx: fix kernel panic when remove module
module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols
nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer
KVM: nSVM: fix running nested guests when npt=0
mm, compaction: make fast_isolate_freepages() stay within zone
mm/vmscan: restore zone_reclaim_mode ABI
hugetlb: fix copy_huge_page_from_user contig page struct assumption
hugetlb: fix update_and_free_page contig page struct assumption
mm: memcontrol: fix get_active_memcg return value
mm: memcontrol: fix swap undercounting in cgroup2
x86: fix seq_file iteration for pat/memtype.c
seq_file: document how per-entry resources are managed.
fs/affs: release old buffer head on error path
mtd: spi-nor: hisi-sfc: Put child node np on error path
mtd: spi-nor: core: Add erase size check for erase command initialization
mtd: spi-nor: core: Fix erase type discovery for overlaid region
mtd: spi-nor: sfdp: Fix wrong erase type bitmask for overlaid region
mtd: spi-nor: sfdp: Fix last erase region marking
coresight: etm4x: Handle accesses to TRCSTALLCTLR
watchdog: mei_wdt: request stop on unregister
watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ
riscv: Disable KSAN_SANITIZE for vDSO
arm64: spectre: Prevent lockdep splat on v4 mitigation enable path
arm64 module: set plt* section addresses to 0x0
arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing
arm64: kexec_file: fix memory leakage in create_dtb() when fdt_open_into() fails
iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs
arm64: Extend workaround for erratum 1024718 to all versions of Cortex-A55
kprobes: Fix to delay the kprobes jump optimization
rcu/nocb: Perform deferred wake up before last idle's need_resched() check
rcu: Pull deferred rcuog wake up to rcu_eqs_enter() callers
powerpc/prom: Fix "ibm,arch-vec-5-platform-support" scan
x86/entry: Fix instrumentation annotation
x86/fault: Fix AMD erratum #91 errata fixup for user code
x86/reboot: Force all cpus to exit VMX root if VMX is supported
x86/virt: Eat faults on VMXOFF in reboot flows
media: smipcie: fix interrupt handling and IR timeout
media: marvell-ccic: power up the device on mclk enable
media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()
media: ir_toy: add another IR Droid device
media: i2c: max9286: fix access to unallocated memory
floppy: reintroduce O_NDELAY fix
staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table
staging: gdm724x: Fix DMA from stack
staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c
arm64: dts: agilex: fix phy interface bit shift for gmac1 and gmac2
dts64: mt7622: fix slow sd card access
pstore: Fix typo in compression option name
drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
misc: rtsx: init of rts522a add OCP power off when no card is present
arm64: ptrace: Fix seccomp of traced syscall -1 (NO_SYSCALL)
seccomp: Add missing return in non-void function
soc: samsung: exynos-asv: handle reading revision register error
soc: samsung: exynos-asv: don't defer early on not-supported SoCs
crypto: sun4i-ss - initialize need_fallback
crypto: sun4i-ss - handle BigEndian for cipher
crypto: sun4i-ss - IV register does not work on A10 and A13
crypto: sun4i-ss - checking sg length is not sufficient
crypto: michael_mic - fix broken misalignment handling
crypto: aesni - prevent misaligned buffers on the stack
crypto: arm64/sha - add missing module aliases
drm/i915/gt: Correct surface base address for renderclear
drm/i915/gt: Flush before changing register state
btrfs: fix extent buffer leak on failure to copy root
btrfs: account for new extents being deleted in total_bytes_pinned
btrfs: handle space_info::total_bytes_pinned inside the delayed ref itself
btrfs: splice remaining dirty_bg's onto the transaction dirty bg list
btrfs: fix reloc root leak with 0 ref reloc roots on recovery
btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
btrfs: add asserts for deleting backref cache nodes
btrfs: do not warn if we can't find the reloc root when looking up backref
btrfs: do not cleanup upper nodes in btrfs_backref_cleanup_node
KEYS: trusted: Reserve TPM for seal and unseal operations
KEYS: trusted: Fix migratable=1 failing
KEYS: trusted: Fix incorrect handling of tpm_get_random()
tpm_tis: Clean up locality release
tpm_tis: Fix check_locality for correct locality acquisition
erofs: initialized fields can only be observed after bit is set
selinux: fix inconsistency between inode_getxattr and inode_listsecurity
ASoC: siu: Fix build error by a wrong const prefix
drm/rockchip: Require the YTR modifier for AFBC
drm/panel: kd35t133: allow using non-continuous dsi clock
drm/sched: Cancel and flush all outstanding jobs before finish.
drm/modes: Switch to 64bit maths to avoid integer overflow
drm/nouveau/kms: handle mDP connectors
drm/amdgpu: Set reference clock to 100Mhz on Renoir (v2)
drm/amdkfd: Fix recursive lock warnings
drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1
drm/amd/display: Remove Assert from dcn10_get_dig_frontend
drm/amd/display: Add FPU wrappers to dcn21_validate_bandwidth()
Revert "drm/amd/display: Update NV1x SR latency values"
bcache: Move journal work to new flush wq
bcache: Give btree_io_wq correct semantics again
Revert "bcache: Kill btree_io_wq"
Revert "MIPS: Octeon: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y"
MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target='
MIPS: Support binutils configured with --enable-mips-fix-loongson3-llsc=yes
MIPS: Ingenic: Disable HPTLB for D0 XBurst CPUs too
ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup
ALSA: hda/realtek: modify EAPD in the ALC886
ALSA: hda/hdmi: Drop bogus check at closing a stream
ALSA: hda: Add another CometLake-H PCI ID
ALSA: fireface: fix to parse sync status register of latter protocol
phy: lantiq: rcu-usb2: wait after clock enable
USB: serial: mos7720: fix error code in mos7720_write()
USB: serial: mos7840: fix error code in mos7840_write()
USB: serial: pl2303: fix line-speed handling on newer chips
USB: serial: ftdi_sio: fix FTX sub-integer prescaler
usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt
usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1
usb: musb: Fix runtime PM race in musb_queue_resume_work
USB: serial: option: update interface mapping for ZTE P685M
media: mceusb: Fix potential out-of-bounds shift
Input: i8042 - add ASUS Zenbook Flip to noselftest list
Input: joydev - prevent potential read overflow in ioctl
Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S
Input: raydium_ts_i2c - do not send zero length
HID: wacom: Ignore attempts to overwrite the touch_max value from HID
HID: logitech-dj: add support for keyboard events in eQUAD step 4 Gaming
cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known
ACPI: configfs: add missing check after configfs_register_default_group()
ACPI: property: Fix fwnode string properties matching
soundwire: intel: fix possible crash when no device is detected
blk-settings: align max_sectors on "logical_block_size" boundary
scsi: sd: Fix Opal support
ide/falconide: Fix module unload
block: reopen the device in blkdev_reread_part
scsi: sd: sd_zbc: Don't pass GFP_NOIO to kvcalloc
scsi: bnx2fc: Fix Kconfig warning & CNIC build errors
csky: Fix a size determination in gpr_get()
proc: use kvzalloc for our kernel buffer
mm/rmap: fix potential pte_unmap on an not mapped pte
mm: fix memory_failure() handling of dax-namespace metadata
mm,thp,shmem: make khugepaged obey tmpfs mount flags
i2c: exynos5: Preserve high speed master code
i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition
arm64: Add missing ISB after invalidating TLB in __primary_switch
KVM: x86/mmu: Expand collapsible SPTE zap for TDP MMU to ZONE_DEVICE and HugeTLB pages
KVM: SVM: Intercept INVPCID when it's disabled to inject #UD
NFSv4: Fixes for nfs4_bitmask_adjust()
r8169: fix jumbo packet handling on RTL8168e
mm/compaction: fix misbehaviors of fast_find_migrateblock()
mm/hugetlb: suppress wrong warning info when alloc gigantic page
mm/hugetlb: fix potential double free in hugetlb_register_node() error path
mm/memory.c: fix potential pte_unmap_unlock pte error
mm: memcontrol: fix slub memory accounting
mm: memcontrol: fix NR_ANON_THPS accounting in charge moving
ocfs2: fix a use after free on error
wireguard: kconfig: use arm chacha even with no neon
wireguard: device: do not generate ICMP for non-IP packets
vxlan: move debug check after netdev unregister
PCI: rockchip: Make 'ep-gpios' DT property optional
net/mlx4_core: Add missed mlx4_free_cmd_mailbox()
net: stmmac: fix CBS idleslope and sendslope calculation
ice: update the number of available RSS queues
ice: Fix state bits on LLDP mode switch
ice: Account for port VLAN in VF max packet size calculation
ice: report correct max number of TCs
vfio/type1: Use follow_pte()
pwm: iqs620a: Fix overflow and optimize calculations
octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()
i40e: Fix add TC filter for IPv6
nios2: fixed broken sys_clone syscall
Take mmap lock in cacheflush syscall
i40e: Fix VFs not created
i40e: Fix addition of RX filters after enabling FW LLDP agent
i40e: Fix overwriting flow control settings during driver loading
i40e: Add zero-initialization of AQ command structures
i40e: Fix flow for IPv6 next header (extension header)
PCI: cadence: Fix DMA range mapping early return error
PCI: pci-bridge-emul: Fix array overruns, improve safety
device-dax: Fix default return code of range_parse()
mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL
ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it
regmap: sdw: use _no_pm functions in regmap_read/write
remoteproc/mediatek: acknowledge watchdog IRQ after handled
misc: fastrpc: fix incorrect usage of dma_map_sgtable
soundwire: bus: fix confusion on device used by pm_runtime
soundwire: export sdw_write/read_no_pm functions
soundwire: bus: use sdw_write_no_pm when setting the bus scale registers
soundwire: bus: use sdw_update_no_pm when initializing a device
nvmem: core: skip child nodes not matching binding
nvmem: core: Fix a resource leak on error in nvmem_add_cells_from_of()
coresight: etm4x: Skip accessing TRCPDCR in save/restore
phy: USB_LGM_PHY should depend on X86
ext4: fix potential htree index checksum corruption
vfio-pci/zdev: fix possible segmentation fault issue
vfio/iommu_type1: Fix some sanity checks in detach group
vfio/iommu_type1: Populate full dirty when detach non-pinned group
drm/msm/dp: trigger unplug event in msm_dp_display_disable
drm/msm: Fix races managing the OOB state for timestamp vs timestamps.
drm/msm: Fix race of GPU init vs timestamp power management.
drm/msm/mdp5: Fix wait-for-commit for cmd panels
drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY)
drm/msm: Fix MSM_INFO_GET_IOVA with carveout
mei: hbm: call mei_set_devstate() on hbm stop response
PCI: Align checking of syscall user config accessors
VMCI: Use set_page_dirty_lock() when unregistering guest memory
PCI: xilinx-cpm: Fix reference count leak on error path
pwm: rockchip: Eliminate potential race condition when probing
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
pwm: rockchip: Enable APB clock during register access while probing
soundwire: cadence: fix ACK/NAK handling
PCI: rcar: Always allocate MSI addresses in 32bit space
misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users
phy: cadence-torrent: Fix error code in cdns_torrent_phy_probe()
phy: rockchip-emmc: emmc_phy_init() always return 0
misc: eeprom_93xx46: Fix module alias to enable module autoprobe
ARM: 9065/1: OABI compat: fix build when EPOLL is not enabled
Input: zinitix - fix return type of zinitix_init_touch()
sparc: fix led.c driver when PROC_FS is not enabled
sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set
Input: elo - fix an error code in elo_connect()
perf test: Fix unaligned access in sample parsing test
perf intel-pt: Fix IPC with CYC threshold
perf intel-pt: Fix premature IPC
perf intel-pt: Fix missing CYC processing in PSB
perf record: Fix continue profiling after draining the buffer
Input: sur40 - fix an error code in sur40_probe()
RDMA/rtrs-srv: Do not pass a valid pointer to PTR_ERR()
RDMA/rtrs-srv-sysfs: fix missing put_device
RDMA/rtrs-srv: fix memory leak by missing kobject free
RDMA/rtrs: Only allow addition of path to an already established session
RDMA/rtrs-srv: Fix stack-out-of-bounds
RDMA/ucma: Fix use-after-free bug in ucma_create_uevent
RDMA/hns: Fixes missing error code of CMDQ
ceph: fix flush_snap logic after putting caps
svcrdma: Hold private mutex while invoking rdma_accept()
nfsd: register pernet ops last, unregister first
perf symbols: Fix return value when loading PE DSO
printk: avoid prb_first_valid_seq() where possible
spi: Skip zero-length transfers in spi_transfer_one_message()
spi: dw: Avoid stack content exposure
regulator: bd718x7, bd71828, Fix dvs voltage levels
perf symbols: Use (long) for iterator for bfd symbols
selftests/ftrace: Update synthetic event syntax errors
clk: aspeed: Fix APLL calculate formula from ast2600-A2
regulator: qcom-rpmh: fix pm8009 ldo7
powerpc/kuap: Restore AMR after replaying soft interrupts
powerpc/uaccess: Avoid might_fault() when user access is enabled
spi: pxa2xx: Fix the controller numbering for Wildcat Point
clk: divider: fix initialization with parent_hw
RDMA/hns: Disable RQ inline by default
RDMA/hns: Fix type of sq_signal_bits
RDMA/siw: Fix calculation of tx_valid_cpus size
RDMA/hns: Fixed wrong judgments in the goto branch
kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir
kunit: tool: fix unit test cleanup handling
clk: qcom: gcc-msm8998: Fix Alpha PLL type for all GPLLs
powerpc/8xx: Fix software emulation interrupt
powerpc/pseries/dlpar: handle ibm, configure-connector delay status
mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
mfd: altera-sysmgr: Fix physical address storing more
spi: stm32: properly handle 0 byte transfer
RDMA/rxe: Correct skb on loopback path
RDMA/rxe: Fix coding error in rxe_rcv_mcast_pkt
RDMA/rxe: Fix coding error in rxe_recv.c
perf vendor events arm64: Fix Ampere eMag event typo
perf tools: Fix DSO filtering when not finding a map for a sampled address
rtc: zynqmp: depend on HAS_IOMEM
tracepoint: Do not fail unregistering a probe due to memory failure
IB/cm: Avoid a loop when device has 255 ports
IB/mlx5: Return appropriate error code instead of ENOMEM
iommu: Properly pass gfp_t in _iommu_map() to avoid atomic sleeping
iommu: Move iotlb_sync_map out from __iommu_map
amba: Fix resource leak for drivers without .remove
i2c: qcom-geni: Store DMA mapping data in geni_i2c_dev struct
ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
mmc: renesas_sdhi_internal_dmac: Fix DMA buffer alignment from 8 to 128-bytes
mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
mmc: sdhci-sprd: Fix some resource leaks in the remove function
mmc: owl-mmc: Fix a resource leak in an error handling path and in the remove function
powerpc/time: Enable sched clock for irqtime
powerpc/47x: Disable 256k page size
KVM: PPC: Make the VMX instruction emulation routines static
IB/umad: Return EPOLLERR in case of when device disassociated
IB/umad: Return EIO in case of when device disassociated
iommu: Switch gather->end to the inclusive end
scsi: lpfc: Fix ancient double free
objtool: Fix ".cold" section suffix check for newer versions of GCC
objtool: Fix retpoline detection in asm code
objtool: Fix error handling for STD/CLD warnings
auxdisplay: ht16k33: Fix refresh rate handling
watchdog: intel-mid_wdt: Postpone IRQ handler registration till SCU is ready
isofs: release buffer head before return
regulator: core: Avoid debugfs: Directory ... already present! error
power: supply: smb347-charger: Fix interrupt usage if interrupt is unavailable
power: supply: axp20x_usb_power: Init work before enabling IRQs
regulator: s5m8767: Drop regulators OF node reference
spi: atmel: Put allocated master before return
regulator: s5m8767: Fix reference count leak
certs: Fix blacklist flag type confusion
watch_queue: Drop references to /dev/watch_queue
regulator: axp20x: Fix reference cout leak
platform/chrome: cros_ec_proto: Add LID and BATTERY to default mask
platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT
clk: sunxi-ng: h6: Fix clock divider range on some clocks
IB/mlx5: Add mutex destroy call to cap_mask_mutex mutex
RDMA/mlx5: Use the correct obj_id upon DEVX TIR creation
spi: imx: Don't print error on -EPROBEDEFER
clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined
clocksource/drivers/ixp4xx: Select TIMER_OF when needed
power: supply: fix sbs-charger build, needs REGMAP_I2C
dmaengine: idxd: set DMA channel to be private
rtc: s5m: select REGMAP_I2C
power: reset: at91-sama5d2_shdwc: fix wkupdbc mask
RDMA/rtrs-srv: Init wr_cnt as 1
RDMA/rtrs-clt: Refactor the failure cases in alloc_clt
RDMA/rtrs-srv: Fix missing wr_cqe
RDMA/rtrs: Call kobject_put in the failure path
RDMA/rtrs-clt: Set mininum limit when create QP
RDMA/rtrs-srv: Use sysfs_remove_file_self for disconnect
RDMA/rtrs-srv: Release lock before call into close_sess
RDMA/rtrs: Extend ibtrs_cq_qp_create
of/fdt: Make sure no-map does not remove already reserved regions
fdt: Properly handle "no-map" field in the memory region
power: supply: cpcap-charger: Fix power_supply_put on null battery pointer
power: supply: cpcap-battery: Fix missing power_supply_put()
power: supply: cpcap-charger: Fix missing power_supply_put()
mfd: bd9571mwv: Use devm_mfd_add_devices()
dmaengine: hsu: disable spurious interrupt
dmaengine: owl-dma: Fix a resource leak in the remove function
dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function
dmaengine: fsldma: Fix a resource leak in the remove function
RDMA/siw: Fix handling of zero-sized Read and Receive Queues.
HID: core: detect and skip invalid inputs to snto32()
clk: renesas: r8a779a0: Fix parent of CBFUSA clock
clk: renesas: r8a779a0: Remove non-existent S2 clock
clk: sunxi-ng: h6: Fix CEC clock
spi: cadence-quadspi: Abort read if dummy cycles required are too many
i2c: iproc: handle master read request
i2c: iproc: update slave isr mask (ISR_MASK_SLAVE)
i2c: iproc: handle only slave interrupts which are enabled
quota: Fix memory leak when handling corrupted quota file
arm64: dts: qcom: qrb5165-rb5: fix pm8009 regulators
regulator: qcom-rpmh-regulator: add pm8009-1 chip revision
selftests/powerpc: Make the test check in eeh-basic.sh posix compliant
clk: meson: clk-pll: propagate the error from meson_clk_pll_set_rate()
clk: meson: clk-pll: make "ret" a signed integer
clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL
power: supply: cpcap: Add missing IRQF_ONESHOT to fix regression
HSI: Fix PM usage counter unbalance in ssi_hw_init
capabilities: Don't allow writing ambiguous v3 file capabilities
drm/amdgpu/display: remove hdcp_srm sysfs on device removal
smp: Process pending softirqs in flush_smp_call_function_from_idle()
irqchip/imx: IMX_INTMUX should not default to y, unconditionally
ubifs: Fix error return code in alloc_wbufs()
ubifs: replay: Fix high stack usage, again
ubifs: Fix memleak in ubifs_init_authentication
jffs2: fix use after free in jffs2_sum_write_data()
fs/jfs: fix potential integer overflow on shift of a int
ASoC: simple-card-utils: Fix device module clock
ima: Free IMA measurement buffer after kexec syscall
ima: Free IMA measurement buffer on error
ASoC: SOF: sof-pci-dev: add missing Up-Extreme quirk
nvmet: set status to 0 in case for invalid nsid
nvmet: remove extra variable in identify ns
nvme-multipath: set nr_zones for zoned namespaces
nvmet-tcp: fix potential race of tcp socket closing accept_work
nvmet-tcp: fix receive data digest calculation for multiple h2cdata PDUs
io_uring: fix possible deadlock in io_uring_poll
crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()
hwrng: timeriomem - Fix cooldown period calculation
drm/dp_mst: Don't cache EDIDs for physical ports
drm/lima: fix reference leak in lima_pm_busy
drm/vc4: hdmi: Update the CEC clock divider on HSM rate change
drm/vc4: hdmi: Compute the CEC clock divider from the clock rate
drm/vc4: hdmi: Restore cec physical address on reconnect
drm/vc4: hdmi: Fix up CEC registers
drm/vc4: hdmi: Fix register offset with longer CEC messages
drm/vc4: hdmi: Move hdmi reset to bind
s390/zcrypt: return EIO when msg retry limit reached
KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64
btrfs: fix double accounting of ordered extent for subpage case in btrfs_invalidapge
btrfs: clarify error returns values in __load_free_space_cache
ASoC: SOF: debug: Fix a potential issue on string buffer termination
ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown
ASoC: qcom: lpass: Fix i2s ctl register bit map
locking/lockdep: Avoid unmatched unlock
ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A3E
ASoC: Intel: sof_sdw: add missing TGL_HDMI quirk for Dell SKU 0A5E
Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind()
drm/mediatek: Check if fb is null
KVM: nSVM: Don't strip host's C-bit from guest's CR3 when reading PDPTRs
ASoC: qcom: Fix typo error in HDMI regmap config callbacks
f2fs: fix a wrong condition in __submit_bio
drm/amdgpu: Prevent shift wrapping in amdgpu_read_mask()
f2fs: fix to avoid inconsistent quota data
mtd: parsers: afs: Fix freeing the part name memory in failure
ASoC: codecs: add missing max_register in regmap config
ASoC: cpcap: fix microphone timeslot mask
ata: ahci_brcm: Add back regulators management
mm: proc: Invalidate TLB after clearing soft-dirty page state
drm/nouveau: bail out of nouveau_channel_new if channel init fails
crypto: talitos - Fix ctr(aes) on SEC1
crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error)
mtd: parser: imagetag: fix error codes in bcm963xx_parse_imagetag_partitions()
perf/arm-cmn: Move IRQs when migrating context
perf/arm-cmn: Fix PMU instance naming
ASoC: SOF: Intel: hda: cancel D0i3 work during runtime suspend
ASoC: qcom: lpass-cpu: Remove bit clock state check
f2fs: compress: fix potential deadlock
sched/eas: Don't update misfit status if the task is pinned
media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values
media: pxa_camera: declare variable when DEBUG is defined
media: mtk-vcodec: fix argument used when DEBUG is defined
media: cx25821: Fix a bug when reallocating some dma memory
media: qm1d1c0042: fix error return code in qm1d1c0042_init()
media: atomisp: Fix a buffer overflow in debug code
media: vidtv: psi: fix missing crc for PMT
media: lmedm04: Fix misuse of comma
media: software_node: Fix refcounts in software_node_get_next_child()
drm/amd/display: Fix HDMI deep color output for DCE 6-11.
drm/amd/display: Fix 10/12 bpc setup in DCE output bit depth reduction.
macintosh/adb-iop: Use big-endian autopoll mask
bsg: free the request before return error code
drm/amdgpu: toggle on DF Cstate after finishing xgmi injection
drm/tegra: Fix reference leak when pm_runtime_get_sync() fails
MIPS: Compare __SYNC_loongson3_war against 0
MIPS: properly stop .eh_frame generation
media: ti-vpe: cal: fix write to unallocated memory
media: imx7: csi: Fix pad link validation
media: imx7: csi: Fix regression for parallel cameras on i.MX6UL
drm/sun4i: tcon: fix inverted DCLK polarity
sched/fair: Avoid stale CPU util_est value for schedutil in task dequeue
crypto: bcm - Rename struct device_private to bcm_device_private
evm: Fix memleak in init_desc
ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-dai
ASoC: cs42l56: fix up error handling in probe
media: aspeed: fix error return code in aspeed_video_setup_video()
media: tm6000: Fix memleak in tm6000_start_stream
media: media/pci: Fix memleak in empress_init
media: em28xx: Fix use-after-free in em28xx_alloc_urbs
media: vsp1: Fix an error handling path in the probe function
media: camss: missing error code in msm_video_register()
media: mtk-vcodec: fix error return code in vdec_vp9_decode()
media: imx: Fix csc/scaler unregister
media: imx: Unregister csc/scaler only if registered
media: i2c: ov5670: Fix PIXEL_RATE minimum value
media: ipu3-cio2: Build only for x86
drm/fourcc: fix Amlogic format modifier masks
drm/virtio: make sure context is created in gem open
MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0
MIPS: c-r4k: Fix section mismatch for loongson2_sc_init
drm/amdgpu: Fix macro name _AMDGPU_TRACE_H_ in preprocessor if condition
drm: rcar-du: Fix the return check of of_parse_phandle and of_find_device_by_node
drm: rcar-du: Fix crash when using LVDS1 clock for CRTC
drm: rcar-du: Fix PM reference leak in rcar_cmm_enable()
kcsan: Rewrite kcsan_prandom_u32_max() without prandom_u32_state()
media: allegro: Fix use after free on error
hwrng: ingenic - Fix a resource leak in an error handling path
crypto: arm64/aes-ce - really hide slower algos when faster ones are enabled
crypto: sun4i-ss - fix kmap usage
crypto: sun4i-ss - linearize buffers content must be kept
drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check
drm/panel: mantix: Tweak init sequence
drm/fb-helper: Add missed unlocks in setcmap_legacy()
gma500: clean up error handling in init
drm/gma500: Fix error return code in psb_driver_load()
fbdev: aty: SPARC64 requires FB_ATY_CT
tty: implement read_iter
tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer
net: enetc: fix destroyed phylink dereference during unbind
net: mvneta: Remove per-cpu queue mapping for Armada 3700
net: amd-xgbe: Fix network fluctuations when using 1G BELFUSE SFP
net: amd-xgbe: Reset link when the link never comes back
net: amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning
net: amd-xgbe: Reset the PHY rx data path when mailbox command timeout
net: phy: mscc: adding LCPLL reset to VSC8514
net: dsa: felix: don't deinitialize unused ports
net: dsa: felix: perform teardown in reverse order of setup
ibmvnic: skip send_request_unmap for timeout reset
ibmvnic: add memory barrier to protect long term buffer
bpf: Clear subreg_def for global function return values
b43: N-PHY: Fix the update of coef for the PHY revision >= 3case
cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds
net: axienet: Handle deferred probe on clock properly
tcp: fix SO_RCVLOWAT related hangs under mem pressure
selftests: mptcp: fix ACKRX debug message
bpf: Fix bpf_fib_lookup helper MTU check for SKB ctx
bpf, devmap: Use GFP_KERNEL for xdp bulk queue allocation
bpf: Fix an unitialized value in bpf_iter
libbpf: Ignore non function pointer member in struct_ops
mac80211: fix potential overflow when multiplying to u32 integers
net/mlx5e: Check tunnel offload is required before setting SWP
net/mlx5e: CT: manage the lifetime of the ct entry object
net/mlx5: Disable devlink reload for lag devices
net/mlx5: Disallow RoCE on lag device
net/mlx5: Disallow RoCE on multi port slave device
net/mlx5: Disable devlink reload for multi port slave device
net/mlx5e: kTLS, Use refcounts to free kTLS RX priv context
net/mlx5e: Replace synchronize_rcu with synchronize_net
net/mlx5: Fix health error state handling
net/mlx5e: Change interrupt moderation channel params also when channels are closed
net/mlx5e: Don't change interrupt moderation params when DIM is enabled
net: phy: consider that suspend2ram may cut off PHY power
dpaa2-eth: fix memory leak in XDP_REDIRECT
xen/netback: fix spurious event detection for common event case
bnxt_en: Fix devlink info's stored fw.psid version format.
bnxt_en: reverse order of TX disable and carrier off
ibmvnic: Set to CLOSED state even on error
selftests/bpf: Convert test_xdp_redirect.sh to bash
ath9k: fix data bus crash when setting nf_override via debugfs
iwlwifi: pnvm: increment the pointer before checking the TLV
iwlwifi: pnvm: set the PNVM again if it was already loaded
bpf_lru_list: Read double-checked variable once without lock
iwlwifi: mvm: don't check if CSA event is running before removing
iwlwifi: mvm: assign SAR table revision to the command later
iwlwifi: mvm: send stored PPAG command instead of local
iwlwifi: mvm: store PPAG enabled/disabled flag properly
iwlwifi: mvm: fix the type we use in the PPAG table validity checks
soc: aspeed: snoop: Add clock control logic
ath11k: fix a locking bug in ath11k_mac_op_start()
ath10k: Fix lockdep assertion warning in ath10k_sta_statistics
ath10k: Fix suspicious RCU usage warning in ath10k_wmi_tlv_parse_peer_stats_info()
ARM: at91: use proper asm syntax in pm_suspend
staging: wfx: fix possible panic with re-queued frames
optee: simplify i2c access
ARM: s3c: fix fiq for clang IAS
iwlwifi: mvm: set enabled in the PPAG command properly
arm64: dts: meson: fix broken wifi node for Khadas VIM3L
arm64: dts: msm8916: Fix reserved and rfsa nodes unit address
soc: qcom: ocmem: don't return NULL in of_get_ocmem
Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv
opp: Correct debug message in _opp_add_static_v2()
arm64: dts: armada-3720-turris-mox: rename u-boot mtd partition to a53-firmware
ARM: dts: armada388-helios4: assign pinctrl to each fan
ARM: dts: armada388-helios4: assign pinctrl to LEDs
can: mcp251xfd: mcp251xfd_probe(): fix errata reference
arm64: dts: renesas: beacon: Fix EEPROM compatible value
x86/MSR: Filter MSR writes through X86_IOC_WRMSR_REGS ioctl too
staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules
usb: dwc2: Make "trimming xfer length" a debug message
usb: dwc2: Abort transaction after errors with unknown reason
usb: dwc2: Do not update data length if it is 0 on inbound transfers
ARM: dts: Configure missing thermal interrupt for 4430
memory: ti-aemif: Drop child node when jumping out loop
Bluetooth: Put HCI device if inquiry procedure interrupts
Bluetooth: drop HCI device reference before return
staging: media: atomisp: Fix size_t format specifier in hmm_alloc() debug statemenet
soc: ti: pm33xx: Fix some resource leak in the error handling paths of the probe function
soc: qcom: socinfo: Fix an off by one in qcom_show_pmic_model()
arm64: dts: qcom: sdm845-db845c: Fix reset-pin of ov8856 node
usb: gadget: u_audio: Free requests only after callback
ACPICA: Fix exception code class checks
arm64: dts: rockchip: rk3328: Add clock_in_out property to gmac2phy node
cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
cpufreq: brcmstb-avs-cpufreq: Free resources in error path
arm64: dts: qcom: msm8916-samsung-a2015: Fix sensors
arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
arm64: dts: allwinner: H6: properly connect USB PHY to port 0
arm64: dts: allwinner: A64: properly connect USB PHY to port 0
firmware: arm_scmi: Fix call site of scmi_notification_exit
bpf: Avoid warning when re-casting __bpf_call_base into __bpf_call_base_args
bpf: Add bpf_patch_call_args prototype to include/linux/bpf.h
net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock
arm64: dts: qcom: msm8916-samsung-a5u: Fix iris compatible
staging: vchiq: Fix bulk transfers on 64-bit builds
staging: vchiq: Fix bulk userdata handling
Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops
arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso
arm64: dts: exynos: correct PMIC interrupt trigger level on TM2
ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid XU3 family
ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa
ARM: dts: exynos: correct PMIC interrupt trigger level on Spring
ARM: dts: exynos: correct PMIC interrupt trigger level on Rinato
ARM: dts: exynos: correct PMIC interrupt trigger level on Monk
ARM: dts: exynos: correct PMIC interrupt trigger level on Artik 5
arm64: dts: renesas: beacon: Fix audio-1.8V pin enable
arm64: dts: renesas: beacon kit: Fix choppy Bluetooth Audio
Bluetooth: Fix initializing response id after clearing struct
Bluetooth: hci_uart: Fix a race for write_work scheduling
Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function
ath10k: Fix error handling in case of CE pipe init failure
drm/i915/gt: One more flush for Baytrail clear residuals
ALSA: pcm: Don't call sync_stop if it hasn't been stopped
ALSA: pcm: Assure sync with the pending stop operation at suspend
ALSA: pcm: Call sync_stop at disconnection
random: fix the RNDRESEEDCRNG ioctl
vmlinux.lds.h: Define SANTIZER_DISCARDS with CONFIG_GCOV_KERNEL=y
MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section
ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode
bfq: Avoid false bfq queue merging
virt: vbox: Do not use wait_event_interruptible when called from kernel context
PCI: Decline to resize resources if boot config must be preserved
PCI: qcom: Use PHY_REFCLK_USE_PAD only for ipq8064
w1: w1_therm: Fix conversion result for negative temperatures
kdb: Make memory allocations more robust
scsi: qla2xxx: Fix mailbox Ch erroneous error
scsi: libsas: docs: Remove notify_ha_event()
debugfs: do not attempt to create a new file before the filesystem is initalized
debugfs: be more robust at handling improper input in debugfs_lookup()
vdpa/mlx5: fix param validation in mlx5_vdpa_get_config()
vmlinux.lds.h: add DWARF v5 sections
Conflicts:
Documentation/devicetree/bindings
Documentation/devicetree/bindings/net/btusb.txt
Documentation/devicetree/bindings/net/ethernet-controller.yaml
drivers/cpufreq/qcom-cpufreq-hw.c
drivers/nvmem/qcom-spmi-sdam.c
drivers/soc/qcom/socinfo.c
drivers/spmi/spmi-pmic-arb.c
net/qrtr/tun.c
Change-Id: I5a14e8d8d00a40af0a0e022ad85996f1351704f4
Signed-off-by: Ivaylo Georgiev <irgeorgiev@codeaurora.org>
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
commit
d82a67cbef
@ -17,7 +17,7 @@ PMU events
|
||||
----------
|
||||
|
||||
The PMU driver registers a single PMU device for the whole interconnect,
|
||||
see /sys/bus/event_source/devices/arm_cmn. Multi-chip systems may link
|
||||
see /sys/bus/event_source/devices/arm_cmn_0. Multi-chip systems may link
|
||||
more than one CMN together via external CCIX links - in this situation,
|
||||
each mesh counts its own events entirely independently, and additional
|
||||
PMU devices will be named arm_cmn_{1..n}.
|
||||
|
@ -1019,11 +1019,11 @@ that benefit from having their data cached, zone_reclaim_mode should be
|
||||
left disabled as the caching effect is likely to be more important than
|
||||
data locality.
|
||||
|
||||
zone_reclaim may be enabled if it's known that the workload is partitioned
|
||||
such that each partition fits within a NUMA node and that accessing remote
|
||||
memory would cause a measurable performance reduction. The page allocator
|
||||
will then reclaim easily reusable pages (those page cache pages that are
|
||||
currently not used) before allocating off node pages.
|
||||
Consider enabling one or more zone_reclaim mode bits if it's known that the
|
||||
workload is partitioned such that each partition fits within a NUMA node
|
||||
and that accessing remote memory would cause a measurable performance
|
||||
reduction. The page allocator will take additional actions before
|
||||
allocating off node pages.
|
||||
|
||||
Allowing zone reclaim to write out pages stops processes that are
|
||||
writing large amounts of data from dirtying pages on other nodes. Zone
|
||||
|
@ -217,6 +217,12 @@ between the calls to start() and stop(), so holding a lock during that time
|
||||
is a reasonable thing to do. The seq_file code will also avoid taking any
|
||||
other locks while the iterator is active.
|
||||
|
||||
The iterater value returned by start() or next() is guaranteed to be
|
||||
passed to a subsequent next() or stop() call. This allows resources
|
||||
such as locks that were taken to be reliably released. There is *no*
|
||||
guarantee that the iterator will be passed to show(), though in practice
|
||||
it often will be.
|
||||
|
||||
|
||||
Formatted output
|
||||
================
|
||||
|
@ -630,16 +630,15 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
|
||||
|
||||
default: initial size of receive buffer used by TCP sockets.
|
||||
This value overrides net.core.rmem_default used by other protocols.
|
||||
Default: 87380 bytes. This value results in window of 65535 with
|
||||
default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit
|
||||
less for default tcp_app_win. See below about these variables.
|
||||
Default: 131072 bytes.
|
||||
This value results in initial window of 65535.
|
||||
|
||||
max: maximal size of receive buffer allowed for automatically
|
||||
selected receiver buffers for TCP socket. This value does not override
|
||||
net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
|
||||
automatic tuning of that socket's receive buffer size, in which
|
||||
case this value is ignored.
|
||||
Default: between 87380B and 6MB, depending on RAM size.
|
||||
Default: between 131072 and 6MB, depending on RAM size.
|
||||
|
||||
tcp_sack - BOOLEAN
|
||||
Enable select acknowledgments (SACKS).
|
||||
|
@ -30,6 +30,7 @@ Power Management
|
||||
userland-swsusp
|
||||
|
||||
powercap/powercap
|
||||
powercap/dtpm
|
||||
|
||||
regulator/consumer
|
||||
regulator/design
|
||||
|
212
Documentation/power/powercap/dtpm.rst
Normal file
212
Documentation/power/powercap/dtpm.rst
Normal file
@ -0,0 +1,212 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
==========================================
|
||||
Dynamic Thermal Power Management framework
|
||||
==========================================
|
||||
|
||||
On the embedded world, the complexity of the SoC leads to an
|
||||
increasing number of hotspots which need to be monitored and mitigated
|
||||
as a whole in order to prevent the temperature to go above the
|
||||
normative and legally stated 'skin temperature'.
|
||||
|
||||
Another aspect is to sustain the performance for a given power budget,
|
||||
for example virtual reality where the user can feel dizziness if the
|
||||
performance is capped while a big CPU is processing something else. Or
|
||||
reduce the battery charging because the dissipated power is too high
|
||||
compared with the power consumed by other devices.
|
||||
|
||||
The user space is the most adequate place to dynamically act on the
|
||||
different devices by limiting their power given an application
|
||||
profile: it has the knowledge of the platform.
|
||||
|
||||
The Dynamic Thermal Power Management (DTPM) is a technique acting on
|
||||
the device power by limiting and/or balancing a power budget among
|
||||
different devices.
|
||||
|
||||
The DTPM framework provides an unified interface to act on the
|
||||
device power.
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The DTPM framework relies on the powercap framework to create the
|
||||
powercap entries in the sysfs directory and implement the backend
|
||||
driver to do the connection with the power manageable device.
|
||||
|
||||
The DTPM is a tree representation describing the power constraints
|
||||
shared between devices, not their physical positions.
|
||||
|
||||
The nodes of the tree are a virtual description aggregating the power
|
||||
characteristics of the children nodes and their power limitations.
|
||||
|
||||
The leaves of the tree are the real power manageable devices.
|
||||
|
||||
For instance::
|
||||
|
||||
SoC
|
||||
|
|
||||
`-- pkg
|
||||
|
|
||||
|-- pd0 (cpu0-3)
|
||||
|
|
||||
`-- pd1 (cpu4-5)
|
||||
|
||||
The pkg power will be the sum of pd0 and pd1 power numbers::
|
||||
|
||||
SoC (400mW - 3100mW)
|
||||
|
|
||||
`-- pkg (400mW - 3100mW)
|
||||
|
|
||||
|-- pd0 (100mW - 700mW)
|
||||
|
|
||||
`-- pd1 (300mW - 2400mW)
|
||||
|
||||
When the nodes are inserted in the tree, their power characteristics are propagated to the parents::
|
||||
|
||||
SoC (600mW - 5900mW)
|
||||
|
|
||||
|-- pkg (400mW - 3100mW)
|
||||
| |
|
||||
| |-- pd0 (100mW - 700mW)
|
||||
| |
|
||||
| `-- pd1 (300mW - 2400mW)
|
||||
|
|
||||
`-- pd2 (200mW - 2800mW)
|
||||
|
||||
Each node have a weight on a 2^10 basis reflecting the percentage of power consumption along the siblings::
|
||||
|
||||
SoC (w=1024)
|
||||
|
|
||||
|-- pkg (w=538)
|
||||
| |
|
||||
| |-- pd0 (w=231)
|
||||
| |
|
||||
| `-- pd1 (w=794)
|
||||
|
|
||||
`-- pd2 (w=486)
|
||||
|
||||
Note the sum of weights at the same level are equal to 1024.
|
||||
|
||||
When a power limitation is applied to a node, then it is distributed along the children given their weights. For example, if we set a power limitation of 3200mW at the 'SoC' root node, the resulting tree will be::
|
||||
|
||||
SoC (w=1024) <--- power_limit = 3200mW
|
||||
|
|
||||
|-- pkg (w=538) --> power_limit = 1681mW
|
||||
| |
|
||||
| |-- pd0 (w=231) --> power_limit = 378mW
|
||||
| |
|
||||
| `-- pd1 (w=794) --> power_limit = 1303mW
|
||||
|
|
||||
`-- pd2 (w=486) --> power_limit = 1519mW
|
||||
|
||||
|
||||
Flat description
|
||||
----------------
|
||||
|
||||
A root node is created and it is the parent of all the nodes. This
|
||||
description is the simplest one and it is supposed to give to user
|
||||
space a flat representation of all the devices supporting the power
|
||||
limitation without any power limitation distribution.
|
||||
|
||||
Hierarchical description
|
||||
------------------------
|
||||
|
||||
The different devices supporting the power limitation are represented
|
||||
hierarchically. There is one root node, all intermediate nodes are
|
||||
grouping the child nodes which can be intermediate nodes also or real
|
||||
devices.
|
||||
|
||||
The intermediate nodes aggregate the power information and allows to
|
||||
set the power limit given the weight of the nodes.
|
||||
|
||||
User space API
|
||||
==============
|
||||
|
||||
As stated in the overview, the DTPM framework is built on top of the
|
||||
powercap framework. Thus the sysfs interface is the same, please refer
|
||||
to the powercap documentation for further details.
|
||||
|
||||
* power_uw: Instantaneous power consumption. If the node is an
|
||||
intermediate node, then the power consumption will be the sum of all
|
||||
children power consumption.
|
||||
|
||||
* max_power_range_uw: The power range resulting of the maximum power
|
||||
minus the minimum power.
|
||||
|
||||
* name: The name of the node. This is implementation dependent. Even
|
||||
if it is not recommended for the user space, several nodes can have
|
||||
the same name.
|
||||
|
||||
* constraint_X_name: The name of the constraint.
|
||||
|
||||
* constraint_X_max_power_uw: The maximum power limit to be applicable
|
||||
to the node.
|
||||
|
||||
* constraint_X_power_limit_uw: The power limit to be applied to the
|
||||
node. If the value contained in constraint_X_max_power_uw is set,
|
||||
the constraint will be removed.
|
||||
|
||||
* constraint_X_time_window_us: The meaning of this file will depend
|
||||
on the constraint number.
|
||||
|
||||
Constraints
|
||||
-----------
|
||||
|
||||
* Constraint 0: The power limitation is immediately applied, without
|
||||
limitation in time.
|
||||
|
||||
Kernel API
|
||||
==========
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The DTPM framework has no power limiting backend support. It is
|
||||
generic and provides a set of API to let the different drivers to
|
||||
implement the backend part for the power limitation and create the
|
||||
power constraints tree.
|
||||
|
||||
It is up to the platform to provide the initialization function to
|
||||
allocate and link the different nodes of the tree.
|
||||
|
||||
A special macro has the role of declaring a node and the corresponding
|
||||
initialization function via a description structure. This one contains
|
||||
an optional parent field allowing to hook different devices to an
|
||||
already existing tree at boot time.
|
||||
|
||||
For instance::
|
||||
|
||||
struct dtpm_descr my_descr = {
|
||||
.name = "my_name",
|
||||
.init = my_init_func,
|
||||
};
|
||||
|
||||
DTPM_DECLARE(my_descr);
|
||||
|
||||
The nodes of the DTPM tree are described with dtpm structure. The
|
||||
steps to add a new power limitable device is done in three steps:
|
||||
|
||||
* Allocate the dtpm node
|
||||
* Set the power number of the dtpm node
|
||||
* Register the dtpm node
|
||||
|
||||
The registration of the dtpm node is done with the powercap
|
||||
ops. Basically, it must implements the callbacks to get and set the
|
||||
power and the limit.
|
||||
|
||||
Alternatively, if the node to be inserted is an intermediate one, then
|
||||
a simple function to insert it as a future parent is available.
|
||||
|
||||
If a device has its power characteristics changing, then the tree must
|
||||
be updated with the new power numbers and weights.
|
||||
|
||||
Nomenclature
|
||||
------------
|
||||
|
||||
* dtpm_alloc() : Allocate and initialize a dtpm structure
|
||||
|
||||
* dtpm_register() : Add the dtpm node to the tree
|
||||
|
||||
* dtpm_unregister() : Remove the dtpm node from the tree
|
||||
|
||||
* dtpm_update_power() : Update the power characteristics of the dtpm node
|
@ -189,7 +189,6 @@ num_phys
|
||||
The event interface::
|
||||
|
||||
/* LLDD calls these to notify the class of an event. */
|
||||
void (*notify_ha_event)(struct sas_ha_struct *, enum ha_event);
|
||||
void (*notify_port_event)(struct sas_phy *, enum port_event);
|
||||
void (*notify_phy_event)(struct sas_phy *, enum phy_event);
|
||||
|
||||
|
@ -1040,8 +1040,8 @@ The keyctl syscall functions are:
|
||||
|
||||
"key" is the ID of the key to be watched.
|
||||
|
||||
"queue_fd" is a file descriptor referring to an open "/dev/watch_queue"
|
||||
which manages the buffer into which notifications will be delivered.
|
||||
"queue_fd" is a file descriptor referring to an open pipe which
|
||||
manages the buffer into which notifications will be delivered.
|
||||
|
||||
"filter" is either NULL to remove a watch or a filter specification to
|
||||
indicate what events are required from the key.
|
||||
|
@ -182,6 +182,9 @@ is dependent on the CPU capability and the kernel configuration. The limit can
|
||||
be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the KVM_CHECK_EXTENSION
|
||||
ioctl() at run-time.
|
||||
|
||||
Creation of the VM will fail if the requested IPA size (whether it is
|
||||
implicit or explicit) is unsupported on the host.
|
||||
|
||||
Please note that configuring the IPA size does not affect the capability
|
||||
exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects
|
||||
size of the address translated by the stage2 level (guest physical to
|
||||
|
12
MAINTAINERS
12
MAINTAINERS
@ -9757,6 +9757,18 @@ F: include/linux/keyctl.h
|
||||
F: include/uapi/linux/keyctl.h
|
||||
F: security/keys/
|
||||
|
||||
KFENCE
|
||||
M: Alexander Potapenko <glider@google.com>
|
||||
M: Marco Elver <elver@google.com>
|
||||
R: Dmitry Vyukov <dvyukov@google.com>
|
||||
L: kasan-dev@googlegroups.com
|
||||
S: Maintained
|
||||
F: Documentation/dev-tools/kfence.rst
|
||||
F: arch/*/include/asm/kfence.h
|
||||
F: include/linux/kfence.h
|
||||
F: lib/Kconfig.kfence
|
||||
F: mm/kfence/
|
||||
|
||||
KFIFO
|
||||
M: Stefani Seibold <stefani@seibold.net>
|
||||
S: Maintained
|
||||
|
10
Makefile
10
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 19
|
||||
SUBLEVEL = 21
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
@ -908,7 +908,13 @@ KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod-prefix).thinlto-cache
|
||||
else
|
||||
CC_FLAGS_LTO += -flto
|
||||
endif
|
||||
|
||||
ifeq ($(SRCARCH),x86)
|
||||
# TODO(b/182572011): Revert workaround for compiler / linker bug.
|
||||
CC_FLAGS_LTO += -fvisibility=hidden
|
||||
else
|
||||
CC_FLAGS_LTO += -fvisibility=default
|
||||
endif
|
||||
|
||||
# Limit inlining across translation units to reduce binary size
|
||||
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
|
||||
@ -1163,7 +1169,7 @@ quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
|
||||
cmd_headers_install = \
|
||||
mkdir -p $(INSTALL_HDR_PATH); \
|
||||
rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
|
||||
usr/include $(INSTALL_HDR_PATH)
|
||||
$(hdr-prefix)usr/include $(INSTALL_HDR_PATH);
|
||||
|
||||
PHONY += headers_install
|
||||
headers_install: headers
|
||||
|
146923
android/abi_gki_aarch64.xml
146923
android/abi_gki_aarch64.xml
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -244,6 +244,7 @@
|
||||
cpufreq_freq_attr_scaling_boost_freqs
|
||||
cpufreq_generic_frequency_table_verify
|
||||
cpufreq_get_policy
|
||||
cpufreq_quick_get
|
||||
cpufreq_quick_get_max
|
||||
cpufreq_register_driver
|
||||
cpufreq_register_governor
|
||||
@ -1920,8 +1921,10 @@
|
||||
rproc_add_subdev
|
||||
rproc_alloc
|
||||
rproc_boot
|
||||
rproc_coredump_add_custom_segment
|
||||
rproc_coredump_add_segment
|
||||
rproc_coredump_set_elf_info
|
||||
rproc_coredump_using_sections
|
||||
rproc_del
|
||||
rproc_free
|
||||
rproc_get_by_child
|
||||
@ -2298,6 +2301,7 @@
|
||||
__tracepoint_android_rvh_can_migrate_task
|
||||
__tracepoint_android_rvh_check_preempt_wakeup
|
||||
__tracepoint_android_rvh_cpu_cgroup_attach
|
||||
__tracepoint_android_rvh_cpufreq_transition
|
||||
__tracepoint_android_rvh_dequeue_task
|
||||
__tracepoint_android_rvh_enqueue_task
|
||||
__tracepoint_android_rvh_find_busiest_queue
|
||||
@ -2353,6 +2357,7 @@
|
||||
__tracepoint_android_vh_timer_calc_index
|
||||
__tracepoint_binder_transaction_received
|
||||
__tracepoint_cpu_frequency
|
||||
__tracepoint_cpu_frequency_limits
|
||||
__tracepoint_cpu_idle
|
||||
__tracepoint_ipi_entry
|
||||
__tracepoint_ipi_raise
|
||||
|
@ -5,6 +5,8 @@
|
||||
__alloc_pages_nodemask
|
||||
__alloc_skb
|
||||
alloc_workqueue
|
||||
amba_driver_register
|
||||
amba_driver_unregister
|
||||
__arch_copy_from_user
|
||||
__arch_copy_to_user
|
||||
arm64_const_caps_ready
|
||||
@ -33,12 +35,19 @@
|
||||
capable
|
||||
cfg80211_inform_bss_data
|
||||
cfg80211_put_bss
|
||||
__cfi_slowpath
|
||||
__check_object_size
|
||||
__class_create
|
||||
class_destroy
|
||||
clk_disable
|
||||
clk_enable
|
||||
clk_get_rate
|
||||
clk_prepare
|
||||
clk_unprepare
|
||||
complete
|
||||
__const_udelay
|
||||
consume_skb
|
||||
contig_page_data
|
||||
__cpuhp_remove_state
|
||||
__cpuhp_setup_state
|
||||
__cpuhp_state_add_instance
|
||||
@ -59,6 +68,7 @@
|
||||
debugfs_remove
|
||||
delayed_work_timer_fn
|
||||
del_gendisk
|
||||
del_timer
|
||||
del_timer_sync
|
||||
destroy_workqueue
|
||||
_dev_err
|
||||
@ -71,9 +81,11 @@
|
||||
_dev_info
|
||||
__dev_kfree_skb_any
|
||||
devm_ioremap
|
||||
devm_ioremap_resource
|
||||
devm_kfree
|
||||
devm_kmalloc
|
||||
devm_request_threaded_irq
|
||||
_dev_notice
|
||||
dev_queue_xmit
|
||||
dev_set_name
|
||||
_dev_warn
|
||||
@ -97,13 +109,14 @@
|
||||
event_triggers_call
|
||||
fd_install
|
||||
finish_wait
|
||||
flush_dcache_page
|
||||
flush_work
|
||||
flush_workqueue
|
||||
fput
|
||||
free_irq
|
||||
free_netdev
|
||||
__free_pages
|
||||
free_pages
|
||||
freezing_slow_path
|
||||
fs_bio_set
|
||||
get_device
|
||||
__get_free_pages
|
||||
@ -122,17 +135,21 @@
|
||||
init_timer_key
|
||||
init_wait_entry
|
||||
__init_waitqueue_head
|
||||
input_alloc_absinfo
|
||||
input_allocate_device
|
||||
input_event
|
||||
input_free_device
|
||||
input_mt_init_slots
|
||||
input_register_device
|
||||
input_set_abs_params
|
||||
input_unregister_device
|
||||
__ioremap
|
||||
iounmap
|
||||
jiffies
|
||||
jiffies_to_msecs
|
||||
kasan_flag_enabled
|
||||
kfree
|
||||
kfree_skb
|
||||
kill_anon_super
|
||||
kimage_voffset
|
||||
__kmalloc
|
||||
kmalloc_caches
|
||||
@ -148,8 +165,12 @@
|
||||
kobject_uevent
|
||||
krealloc
|
||||
kstrdup
|
||||
kstrndup
|
||||
kstrtobool
|
||||
kstrtoint
|
||||
kstrtouint
|
||||
kstrtoull
|
||||
kthread_create_on_node
|
||||
ktime_get
|
||||
ktime_get_mono_fast_ns
|
||||
ktime_get_raw_ts64
|
||||
@ -196,9 +217,13 @@
|
||||
netif_tx_wake_queue
|
||||
nf_conntrack_destroy
|
||||
no_llseek
|
||||
nonseekable_open
|
||||
noop_llseek
|
||||
nr_cpu_ids
|
||||
__num_online_cpus
|
||||
of_find_property
|
||||
of_get_property
|
||||
of_property_read_variable_u32_array
|
||||
param_ops_bint
|
||||
param_ops_bool
|
||||
param_ops_charp
|
||||
@ -222,10 +247,6 @@
|
||||
__per_cpu_offset
|
||||
perf_trace_buf_alloc
|
||||
perf_trace_run_bpf_submit
|
||||
platform_device_add
|
||||
platform_device_alloc
|
||||
platform_device_del
|
||||
platform_device_put
|
||||
platform_device_unregister
|
||||
__platform_driver_register
|
||||
platform_driver_unregister
|
||||
@ -234,7 +255,11 @@
|
||||
pm_runtime_allow
|
||||
__pm_runtime_disable
|
||||
pm_runtime_enable
|
||||
pm_runtime_force_resume
|
||||
pm_runtime_force_suspend
|
||||
__pm_runtime_idle
|
||||
__pm_runtime_resume
|
||||
pm_runtime_set_autosuspend_delay
|
||||
__pm_runtime_suspend
|
||||
__pm_runtime_use_autosuspend
|
||||
preempt_schedule
|
||||
@ -261,12 +286,18 @@
|
||||
__rcu_read_lock
|
||||
__rcu_read_unlock
|
||||
refcount_warn_saturate
|
||||
__refrigerator
|
||||
register_blkdev
|
||||
register_netdev
|
||||
register_netdevice
|
||||
register_netdevice_notifier
|
||||
register_shrinker
|
||||
register_virtio_device
|
||||
register_virtio_driver
|
||||
regmap_exit
|
||||
__regmap_init
|
||||
regmap_read
|
||||
regmap_write
|
||||
remap_pfn_range
|
||||
__request_module
|
||||
request_threaded_irq
|
||||
@ -282,6 +313,13 @@
|
||||
seq_printf
|
||||
seq_read
|
||||
seq_release
|
||||
serio_close
|
||||
serio_interrupt
|
||||
serio_open
|
||||
serio_reconnect
|
||||
__serio_register_driver
|
||||
__serio_register_port
|
||||
serio_unregister_driver
|
||||
set_disk_ro
|
||||
sg_alloc_table
|
||||
sg_free_table
|
||||
@ -290,7 +328,10 @@
|
||||
sg_next
|
||||
simple_strtoul
|
||||
skb_add_rx_frag
|
||||
skb_dequeue
|
||||
skb_push
|
||||
skb_put
|
||||
skb_queue_tail
|
||||
snd_card_disconnect
|
||||
snd_card_free
|
||||
snd_card_new
|
||||
@ -330,7 +371,6 @@
|
||||
strncmp
|
||||
strncpy
|
||||
strsep
|
||||
strstr
|
||||
submit_bio
|
||||
sync_file_create
|
||||
synchronize_rcu
|
||||
@ -338,6 +378,7 @@
|
||||
__sysfs_match_string
|
||||
sysfs_remove_group
|
||||
sysfs_remove_link
|
||||
system_freezing_cnt
|
||||
system_wq
|
||||
trace_event_buffer_commit
|
||||
trace_event_buffer_reserve
|
||||
@ -351,6 +392,7 @@
|
||||
trace_raw_output_prep
|
||||
trace_seq_printf
|
||||
try_module_get
|
||||
__udelay
|
||||
unlock_page
|
||||
unregister_blkdev
|
||||
unregister_netdev
|
||||
@ -360,6 +402,7 @@
|
||||
unregister_virtio_driver
|
||||
up_read
|
||||
up_write
|
||||
__usecs_to_jiffies
|
||||
usleep_range
|
||||
vabits_actual
|
||||
vfree
|
||||
@ -386,8 +429,62 @@
|
||||
vring_transport_features
|
||||
wait_for_completion
|
||||
__wake_up
|
||||
wake_up_process
|
||||
__warn_printk
|
||||
|
||||
# required by ambakmi.ko
|
||||
amba_release_regions
|
||||
amba_request_regions
|
||||
clk_get
|
||||
clk_put
|
||||
serio_unregister_port
|
||||
|
||||
# required by armmmci.ko
|
||||
clk_round_rate
|
||||
clk_set_rate
|
||||
devm_clk_get
|
||||
devm_of_iomap
|
||||
devm_pinctrl_get
|
||||
__devm_reset_control_get
|
||||
dmam_alloc_attrs
|
||||
dma_release_channel
|
||||
dma_request_chan
|
||||
mmc_add_host
|
||||
mmc_alloc_host
|
||||
mmc_free_host
|
||||
mmc_gpiod_request_cd
|
||||
mmc_gpiod_request_ro
|
||||
mmc_gpio_get_cd
|
||||
mmc_gpio_get_ro
|
||||
mmc_of_parse
|
||||
mmc_regulator_get_supply
|
||||
mmc_regulator_set_ocr
|
||||
mmc_regulator_set_vqmmc
|
||||
mmc_remove_host
|
||||
mmc_request_done
|
||||
mmc_send_tuning
|
||||
pinctrl_lookup_state
|
||||
pinctrl_pm_select_sleep_state
|
||||
pinctrl_select_default_state
|
||||
pinctrl_select_state
|
||||
regulator_disable
|
||||
regulator_enable
|
||||
reset_control_assert
|
||||
reset_control_deassert
|
||||
sg_miter_next
|
||||
sg_miter_start
|
||||
sg_miter_stop
|
||||
|
||||
# required by clk-vexpress-osc.ko
|
||||
clk_hw_set_rate_range
|
||||
devm_clk_hw_register
|
||||
devm_of_clk_add_hw_provider
|
||||
of_clk_hw_simple_get
|
||||
of_property_read_string
|
||||
|
||||
# required by deferred-free-helper.ko
|
||||
sched_set_normal
|
||||
|
||||
# required by dummy-cpufreq.ko
|
||||
cpufreq_generic_attr
|
||||
cpufreq_register_driver
|
||||
@ -402,6 +499,7 @@
|
||||
device_find_child
|
||||
device_match_name
|
||||
platform_bus_type
|
||||
strstr
|
||||
|
||||
# required by gnss-serial.ko
|
||||
gnss_allocate_device
|
||||
@ -409,8 +507,6 @@
|
||||
gnss_insert_raw
|
||||
gnss_put_device
|
||||
gnss_register_device
|
||||
of_property_read_variable_u32_array
|
||||
__pm_runtime_idle
|
||||
serdev_device_close
|
||||
serdev_device_open
|
||||
serdev_device_set_baudrate
|
||||
@ -419,9 +515,6 @@
|
||||
serdev_device_write
|
||||
serdev_device_write_wakeup
|
||||
|
||||
# required by goldfish_address_space.ko
|
||||
__ioremap
|
||||
|
||||
# required by goldfish_battery.ko
|
||||
power_supply_changed
|
||||
power_supply_get_drvdata
|
||||
@ -440,6 +533,18 @@
|
||||
dma_fence_default_wait
|
||||
dma_fence_free
|
||||
|
||||
# required by hci_vhci.ko
|
||||
bt_err
|
||||
_copy_from_iter_full
|
||||
hci_alloc_dev
|
||||
hci_free_dev
|
||||
hci_recv_frame
|
||||
hci_register_dev
|
||||
hci_unregister_dev
|
||||
skb_pull
|
||||
skb_queue_head
|
||||
skb_queue_purge
|
||||
|
||||
# required by ledtrig-audio.ko
|
||||
led_trigger_event
|
||||
led_trigger_register_simple
|
||||
@ -488,11 +593,12 @@
|
||||
ieee80211_remain_on_channel_expired
|
||||
ieee80211_rx_irqsafe
|
||||
ieee80211_scan_completed
|
||||
ieee80211_stop_queues
|
||||
ieee80211_stop_tx_ba_cb_irqsafe
|
||||
ieee80211_tx_status_irqsafe
|
||||
ieee80211_unregister_hw
|
||||
ieee80211_wake_queues
|
||||
init_net
|
||||
kstrndup
|
||||
__netdev_alloc_skb
|
||||
netif_rx
|
||||
netlink_broadcast
|
||||
@ -518,10 +624,7 @@
|
||||
simple_attr_release
|
||||
skb_copy
|
||||
skb_copy_expand
|
||||
skb_dequeue
|
||||
__skb_ext_put
|
||||
skb_push
|
||||
skb_queue_tail
|
||||
skb_trim
|
||||
skb_unlink
|
||||
unregister_pernet_device
|
||||
@ -561,7 +664,6 @@
|
||||
fget
|
||||
file_path
|
||||
flush_signals
|
||||
flush_workqueue
|
||||
free_buffer_head
|
||||
int_pow
|
||||
invalidate_bdev
|
||||
@ -572,10 +674,7 @@
|
||||
kernfs_put
|
||||
kobject_del
|
||||
kobject_get
|
||||
kstrtobool
|
||||
kstrtoll
|
||||
kstrtouint
|
||||
kthread_create_on_node
|
||||
kthread_parkme
|
||||
kthread_should_park
|
||||
kthread_should_stop
|
||||
@ -611,7 +710,6 @@
|
||||
unregister_reboot_notifier
|
||||
unregister_sysctl_table
|
||||
vfs_fsync
|
||||
wake_up_process
|
||||
|
||||
# required by nd_virtio.ko
|
||||
bio_chain
|
||||
@ -634,6 +732,46 @@
|
||||
netdev_pick_tx
|
||||
pci_bus_type
|
||||
|
||||
# required by page_pool.ko
|
||||
mod_node_page_state
|
||||
|
||||
# required by psmouse.ko
|
||||
bus_register_notifier
|
||||
bus_unregister_notifier
|
||||
device_add_groups
|
||||
device_create_file
|
||||
device_remove_file
|
||||
device_remove_groups
|
||||
i2c_adapter_type
|
||||
i2c_bus_type
|
||||
i2c_client_type
|
||||
i2c_for_each_dev
|
||||
i2c_new_scanned_device
|
||||
i2c_unregister_device
|
||||
i2c_verify_adapter
|
||||
input_mt_assign_slots
|
||||
input_mt_drop_unused
|
||||
input_mt_report_finger_count
|
||||
input_mt_report_pointer_emulation
|
||||
input_mt_report_slot_state
|
||||
input_mt_sync_frame
|
||||
input_set_capability
|
||||
kstrtou8
|
||||
pm_wakeup_dev_event
|
||||
ps2_begin_command
|
||||
ps2_cmd_aborted
|
||||
ps2_command
|
||||
ps2_drain
|
||||
ps2_end_command
|
||||
ps2_handle_ack
|
||||
ps2_handle_response
|
||||
ps2_init
|
||||
ps2_sendbyte
|
||||
ps2_sliced_command
|
||||
serio_rescan
|
||||
serio_unregister_child_port
|
||||
strcasecmp
|
||||
|
||||
# required by pulse8-cec.ko
|
||||
cec_allocate_adapter
|
||||
cec_delete_adapter
|
||||
@ -643,18 +781,17 @@
|
||||
cec_s_phys_addr
|
||||
cec_transmit_attempt_done_ts
|
||||
cec_unregister_adapter
|
||||
serio_close
|
||||
serio_open
|
||||
__serio_register_driver
|
||||
serio_unregister_driver
|
||||
strscpy
|
||||
wait_for_completion_timeout
|
||||
|
||||
# required by rtc-test.ko
|
||||
add_timer
|
||||
del_timer
|
||||
device_init_wakeup
|
||||
devm_rtc_allocate_device
|
||||
platform_device_add
|
||||
platform_device_alloc
|
||||
platform_device_del
|
||||
platform_device_put
|
||||
__rtc_register_device
|
||||
rtc_time64_to_tm
|
||||
rtc_tm_to_time64
|
||||
@ -685,9 +822,6 @@
|
||||
kvasprintf
|
||||
ns_to_timespec64
|
||||
pm_runtime_forbid
|
||||
pm_runtime_force_resume
|
||||
pm_runtime_force_suspend
|
||||
pm_runtime_set_autosuspend_delay
|
||||
__printk_ratelimit
|
||||
regcache_mark_dirty
|
||||
snd_ctl_add_vmaster_hook
|
||||
@ -715,15 +849,10 @@
|
||||
__pm_runtime_set_status
|
||||
regcache_cache_only
|
||||
regcache_sync
|
||||
regmap_exit
|
||||
__regmap_init
|
||||
regmap_read
|
||||
regmap_update_bits_base
|
||||
regmap_write
|
||||
snd_pcm_format_width
|
||||
__sw_hweight64
|
||||
timecounter_init
|
||||
__udelay
|
||||
|
||||
# required by snd-hda-intel.ko
|
||||
bpf_trace_run1
|
||||
@ -749,6 +878,7 @@
|
||||
# required by system_heap.ko
|
||||
dma_heap_add
|
||||
dma_heap_get_dev
|
||||
dma_heap_get_name
|
||||
dma_sync_sg_for_cpu
|
||||
__sg_page_iter_next
|
||||
__sg_page_iter_start
|
||||
@ -770,8 +900,6 @@
|
||||
idr_replace
|
||||
jiffies_to_usecs
|
||||
memchr_inv
|
||||
of_find_property
|
||||
of_get_property
|
||||
of_property_match_string
|
||||
pm_suspend_global_flags
|
||||
securityfs_create_dir
|
||||
@ -780,12 +908,27 @@
|
||||
seq_putc
|
||||
seq_write
|
||||
unregister_chrdev_region
|
||||
__usecs_to_jiffies
|
||||
|
||||
# required by tpm_vtpm_proxy.ko
|
||||
anon_inode_getfile
|
||||
compat_ptr_ioctl
|
||||
|
||||
# required by vexpress-config.ko
|
||||
devres_add
|
||||
devres_alloc_node
|
||||
devres_free
|
||||
of_device_is_compatible
|
||||
of_find_compatible_node
|
||||
of_get_next_parent
|
||||
of_parse_phandle
|
||||
of_platform_populate
|
||||
of_root
|
||||
|
||||
# required by vexpress-sysreg.ko
|
||||
bgpio_init
|
||||
devm_gpiochip_add_data_with_key
|
||||
devm_mfd_add_devices
|
||||
|
||||
# required by virt_wifi.ko
|
||||
cfg80211_connect_done
|
||||
cfg80211_disconnected
|
||||
@ -963,7 +1106,6 @@
|
||||
blk_queue_max_segment_size
|
||||
blk_rq_map_kern
|
||||
__blk_rq_map_sg
|
||||
_dev_notice
|
||||
set_capacity_revalidate_and_notify
|
||||
string_get_size
|
||||
virtio_max_dma_size
|
||||
@ -974,7 +1116,6 @@
|
||||
cdev_del
|
||||
device_destroy
|
||||
fasync_helper
|
||||
freezing_slow_path
|
||||
hvc_alloc
|
||||
hvc_instantiate
|
||||
hvc_kick
|
||||
@ -982,22 +1123,14 @@
|
||||
hvc_remove
|
||||
__hvc_resize
|
||||
kill_fasync
|
||||
nonseekable_open
|
||||
pipe_lock
|
||||
pipe_unlock
|
||||
__refrigerator
|
||||
__register_chrdev
|
||||
single_open
|
||||
single_release
|
||||
__splice_from_pipe
|
||||
system_freezing_cnt
|
||||
__unregister_chrdev
|
||||
|
||||
# required by virtio_input.ko
|
||||
input_alloc_absinfo
|
||||
input_mt_init_slots
|
||||
input_set_abs_params
|
||||
|
||||
# required by virtio_mmio.ko
|
||||
device_for_each_child
|
||||
devm_platform_ioremap_resource
|
||||
@ -1086,33 +1219,6 @@
|
||||
nvdimm_bus_unregister
|
||||
nvdimm_pmem_region_create
|
||||
|
||||
# required by virtiofs.ko
|
||||
deactivate_locked_super
|
||||
flush_delayed_work
|
||||
__fs_parse
|
||||
fuse_conn_destroy
|
||||
fuse_conn_init
|
||||
fuse_dequeue_forget
|
||||
fuse_dev_alloc
|
||||
fuse_dev_free
|
||||
fuse_dev_install
|
||||
fuse_fill_super_common
|
||||
fuse_free_conn
|
||||
fuse_get_unique
|
||||
fuse_len_args
|
||||
fuse_mount_get
|
||||
fuse_mount_put
|
||||
fuse_mount_remove
|
||||
fuse_request_end
|
||||
fuse_send_init
|
||||
get_anon_bdev
|
||||
init_user_ns
|
||||
lockref_get
|
||||
memchr
|
||||
register_filesystem
|
||||
sget_fc
|
||||
unregister_filesystem
|
||||
|
||||
# required by vmw_vsock_virtio_transport.ko
|
||||
lock_sock_nested
|
||||
release_sock
|
||||
@ -1163,6 +1269,7 @@
|
||||
crypto_has_alg
|
||||
disk_end_io_acct
|
||||
disk_start_io_acct
|
||||
flush_dcache_page
|
||||
free_percpu
|
||||
fsync_bdev
|
||||
idr_find
|
||||
@ -1177,19 +1284,18 @@
|
||||
# required by zsmalloc.ko
|
||||
alloc_anon_inode
|
||||
__ClearPageMovable
|
||||
contig_page_data
|
||||
dec_zone_page_state
|
||||
inc_zone_page_state
|
||||
init_pseudo
|
||||
iput
|
||||
kern_mount
|
||||
kern_unmount
|
||||
kill_anon_super
|
||||
__lock_page
|
||||
page_mapping
|
||||
_raw_read_lock
|
||||
_raw_read_unlock
|
||||
_raw_write_lock
|
||||
_raw_write_unlock
|
||||
register_shrinker
|
||||
__SetPageMovable
|
||||
unregister_shrinker
|
||||
|
@ -649,7 +649,7 @@ config HAS_LTO_CLANG
|
||||
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
|
||||
depends on ARCH_SUPPORTS_LTO_CLANG
|
||||
depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
|
||||
depends on !KASAN
|
||||
depends on !KASAN || KASAN_HW_TAGS
|
||||
depends on !GCOV_KERNEL
|
||||
help
|
||||
The compiler and Kconfig options support building with Clang's
|
||||
|
@ -1175,9 +1175,9 @@ __armv4_mmu_cache_off:
|
||||
__armv7_mmu_cache_off:
|
||||
mrc p15, 0, r0, c1, c0
|
||||
#ifdef CONFIG_MMU
|
||||
bic r0, r0, #0x000d
|
||||
bic r0, r0, #0x0005
|
||||
#else
|
||||
bic r0, r0, #0x000c
|
||||
bic r0, r0, #0x0004
|
||||
#endif
|
||||
mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
|
||||
mov r0, #0
|
||||
|
@ -70,6 +70,9 @@ reg_5p0v_usb: regulator-5v-usb {
|
||||
|
||||
system-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_system_led_pins>;
|
||||
|
||||
status-led {
|
||||
label = "helios4:green:status";
|
||||
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
@ -86,6 +89,9 @@ fault-led {
|
||||
|
||||
io-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_io_led_pins>;
|
||||
|
||||
sata1-led {
|
||||
label = "helios4:green:ata1";
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
@ -121,11 +127,15 @@ usb-led {
|
||||
fan1: j10-pwm {
|
||||
compatible = "pwm-fan";
|
||||
pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_fan1_pins>;
|
||||
};
|
||||
|
||||
fan2: j17-pwm {
|
||||
compatible = "pwm-fan";
|
||||
pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&helios_fan2_pins>;
|
||||
};
|
||||
|
||||
usb2_phy: usb2-phy {
|
||||
@ -286,16 +296,22 @@ helios_sdhci_pins: helios-sdhci-pins {
|
||||
"mpp39", "mpp40";
|
||||
marvell,function = "sd0";
|
||||
};
|
||||
helios_led_pins: helios-led-pins {
|
||||
marvell,pins = "mpp24", "mpp25",
|
||||
"mpp49", "mpp50",
|
||||
helios_system_led_pins: helios-system-led-pins {
|
||||
marvell,pins = "mpp24", "mpp25";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_io_led_pins: helios-io-led-pins {
|
||||
marvell,pins = "mpp49", "mpp50",
|
||||
"mpp52", "mpp53",
|
||||
"mpp54";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_fan_pins: helios-fan-pins {
|
||||
marvell,pins = "mpp41", "mpp43",
|
||||
"mpp48", "mpp55";
|
||||
helios_fan1_pins: helios_fan1_pins {
|
||||
marvell,pins = "mpp41", "mpp43";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
helios_fan2_pins: helios_fan2_pins {
|
||||
marvell,pins = "mpp48", "mpp55";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
microsom_spi1_cs_pins: spi1-cs-pins {
|
||||
|
@ -370,6 +370,7 @@ lpc_snoop: lpc-snoop@10 {
|
||||
compatible = "aspeed,ast2400-lpc-snoop";
|
||||
reg = <0x10 0x8>;
|
||||
interrupts = <8>;
|
||||
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -492,6 +492,7 @@ lpc_snoop: lpc-snoop@10 {
|
||||
compatible = "aspeed,ast2500-lpc-snoop";
|
||||
reg = <0x10 0x8>;
|
||||
interrupts = <8>;
|
||||
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -513,6 +513,7 @@ lpc_snoop: lpc-snoop@0 {
|
||||
compatible = "aspeed,ast2600-lpc-snoop";
|
||||
reg = <0x0 0x80>;
|
||||
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ &i2c_0 {
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <5 IRQ_TYPE_NONE>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps14_irq>;
|
||||
reg = <0x66>;
|
||||
|
@ -200,7 +200,7 @@ &i2c_0 {
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
wakeup-source;
|
||||
|
||||
|
@ -270,7 +270,7 @@ &i2c_0 {
|
||||
s2mps14_pmic@66 {
|
||||
compatible = "samsung,s2mps14-pmic";
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
wakeup-source;
|
||||
|
||||
|
@ -109,7 +109,7 @@ s5m8767-pmic@66 {
|
||||
compatible = "samsung,s5m8767-pmic";
|
||||
reg = <0x66>;
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
|
||||
wakeup-source;
|
||||
|
@ -349,7 +349,7 @@ s2mps11_pmic@66 {
|
||||
reg = <0x66>;
|
||||
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps11_irq>;
|
||||
|
||||
|
@ -509,7 +509,7 @@ s2mps11_pmic@66 {
|
||||
samsung,s2mps11-acokb-ground;
|
||||
|
||||
interrupt-parent = <&gpx0>;
|
||||
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&s2mps11_irq>;
|
||||
|
||||
|
@ -33,10 +33,12 @@ thermal-zones {
|
||||
};
|
||||
|
||||
ocp {
|
||||
/* 4430 has only gpio_86 tshut and no talert interrupt */
|
||||
bandgap: bandgap@4a002260 {
|
||||
reg = <0x4a002260 0x4
|
||||
0x4a00232C 0x4>;
|
||||
compatible = "ti,omap4430-bandgap";
|
||||
gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
|
@ -248,6 +248,7 @@ struct oabi_epoll_event {
|
||||
__u64 data;
|
||||
} __attribute__ ((packed,aligned(4)));
|
||||
|
||||
#ifdef CONFIG_EPOLL
|
||||
asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
|
||||
struct oabi_epoll_event __user *event)
|
||||
{
|
||||
@ -298,6 +299,20 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
|
||||
kfree(kbuf);
|
||||
return err ? -EFAULT : ret;
|
||||
}
|
||||
#else
|
||||
asmlinkage long sys_oabi_epoll_ctl(int epfd, int op, int fd,
|
||||
struct oabi_epoll_event __user *event)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
asmlinkage long sys_oabi_epoll_wait(int epfd,
|
||||
struct oabi_epoll_event __user *events,
|
||||
int maxevents, int timeout)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct oabi_sembuf {
|
||||
unsigned short sem_num;
|
||||
|
@ -442,7 +442,7 @@ ENDPROC(at91_backup_mode)
|
||||
str tmp1, [pmc, #AT91_PMC_PLL_UPDT]
|
||||
|
||||
/* step 2. */
|
||||
ldr tmp1, =#AT91_PMC_PLL_ACR_DEFAULT_PLLA
|
||||
ldr tmp1, =AT91_PMC_PLL_ACR_DEFAULT_PLLA
|
||||
str tmp1, [pmc, #AT91_PMC_PLL_ACR]
|
||||
|
||||
/* step 3. */
|
||||
|
@ -13,7 +13,6 @@ config MACH_IXP4XX_OF
|
||||
select I2C
|
||||
select I2C_IOP3XX
|
||||
select PCI
|
||||
select TIMER_OF
|
||||
select USE_OF
|
||||
help
|
||||
Say 'Y' here to support Device Tree-based IXP4xx platforms.
|
||||
|
@ -35,7 +35,6 @@
|
||||
@ and an offset to the irq acknowledgment word
|
||||
|
||||
ENTRY(s3c24xx_spi_fiq_rx)
|
||||
s3c24xx_spi_fix_rx:
|
||||
.word fiq_rx_end - fiq_rx_start
|
||||
.word fiq_rx_irq_ack - fiq_rx_start
|
||||
fiq_rx_start:
|
||||
@ -49,7 +48,7 @@ fiq_rx_start:
|
||||
strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ]
|
||||
|
||||
subs fiq_rcount, fiq_rcount, #1
|
||||
subnes pc, lr, #4 @@ return, still have work to do
|
||||
subsne pc, lr, #4 @@ return, still have work to do
|
||||
|
||||
@@ set IRQ controller so that next op will trigger IRQ
|
||||
mov fiq_rtmp, #0
|
||||
@ -61,7 +60,6 @@ fiq_rx_irq_ack:
|
||||
fiq_rx_end:
|
||||
|
||||
ENTRY(s3c24xx_spi_fiq_txrx)
|
||||
s3c24xx_spi_fiq_txrx:
|
||||
.word fiq_txrx_end - fiq_txrx_start
|
||||
.word fiq_txrx_irq_ack - fiq_txrx_start
|
||||
fiq_txrx_start:
|
||||
@ -76,7 +74,7 @@ fiq_txrx_start:
|
||||
strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ]
|
||||
|
||||
subs fiq_rcount, fiq_rcount, #1
|
||||
subnes pc, lr, #4 @@ return, still have work to do
|
||||
subsne pc, lr, #4 @@ return, still have work to do
|
||||
|
||||
mov fiq_rtmp, #0
|
||||
str fiq_rtmp, [ fiq_rirq, # S3C2410_INTMOD - S3C24XX_VA_IRQ ]
|
||||
@ -88,7 +86,6 @@ fiq_txrx_irq_ack:
|
||||
fiq_txrx_end:
|
||||
|
||||
ENTRY(s3c24xx_spi_fiq_tx)
|
||||
s3c24xx_spi_fix_tx:
|
||||
.word fiq_tx_end - fiq_tx_start
|
||||
.word fiq_tx_irq_ack - fiq_tx_start
|
||||
fiq_tx_start:
|
||||
@ -101,7 +98,7 @@ fiq_tx_start:
|
||||
strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ]
|
||||
|
||||
subs fiq_rcount, fiq_rcount, #1
|
||||
subnes pc, lr, #4 @@ return, still have work to do
|
||||
subsne pc, lr, #4 @@ return, still have work to do
|
||||
|
||||
mov fiq_rtmp, #0
|
||||
str fiq_rtmp, [ fiq_rirq, # S3C2410_INTMOD - S3C24XX_VA_IRQ ]
|
||||
|
@ -93,12 +93,39 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct gnttab_unmap_grant_ref unmap;
|
||||
int rc;
|
||||
|
||||
if (map_ops[i].status)
|
||||
continue;
|
||||
if (unlikely(!set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
|
||||
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT))) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (likely(set_phys_to_machine(map_ops[i].host_addr >> XEN_PAGE_SHIFT,
|
||||
map_ops[i].dev_bus_addr >> XEN_PAGE_SHIFT)))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Signal an error for this slot. This in turn requires
|
||||
* immediate unmapping.
|
||||
*/
|
||||
map_ops[i].status = GNTST_general_error;
|
||||
unmap.host_addr = map_ops[i].host_addr,
|
||||
unmap.handle = map_ops[i].handle;
|
||||
map_ops[i].handle = ~0;
|
||||
if (map_ops[i].flags & GNTMAP_device_map)
|
||||
unmap.dev_bus_addr = map_ops[i].dev_bus_addr;
|
||||
else
|
||||
unmap.dev_bus_addr = 0;
|
||||
|
||||
/*
|
||||
* Pre-populate the status field, to be recognizable in
|
||||
* the log message below.
|
||||
*/
|
||||
unmap.status = 1;
|
||||
|
||||
rc = HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
|
||||
&unmap, 1);
|
||||
if (rc || unmap.status != GNTST_okay)
|
||||
pr_err_once("gnttab unmap failed: rc=%d st=%d\n",
|
||||
rc, unmap.status);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -534,7 +534,7 @@ config ARM64_ERRATUM_1024718
|
||||
help
|
||||
This option adds a workaround for ARM Cortex-A55 Erratum 1024718.
|
||||
|
||||
Affected Cortex-A55 cores (r0p0, r0p1, r1p0) could cause incorrect
|
||||
Affected Cortex-A55 cores (all revisions) could cause incorrect
|
||||
update of the hardware dirty bit when the DBM/AP bits are updated
|
||||
without a break-before-make. The workaround is to disable the usage
|
||||
of hardware DBM locally on the affected cores. CPUs not affected by
|
||||
|
@ -126,8 +126,6 @@ &de {
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -169,6 +167,7 @@ &mmc2 {
|
||||
pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_eldo1>;
|
||||
max-frequency = <200000000>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
@ -177,8 +176,6 @@ &mmc2 {
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,6 @@ &mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
non-removable;
|
||||
disable-wp;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
|
@ -514,7 +514,7 @@ mmc2: mmc@1c11000 {
|
||||
resets = <&ccu RST_BUS_MMC2>;
|
||||
reset-names = "ahb";
|
||||
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
max-frequency = <200000000>;
|
||||
max-frequency = <150000000>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@ -593,6 +593,8 @@ ehci0: usb@1c1a000 {
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>,
|
||||
<&ccu RST_BUS_EHCI0>;
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -603,6 +605,8 @@ ohci0: usb@1c1a400 {
|
||||
clocks = <&ccu CLK_BUS_OHCI0>,
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>;
|
||||
phys = <&usbphy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -436,6 +436,7 @@ mmc0: mmc@4020000 {
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
max-frequency = <150000000>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@ -452,6 +453,7 @@ mmc1: mmc@4021000 {
|
||||
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
max-frequency = <150000000>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@ -468,6 +470,7 @@ mmc2: mmc@4022000 {
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_pins>;
|
||||
max-frequency = <150000000>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@ -667,6 +670,8 @@ ehci0: usb@5101000 {
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>,
|
||||
<&ccu RST_BUS_EHCI0>;
|
||||
phys = <&usb2phy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -677,6 +682,8 @@ ohci0: usb@5101400 {
|
||||
clocks = <&ccu CLK_BUS_OHCI0>,
|
||||
<&ccu CLK_USB_OHCI0>;
|
||||
resets = <&ccu RST_BUS_OHCI0>;
|
||||
phys = <&usb2phy 0>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -89,13 +89,12 @@ &pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sd_emmc_a {
|
||||
sd-uhs-sdr50;
|
||||
};
|
||||
|
||||
&usb {
|
||||
phys = <&usb2_phy0>, <&usb2_phy1>;
|
||||
phy-names = "usb2-phy0", "usb2-phy1";
|
||||
};
|
||||
*/
|
||||
|
||||
&sd_emmc_a {
|
||||
sd-uhs-sdr50;
|
||||
};
|
||||
|
@ -389,7 +389,7 @@ &hsi2c_0 {
|
||||
s2mps13-pmic@66 {
|
||||
compatible = "samsung,s2mps13-pmic";
|
||||
interrupt-parent = <&gpa0>;
|
||||
interrupts = <7 IRQ_TYPE_NONE>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
reg = <0x66>;
|
||||
samsung,s2mps11-wrstbi-ground;
|
||||
|
||||
|
@ -90,7 +90,7 @@ &hsi2c_4 {
|
||||
s2mps15_pmic@66 {
|
||||
compatible = "samsung,s2mps15-pmic";
|
||||
reg = <0x66>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&gpa0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_irq>;
|
||||
|
@ -166,7 +166,7 @@ gmac1: ethernet@ff802000 {
|
||||
rx-fifo-depth = <16384>;
|
||||
snps,multicast-filter-bins = <256>;
|
||||
iommus = <&smmu 2>;
|
||||
altr,sysmgr-syscon = <&sysmgr 0x48 8>;
|
||||
altr,sysmgr-syscon = <&sysmgr 0x48 0>;
|
||||
clocks = <&clkmgr AGILEX_EMAC1_CLK>, <&clkmgr AGILEX_EMAC_PTP_CLK>;
|
||||
clock-names = "stmmaceth", "ptp_ref";
|
||||
status = "disabled";
|
||||
@ -184,7 +184,7 @@ gmac2: ethernet@ff804000 {
|
||||
rx-fifo-depth = <16384>;
|
||||
snps,multicast-filter-bins = <256>;
|
||||
iommus = <&smmu 3>;
|
||||
altr,sysmgr-syscon = <&sysmgr 0x4c 16>;
|
||||
altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
|
||||
clocks = <&clkmgr AGILEX_EMAC2_CLK>, <&clkmgr AGILEX_EMAC_PTP_CLK>;
|
||||
clock-names = "stmmaceth", "ptp_ref";
|
||||
status = "disabled";
|
||||
|
@ -204,7 +204,7 @@ partition@0 {
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "u-boot";
|
||||
label = "a53-firmware";
|
||||
reg = <0x20000 0x160000>;
|
||||
};
|
||||
|
||||
|
@ -698,6 +698,8 @@ mmc1: mmc@11240000 {
|
||||
clocks = <&pericfg CLK_PERI_MSDC30_1_PD>,
|
||||
<&topckgen CLK_TOP_AXI_SEL>;
|
||||
clock-names = "source", "hclk";
|
||||
resets = <&pericfg MT7622_PERI_MSDC1_SW_RST>;
|
||||
reset-names = "hrst";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -106,6 +106,9 @@ accelerometer: accelerometer@10 {
|
||||
interrupt-parent = <&msmgpio>;
|
||||
interrupts = <115 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
vdd-supply = <&pm8916_l17>;
|
||||
vddio-supply = <&pm8916_l5>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&accel_int_default>;
|
||||
};
|
||||
@ -113,6 +116,9 @@ accelerometer: accelerometer@10 {
|
||||
magnetometer@12 {
|
||||
compatible = "bosch,bmc150_magn";
|
||||
reg = <0x12>;
|
||||
|
||||
vdd-supply = <&pm8916_l17>;
|
||||
vddio-supply = <&pm8916_l5>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ touchscreen@48 {
|
||||
|
||||
&pronto {
|
||||
iris {
|
||||
compatible = "qcom,wcn3680";
|
||||
compatible = "qcom,wcn3660b";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -55,7 +55,7 @@ tz@86500000 {
|
||||
no-map;
|
||||
};
|
||||
|
||||
reserved@8668000 {
|
||||
reserved@86680000 {
|
||||
reg = <0x0 0x86680000 0x0 0x80000>;
|
||||
no-map;
|
||||
};
|
||||
@ -68,7 +68,7 @@ rmtfs@86700000 {
|
||||
qcom,client-id = <1>;
|
||||
};
|
||||
|
||||
rfsa@867e00000 {
|
||||
rfsa@867e0000 {
|
||||
reg = <0x0 0x867e0000 0x0 0x20000>;
|
||||
no-map;
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ vreg_s4a_1p8: vreg-s4a-1p8 {
|
||||
|
||||
&apps_rsc {
|
||||
pm8009-rpmh-regulators {
|
||||
compatible = "qcom,pm8009-rpmh-regulators";
|
||||
compatible = "qcom,pm8009-1-rpmh-regulators";
|
||||
qcom,pmic-id = "f";
|
||||
|
||||
vdd-s1-supply = <&vph_pwr>;
|
||||
@ -123,6 +123,13 @@ pm8009-rpmh-regulators {
|
||||
vdd-l5-l6-supply = <&vreg_bob>;
|
||||
vdd-l7-supply = <&vreg_s4a_1p8>;
|
||||
|
||||
vreg_s2f_0p95: smps2 {
|
||||
regulator-name = "vreg_s2f_0p95";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <952000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
|
||||
};
|
||||
|
||||
vreg_l1f_1p1: ldo1 {
|
||||
regulator-name = "vreg_l1f_1p1";
|
||||
regulator-min-microvolt = <1104000>;
|
||||
|
@ -1114,11 +1114,11 @@ camera@10 {
|
||||
reg = <0x10>;
|
||||
|
||||
// CAM0_RST_N
|
||||
reset-gpios = <&tlmm 9 0>;
|
||||
reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&cam0_default>;
|
||||
gpios = <&tlmm 13 0>,
|
||||
<&tlmm 9 0>;
|
||||
<&tlmm 9 GPIO_ACTIVE_LOW>;
|
||||
|
||||
clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
|
||||
clock-names = "xvclk";
|
||||
|
@ -150,7 +150,7 @@ reg_audio: regulator_audio {
|
||||
regulator-name = "audio-1.8V";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
gpio = <&gpio_exp2 7 GPIO_ACTIVE_HIGH>;
|
||||
gpio = <&gpio_exp4 1 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
|
@ -88,7 +88,6 @@ &hscif0 {
|
||||
pinctrl-names = "default";
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
max-speed = <4000000>;
|
||||
|
||||
bluetooth {
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
@ -97,6 +96,7 @@ bluetooth {
|
||||
device-wakeup-gpios = <&pca9654 5 GPIO_ACTIVE_HIGH>;
|
||||
clocks = <&osc_32k>;
|
||||
clock-names = "extclk";
|
||||
max-speed = <4000000>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -147,7 +147,7 @@ pca9654_lte: gpio@21 {
|
||||
};
|
||||
|
||||
eeprom@50 {
|
||||
compatible = "microchip,at24c64", "atmel,24c64";
|
||||
compatible = "microchip,24c64", "atmel,24c64";
|
||||
pagesize = <32>;
|
||||
read-only; /* Manufacturing EEPROM programmed at factory */
|
||||
reg = <0x50>;
|
||||
|
@ -928,6 +928,7 @@ gmac2phy: ethernet@ff550000 {
|
||||
phy-mode = "rmii";
|
||||
phy-handle = <&phy>;
|
||||
snps,txpbl = <0x4>;
|
||||
clock_in_out = "output";
|
||||
status = "disabled";
|
||||
|
||||
mdio {
|
||||
|
@ -105,6 +105,7 @@ CONFIG_CLEANCACHE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_CMA_AREAS=16
|
||||
CONFIG_READ_ONLY_THP_FOR_FS=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
@ -500,6 +501,9 @@ CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_POWERCAP=y
|
||||
CONFIG_DTPM=y
|
||||
CONFIG_DTPM_CPU=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_ANDROID=y
|
||||
CONFIG_ANDROID_BINDER_IPC=y
|
||||
@ -606,6 +610,7 @@ CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRC8=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_STACK_HASH_ORDER=12
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PRINTK_CALLER=y
|
||||
CONFIG_DYNAMIC_DEBUG_CORE=y
|
||||
|
@ -55,7 +55,7 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions");
|
||||
#define aes_mac_update neon_aes_mac_update
|
||||
MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON");
|
||||
#endif
|
||||
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS)
|
||||
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS)
|
||||
MODULE_ALIAS_CRYPTO("ecb(aes)");
|
||||
MODULE_ALIAS_CRYPTO("cbc(aes)");
|
||||
MODULE_ALIAS_CRYPTO("ctr(aes)");
|
||||
@ -650,7 +650,7 @@ static int __maybe_unused xts_decrypt(struct skcipher_request *req)
|
||||
}
|
||||
|
||||
static struct skcipher_alg aes_algs[] = { {
|
||||
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS)
|
||||
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS)
|
||||
.base = {
|
||||
.cra_name = "__ecb(aes)",
|
||||
.cra_driver_name = "__ecb-aes-" MODE,
|
||||
|
@ -19,6 +19,7 @@
|
||||
MODULE_DESCRIPTION("SHA1 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha1");
|
||||
|
||||
struct sha1_ce_state {
|
||||
struct sha1_state sst;
|
||||
|
@ -19,6 +19,8 @@
|
||||
MODULE_DESCRIPTION("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha224");
|
||||
MODULE_ALIAS_CRYPTO("sha256");
|
||||
|
||||
struct sha256_ce_state {
|
||||
struct sha256_state sst;
|
||||
|
@ -23,6 +23,10 @@
|
||||
MODULE_DESCRIPTION("SHA3 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha3-224");
|
||||
MODULE_ALIAS_CRYPTO("sha3-256");
|
||||
MODULE_ALIAS_CRYPTO("sha3-384");
|
||||
MODULE_ALIAS_CRYPTO("sha3-512");
|
||||
|
||||
asmlinkage void sha3_ce_transform(u64 *st, const u8 *data, int blocks,
|
||||
int md_len);
|
||||
|
@ -23,6 +23,8 @@
|
||||
MODULE_DESCRIPTION("SHA-384/SHA-512 secure hash using ARMv8 Crypto Extensions");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS_CRYPTO("sha384");
|
||||
MODULE_ALIAS_CRYPTO("sha512");
|
||||
|
||||
asmlinkage void sha512_ce_transform(struct sha512_state *sst, u8 const *src,
|
||||
int blocks);
|
||||
|
@ -676,11 +676,11 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Set SCTLR_EL1 to the passed value, and invalidate the local icache
|
||||
* Set SCTLR_ELx to the @reg value, and invalidate the local icache
|
||||
* in the process. This is called when setting the MMU on.
|
||||
*/
|
||||
.macro set_sctlr_el1, reg
|
||||
msr sctlr_el1, \reg
|
||||
.macro set_sctlr, sreg, reg
|
||||
msr \sreg, \reg
|
||||
isb
|
||||
/*
|
||||
* Invalidate the local I-cache so that any instructions fetched
|
||||
@ -692,6 +692,14 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU
|
||||
isb
|
||||
.endm
|
||||
|
||||
.macro set_sctlr_el1, reg
|
||||
set_sctlr sctlr_el1, \reg
|
||||
.endm
|
||||
|
||||
.macro set_sctlr_el2, reg
|
||||
set_sctlr sctlr_el2, \reg
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Check whether to yield to another runnable task from kernel mode NEON code
|
||||
* (which runs with preemption disabled).
|
||||
|
@ -607,6 +607,7 @@ void check_local_cpu_capabilities(void);
|
||||
|
||||
u64 read_sanitised_ftr_reg(u32 id);
|
||||
u64 __read_sysreg_by_encoding(u32 sys_id);
|
||||
int copy_ftr_reg(u32 id, struct arm64_ftr_reg *dst);
|
||||
|
||||
static inline bool cpu_supports_mixed_endian_el0(void)
|
||||
{
|
||||
|
@ -10,11 +10,15 @@
|
||||
#define __HYP_CONCAT(a, b) a ## b
|
||||
#define HYP_CONCAT(a, b) __HYP_CONCAT(a, b)
|
||||
|
||||
#ifndef __KVM_NVHE_HYPERVISOR__
|
||||
/*
|
||||
* KVM nVHE code has its own symbol namespace prefixed with __kvm_nvhe_,
|
||||
* to separate it from the kernel proper.
|
||||
*/
|
||||
#define kvm_nvhe_sym(sym) __kvm_nvhe_##sym
|
||||
#else
|
||||
#define kvm_nvhe_sym(sym) sym
|
||||
#endif
|
||||
|
||||
#ifdef LINKER_SCRIPT
|
||||
|
||||
@ -56,6 +60,9 @@
|
||||
*/
|
||||
#define KVM_NVHE_ALIAS(sym) kvm_nvhe_sym(sym) = sym;
|
||||
|
||||
/* Defines a linker script alias for KVM nVHE hyp symbols */
|
||||
#define KVM_NVHE_ALIAS_HYP(first, sec) kvm_nvhe_sym(first) = kvm_nvhe_sym(sec);
|
||||
|
||||
#endif /* LINKER_SCRIPT */
|
||||
|
||||
#endif /* __ARM64_HYP_IMAGE_H__ */
|
||||
|
@ -47,16 +47,22 @@
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_flush_vm_context 2
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa 3
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid 4
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_local_vmid 5
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_flush_cpu_context 5
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_timer_set_cntvoff 6
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_enable_ssbs 7
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_get_ich_vtr_el2 8
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_get_gic_config 8
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_read_vmcr 9
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_write_vmcr 10
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_init_lrs 11
|
||||
#define __KVM_HOST_SMCCC_FUNC___kvm_get_mdcr_el2 12
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_save_aprs 13
|
||||
#define __KVM_HOST_SMCCC_FUNC___vgic_v3_restore_aprs 14
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_init 15
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_create_mappings 16
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_create_private_mapping 17
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_cpu_set_vector 18
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_prot_finalize 19
|
||||
#define __KVM_HOST_SMCCC_FUNC___pkvm_mark_hyp 20
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@ -154,6 +160,9 @@ struct kvm_nvhe_init_params {
|
||||
unsigned long tpidr_el2;
|
||||
unsigned long stack_hyp_va;
|
||||
phys_addr_t pgd_pa;
|
||||
unsigned long hcr_el2;
|
||||
unsigned long vttbr;
|
||||
unsigned long vtcr;
|
||||
};
|
||||
|
||||
/* Translate a kernel address @ptr into its equivalent linear mapping */
|
||||
@ -183,16 +192,16 @@ DECLARE_KVM_HYP_SYM(__bp_harden_hyp_vecs);
|
||||
#define __bp_harden_hyp_vecs CHOOSE_HYP_SYM(__bp_harden_hyp_vecs)
|
||||
|
||||
extern void __kvm_flush_vm_context(void);
|
||||
extern void __kvm_flush_cpu_context(struct kvm_s2_mmu *mmu);
|
||||
extern void __kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa,
|
||||
int level);
|
||||
extern void __kvm_tlb_flush_vmid(struct kvm_s2_mmu *mmu);
|
||||
extern void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu);
|
||||
|
||||
extern void __kvm_timer_set_cntvoff(u64 cntvoff);
|
||||
|
||||
extern int __kvm_vcpu_run(struct kvm_vcpu *vcpu);
|
||||
|
||||
extern u64 __vgic_v3_get_ich_vtr_el2(void);
|
||||
extern u64 __vgic_v3_get_gic_config(void);
|
||||
extern u64 __vgic_v3_read_vmcr(void);
|
||||
extern void __vgic_v3_write_vmcr(u32 vmcr);
|
||||
extern void __vgic_v3_init_lrs(void);
|
||||
|
19
arch/arm64/include/asm/kvm_cpufeature.h
Normal file
19
arch/arm64/include/asm/kvm_cpufeature.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2020 - Google LLC
|
||||
* Author: Quentin Perret <qperret@google.com>
|
||||
*/
|
||||
|
||||
#include <asm/cpufeature.h>
|
||||
|
||||
#ifndef KVM_HYP_CPU_FTR_REG
|
||||
#if defined(__KVM_NVHE_HYPERVISOR__)
|
||||
#define KVM_HYP_CPU_FTR_REG(name) extern struct arm64_ftr_reg name
|
||||
#else
|
||||
#define KVM_HYP_CPU_FTR_REG(name) extern struct arm64_ftr_reg kvm_nvhe_sym(name)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_ctrel0);
|
||||
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr0_el1);
|
||||
KVM_HYP_CPU_FTR_REG(arm64_ftr_reg_id_aa64mmfr1_el1);
|
@ -95,7 +95,7 @@ struct kvm_s2_mmu {
|
||||
/* The last vcpu id that ran on each physical CPU */
|
||||
int __percpu *last_vcpu_ran;
|
||||
|
||||
struct kvm *kvm;
|
||||
struct kvm_arch *arch;
|
||||
};
|
||||
|
||||
struct kvm_arch_memory_slot {
|
||||
@ -594,6 +594,7 @@ int kvm_test_age_hva(struct kvm *kvm, unsigned long hva);
|
||||
void kvm_arm_halt_guest(struct kvm *kvm);
|
||||
void kvm_arm_resume_guest(struct kvm *kvm);
|
||||
|
||||
#ifndef __KVM_NVHE_HYPERVISOR__
|
||||
#define kvm_call_hyp_nvhe(f, ...) \
|
||||
({ \
|
||||
struct arm_smccc_res res; \
|
||||
@ -633,6 +634,11 @@ void kvm_arm_resume_guest(struct kvm *kvm);
|
||||
\
|
||||
ret; \
|
||||
})
|
||||
#else /* __KVM_NVHE_HYPERVISOR__ */
|
||||
#define kvm_call_hyp(f, ...) f(__VA_ARGS__)
|
||||
#define kvm_call_hyp_ret(f, ...) f(__VA_ARGS__)
|
||||
#define kvm_call_hyp_nvhe(f, ...) f(__VA_ARGS__)
|
||||
#endif /* __KVM_NVHE_HYPERVISOR__ */
|
||||
|
||||
void force_vm_exit(const cpumask_t *mask);
|
||||
void kvm_mmu_wp_memory_region(struct kvm *kvm, int slot);
|
||||
@ -748,9 +754,13 @@ void kvm_clr_pmu_events(u32 clr);
|
||||
|
||||
void kvm_vcpu_pmu_restore_guest(struct kvm_vcpu *vcpu);
|
||||
void kvm_vcpu_pmu_restore_host(struct kvm_vcpu *vcpu);
|
||||
|
||||
void setup_kvm_el2_caps(void);
|
||||
#else
|
||||
static inline void kvm_set_pmu_events(u32 set, struct perf_event_attr *attr) {}
|
||||
static inline void kvm_clr_pmu_events(u32 clr) {}
|
||||
|
||||
static inline void setup_kvm_el2_caps(void) {}
|
||||
#endif
|
||||
|
||||
void kvm_vcpu_load_sysregs_vhe(struct kvm_vcpu *vcpu);
|
||||
@ -774,5 +784,12 @@ bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu);
|
||||
(test_bit(KVM_ARM_VCPU_PMU_V3, (vcpu)->arch.features))
|
||||
|
||||
int kvm_trng_call(struct kvm_vcpu *vcpu);
|
||||
#ifdef CONFIG_KVM
|
||||
extern phys_addr_t hyp_mem_base;
|
||||
extern phys_addr_t hyp_mem_size;
|
||||
void __init kvm_hyp_reserve(void);
|
||||
#else
|
||||
static inline void kvm_hyp_reserve(void) { }
|
||||
#endif
|
||||
|
||||
#endif /* __ARM64_KVM_HOST_H__ */
|
||||
|
@ -102,7 +102,16 @@ bool kvm_host_psci_handler(struct kvm_cpu_context *host_ctxt);
|
||||
|
||||
void __noreturn hyp_panic(void);
|
||||
#ifdef __KVM_NVHE_HYPERVISOR__
|
||||
void __noreturn __hyp_do_panic(bool restore_host, u64 spsr, u64 elr, u64 par);
|
||||
void __noreturn __hyp_do_panic(struct kvm_cpu_context *host_ctxt, u64 spsr,
|
||||
u64 elr, u64 par);
|
||||
#endif
|
||||
|
||||
#ifdef __KVM_NVHE_HYPERVISOR__
|
||||
void __pkvm_init_switch_pgd(phys_addr_t phys, unsigned long size,
|
||||
phys_addr_t pgd, void *sp, void *cont_fn);
|
||||
int __pkvm_init(phys_addr_t phys, unsigned long size, unsigned long nr_cpus,
|
||||
unsigned long *per_cpu_base, u32 hyp_va_bits);
|
||||
void __noreturn __host_enter(struct kvm_cpu_context *host_ctxt);
|
||||
#endif
|
||||
|
||||
#endif /* __ARM64_KVM_HYP_H__ */
|
||||
|
@ -166,7 +166,15 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu);
|
||||
|
||||
phys_addr_t kvm_mmu_get_httbr(void);
|
||||
phys_addr_t kvm_get_idmap_vector(void);
|
||||
int kvm_mmu_init(void);
|
||||
int kvm_mmu_init(u32 *hyp_va_bits);
|
||||
|
||||
static inline void *__kvm_vector_slot2addr(void *base,
|
||||
enum arm64_hyp_spectre_vector slot)
|
||||
{
|
||||
int idx = slot - (slot != HYP_VECTOR_DIRECT);
|
||||
|
||||
return base + (idx * SZ_2K);
|
||||
}
|
||||
|
||||
struct kvm;
|
||||
|
||||
@ -262,9 +270,9 @@ static __always_inline u64 kvm_get_vttbr(struct kvm_s2_mmu *mmu)
|
||||
* Must be called from hyp code running at EL2 with an updated VTTBR
|
||||
* and interrupts disabled.
|
||||
*/
|
||||
static __always_inline void __load_guest_stage2(struct kvm_s2_mmu *mmu)
|
||||
static __always_inline void __load_stage2(struct kvm_s2_mmu *mmu, unsigned long vtcr)
|
||||
{
|
||||
write_sysreg(kern_hyp_va(mmu->kvm)->arch.vtcr, vtcr_el2);
|
||||
write_sysreg(vtcr, vtcr_el2);
|
||||
write_sysreg(kvm_get_vttbr(mmu), vttbr_el2);
|
||||
|
||||
/*
|
||||
@ -275,5 +283,14 @@ static __always_inline void __load_guest_stage2(struct kvm_s2_mmu *mmu)
|
||||
asm(ALTERNATIVE("nop", "isb", ARM64_WORKAROUND_SPECULATIVE_AT));
|
||||
}
|
||||
|
||||
static __always_inline void __load_guest_stage2(struct kvm_s2_mmu *mmu)
|
||||
{
|
||||
__load_stage2(mmu, kern_hyp_va(mmu->arch)->vtcr);
|
||||
}
|
||||
|
||||
static inline struct kvm *kvm_s2_mmu_to_kvm(struct kvm_s2_mmu *mmu)
|
||||
{
|
||||
return container_of(mmu->arch, struct kvm, arch);
|
||||
}
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARM64_KVM_MMU_H__ */
|
||||
|
@ -11,22 +11,77 @@
|
||||
#include <linux/kvm_host.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define KVM_PGTABLE_MAX_LEVELS 4U
|
||||
|
||||
static inline u64 kvm_get_parange(u64 mmfr0)
|
||||
{
|
||||
u64 parange = cpuid_feature_extract_unsigned_field(mmfr0,
|
||||
ID_AA64MMFR0_PARANGE_SHIFT);
|
||||
if (parange > ID_AA64MMFR0_PARANGE_MAX)
|
||||
parange = ID_AA64MMFR0_PARANGE_MAX;
|
||||
|
||||
return parange;
|
||||
}
|
||||
|
||||
typedef u64 kvm_pte_t;
|
||||
|
||||
/**
|
||||
* struct kvm_pgtable_mm_ops - Memory management callbacks.
|
||||
* @zalloc_page: Allocate a single zeroed memory page. The @arg parameter
|
||||
* can be used by the walker to pass a memcache. The
|
||||
* initial refcount of the page is 1.
|
||||
* @zalloc_pages_exact: Allocate an exact number of zeroed memory pages. The
|
||||
* @size parameter is in bytes, and is rounded-up to the
|
||||
* next page boundary. The resulting allocation is
|
||||
* physically contiguous.
|
||||
* @free_pages_exact: Free an exact number of memory pages previously
|
||||
* allocated by zalloc_pages_exact.
|
||||
* @get_page: Increment the refcount on a page.
|
||||
* @put_page: Decrement the refcount on a page. When the refcount
|
||||
* reaches 0 the page is automatically freed.
|
||||
* @page_count: Return the refcount of a page.
|
||||
* @phys_to_virt: Convert a physical address into a virtual address mapped
|
||||
* in the current context.
|
||||
* @virt_to_phys: Convert a virtual address mapped in the current context
|
||||
* into a physical address.
|
||||
*/
|
||||
struct kvm_pgtable_mm_ops {
|
||||
void* (*zalloc_page)(void *arg);
|
||||
void* (*zalloc_pages_exact)(size_t size);
|
||||
void (*free_pages_exact)(void *addr, size_t size);
|
||||
void (*get_page)(void *addr);
|
||||
void (*put_page)(void *addr);
|
||||
int (*page_count)(void *addr);
|
||||
void* (*phys_to_virt)(phys_addr_t phys);
|
||||
phys_addr_t (*virt_to_phys)(void *addr);
|
||||
};
|
||||
|
||||
/**
|
||||
* enum kvm_pgtable_stage2_flags - Stage-2 page-table flags.
|
||||
* @KVM_PGTABLE_S2_NOFWB: Don't enforce Normal-WB even if the CPUs have
|
||||
* ARM64_HAS_STAGE2_FWB.
|
||||
*/
|
||||
enum kvm_pgtable_stage2_flags {
|
||||
KVM_PGTABLE_S2_NOFWB = BIT(0),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct kvm_pgtable - KVM page-table.
|
||||
* @ia_bits: Maximum input address size, in bits.
|
||||
* @start_level: Level at which the page-table walk starts.
|
||||
* @pgd: Pointer to the first top-level entry of the page-table.
|
||||
* @mm_ops: Memory management callbacks.
|
||||
* @mmu: Stage-2 KVM MMU struct. Unused for stage-1 page-tables.
|
||||
*/
|
||||
struct kvm_pgtable {
|
||||
u32 ia_bits;
|
||||
u32 start_level;
|
||||
kvm_pte_t *pgd;
|
||||
struct kvm_pgtable_mm_ops *mm_ops;
|
||||
|
||||
/* Stage-2 only */
|
||||
struct kvm_s2_mmu *mmu;
|
||||
enum kvm_pgtable_stage2_flags flags;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -49,6 +104,16 @@ enum kvm_pgtable_prot {
|
||||
#define PAGE_HYP_RO (KVM_PGTABLE_PROT_R)
|
||||
#define PAGE_HYP_DEVICE (PAGE_HYP | KVM_PGTABLE_PROT_DEVICE)
|
||||
|
||||
/**
|
||||
* struct kvm_mem_range - Range of Intermediate Physical Addresses
|
||||
* @start: Start of the range.
|
||||
* @end: End of the range.
|
||||
*/
|
||||
struct kvm_mem_range {
|
||||
u64 start;
|
||||
u64 end;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum kvm_pgtable_walk_flags - Flags to control a depth-first page-table walk.
|
||||
* @KVM_PGTABLE_WALK_LEAF: Visit leaf entries, including invalid
|
||||
@ -86,10 +151,12 @@ struct kvm_pgtable_walker {
|
||||
* kvm_pgtable_hyp_init() - Initialise a hypervisor stage-1 page-table.
|
||||
* @pgt: Uninitialised page-table structure to initialise.
|
||||
* @va_bits: Maximum virtual address bits.
|
||||
* @mm_ops: Memory management callbacks.
|
||||
*
|
||||
* Return: 0 on success, negative error code on failure.
|
||||
*/
|
||||
int kvm_pgtable_hyp_init(struct kvm_pgtable *pgt, u32 va_bits);
|
||||
int kvm_pgtable_hyp_init(struct kvm_pgtable *pgt, u32 va_bits,
|
||||
struct kvm_pgtable_mm_ops *mm_ops);
|
||||
|
||||
/**
|
||||
* kvm_pgtable_hyp_destroy() - Destroy an unused hypervisor stage-1 page-table.
|
||||
@ -122,14 +189,38 @@ void kvm_pgtable_hyp_destroy(struct kvm_pgtable *pgt);
|
||||
int kvm_pgtable_hyp_map(struct kvm_pgtable *pgt, u64 addr, u64 size, u64 phys,
|
||||
enum kvm_pgtable_prot prot);
|
||||
|
||||
/**
|
||||
* kvm_get_vtcr() - Helper to construct VTCR_EL2
|
||||
* @mmfr0: Sanitized value of SYS_ID_AA64MMFR0_EL1 register.
|
||||
* @mmfr1: Sanitized value of SYS_ID_AA64MMFR1_EL1 register.
|
||||
* @phys_shfit: Value to set in VTCR_EL2.T0SZ.
|
||||
*
|
||||
* The VTCR value is common across all the physical CPUs on the system.
|
||||
* We use system wide sanitised values to fill in different fields,
|
||||
* except for Hardware Management of Access Flags. HA Flag is set
|
||||
* unconditionally on all CPUs, as it is safe to run with or without
|
||||
* the feature and the bit is RES0 on CPUs that don't support it.
|
||||
*
|
||||
* Return: VTCR_EL2 value
|
||||
*/
|
||||
u64 kvm_get_vtcr(u64 mmfr0, u64 mmfr1, u32 phys_shift);
|
||||
|
||||
/**
|
||||
* kvm_pgtable_stage2_init() - Initialise a guest stage-2 page-table.
|
||||
* @pgt: Uninitialised page-table structure to initialise.
|
||||
* @kvm: KVM structure representing the guest virtual machine.
|
||||
* @arch: Arch-specific KVM structure representing the guest virtual
|
||||
* machine.
|
||||
* @mm_ops: Memory management callbacks.
|
||||
* @flags: Stage-2 configuration flags.
|
||||
*
|
||||
* Return: 0 on success, negative error code on failure.
|
||||
*/
|
||||
int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm *kvm);
|
||||
int kvm_pgtable_stage2_init_flags(struct kvm_pgtable *pgt, struct kvm_arch *arch,
|
||||
struct kvm_pgtable_mm_ops *mm_ops,
|
||||
enum kvm_pgtable_stage2_flags flags);
|
||||
|
||||
#define kvm_pgtable_stage2_init(pgt, arch, mm_ops) \
|
||||
kvm_pgtable_stage2_init_flags(pgt, arch, mm_ops, 0)
|
||||
|
||||
/**
|
||||
* kvm_pgtable_stage2_destroy() - Destroy an unused guest stage-2 page-table.
|
||||
@ -147,8 +238,8 @@ void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
|
||||
* @size: Size of the mapping.
|
||||
* @phys: Physical address of the memory to map.
|
||||
* @prot: Permissions and attributes for the mapping.
|
||||
* @mc: Cache of pre-allocated GFP_PGTABLE_USER memory from which to
|
||||
* allocate page-table pages.
|
||||
* @mc: Cache of pre-allocated and zeroed memory from which to allocate
|
||||
* page-table pages.
|
||||
*
|
||||
* The offset of @addr within a page is ignored, @size is rounded-up to
|
||||
* the next page boundary and @phys is rounded-down to the previous page
|
||||
@ -170,7 +261,28 @@ void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
|
||||
*/
|
||||
int kvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size,
|
||||
u64 phys, enum kvm_pgtable_prot prot,
|
||||
struct kvm_mmu_memory_cache *mc);
|
||||
void *mc);
|
||||
|
||||
/**
|
||||
* kvm_pgtable_stage2_set_owner() - Annotate invalid mappings with metadata
|
||||
* encoding the ownership of a page in the
|
||||
* IPA space.
|
||||
* @pgt: Page-table structure initialised by kvm_pgtable_stage2_init().
|
||||
* @addr: Base intermediate physical address to annotate.
|
||||
* @size: Size of the annotated range.
|
||||
* @mc: Cache of pre-allocated and zeroed memory from which to allocate
|
||||
* page-table pages.
|
||||
* @owner_id: Unique identifier for the owner of the page.
|
||||
*
|
||||
* By default, all page-tables are owned by identifier 0. This function can be
|
||||
* used to mark portions of the IPA space as owned by other entities. When a
|
||||
* stage 2 is used with identity-mappings, these annotations allow to use the
|
||||
* page-table data structure as a simple rmap.
|
||||
*
|
||||
* Return: 0 on success, negative error code on failure.
|
||||
*/
|
||||
int kvm_pgtable_stage2_set_owner(struct kvm_pgtable *pgt, u64 addr, u64 size,
|
||||
void *mc, u8 owner_id);
|
||||
|
||||
/**
|
||||
* kvm_pgtable_stage2_unmap() - Remove a mapping from a guest stage-2 page-table.
|
||||
@ -311,4 +423,23 @@ int kvm_pgtable_stage2_flush(struct kvm_pgtable *pgt, u64 addr, u64 size);
|
||||
int kvm_pgtable_walk(struct kvm_pgtable *pgt, u64 addr, u64 size,
|
||||
struct kvm_pgtable_walker *walker);
|
||||
|
||||
/**
|
||||
* kvm_pgtable_stage2_find_range() - Find a range of Intermediate Physical
|
||||
* Addresses with compatible permission
|
||||
* attributes.
|
||||
* @pgt: Page-table structure initialised by kvm_pgtable_stage2_init().
|
||||
* @addr: Address that must be covered by the range.
|
||||
* @prot: Protection attributes that the range must be compatible with.
|
||||
* @range: Range structure used to limit the search space at call time and
|
||||
* that will hold the result.
|
||||
*
|
||||
* The offset of @addr within a page is ignored. An IPA is compatible with @prot
|
||||
* iff its corresponding stage-2 page-table entry has default ownership and, if
|
||||
* valid, is mapped with protection attributes identical to @prot.
|
||||
*
|
||||
* Return: 0 on success, negative error code on failure.
|
||||
*/
|
||||
int kvm_pgtable_stage2_find_range(struct kvm_pgtable *pgt, u64 addr,
|
||||
enum kvm_pgtable_prot prot,
|
||||
struct kvm_mem_range *range);
|
||||
#endif /* __ARM64_KVM_PGTABLE_H__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifdef CONFIG_ARM64_MODULE_PLTS
|
||||
SECTIONS {
|
||||
.plt (NOLOAD) : { BYTE(0) }
|
||||
.init.plt (NOLOAD) : { BYTE(0) }
|
||||
.text.ftrace_trampoline (NOLOAD) : { BYTE(0) }
|
||||
.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.init.plt 0 (NOLOAD) : { BYTE(0) }
|
||||
.text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) }
|
||||
}
|
||||
#endif
|
||||
|
@ -66,16 +66,15 @@ extern bool arm64_use_ng_mappings;
|
||||
#define _PAGE_DEFAULT (_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
|
||||
|
||||
#define PAGE_KERNEL __pgprot(PROT_NORMAL)
|
||||
#define PAGE_KERNEL_TAGGED __pgprot(PROT_NORMAL_TAGGED)
|
||||
#define PAGE_KERNEL_RO __pgprot((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY)
|
||||
#define PAGE_KERNEL_ROX __pgprot((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY)
|
||||
#define PAGE_KERNEL_EXEC __pgprot(PROT_NORMAL & ~PTE_PXN)
|
||||
#define PAGE_KERNEL_EXEC_CONT __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_CONT)
|
||||
|
||||
#define PAGE_S2_MEMATTR(attr) \
|
||||
#define PAGE_S2_MEMATTR(attr, has_fwb) \
|
||||
({ \
|
||||
u64 __val; \
|
||||
if (cpus_have_const_cap(ARM64_HAS_STAGE2_FWB)) \
|
||||
if (has_fwb) \
|
||||
__val = PTE_S2_MEMATTR(MT_S2_FWB_ ## attr); \
|
||||
else \
|
||||
__val = PTE_S2_MEMATTR(MT_S2_ ## attr); \
|
||||
|
@ -485,6 +485,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd)
|
||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
|
||||
#define pgprot_device(prot) \
|
||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
|
||||
#define pgprot_tagged(prot) \
|
||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_TAGGED))
|
||||
#define pgprot_mhp pgprot_tagged
|
||||
/*
|
||||
* DMA allocations for non-coherent devices use what the Arm architecture calls
|
||||
* "Normal non-cacheable" memory, which permits speculation, unaligned accesses
|
||||
|
@ -13,6 +13,7 @@ extern char __hyp_idmap_text_start[], __hyp_idmap_text_end[];
|
||||
extern char __hyp_text_start[], __hyp_text_end[];
|
||||
extern char __hyp_rodata_start[], __hyp_rodata_end[];
|
||||
extern char __hyp_reloc_begin[], __hyp_reloc_end[];
|
||||
extern char __hyp_bss_start[], __hyp_bss_end[];
|
||||
extern char __idmap_text_start[], __idmap_text_end[];
|
||||
extern char __initdata_begin[], __initdata_end[];
|
||||
extern char __inittext_begin[], __inittext_end[];
|
||||
|
@ -121,6 +121,9 @@ int main(void)
|
||||
DEFINE(NVHE_INIT_TPIDR_EL2, offsetof(struct kvm_nvhe_init_params, tpidr_el2));
|
||||
DEFINE(NVHE_INIT_STACK_HYP_VA, offsetof(struct kvm_nvhe_init_params, stack_hyp_va));
|
||||
DEFINE(NVHE_INIT_PGD_PA, offsetof(struct kvm_nvhe_init_params, pgd_pa));
|
||||
DEFINE(NVHE_INIT_HCR_EL2, offsetof(struct kvm_nvhe_init_params, hcr_el2));
|
||||
DEFINE(NVHE_INIT_VTTBR, offsetof(struct kvm_nvhe_init_params, vttbr));
|
||||
DEFINE(NVHE_INIT_VTCR, offsetof(struct kvm_nvhe_init_params, vtcr));
|
||||
#endif
|
||||
#ifdef CONFIG_CPU_PM
|
||||
DEFINE(CPU_CTX_SP, offsetof(struct cpu_suspend_ctx, sp));
|
||||
|
@ -1199,6 +1199,18 @@ u64 read_sanitised_ftr_reg(u32 id)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(read_sanitised_ftr_reg);
|
||||
|
||||
int copy_ftr_reg(u32 id, struct arm64_ftr_reg *dst)
|
||||
{
|
||||
struct arm64_ftr_reg *regp = get_arm64_ftr_reg(id);
|
||||
|
||||
if (!regp)
|
||||
return -EINVAL;
|
||||
|
||||
*dst = *regp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define read_sysreg_case(r) \
|
||||
case r: val = read_sysreg_s(r); break;
|
||||
|
||||
@ -1643,7 +1655,7 @@ static bool cpu_has_broken_dbm(void)
|
||||
/* List of CPUs which have broken DBM support. */
|
||||
static const struct midr_range cpus[] = {
|
||||
#ifdef CONFIG_ARM64_ERRATUM_1024718
|
||||
MIDR_RANGE(MIDR_CORTEX_A55, 0, 0, 1, 0), // A55 r0p0 -r1p0
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||
/* Kryo4xx Silver (rdpe => r1p0) */
|
||||
MIDR_REV(MIDR_QCOM_KRYO_4XX_SILVER, 0xd, 0xe),
|
||||
#endif
|
||||
@ -2930,6 +2942,7 @@ void __init setup_cpu_features(void)
|
||||
|
||||
setup_system_capabilities();
|
||||
setup_elf_hwcaps(arm64_elf_hwcaps);
|
||||
setup_kvm_el2_caps();
|
||||
|
||||
if (system_supports_32bit_el0())
|
||||
setup_elf_hwcaps(compat_elf_hwcaps);
|
||||
|
@ -852,6 +852,7 @@ SYM_FUNC_START_LOCAL(__primary_switch)
|
||||
|
||||
tlbi vmalle1 // Remove any stale TLB entries
|
||||
dsb nsh
|
||||
isb
|
||||
|
||||
set_sctlr_el1 x19 // re-enable the MMU
|
||||
|
||||
|
@ -163,33 +163,39 @@ static __init void __parse_cmdline(const char *cmdline, bool parse_aliases)
|
||||
} while (1);
|
||||
}
|
||||
|
||||
static __init const u8 *get_bootargs_cmdline(void)
|
||||
{
|
||||
const u8 *prop;
|
||||
void *fdt;
|
||||
int node;
|
||||
|
||||
fdt = get_early_fdt_ptr();
|
||||
if (!fdt)
|
||||
return NULL;
|
||||
|
||||
node = fdt_path_offset(fdt, "/chosen");
|
||||
if (node < 0)
|
||||
return NULL;
|
||||
|
||||
prop = fdt_getprop(fdt, node, "bootargs", NULL);
|
||||
if (!prop)
|
||||
return NULL;
|
||||
|
||||
return strlen(prop) ? prop : NULL;
|
||||
}
|
||||
|
||||
static __init void parse_cmdline(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_CMDLINE_FORCE)) {
|
||||
const u8 *prop;
|
||||
void *fdt;
|
||||
int node;
|
||||
const u8 *prop = get_bootargs_cmdline();
|
||||
|
||||
fdt = get_early_fdt_ptr();
|
||||
if (!fdt)
|
||||
goto out;
|
||||
|
||||
node = fdt_path_offset(fdt, "/chosen");
|
||||
if (node < 0)
|
||||
goto out;
|
||||
|
||||
prop = fdt_getprop(fdt, node, "bootargs", NULL);
|
||||
if (!prop)
|
||||
goto out;
|
||||
|
||||
__parse_cmdline(prop, true);
|
||||
|
||||
if (!IS_ENABLED(CONFIG_CMDLINE_EXTEND))
|
||||
return;
|
||||
if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
|
||||
IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
|
||||
!prop) {
|
||||
__parse_cmdline(CONFIG_CMDLINE, true);
|
||||
}
|
||||
|
||||
out:
|
||||
__parse_cmdline(CONFIG_CMDLINE, true);
|
||||
if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
|
||||
__parse_cmdline(prop, true);
|
||||
}
|
||||
|
||||
/* Keep checkers quiet */
|
||||
|
@ -101,6 +101,39 @@ KVM_NVHE_ALIAS(__stop___kvm_ex_table);
|
||||
/* Array containing bases of nVHE per-CPU memory regions. */
|
||||
KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base);
|
||||
|
||||
/* PMU available static key */
|
||||
KVM_NVHE_ALIAS(kvm_arm_pmu_available);
|
||||
|
||||
/* Position-independent library routines */
|
||||
KVM_NVHE_ALIAS_HYP(clear_page, __pi_clear_page);
|
||||
KVM_NVHE_ALIAS_HYP(copy_page, __pi_copy_page);
|
||||
KVM_NVHE_ALIAS_HYP(memcpy, __pi_memcpy);
|
||||
KVM_NVHE_ALIAS_HYP(memset, __pi_memset);
|
||||
|
||||
#ifdef CONFIG_KASAN
|
||||
KVM_NVHE_ALIAS_HYP(__memcpy, __pi_memcpy);
|
||||
KVM_NVHE_ALIAS_HYP(__memset, __pi_memset);
|
||||
#endif
|
||||
|
||||
/* Kernel memory sections */
|
||||
KVM_NVHE_ALIAS(__start_rodata);
|
||||
KVM_NVHE_ALIAS(__end_rodata);
|
||||
KVM_NVHE_ALIAS(__bss_start);
|
||||
KVM_NVHE_ALIAS(__bss_stop);
|
||||
|
||||
/* Hyp memory sections */
|
||||
KVM_NVHE_ALIAS(__hyp_idmap_text_start);
|
||||
KVM_NVHE_ALIAS(__hyp_idmap_text_end);
|
||||
KVM_NVHE_ALIAS(__hyp_text_start);
|
||||
KVM_NVHE_ALIAS(__hyp_text_end);
|
||||
KVM_NVHE_ALIAS(__hyp_bss_start);
|
||||
KVM_NVHE_ALIAS(__hyp_bss_end);
|
||||
KVM_NVHE_ALIAS(__hyp_rodata_start);
|
||||
KVM_NVHE_ALIAS(__hyp_rodata_end);
|
||||
|
||||
/* pKVM static key */
|
||||
KVM_NVHE_ALIAS(kvm_protected_mode_initialized);
|
||||
|
||||
#endif /* CONFIG_KVM */
|
||||
|
||||
#endif /* __ARM64_KERNEL_IMAGE_VARS_H */
|
||||
|
@ -182,8 +182,10 @@ static int create_dtb(struct kimage *image,
|
||||
|
||||
/* duplicate a device tree blob */
|
||||
ret = fdt_open_into(initial_boot_params, buf, buf_size);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
vfree(buf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = setup_dtb(image, initrd_load_addr, initrd_len,
|
||||
cmdline, buf);
|
||||
|
@ -38,7 +38,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
||||
|
||||
/* TODO: Currently we do not support AARCH32 instruction probing */
|
||||
if (mm->context.flags & MMCF_AARCH32)
|
||||
return -ENOTSUPP;
|
||||
return -EOPNOTSUPP;
|
||||
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -1796,7 +1796,7 @@ int syscall_trace_enter(struct pt_regs *regs)
|
||||
|
||||
if (flags & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {
|
||||
tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
|
||||
if (!in_syscall(regs) || (flags & _TIF_SYSCALL_EMU))
|
||||
if (flags & _TIF_SYSCALL_EMU)
|
||||
return NO_SYSCALL;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ SYM_FUNC_START(_cpu_resume)
|
||||
*/
|
||||
bl cpu_do_resume
|
||||
|
||||
#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
|
||||
#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
|
||||
mov x0, sp
|
||||
bl kasan_unpoison_task_stack_below
|
||||
#endif
|
||||
|
@ -120,7 +120,7 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
|
||||
if (!ret)
|
||||
ret = -EOPNOTSUPP;
|
||||
} else {
|
||||
__cpu_suspend_exit();
|
||||
RCU_NONIDLE(__cpu_suspend_exit());
|
||||
}
|
||||
|
||||
unpause_graph_tracing();
|
||||
|
@ -46,6 +46,8 @@
|
||||
#include <asm/system_misc.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
#include <trace/hooks/traps.h>
|
||||
|
||||
static const char *handler[]= {
|
||||
"Synchronous Abort",
|
||||
"IRQ",
|
||||
@ -404,6 +406,7 @@ void do_undefinstr(struct pt_regs *regs)
|
||||
if (call_undef_hook(regs) == 0)
|
||||
return;
|
||||
|
||||
trace_android_rvh_do_undefinstr(regs, user_mode(regs));
|
||||
BUG_ON(!user_mode(regs));
|
||||
force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0);
|
||||
}
|
||||
@ -765,6 +768,7 @@ asmlinkage void notrace bad_mode(struct pt_regs *regs, int reason, unsigned int
|
||||
handler[reason], smp_processor_id(), esr,
|
||||
esr_get_class_string(esr));
|
||||
|
||||
trace_android_rvh_bad_mode(regs, esr, reason);
|
||||
__show_regs(regs);
|
||||
local_daif_mask();
|
||||
panic("bad mode");
|
||||
@ -830,6 +834,8 @@ void __noreturn arm64_serror_panic(struct pt_regs *regs, u32 esr)
|
||||
|
||||
pr_crit("SError Interrupt on CPU%d, code 0x%08x -- %s\n",
|
||||
smp_processor_id(), esr, esr_get_class_string(esr));
|
||||
|
||||
trace_android_rvh_arm64_serror_panic(regs, esr);
|
||||
if (regs)
|
||||
__show_regs(regs);
|
||||
|
||||
|
@ -5,24 +5,7 @@
|
||||
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
||||
*/
|
||||
|
||||
#define RO_EXCEPTION_TABLE_ALIGN 8
|
||||
#define RUNTIME_DISCARD_EXIT
|
||||
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/hyp_image.h>
|
||||
#include <asm/kernel-pgtable.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
OUTPUT_ARCH(aarch64)
|
||||
ENTRY(_text)
|
||||
|
||||
jiffies = jiffies_64;
|
||||
|
||||
|
||||
#ifdef CONFIG_KVM
|
||||
#define HYPERVISOR_EXTABLE \
|
||||
. = ALIGN(SZ_8); \
|
||||
@ -32,9 +15,11 @@ jiffies = jiffies_64;
|
||||
|
||||
#define HYPERVISOR_DATA_SECTIONS \
|
||||
HYP_SECTION_NAME(.rodata) : { \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
__hyp_rodata_start = .; \
|
||||
*(HYP_SECTION_NAME(.data..ro_after_init)) \
|
||||
*(HYP_SECTION_NAME(.rodata)) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
__hyp_rodata_end = .; \
|
||||
}
|
||||
|
||||
@ -51,29 +36,52 @@ jiffies = jiffies_64;
|
||||
__hyp_reloc_end = .; \
|
||||
}
|
||||
|
||||
#define BSS_FIRST_SECTIONS \
|
||||
__hyp_bss_start = .; \
|
||||
*(HYP_SECTION_NAME(.bss)) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
__hyp_bss_end = .;
|
||||
|
||||
/*
|
||||
* We require that __hyp_bss_start and __bss_start are aligned, and enforce it
|
||||
* with an assertion. But the BSS_SECTION macro places an empty .sbss section
|
||||
* between them, which can in some cases cause the linker to misalign them. To
|
||||
* work around the issue, force a page alignment for __bss_start.
|
||||
*/
|
||||
#define SBSS_ALIGN PAGE_SIZE
|
||||
#else /* CONFIG_KVM */
|
||||
#define HYPERVISOR_EXTABLE
|
||||
#define HYPERVISOR_DATA_SECTIONS
|
||||
#define HYPERVISOR_PERCPU_SECTION
|
||||
#define HYPERVISOR_RELOC_SECTION
|
||||
#define SBSS_ALIGN 0
|
||||
#endif
|
||||
|
||||
#define RO_EXCEPTION_TABLE_ALIGN 8
|
||||
#define RUNTIME_DISCARD_EXIT
|
||||
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/kernel-pgtable.h>
|
||||
#include <asm/memory.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
OUTPUT_ARCH(aarch64)
|
||||
ENTRY(_text)
|
||||
|
||||
jiffies = jiffies_64;
|
||||
|
||||
#define HYPERVISOR_TEXT \
|
||||
/* \
|
||||
* Align to 4 KB so that \
|
||||
* a) the HYP vector table is at its minimum \
|
||||
* alignment of 2048 bytes \
|
||||
* b) the HYP init code will not cross a page \
|
||||
* boundary if its size does not exceed \
|
||||
* 4 KB (see related ASSERT() below) \
|
||||
*/ \
|
||||
. = ALIGN(SZ_4K); \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
__hyp_idmap_text_start = .; \
|
||||
*(.hyp.idmap.text) \
|
||||
__hyp_idmap_text_end = .; \
|
||||
__hyp_text_start = .; \
|
||||
*(.hyp.text) \
|
||||
HYPERVISOR_EXTABLE \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
__hyp_text_end = .;
|
||||
|
||||
#define IDMAP_TEXT \
|
||||
@ -278,7 +286,7 @@ SECTIONS
|
||||
__pecoff_data_rawsize = ABSOLUTE(. - __initdata_begin);
|
||||
_edata = .;
|
||||
|
||||
BSS_SECTION(0, 0, 0)
|
||||
BSS_SECTION(SBSS_ALIGN, 0, 0)
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
init_pg_dir = .;
|
||||
@ -311,11 +319,12 @@ SECTIONS
|
||||
#include "image-vars.h"
|
||||
|
||||
/*
|
||||
* The HYP init code and ID map text can't be longer than a page each,
|
||||
* and should not cross a page boundary.
|
||||
* The HYP init code and ID map text can't be longer than a page each. The
|
||||
* former is page-aligned, but the latter may not be with 16K or 64K pages, so
|
||||
* it should also not cross a page boundary.
|
||||
*/
|
||||
ASSERT(__hyp_idmap_text_end - (__hyp_idmap_text_start & ~(SZ_4K - 1)) <= SZ_4K,
|
||||
"HYP init code too big or misaligned")
|
||||
ASSERT(__hyp_idmap_text_end - __hyp_idmap_text_start <= PAGE_SIZE,
|
||||
"HYP init code too big")
|
||||
ASSERT(__idmap_text_end - (__idmap_text_start & ~(SZ_4K - 1)) <= SZ_4K,
|
||||
"ID map text too big or misaligned")
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
@ -326,6 +335,9 @@ ASSERT(__hibernate_exit_text_end - (__hibernate_exit_text_start & ~(SZ_4K - 1))
|
||||
ASSERT((__entry_tramp_text_end - __entry_tramp_text_start) == PAGE_SIZE,
|
||||
"Entry trampoline text too big")
|
||||
#endif
|
||||
#ifdef CONFIG_KVM
|
||||
ASSERT(__hyp_bss_start == __bss_start, "HYP and Host BSS are misaligned")
|
||||
#endif
|
||||
/*
|
||||
* If padding is applied before .head.text, virt<->phys conversions will fail.
|
||||
*/
|
||||
|
@ -4,7 +4,6 @@
|
||||
#
|
||||
|
||||
ccflags-y += -I $(srctree)/$(src)
|
||||
CFLAGS_REMOVE_debug.o += $(CC_FLAGS_CFI)
|
||||
|
||||
KVM=../../../virt/kvm
|
||||
|
||||
|
@ -385,11 +385,16 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
||||
last_ran = this_cpu_ptr(mmu->last_vcpu_ran);
|
||||
|
||||
/*
|
||||
* We guarantee that both TLBs and I-cache are private to each
|
||||
* vcpu. If detecting that a vcpu from the same VM has
|
||||
* previously run on the same physical CPU, call into the
|
||||
* hypervisor code to nuke the relevant contexts.
|
||||
*
|
||||
* We might get preempted before the vCPU actually runs, but
|
||||
* over-invalidation doesn't affect correctness.
|
||||
*/
|
||||
if (*last_ran != vcpu->vcpu_id) {
|
||||
kvm_call_hyp(__kvm_tlb_flush_local_vmid, mmu);
|
||||
kvm_call_hyp(__kvm_flush_cpu_context, mmu);
|
||||
*last_ran = vcpu->vcpu_id;
|
||||
}
|
||||
|
||||
@ -1354,16 +1359,9 @@ static unsigned long nvhe_percpu_order(void)
|
||||
/* A lookup table holding the hypervisor VA for each vector slot */
|
||||
static void *hyp_spectre_vector_selector[BP_HARDEN_EL2_SLOTS];
|
||||
|
||||
static int __kvm_vector_slot2idx(enum arm64_hyp_spectre_vector slot)
|
||||
{
|
||||
return slot - (slot != HYP_VECTOR_DIRECT);
|
||||
}
|
||||
|
||||
static void kvm_init_vector_slot(void *base, enum arm64_hyp_spectre_vector slot)
|
||||
{
|
||||
int idx = __kvm_vector_slot2idx(slot);
|
||||
|
||||
hyp_spectre_vector_selector[slot] = base + (idx * SZ_2K);
|
||||
hyp_spectre_vector_selector[slot] = __kvm_vector_slot2addr(base, slot);
|
||||
}
|
||||
|
||||
static int kvm_init_vector_slots(void)
|
||||
@ -1392,22 +1390,18 @@ static int kvm_init_vector_slots(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cpu_init_hyp_mode(void)
|
||||
static void cpu_prepare_hyp_mode(int cpu)
|
||||
{
|
||||
struct kvm_nvhe_init_params *params = this_cpu_ptr_nvhe_sym(kvm_init_params);
|
||||
struct arm_smccc_res res;
|
||||
struct kvm_nvhe_init_params *params = per_cpu_ptr_nvhe_sym(kvm_init_params, cpu);
|
||||
unsigned long tcr;
|
||||
|
||||
/* Switch from the HYP stub to our own HYP init vector */
|
||||
__hyp_set_vectors(kvm_get_idmap_vector());
|
||||
|
||||
/*
|
||||
* Calculate the raw per-cpu offset without a translation from the
|
||||
* kernel's mapping to the linear mapping, and store it in tpidr_el2
|
||||
* so that we can use adr_l to access per-cpu variables in EL2.
|
||||
* Also drop the KASAN tag which gets in the way...
|
||||
*/
|
||||
params->tpidr_el2 = (unsigned long)kasan_reset_tag(this_cpu_ptr_nvhe_sym(__per_cpu_start)) -
|
||||
params->tpidr_el2 = (unsigned long)kasan_reset_tag(per_cpu_ptr_nvhe_sym(__per_cpu_start, cpu)) -
|
||||
(unsigned long)kvm_ksym_ref(CHOOSE_NVHE_SYM(__per_cpu_start));
|
||||
|
||||
params->mair_el2 = read_sysreg(mair_el1);
|
||||
@ -1431,14 +1425,28 @@ static void cpu_init_hyp_mode(void)
|
||||
tcr |= (idmap_t0sz & GENMASK(TCR_TxSZ_WIDTH - 1, 0)) << TCR_T0SZ_OFFSET;
|
||||
params->tcr_el2 = tcr;
|
||||
|
||||
params->stack_hyp_va = kern_hyp_va(__this_cpu_read(kvm_arm_hyp_stack_page) + PAGE_SIZE);
|
||||
params->stack_hyp_va = kern_hyp_va(per_cpu(kvm_arm_hyp_stack_page, cpu) + PAGE_SIZE);
|
||||
params->pgd_pa = kvm_mmu_get_httbr();
|
||||
if (is_protected_kvm_enabled())
|
||||
params->hcr_el2 = HCR_HOST_NVHE_PROTECTED_FLAGS;
|
||||
else
|
||||
params->hcr_el2 = HCR_HOST_NVHE_FLAGS;
|
||||
params->vttbr = params->vtcr = 0;
|
||||
|
||||
/*
|
||||
* Flush the init params from the data cache because the struct will
|
||||
* be read while the MMU is off.
|
||||
*/
|
||||
kvm_flush_dcache_to_poc(params, sizeof(*params));
|
||||
}
|
||||
|
||||
static void hyp_install_host_vector(void)
|
||||
{
|
||||
struct kvm_nvhe_init_params *params;
|
||||
struct arm_smccc_res res;
|
||||
|
||||
/* Switch from the HYP stub to our own HYP init vector */
|
||||
__hyp_set_vectors(kvm_get_idmap_vector());
|
||||
|
||||
/*
|
||||
* Call initialization code, and switch to the full blown HYP code.
|
||||
@ -1447,8 +1455,14 @@ static void cpu_init_hyp_mode(void)
|
||||
* cpus_have_const_cap() wrapper.
|
||||
*/
|
||||
BUG_ON(!system_capabilities_finalized());
|
||||
params = this_cpu_ptr_nvhe_sym(kvm_init_params);
|
||||
arm_smccc_1_1_hvc(KVM_HOST_SMCCC_FUNC(__kvm_hyp_init), virt_to_phys(params), &res);
|
||||
WARN_ON(res.a0 != SMCCC_RET_SUCCESS);
|
||||
}
|
||||
|
||||
static void cpu_init_hyp_mode(void)
|
||||
{
|
||||
hyp_install_host_vector();
|
||||
|
||||
/*
|
||||
* Disabling SSBD on a non-VHE system requires us to enable SSBS
|
||||
@ -1491,7 +1505,10 @@ static void cpu_set_hyp_vector(void)
|
||||
struct bp_hardening_data *data = this_cpu_ptr(&bp_hardening_data);
|
||||
void *vector = hyp_spectre_vector_selector[data->slot];
|
||||
|
||||
*this_cpu_ptr_hyp_sym(kvm_hyp_vector) = (unsigned long)vector;
|
||||
if (!is_protected_kvm_enabled())
|
||||
*this_cpu_ptr_hyp_sym(kvm_hyp_vector) = (unsigned long)vector;
|
||||
else
|
||||
kvm_call_hyp_nvhe(__pkvm_cpu_set_vector, data->slot);
|
||||
}
|
||||
|
||||
static void cpu_hyp_reinit(void)
|
||||
@ -1499,13 +1516,14 @@ static void cpu_hyp_reinit(void)
|
||||
kvm_init_host_cpu_context(&this_cpu_ptr_hyp_sym(kvm_host_data)->host_ctxt);
|
||||
|
||||
cpu_hyp_reset();
|
||||
cpu_set_hyp_vector();
|
||||
|
||||
if (is_kernel_in_hyp_mode())
|
||||
kvm_timer_init_vhe();
|
||||
else
|
||||
cpu_init_hyp_mode();
|
||||
|
||||
cpu_set_hyp_vector();
|
||||
|
||||
kvm_arm_init_debug();
|
||||
|
||||
if (vgic_present)
|
||||
@ -1701,18 +1719,59 @@ static void teardown_hyp_mode(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int do_pkvm_init(u32 hyp_va_bits)
|
||||
{
|
||||
void *per_cpu_base = kvm_ksym_ref(kvm_arm_hyp_percpu_base);
|
||||
int ret;
|
||||
|
||||
preempt_disable();
|
||||
hyp_install_host_vector();
|
||||
ret = kvm_call_hyp_nvhe(__pkvm_init, hyp_mem_base, hyp_mem_size,
|
||||
num_possible_cpus(), kern_hyp_va(per_cpu_base),
|
||||
hyp_va_bits);
|
||||
preempt_enable();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int kvm_hyp_init_protection(u32 hyp_va_bits)
|
||||
{
|
||||
void *addr = phys_to_virt(hyp_mem_base);
|
||||
int ret;
|
||||
|
||||
ret = create_hyp_mappings(addr, addr + hyp_mem_size, PAGE_HYP);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = do_pkvm_init(hyp_va_bits);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
free_hyp_pgds();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inits Hyp-mode on all online CPUs
|
||||
*/
|
||||
static int init_hyp_mode(void)
|
||||
{
|
||||
u32 hyp_va_bits;
|
||||
int cpu;
|
||||
int err = 0;
|
||||
int err = -ENOMEM;
|
||||
|
||||
/*
|
||||
* The protected Hyp-mode cannot be initialized if the memory pool
|
||||
* allocation has failed.
|
||||
*/
|
||||
if (is_protected_kvm_enabled() && !hyp_mem_base)
|
||||
goto out_err;
|
||||
|
||||
/*
|
||||
* Allocate Hyp PGD and setup Hyp identity mapping
|
||||
*/
|
||||
err = kvm_mmu_init();
|
||||
err = kvm_mmu_init(&hyp_va_bits);
|
||||
if (err)
|
||||
goto out_err;
|
||||
|
||||
@ -1773,7 +1832,19 @@ static int init_hyp_mode(void)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
err = create_hyp_mappings(kvm_ksym_ref(__bss_start),
|
||||
/*
|
||||
* .hyp.bss is guaranteed to be placed at the beginning of the .bss
|
||||
* section thanks to an assertion in the linker script. Map it RW and
|
||||
* the rest of .bss RO.
|
||||
*/
|
||||
err = create_hyp_mappings(kvm_ksym_ref(__hyp_bss_start),
|
||||
kvm_ksym_ref(__hyp_bss_end), PAGE_HYP);
|
||||
if (err) {
|
||||
kvm_err("Cannot map hyp bss section: %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
err = create_hyp_mappings(kvm_ksym_ref(__hyp_bss_end),
|
||||
kvm_ksym_ref(__bss_stop), PAGE_HYP_RO);
|
||||
if (err) {
|
||||
kvm_err("Cannot map bss section\n");
|
||||
@ -1794,19 +1865,19 @@ static int init_hyp_mode(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Map Hyp percpu pages
|
||||
*/
|
||||
for_each_possible_cpu(cpu) {
|
||||
char *percpu_begin = (char *)kvm_arm_hyp_percpu_base[cpu];
|
||||
char *percpu_end = percpu_begin + nvhe_percpu_size();
|
||||
|
||||
/* Map Hyp percpu pages */
|
||||
err = create_hyp_mappings(percpu_begin, percpu_end, PAGE_HYP);
|
||||
|
||||
if (err) {
|
||||
kvm_err("Cannot map hyp percpu region\n");
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
/* Prepare the CPU initialization parameters */
|
||||
cpu_prepare_hyp_mode(cpu);
|
||||
}
|
||||
|
||||
if (is_protected_kvm_enabled()) {
|
||||
@ -1816,6 +1887,14 @@ static int init_hyp_mode(void)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (is_protected_kvm_enabled()) {
|
||||
err = kvm_hyp_init_protection(hyp_va_bits);
|
||||
if (err) {
|
||||
kvm_err("Failed to init hyp memory protection\n");
|
||||
goto out_err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
@ -1824,6 +1903,72 @@ static int init_hyp_mode(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
void _kvm_host_prot_finalize(void *discard)
|
||||
{
|
||||
WARN_ON(kvm_call_hyp_nvhe(__pkvm_prot_finalize));
|
||||
}
|
||||
|
||||
static inline int pkvm_mark_hyp(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
return kvm_call_hyp_nvhe(__pkvm_mark_hyp, start, end);
|
||||
}
|
||||
|
||||
#define pkvm_mark_hyp_section(__section) \
|
||||
pkvm_mark_hyp(__pa_symbol(__section##_start), \
|
||||
__pa_symbol(__section##_end))
|
||||
|
||||
static int finalize_hyp_mode(void)
|
||||
{
|
||||
int cpu, ret;
|
||||
|
||||
if (!is_protected_kvm_enabled())
|
||||
return 0;
|
||||
|
||||
ret = pkvm_mark_hyp_section(__hyp_idmap_text);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pkvm_mark_hyp_section(__hyp_text);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pkvm_mark_hyp_section(__hyp_rodata);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pkvm_mark_hyp_section(__hyp_bss);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = pkvm_mark_hyp(hyp_mem_base, hyp_mem_base + hyp_mem_size);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
phys_addr_t start = virt_to_phys((void *)kvm_arm_hyp_percpu_base[cpu]);
|
||||
phys_addr_t end = start + (PAGE_SIZE << nvhe_percpu_order());
|
||||
|
||||
ret = pkvm_mark_hyp(start, end);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
start = virt_to_phys((void *)per_cpu(kvm_arm_hyp_stack_page, cpu));
|
||||
end = start + PAGE_SIZE;
|
||||
ret = pkvm_mark_hyp(start, end);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flip the static key upfront as that may no longer be possible
|
||||
* once the host stage 2 is installed.
|
||||
*/
|
||||
static_branch_enable(&kvm_protected_mode_initialized);
|
||||
on_each_cpu(_kvm_host_prot_finalize, NULL, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void check_kvm_target_cpu(void *ret)
|
||||
{
|
||||
*(int *)ret = kvm_target_cpu();
|
||||
@ -1940,8 +2085,15 @@ int kvm_arch_init(void *opaque)
|
||||
if (err)
|
||||
goto out_hyp;
|
||||
|
||||
if (!in_hyp_mode) {
|
||||
err = finalize_hyp_mode();
|
||||
if (err) {
|
||||
kvm_err("Failed to finalize Hyp protection\n");
|
||||
goto out_hyp;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_protected_kvm_enabled()) {
|
||||
static_branch_enable(&kvm_protected_mode_initialized);
|
||||
kvm_info("Protected nVHE mode initialized successfully\n");
|
||||
} else if (in_hyp_mode) {
|
||||
kvm_info("VHE mode initialized successfully\n");
|
||||
|
@ -10,7 +10,4 @@ subdir-ccflags-y := -I$(incdir) \
|
||||
-DDISABLE_BRANCH_PROFILING \
|
||||
$(DISABLE_STACKLEAK_PLUGIN)
|
||||
|
||||
obj-$(CONFIG_KVM) += vhe/ nvhe/ pgtable.o
|
||||
|
||||
# Disable LTO+CFI for the files in this directory
|
||||
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS))
|
||||
obj-$(CONFIG_KVM) += vhe/ nvhe/ pgtable.o reserved_mem.o
|
||||
|
@ -85,8 +85,10 @@ SYM_INNER_LABEL(__guest_exit_panic, SYM_L_GLOBAL)
|
||||
|
||||
// If the hyp context is loaded, go straight to hyp_panic
|
||||
get_loaded_vcpu x0, x1
|
||||
cbz x0, hyp_panic
|
||||
cbnz x0, 1f
|
||||
b hyp_panic
|
||||
|
||||
1:
|
||||
// The hyp context is saved so make sure it is restored to allow
|
||||
// hyp_panic to run at hyp and, subsequently, panic to run in the host.
|
||||
// This makes use of __guest_exit to avoid duplication but sets the
|
||||
@ -94,7 +96,7 @@ SYM_INNER_LABEL(__guest_exit_panic, SYM_L_GLOBAL)
|
||||
// current state is saved to the guest context but it will only be
|
||||
// accurate if the guest had been completely restored.
|
||||
adr_this_cpu x0, kvm_hyp_ctxt, x1
|
||||
adr x1, hyp_panic
|
||||
adr_l x1, hyp_panic
|
||||
str x1, [x0, #CPU_XREG_OFFSET(30)]
|
||||
|
||||
get_vcpu_ptr x1, x0
|
||||
@ -146,7 +148,7 @@ SYM_INNER_LABEL(__guest_exit, SYM_L_GLOBAL)
|
||||
// Now restore the hyp regs
|
||||
restore_callee_saved_regs x2
|
||||
|
||||
set_loaded_vcpu xzr, x1, x2
|
||||
set_loaded_vcpu xzr, x2, x3
|
||||
|
||||
alternative_if ARM64_HAS_RAS_EXTN
|
||||
// If we have the RAS extensions we can consume a pending error
|
||||
|
@ -90,15 +90,18 @@ static inline void __activate_traps_common(struct kvm_vcpu *vcpu)
|
||||
* counter, which could make a PMXEVCNTR_EL0 access UNDEF at
|
||||
* EL1 instead of being trapped to EL2.
|
||||
*/
|
||||
write_sysreg(0, pmselr_el0);
|
||||
write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);
|
||||
if (kvm_arm_support_pmu_v3()) {
|
||||
write_sysreg(0, pmselr_el0);
|
||||
write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0);
|
||||
}
|
||||
write_sysreg(vcpu->arch.mdcr_el2, mdcr_el2);
|
||||
}
|
||||
|
||||
static inline void __deactivate_traps_common(void)
|
||||
{
|
||||
write_sysreg(0, hstr_el2);
|
||||
write_sysreg(0, pmuserenr_el0);
|
||||
if (kvm_arm_support_pmu_v3())
|
||||
write_sysreg(0, pmuserenr_el0);
|
||||
}
|
||||
|
||||
static inline void ___activate_traps(struct kvm_vcpu *vcpu)
|
||||
@ -157,19 +160,9 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar)
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool __populate_fault_info(struct kvm_vcpu *vcpu)
|
||||
static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault)
|
||||
{
|
||||
u8 ec;
|
||||
u64 esr;
|
||||
u64 hpfar, far;
|
||||
|
||||
esr = vcpu->arch.fault.esr_el2;
|
||||
ec = ESR_ELx_EC(esr);
|
||||
|
||||
if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW)
|
||||
return true;
|
||||
|
||||
far = read_sysreg_el2(SYS_FAR);
|
||||
fault->far_el2 = read_sysreg_el2(SYS_FAR);
|
||||
|
||||
/*
|
||||
* The HPFAR can be invalid if the stage 2 fault did not
|
||||
@ -185,17 +178,29 @@ static inline bool __populate_fault_info(struct kvm_vcpu *vcpu)
|
||||
if (!(esr & ESR_ELx_S1PTW) &&
|
||||
(cpus_have_final_cap(ARM64_WORKAROUND_834220) ||
|
||||
(esr & ESR_ELx_FSC_TYPE) == FSC_PERM)) {
|
||||
if (!__translate_far_to_hpfar(far, &hpfar))
|
||||
if (!__translate_far_to_hpfar(fault->far_el2, &fault->hpfar_el2))
|
||||
return false;
|
||||
} else {
|
||||
hpfar = read_sysreg(hpfar_el2);
|
||||
fault->hpfar_el2 = read_sysreg(hpfar_el2);
|
||||
}
|
||||
|
||||
vcpu->arch.fault.far_el2 = far;
|
||||
vcpu->arch.fault.hpfar_el2 = hpfar;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool __populate_fault_info(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
u8 ec;
|
||||
u64 esr;
|
||||
|
||||
esr = vcpu->arch.fault.esr_el2;
|
||||
ec = ESR_ELx_EC(esr);
|
||||
|
||||
if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW)
|
||||
return true;
|
||||
|
||||
return __get_fault_info(esr, &vcpu->arch.fault);
|
||||
}
|
||||
|
||||
/* Check for an FPSIMD/SVE trap and handle as appropriate */
|
||||
static inline bool __hyp_handle_fpsimd(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
|
14
arch/arm64/kvm/hyp/include/nvhe/early_alloc.h
Normal file
14
arch/arm64/kvm/hyp/include/nvhe/early_alloc.h
Normal file
@ -0,0 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __KVM_HYP_EARLY_ALLOC_H
|
||||
#define __KVM_HYP_EARLY_ALLOC_H
|
||||
|
||||
#include <asm/kvm_pgtable.h>
|
||||
|
||||
void hyp_early_alloc_init(void *virt, unsigned long size);
|
||||
unsigned long hyp_early_alloc_nr_used_pages(void);
|
||||
void *hyp_early_alloc_page(void *arg);
|
||||
void *hyp_early_alloc_contig(unsigned int nr_pages);
|
||||
|
||||
extern struct kvm_pgtable_mm_ops hyp_early_alloc_mm_ops;
|
||||
|
||||
#endif /* __KVM_HYP_EARLY_ALLOC_H */
|
68
arch/arm64/kvm/hyp/include/nvhe/gfp.h
Normal file
68
arch/arm64/kvm/hyp/include/nvhe/gfp.h
Normal file
@ -0,0 +1,68 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __KVM_HYP_GFP_H
|
||||
#define __KVM_HYP_GFP_H
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
#include <nvhe/memory.h>
|
||||
#include <nvhe/spinlock.h>
|
||||
|
||||
#define HYP_NO_ORDER UINT_MAX
|
||||
|
||||
struct hyp_pool {
|
||||
/*
|
||||
* Spinlock protecting concurrent changes to the memory pool as well as
|
||||
* the struct hyp_page of the pool's pages until we have a proper atomic
|
||||
* API at EL2.
|
||||
*/
|
||||
hyp_spinlock_t lock;
|
||||
struct list_head free_area[MAX_ORDER];
|
||||
phys_addr_t range_start;
|
||||
phys_addr_t range_end;
|
||||
unsigned int max_order;
|
||||
};
|
||||
|
||||
static inline void hyp_page_ref_inc(struct hyp_page *p)
|
||||
{
|
||||
struct hyp_pool *pool = hyp_page_to_pool(p);
|
||||
|
||||
hyp_spin_lock(&pool->lock);
|
||||
p->refcount++;
|
||||
hyp_spin_unlock(&pool->lock);
|
||||
}
|
||||
|
||||
static inline int hyp_page_ref_dec_and_test(struct hyp_page *p)
|
||||
{
|
||||
struct hyp_pool *pool = hyp_page_to_pool(p);
|
||||
int ret;
|
||||
|
||||
hyp_spin_lock(&pool->lock);
|
||||
p->refcount--;
|
||||
ret = (p->refcount == 0);
|
||||
hyp_spin_unlock(&pool->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void hyp_set_page_refcounted(struct hyp_page *p)
|
||||
{
|
||||
struct hyp_pool *pool = hyp_page_to_pool(p);
|
||||
|
||||
hyp_spin_lock(&pool->lock);
|
||||
if (p->refcount) {
|
||||
hyp_spin_unlock(&pool->lock);
|
||||
hyp_panic();
|
||||
}
|
||||
p->refcount = 1;
|
||||
hyp_spin_unlock(&pool->lock);
|
||||
}
|
||||
|
||||
/* Allocation */
|
||||
void *hyp_alloc_pages(struct hyp_pool *pool, unsigned int order);
|
||||
void hyp_get_page(void *addr);
|
||||
void hyp_put_page(void *addr);
|
||||
|
||||
/* Used pages cannot be freed */
|
||||
int hyp_pool_init(struct hyp_pool *pool, u64 pfn, unsigned int nr_pages,
|
||||
unsigned int reserved_pages);
|
||||
#endif /* __KVM_HYP_GFP_H */
|
36
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
Normal file
36
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
Normal file
@ -0,0 +1,36 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2020 Google LLC
|
||||
* Author: Quentin Perret <qperret@google.com>
|
||||
*/
|
||||
|
||||
#ifndef __KVM_NVHE_MEM_PROTECT__
|
||||
#define __KVM_NVHE_MEM_PROTECT__
|
||||
#include <linux/kvm_host.h>
|
||||
#include <asm/kvm_hyp.h>
|
||||
#include <asm/kvm_pgtable.h>
|
||||
#include <asm/virt.h>
|
||||
#include <nvhe/spinlock.h>
|
||||
|
||||
struct host_kvm {
|
||||
struct kvm_arch arch;
|
||||
struct kvm_pgtable pgt;
|
||||
struct kvm_pgtable_mm_ops mm_ops;
|
||||
hyp_spinlock_t lock;
|
||||
};
|
||||
extern struct host_kvm host_kvm;
|
||||
|
||||
int __pkvm_prot_finalize(void);
|
||||
int __pkvm_mark_hyp(phys_addr_t start, phys_addr_t end);
|
||||
|
||||
int kvm_host_prepare_stage2(void *mem_pgt_pool, void *dev_pgt_pool);
|
||||
void handle_host_mem_abort(struct kvm_cpu_context *host_ctxt);
|
||||
|
||||
static __always_inline void __load_host_stage2(void)
|
||||
{
|
||||
if (static_branch_likely(&kvm_protected_mode_initialized))
|
||||
__load_stage2(&host_kvm.arch.mmu, host_kvm.arch.vtcr);
|
||||
else
|
||||
write_sysreg(0, vttbr_el2);
|
||||
}
|
||||
#endif /* __KVM_NVHE_MEM_PROTECT__ */
|
52
arch/arm64/kvm/hyp/include/nvhe/memory.h
Normal file
52
arch/arm64/kvm/hyp/include/nvhe/memory.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __KVM_HYP_MEMORY_H
|
||||
#define __KVM_HYP_MEMORY_H
|
||||
|
||||
#include <asm/page.h>
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct hyp_pool;
|
||||
struct hyp_page {
|
||||
unsigned int refcount;
|
||||
unsigned int order;
|
||||
struct hyp_pool *pool;
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
extern s64 hyp_physvirt_offset;
|
||||
extern u64 __hyp_vmemmap;
|
||||
#define hyp_vmemmap ((struct hyp_page *)__hyp_vmemmap)
|
||||
|
||||
#define __hyp_pa(virt) ((phys_addr_t)(virt) + hyp_physvirt_offset)
|
||||
#define __hyp_va(phys) ((void *)((phys_addr_t)(phys) - hyp_physvirt_offset))
|
||||
|
||||
static inline void *hyp_phys_to_virt(phys_addr_t phys)
|
||||
{
|
||||
return __hyp_va(phys);
|
||||
}
|
||||
|
||||
static inline phys_addr_t hyp_virt_to_phys(void *addr)
|
||||
{
|
||||
return __hyp_pa(addr);
|
||||
}
|
||||
|
||||
#define hyp_phys_to_pfn(phys) ((phys) >> PAGE_SHIFT)
|
||||
#define hyp_pfn_to_phys(pfn) ((phys_addr_t)((pfn) << PAGE_SHIFT))
|
||||
#define hyp_phys_to_page(phys) (&hyp_vmemmap[hyp_phys_to_pfn(phys)])
|
||||
#define hyp_virt_to_page(virt) hyp_phys_to_page(__hyp_pa(virt))
|
||||
#define hyp_virt_to_pfn(virt) hyp_phys_to_pfn(__hyp_pa(virt))
|
||||
|
||||
#define hyp_page_to_pfn(page) ((struct hyp_page *)(page) - hyp_vmemmap)
|
||||
#define hyp_page_to_phys(page) hyp_pfn_to_phys((hyp_page_to_pfn(page)))
|
||||
#define hyp_page_to_virt(page) __hyp_va(hyp_page_to_phys(page))
|
||||
#define hyp_page_to_pool(page) (((struct hyp_page *)page)->pool)
|
||||
|
||||
static inline int hyp_page_count(void *addr)
|
||||
{
|
||||
struct hyp_page *p = hyp_virt_to_page(addr);
|
||||
|
||||
return p->refcount;
|
||||
}
|
||||
|
||||
#endif /* __KVM_HYP_MEMORY_H */
|
96
arch/arm64/kvm/hyp/include/nvhe/mm.h
Normal file
96
arch/arm64/kvm/hyp/include/nvhe/mm.h
Normal file
@ -0,0 +1,96 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __KVM_HYP_MM_H
|
||||
#define __KVM_HYP_MM_H
|
||||
|
||||
#include <asm/kvm_pgtable.h>
|
||||
#include <asm/spectre.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <nvhe/memory.h>
|
||||
#include <nvhe/spinlock.h>
|
||||
|
||||
#define HYP_MEMBLOCK_REGIONS 128
|
||||
extern struct memblock_region kvm_nvhe_sym(hyp_memory)[];
|
||||
extern unsigned int kvm_nvhe_sym(hyp_memblock_nr);
|
||||
extern struct kvm_pgtable pkvm_pgtable;
|
||||
extern hyp_spinlock_t pkvm_pgd_lock;
|
||||
extern struct hyp_pool hpool;
|
||||
extern u64 __io_map_base;
|
||||
|
||||
int hyp_create_idmap(u32 hyp_va_bits);
|
||||
int hyp_map_vectors(void);
|
||||
int hyp_back_vmemmap(phys_addr_t phys, unsigned long size, phys_addr_t back);
|
||||
int pkvm_cpu_set_vector(enum arm64_hyp_spectre_vector slot);
|
||||
int pkvm_create_mappings(void *from, void *to, enum kvm_pgtable_prot prot);
|
||||
int __pkvm_create_mappings(unsigned long start, unsigned long size,
|
||||
unsigned long phys, enum kvm_pgtable_prot prot);
|
||||
unsigned long __pkvm_create_private_mapping(phys_addr_t phys, size_t size,
|
||||
enum kvm_pgtable_prot prot);
|
||||
|
||||
static inline void hyp_vmemmap_range(phys_addr_t phys, unsigned long size,
|
||||
unsigned long *start, unsigned long *end)
|
||||
{
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct hyp_page *p = hyp_phys_to_page(phys);
|
||||
|
||||
*start = (unsigned long)p;
|
||||
*end = *start + nr_pages * sizeof(struct hyp_page);
|
||||
*start = ALIGN_DOWN(*start, PAGE_SIZE);
|
||||
*end = ALIGN(*end, PAGE_SIZE);
|
||||
}
|
||||
|
||||
static inline unsigned long __hyp_pgtable_max_pages(unsigned long nr_pages)
|
||||
{
|
||||
unsigned long total = 0, i;
|
||||
|
||||
/* Provision the worst case scenario */
|
||||
for (i = 0; i < KVM_PGTABLE_MAX_LEVELS; i++) {
|
||||
nr_pages = DIV_ROUND_UP(nr_pages, PTRS_PER_PTE);
|
||||
total += nr_pages;
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
static inline unsigned long __hyp_pgtable_total_pages(void)
|
||||
{
|
||||
unsigned long res = 0, i;
|
||||
|
||||
/* Cover all of memory with page-granularity */
|
||||
for (i = 0; i < kvm_nvhe_sym(hyp_memblock_nr); i++) {
|
||||
struct memblock_region *reg = &kvm_nvhe_sym(hyp_memory)[i];
|
||||
res += __hyp_pgtable_max_pages(reg->size >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline unsigned long hyp_s1_pgtable_pages(void)
|
||||
{
|
||||
unsigned long res;
|
||||
|
||||
res = __hyp_pgtable_total_pages();
|
||||
|
||||
/* Allow 1 GiB for private mappings */
|
||||
res += __hyp_pgtable_max_pages(SZ_1G >> PAGE_SHIFT);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline unsigned long host_s2_mem_pgtable_pages(void)
|
||||
{
|
||||
/*
|
||||
* Include an extra 16 pages to safely upper-bound the worst case of
|
||||
* concatenated pgds.
|
||||
*/
|
||||
return __hyp_pgtable_total_pages() + 16;
|
||||
}
|
||||
|
||||
static inline unsigned long host_s2_dev_pgtable_pages(void)
|
||||
{
|
||||
/* Allow 1 GiB for MMIO mappings */
|
||||
return __hyp_pgtable_max_pages(SZ_1G >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
#endif /* __KVM_HYP_MM_H */
|
92
arch/arm64/kvm/hyp/include/nvhe/spinlock.h
Normal file
92
arch/arm64/kvm/hyp/include/nvhe/spinlock.h
Normal file
@ -0,0 +1,92 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* A stand-alone ticket spinlock implementation for use by the non-VHE
|
||||
* KVM hypervisor code running at EL2.
|
||||
*
|
||||
* Copyright (C) 2020 Google LLC
|
||||
* Author: Will Deacon <will@kernel.org>
|
||||
*
|
||||
* Heavily based on the implementation removed by c11090474d70 which was:
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
|
||||
#ifndef __ARM64_KVM_NVHE_SPINLOCK_H__
|
||||
#define __ARM64_KVM_NVHE_SPINLOCK_H__
|
||||
|
||||
#include <asm/alternative.h>
|
||||
#include <asm/lse.h>
|
||||
|
||||
typedef union hyp_spinlock {
|
||||
u32 __val;
|
||||
struct {
|
||||
#ifdef __AARCH64EB__
|
||||
u16 next, owner;
|
||||
#else
|
||||
u16 owner, next;
|
||||
#endif
|
||||
};
|
||||
} hyp_spinlock_t;
|
||||
|
||||
#define hyp_spin_lock_init(l) \
|
||||
do { \
|
||||
*(l) = (hyp_spinlock_t){ .__val = 0 }; \
|
||||
} while (0)
|
||||
|
||||
static inline void hyp_spin_lock(hyp_spinlock_t *lock)
|
||||
{
|
||||
u32 tmp;
|
||||
hyp_spinlock_t lockval, newval;
|
||||
|
||||
asm volatile(
|
||||
/* Atomically increment the next ticket. */
|
||||
ARM64_LSE_ATOMIC_INSN(
|
||||
/* LL/SC */
|
||||
" prfm pstl1strm, %3\n"
|
||||
"1: ldaxr %w0, %3\n"
|
||||
" add %w1, %w0, #(1 << 16)\n"
|
||||
" stxr %w2, %w1, %3\n"
|
||||
" cbnz %w2, 1b\n",
|
||||
/* LSE atomics */
|
||||
" mov %w2, #(1 << 16)\n"
|
||||
" ldadda %w2, %w0, %3\n"
|
||||
__nops(3))
|
||||
|
||||
/* Did we get the lock? */
|
||||
" eor %w1, %w0, %w0, ror #16\n"
|
||||
" cbz %w1, 3f\n"
|
||||
/*
|
||||
* No: spin on the owner. Send a local event to avoid missing an
|
||||
* unlock before the exclusive load.
|
||||
*/
|
||||
" sevl\n"
|
||||
"2: wfe\n"
|
||||
" ldaxrh %w2, %4\n"
|
||||
" eor %w1, %w2, %w0, lsr #16\n"
|
||||
" cbnz %w1, 2b\n"
|
||||
/* We got the lock. Critical section starts here. */
|
||||
"3:"
|
||||
: "=&r" (lockval), "=&r" (newval), "=&r" (tmp), "+Q" (*lock)
|
||||
: "Q" (lock->owner)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static inline void hyp_spin_unlock(hyp_spinlock_t *lock)
|
||||
{
|
||||
u64 tmp;
|
||||
|
||||
asm volatile(
|
||||
ARM64_LSE_ATOMIC_INSN(
|
||||
/* LL/SC */
|
||||
" ldrh %w1, %0\n"
|
||||
" add %w1, %w1, #1\n"
|
||||
" stlrh %w1, %0",
|
||||
/* LSE atomics */
|
||||
" mov %w1, #1\n"
|
||||
" staddlh %w1, %0\n"
|
||||
__nops(1))
|
||||
: "=Q" (lock->owner), "=&r" (tmp)
|
||||
:
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif /* __ARM64_KVM_NVHE_SPINLOCK_H__ */
|
@ -9,10 +9,15 @@ ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
|
||||
hostprogs := gen-hyprel
|
||||
HOST_EXTRACFLAGS += -I$(objtree)/include
|
||||
|
||||
lib-objs := clear_page.o copy_page.o memcpy.o memset.o
|
||||
lib-objs := $(addprefix ../../../lib/, $(lib-objs))
|
||||
|
||||
obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \
|
||||
hyp-main.o hyp-smp.o psci-relay.o
|
||||
hyp-main.o hyp-smp.o psci-relay.o early_alloc.o stub.o page_alloc.o \
|
||||
cache.o setup.o mm.o mem_protect.o
|
||||
obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
||||
../fpsimd.o ../hyp-entry.o ../exception.o
|
||||
../fpsimd.o ../hyp-entry.o ../exception.o ../pgtable.o
|
||||
obj-y += $(lib-objs)
|
||||
|
||||
##
|
||||
## Build rules for compiling nVHE hyp code
|
||||
@ -75,9 +80,9 @@ quiet_cmd_hyprel = HYPREL $@
|
||||
quiet_cmd_hypcopy = HYPCOPY $@
|
||||
cmd_hypcopy = $(OBJCOPY) --prefix-symbols=__kvm_nvhe_ $< $@
|
||||
|
||||
# Remove ftrace and Shadow Call Stack CFLAGS.
|
||||
# This is equivalent to the 'notrace' and '__noscs' annotations.
|
||||
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS), $(KBUILD_CFLAGS))
|
||||
# Remove ftrace, Shadow Call Stack and CFI CFLAGS.
|
||||
# This is equivalent to the 'notrace', '__noscs' and '__nocfi' annotations.
|
||||
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_CFI), $(KBUILD_CFLAGS))
|
||||
|
||||
# KVM nVHE code is run at a different exception code with a different map, so
|
||||
# compiler instrumentation that inserts callbacks or checks into the code may
|
||||
|
13
arch/arm64/kvm/hyp/nvhe/cache.S
Normal file
13
arch/arm64/kvm/hyp/nvhe/cache.S
Normal file
@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Code copied from arch/arm64/mm/cache.S.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/alternative.h>
|
||||
|
||||
SYM_FUNC_START_PI(__flush_dcache_area)
|
||||
dcache_by_line_op civac, sy, x0, x1, x2, x3
|
||||
ret
|
||||
SYM_FUNC_END_PI(__flush_dcache_area)
|
54
arch/arm64/kvm/hyp/nvhe/early_alloc.c
Normal file
54
arch/arm64/kvm/hyp/nvhe/early_alloc.c
Normal file
@ -0,0 +1,54 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2020 Google LLC
|
||||
* Author: Quentin Perret <qperret@google.com>
|
||||
*/
|
||||
|
||||
#include <asm/kvm_pgtable.h>
|
||||
|
||||
#include <nvhe/early_alloc.h>
|
||||
#include <nvhe/memory.h>
|
||||
|
||||
struct kvm_pgtable_mm_ops hyp_early_alloc_mm_ops;
|
||||
s64 __ro_after_init hyp_physvirt_offset;
|
||||
|
||||
static unsigned long base;
|
||||
static unsigned long end;
|
||||
static unsigned long cur;
|
||||
|
||||
unsigned long hyp_early_alloc_nr_used_pages(void)
|
||||
{
|
||||
return (cur - base) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
void *hyp_early_alloc_contig(unsigned int nr_pages)
|
||||
{
|
||||
unsigned long size = (nr_pages << PAGE_SHIFT);
|
||||
void *ret = (void *)cur;
|
||||
|
||||
if (!nr_pages)
|
||||
return NULL;
|
||||
|
||||
if (end - cur < size)
|
||||
return NULL;
|
||||
|
||||
cur += size;
|
||||
memset(ret, 0, size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *hyp_early_alloc_page(void *arg)
|
||||
{
|
||||
return hyp_early_alloc_contig(1);
|
||||
}
|
||||
|
||||
void hyp_early_alloc_init(void *virt, unsigned long size)
|
||||
{
|
||||
base = cur = (unsigned long)virt;
|
||||
end = base + size;
|
||||
|
||||
hyp_early_alloc_mm_ops.zalloc_page = hyp_early_alloc_page;
|
||||
hyp_early_alloc_mm_ops.phys_to_virt = hyp_phys_to_virt;
|
||||
hyp_early_alloc_mm_ops.virt_to_phys = hyp_virt_to_phys;
|
||||
}
|
@ -71,7 +71,8 @@ SYM_FUNC_START(__host_enter)
|
||||
SYM_FUNC_END(__host_enter)
|
||||
|
||||
/*
|
||||
* void __noreturn __hyp_do_panic(bool restore_host, u64 spsr, u64 elr, u64 par);
|
||||
* void __noreturn __hyp_do_panic(struct kvm_cpu_context *host_ctxt, u64 spsr,
|
||||
* u64 elr, u64 par);
|
||||
*/
|
||||
SYM_FUNC_START(__hyp_do_panic)
|
||||
/* Prepare and exit to the host's panic funciton. */
|
||||
@ -82,9 +83,11 @@ SYM_FUNC_START(__hyp_do_panic)
|
||||
hyp_kimg_va lr, x6
|
||||
msr elr_el2, lr
|
||||
|
||||
/* Set the panic format string. Use the, now free, LR as scratch. */
|
||||
ldr lr, =__hyp_panic_string
|
||||
hyp_kimg_va lr, x6
|
||||
mov x29, x0
|
||||
|
||||
/* Load the format string into x0 and arguments into x1-7 */
|
||||
ldr x0, =__hyp_panic_string
|
||||
hyp_kimg_va x0, x6
|
||||
|
||||
/* Load the format arguments into x1-7. */
|
||||
mov x6, x3
|
||||
@ -94,9 +97,7 @@ SYM_FUNC_START(__hyp_do_panic)
|
||||
mrs x5, hpfar_el2
|
||||
|
||||
/* Enter the host, conditionally restoring the host context. */
|
||||
cmp x0, xzr
|
||||
mov x0, lr
|
||||
b.eq __host_enter_without_restoring
|
||||
cbz x29, __host_enter_without_restoring
|
||||
b __host_enter_for_panic
|
||||
SYM_FUNC_END(__hyp_do_panic)
|
||||
|
||||
|
@ -83,11 +83,6 @@ SYM_CODE_END(__kvm_hyp_init)
|
||||
* x0: struct kvm_nvhe_init_params PA
|
||||
*/
|
||||
SYM_CODE_START_LOCAL(___kvm_hyp_init)
|
||||
alternative_if ARM64_KVM_PROTECTED_MODE
|
||||
mov_q x1, HCR_HOST_NVHE_PROTECTED_FLAGS
|
||||
msr hcr_el2, x1
|
||||
alternative_else_nop_endif
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_TPIDR_EL2]
|
||||
msr tpidr_el2, x1
|
||||
|
||||
@ -97,6 +92,15 @@ alternative_else_nop_endif
|
||||
ldr x1, [x0, #NVHE_INIT_MAIR_EL2]
|
||||
msr mair_el2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_HCR_EL2]
|
||||
msr hcr_el2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_VTTBR]
|
||||
msr vttbr_el2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_VTCR]
|
||||
msr vtcr_el2, x1
|
||||
|
||||
ldr x1, [x0, #NVHE_INIT_PGD_PA]
|
||||
phys_to_ttbr x2, x1
|
||||
alternative_if ARM64_HAS_CNP
|
||||
@ -115,6 +119,7 @@ alternative_else_nop_endif
|
||||
|
||||
/* Invalidate the stale TLBs from Bootloader */
|
||||
tlbi alle2
|
||||
tlbi vmalls12e1
|
||||
dsb sy
|
||||
|
||||
/*
|
||||
@ -244,4 +249,31 @@ alternative_else_nop_endif
|
||||
|
||||
SYM_CODE_END(__kvm_handle_stub_hvc)
|
||||
|
||||
SYM_FUNC_START(__pkvm_init_switch_pgd)
|
||||
/* Turn the MMU off */
|
||||
pre_disable_mmu_workaround
|
||||
mrs x2, sctlr_el2
|
||||
bic x3, x2, #SCTLR_ELx_M
|
||||
msr sctlr_el2, x3
|
||||
isb
|
||||
|
||||
tlbi alle2
|
||||
|
||||
/* Install the new pgtables */
|
||||
ldr x3, [x0, #NVHE_INIT_PGD_PA]
|
||||
phys_to_ttbr x4, x3
|
||||
alternative_if ARM64_HAS_CNP
|
||||
orr x4, x4, #TTBR_CNP_BIT
|
||||
alternative_else_nop_endif
|
||||
msr ttbr0_el2, x4
|
||||
|
||||
/* Set the new stack pointer */
|
||||
ldr x0, [x0, #NVHE_INIT_STACK_HYP_VA]
|
||||
mov sp, x0
|
||||
|
||||
/* And turn the MMU back on! */
|
||||
set_sctlr_el2 x2
|
||||
ret x1
|
||||
SYM_FUNC_END(__pkvm_init_switch_pgd)
|
||||
|
||||
.popsection
|
||||
|
@ -6,12 +6,15 @@
|
||||
|
||||
#include <hyp/switch.h>
|
||||
|
||||
#include <asm/pgtable-types.h>
|
||||
#include <asm/kvm_asm.h>
|
||||
#include <asm/kvm_emulate.h>
|
||||
#include <asm/kvm_host.h>
|
||||
#include <asm/kvm_hyp.h>
|
||||
#include <asm/kvm_mmu.h>
|
||||
|
||||
#include <nvhe/mem_protect.h>
|
||||
#include <nvhe/mm.h>
|
||||
#include <nvhe/trap_handler.h>
|
||||
|
||||
DEFINE_PER_CPU(struct kvm_nvhe_init_params, kvm_init_params);
|
||||
@ -46,11 +49,11 @@ static void handle___kvm_tlb_flush_vmid(struct kvm_cpu_context *host_ctxt)
|
||||
__kvm_tlb_flush_vmid(kern_hyp_va(mmu));
|
||||
}
|
||||
|
||||
static void handle___kvm_tlb_flush_local_vmid(struct kvm_cpu_context *host_ctxt)
|
||||
static void handle___kvm_flush_cpu_context(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(struct kvm_s2_mmu *, mmu, host_ctxt, 1);
|
||||
|
||||
__kvm_tlb_flush_local_vmid(kern_hyp_va(mmu));
|
||||
__kvm_flush_cpu_context(kern_hyp_va(mmu));
|
||||
}
|
||||
|
||||
static void handle___kvm_timer_set_cntvoff(struct kvm_cpu_context *host_ctxt)
|
||||
@ -67,9 +70,9 @@ static void handle___kvm_enable_ssbs(struct kvm_cpu_context *host_ctxt)
|
||||
write_sysreg_el2(tmp, SYS_SCTLR);
|
||||
}
|
||||
|
||||
static void handle___vgic_v3_get_ich_vtr_el2(struct kvm_cpu_context *host_ctxt)
|
||||
static void handle___vgic_v3_get_gic_config(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
cpu_reg(host_ctxt, 1) = __vgic_v3_get_ich_vtr_el2();
|
||||
cpu_reg(host_ctxt, 1) = __vgic_v3_get_gic_config();
|
||||
}
|
||||
|
||||
static void handle___vgic_v3_read_vmcr(struct kvm_cpu_context *host_ctxt)
|
||||
@ -106,6 +109,61 @@ static void handle___vgic_v3_restore_aprs(struct kvm_cpu_context *host_ctxt)
|
||||
__vgic_v3_restore_aprs(kern_hyp_va(cpu_if));
|
||||
}
|
||||
|
||||
static void handle___pkvm_init(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(phys_addr_t, phys, host_ctxt, 1);
|
||||
DECLARE_REG(unsigned long, size, host_ctxt, 2);
|
||||
DECLARE_REG(unsigned long, nr_cpus, host_ctxt, 3);
|
||||
DECLARE_REG(unsigned long *, per_cpu_base, host_ctxt, 4);
|
||||
DECLARE_REG(u32, hyp_va_bits, host_ctxt, 5);
|
||||
|
||||
/*
|
||||
* __pkvm_init() will return only if an error occurred, otherwise it
|
||||
* will tail-call in __pkvm_init_finalise() which will have to deal
|
||||
* with the host context directly.
|
||||
*/
|
||||
cpu_reg(host_ctxt, 1) = __pkvm_init(phys, size, nr_cpus, per_cpu_base,
|
||||
hyp_va_bits);
|
||||
}
|
||||
|
||||
static void handle___pkvm_cpu_set_vector(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(enum arm64_hyp_spectre_vector, slot, host_ctxt, 1);
|
||||
|
||||
cpu_reg(host_ctxt, 1) = pkvm_cpu_set_vector(slot);
|
||||
}
|
||||
|
||||
static void handle___pkvm_create_mappings(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(unsigned long, start, host_ctxt, 1);
|
||||
DECLARE_REG(unsigned long, size, host_ctxt, 2);
|
||||
DECLARE_REG(unsigned long, phys, host_ctxt, 3);
|
||||
DECLARE_REG(enum kvm_pgtable_prot, prot, host_ctxt, 4);
|
||||
|
||||
cpu_reg(host_ctxt, 1) = __pkvm_create_mappings(start, size, phys, prot);
|
||||
}
|
||||
|
||||
static void handle___pkvm_create_private_mapping(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(phys_addr_t, phys, host_ctxt, 1);
|
||||
DECLARE_REG(size_t, size, host_ctxt, 2);
|
||||
DECLARE_REG(enum kvm_pgtable_prot, prot, host_ctxt, 3);
|
||||
|
||||
cpu_reg(host_ctxt, 1) = __pkvm_create_private_mapping(phys, size, prot);
|
||||
}
|
||||
|
||||
static void handle___pkvm_prot_finalize(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
cpu_reg(host_ctxt, 1) = __pkvm_prot_finalize();
|
||||
}
|
||||
|
||||
static void handle___pkvm_mark_hyp(struct kvm_cpu_context *host_ctxt)
|
||||
{
|
||||
DECLARE_REG(phys_addr_t, start, host_ctxt, 1);
|
||||
DECLARE_REG(phys_addr_t, end, host_ctxt, 2);
|
||||
|
||||
cpu_reg(host_ctxt, 1) = __pkvm_mark_hyp(start, end);
|
||||
}
|
||||
typedef void (*hcall_t)(struct kvm_cpu_context *);
|
||||
|
||||
#define HANDLE_FUNC(x) [__KVM_HOST_SMCCC_FUNC_##x] = (hcall_t)handle_##x
|
||||
@ -115,16 +173,22 @@ static const hcall_t host_hcall[] = {
|
||||
HANDLE_FUNC(__kvm_flush_vm_context),
|
||||
HANDLE_FUNC(__kvm_tlb_flush_vmid_ipa),
|
||||
HANDLE_FUNC(__kvm_tlb_flush_vmid),
|
||||
HANDLE_FUNC(__kvm_tlb_flush_local_vmid),
|
||||
HANDLE_FUNC(__kvm_flush_cpu_context),
|
||||
HANDLE_FUNC(__kvm_timer_set_cntvoff),
|
||||
HANDLE_FUNC(__kvm_enable_ssbs),
|
||||
HANDLE_FUNC(__vgic_v3_get_ich_vtr_el2),
|
||||
HANDLE_FUNC(__vgic_v3_get_gic_config),
|
||||
HANDLE_FUNC(__vgic_v3_read_vmcr),
|
||||
HANDLE_FUNC(__vgic_v3_write_vmcr),
|
||||
HANDLE_FUNC(__vgic_v3_init_lrs),
|
||||
HANDLE_FUNC(__kvm_get_mdcr_el2),
|
||||
HANDLE_FUNC(__vgic_v3_save_aprs),
|
||||
HANDLE_FUNC(__vgic_v3_restore_aprs),
|
||||
HANDLE_FUNC(__pkvm_init),
|
||||
HANDLE_FUNC(__pkvm_cpu_set_vector),
|
||||
HANDLE_FUNC(__pkvm_create_mappings),
|
||||
HANDLE_FUNC(__pkvm_create_private_mapping),
|
||||
HANDLE_FUNC(__pkvm_prot_finalize),
|
||||
HANDLE_FUNC(__pkvm_mark_hyp),
|
||||
};
|
||||
|
||||
static void handle_host_hcall(struct kvm_cpu_context *host_ctxt)
|
||||
@ -177,6 +241,11 @@ void handle_trap(struct kvm_cpu_context *host_ctxt)
|
||||
case ESR_ELx_EC_SMC64:
|
||||
handle_host_smc(host_ctxt);
|
||||
break;
|
||||
case ESR_ELx_EC_IABT_LOW:
|
||||
fallthrough;
|
||||
case ESR_ELx_EC_DABT_LOW:
|
||||
handle_host_mem_abort(host_ctxt);
|
||||
break;
|
||||
default:
|
||||
hyp_panic();
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user