Changes in 6.1.22
interconnect: qcom: osm-l3: fix icc_onecell_data allocation
interconnect: qcom: sm8450: switch to qcom_icc_rpmh_* function
interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT
perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output
perf: fix perf_event_context->time
tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr
drm/amd/display: Include virtual signal to set k1 and k2 values
drm/amd/display: fix k1 k2 divider programming for phantom streams
drm/amd/display: Remove OTG DIV register write for Virtual signals.
mptcp: refactor passive socket initialization
mptcp: use the workqueue to destroy unaccepted sockets
mptcp: fix UaF in listener shutdown
drm/amd/display: Fix DP MST sinks removal issue
arm64: dts: qcom: sm8450: Mark UFS controller as cache coherent
power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition
power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition
arm64: dts: imx8dxl-evk: Disable hibernation mode of AR8031 for EQOS
arm64: dts: imx8dxl-evk: Fix eqos phy reset gpio
ARM: dts: imx6sll: e70k02: fix usbotg1 pinctrl
ARM: dts: imx6sll: e60k02: fix usbotg1 pinctrl
ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl
arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes
arm64: dts: imx93: add missing #address-cells and #size-cells to i2c nodes
NFS: Fix /proc/PID/io read_bytes for buffered reads
xsk: Add missing overflow check in xdp_umem_reg
iavf: fix inverted Rx hash condition leading to disabled hash
iavf: fix non-tunneled IPv6 UDP packet type and hashing
iavf: do not track VLAN 0 filters
intel/igbvf: free irq on the error path in igbvf_request_msix()
igbvf: Regard vf reset nack as success
igc: fix the validation logic for taprio's gate list
i2c: imx-lpi2c: check only for enabled interrupt flags
i2c: mxs: ensure that DMA buffers are safe for DMA
i2c: hisi: Only use the completion interrupt to finish the transfer
scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate()
nfsd: don't replace page in rq_pages if it's a continuation of last page
net: dsa: b53: mmap: fix device tree support
net: usb: smsc95xx: Limit packet length to skb->len
efi/libstub: smbios: Use length member instead of record struct size
qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info
xirc2ps_cs: Fix use after free bug in xirc2ps_detach
net: phy: Ensure state transitions are processed from phy_stop()
net: mdio: fix owner field for mdio buses registered using device-tree
net: mdio: fix owner field for mdio buses registered using ACPI
net: stmmac: Fix for mismatched host/device DMA address width
thermal/drivers/mellanox: Use generic thermal_zone_get_trip() function
mlxsw: core_thermal: Fix fan speed in maximum cooling state
drm/i915: Print return value on error
drm/i915/fbdev: lock the fbdev obj before vma pin
drm/i915/guc: Rename GuC register state capture node to be more obvious
drm/i915/guc: Fix missing ecodes
drm/i915/gt: perform uc late init after probe error injection
net: qcom/emac: Fix use after free bug in emac_remove due to race condition
net: usb: lan78xx: Limit packet length to skb->len
net/ps3_gelic_net: Fix RX sk_buff length
net/ps3_gelic_net: Use dma_mapping_error
octeontx2-vf: Add missing free for alloc_percpu
bootconfig: Fix testcase to increase max node
keys: Do not cache key in task struct if key is requested from kernel thread
ice: check if VF exists before mode check
iavf: fix hang on reboot with ice
i40e: fix flow director packet filter programming
bpf: Adjust insufficient default bpf_jit_limit
net/mlx5e: Set uplink rep as NETNS_LOCAL
net/mlx5e: Block entering switchdev mode with ns inconsistency
net/mlx5: Fix steering rules cleanup
net/mlx5e: Overcome slow response for first macsec ASO WQE
net/mlx5: Read the TC mapping of all priorities on ETS query
net/mlx5: E-Switch, Fix an Oops in error handling code
net: dsa: tag_brcm: legacy: fix daisy-chained switches
atm: idt77252: fix kmemleak when rmmod idt77252
erspan: do not use skb_mac_header() in ndo_start_xmit()
net/sonic: use dma_mapping_error() for error check
nvme-tcp: fix nvme_tcp_term_pdu to match spec
mlxsw: spectrum_fid: Fix incorrect local port type
hvc/xen: prevent concurrent accesses to the shared ring
ksmbd: add low bound validation to FSCTL_SET_ZERO_DATA
ksmbd: add low bound validation to FSCTL_QUERY_ALLOCATED_RANGES
ksmbd: fix possible refcount leak in smb2_open()
Bluetooth: hci_sync: Resume adv with no RPA when active scan
Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet
Bluetooth: btusb: Remove detection of ISO packets over bulk
Bluetooth: ISO: fix timestamped HCI ISO data packet parsing
Bluetooth: Remove "Power-on" check from Mesh feature
gve: Cache link_speed value from device
net: asix: fix modprobe "sysfs: cannot create duplicate filename"
net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()
net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup()
net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case
net: mdio: thunder: Add missing fwnode_handle_put()
drm/amd/display: Set dcn32 caps.seamless_odm
Bluetooth: btqcomsmd: Fix command timeout after setting BD address
Bluetooth: L2CAP: Fix responding with wrong PDU type
Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
Bluetooth: HCI: Fix global-out-of-bounds
platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl
entry: Fix noinstr warning in __enter_from_user_mode()
perf/x86/amd/core: Always clear status for idx
entry/rcu: Check TIF_RESCHED _after_ delayed RCU wake-up
hwmon: fix potential sensor registration fail if of_node is missing
hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs
scsi: qla2xxx: Synchronize the IOCB count to be in order
scsi: qla2xxx: Perform lockless command completion in abort path
smb3: lower default deferred close timeout to address perf regression
smb3: fix unusable share after force unmount failure
uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2
thunderbolt: Use scale field when allocating USB3 bandwidth
thunderbolt: Call tb_check_quirks() after initializing adapters
thunderbolt: Add quirk to disable CLx
thunderbolt: Fix memory leak in margining
thunderbolt: Disable interrupt auto clear for rings
thunderbolt: Add missing UNSET_INBOUND_SBTX for retimer access
thunderbolt: Use const qualifier for `ring_interrupt_index`
thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit
ASoC: amd: yp: Add OMEN by HP Gaming Laptop 16z-n000 to quirks
ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43)
ACPI: x86: Drop quirk for HP Elitebook
ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable
riscv: Bump COMMAND_LINE_SIZE value to 1024
drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded
ca8210: fix mac_len negative array access
HID: logitech-hidpp: Add support for Logitech MX Master 3S mouse
HID: intel-ish-hid: ipc: Fix potential use-after-free in work function
m68k: mm: Fix systems with memory at end of 32-bit address space
m68k: Only force 030 bus error if PC not in exception table
selftests/bpf: check that modifier resolves after pointer
scsi: target: iscsi: Fix an error message in iscsi_check_key()
scsi: qla2xxx: Add option to disable FC2 Target support
scsi: hisi_sas: Check devm_add_action() return value
scsi: ufs: core: Add soft dependency on governor_simpleondemand
scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read()
scsi: lpfc: Avoid usage of list iterator variable after loop
scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled
scsi: mpi3mr: Wait for diagnostic save during controller init
scsi: mpi3mr: NVMe command size greater than 8K fails
scsi: mpi3mr: Bad drive in topology results kernel crash
scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file
platform/x86: int3472: Add GPIOs to Surface Go 3 Board data
net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990
net: usb: qmi_wwan: add Telit 0x1080 composition
drm/amd/display: Update clock table to include highest clock setting
sh: sanitize the flags on sigreturn
drm/amdgpu: Fix call trace warning and hang when removing amdgpu device
drm/amd: Fix initialization mistake for NBIO 7.3.0
net/sched: act_mirred: better wording on protection against excessive stack growth
act_mirred: use the backlog for nested calls to mirred ingress
cifs: lock chan_lock outside match_session
cifs: append path to open_enter trace event
cifs: do not poll server interfaces too regularly
cifs: empty interface list when server doesn't support query interfaces
cifs: dump pending mids for all channels in DebugData
cifs: print session id while listing open files
cifs: fix dentry lookups in directory handle cache
x86/fpu/xstate: Prevent false-positive warning in __copy_xstate_uabi_buf()
selftests/x86/amx: Add a ptrace test
scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR
usb: misc: onboard-hub: add support for Microchip USB2517 USB 2.0 hub
usb: dwc2: drd: fix inconsistent mode if role-switch-default-mode="host"
usb: dwc2: fix a devres leak in hw_enable upon suspend resume
usb: gadget: u_audio: don't let userspace block driver unbind
btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile
Bluetooth: Fix race condition in hci_cmd_sync_clear
efi: sysfb_efi: Fix DMI quirks not working for simpledrm
mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP
fscrypt: destroy keyring after security_sb_delete()
fsverity: Remove WQ_UNBOUND from fsverity read workqueue
lockd: set file_lock start and end when decoding nlm4 testargs
arm64: dts: imx8mm-nitrogen-r2: fix WM8960 clock name
igb: revert rtnl_lock() that causes deadlock
dm thin: fix deadlock when swapping to thin device
usb: typec: tcpm: fix create duplicate source-capabilities file
usb: typec: tcpm: fix warning when handle discover_identity message
usb: cdns3: Fix issue with using incorrect PCI device function
usb: cdnsp: Fixes issue with redundant Status Stage
usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver
usb: chipdea: core: fix return -EINVAL if request role is the same with current role
usb: chipidea: core: fix possible concurrent when switch role
usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC
usb: ucsi: Fix NULL pointer deref in ucsi_connector_change()
usb: ucsi_acpi: Increase the command completion timeout
mm: kfence: fix using kfence_metadata without initialization in show_object()
kfence: avoid passing -g for test
io_uring/net: avoid sending -ECONNABORTED on repeated connection requests
io_uring/rsrc: fix null-ptr-deref in io_file_bitmap_get()
Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare"
test_maple_tree: add more testing for mas_empty_area()
maple_tree: fix mas_skip_node() end slot detection
ksmbd: fix wrong signingkey creation when encryption is AES256
ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION
ksmbd: don't terminate inactive sessions after a few seconds
ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect
ksmbd: return unsupported error on smb1 mount
wifi: mac80211: fix qos on mesh interfaces
nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy()
drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
drm/amd/display: fix wrong index used in dccg32_set_dpstreamclk
drm/meson: fix missing component unbind on bind errors
drm/amdgpu/nv: Apply ASPM quirk on Intel ADL + AMD Navi
drm/i915/active: Fix missing debug object activation
drm/i915: Preserve crtc_state->inherited during state clearing
drm/amdgpu: skip ASIC reset for APUs when go to S4
drm/amdgpu: reposition the gpu reset checking for reuse
riscv: mm: Fix incorrect ASID argument when flushing TLB
riscv: Handle zicsr/zifencei issues between clang and binutils
tee: amdtee: fix race condition in amdtee_open_session
firmware: arm_scmi: Fix device node validation for mailbox transport
arm64: dts: qcom: sc7280: Mark PCIe controller as cache coherent
arm64: dts: qcom: sm8150: Fix the iommu mask used for PCIe controllers
soc: qcom: llcc: Fix slice configuration values for SC8280XP
mm/ksm: fix race with VMA iteration and mm_struct teardown
bus: imx-weim: fix branch condition evaluates to a garbage value
i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer()
dm stats: check for and propagate alloc_percpu failure
dm crypt: add cond_resched() to dmcrypt_write()
dm crypt: avoid accessing uninitialized tasklet
sched/fair: sanitize vruntime of entity being placed
sched/fair: Sanitize vruntime of entity being migrated
drm/amdkfd: introduce dummy cache info for property asic
drm/amdkfd: Fix the warning of array-index-out-of-bounds
drm/amdkfd: add GC 11.0.4 KFD support
drm/amdkfd: Fix the memory overrun
Linux 6.1.22
Change-Id: Id13b4655dbfb59c29a0b8953e5e0cda3703f1879
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Add support for setting the protected VM firmware load location. This
change requires lent memory support, which will land in future kernel as
restricted_memfd. Until then, it is in Android Common Kernel following
the GH_VM_ANDROID_LEND_USER_MEMORY patches.
Bug: 268234781
Change-Id: I1d1385ee6d4018d7a6e82868bf115b9bd6c785ca
Co-developed-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Sreenad Menon <quic_sreemeno@quicinc.com>
Add support for lending memory via GH_VM_ANDROID_LEND_USER_MEM. Lending
memory makes it inaccessible to the host.
pKVM and Gunyah aim to converge to a common design based around
restricted_memfd in kernel.org, but the base restricted_memfd support is
not available yet. So, carry the support to lend memory as an Android
patch.
Bug: 268234781
Change-Id: Iecef11891f40efe4a3df7585808d6fe28a14ab39
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Make gunyah core driver a built in module to allow Gunyah vendor modules
to be a part of first stage ramdisk.
Bug: 268234781
Change-Id: I5b442baabb720362c7be7727d138ef8d9850bfbc
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Add support for further vendor features of Gunyah. To probe the vendor
features, add auxiliary device and export gh_rm_call to all the vendor
features to make not-yet-upstreamed RM RPC calls.
Bug: 268234781
Change-Id: I13de37b7c0d5d6c85bdd32a20c39fdde99cffbdd
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Enable support for creating irqfds which can raise an interrupt on a
Gunyah virtual machine. irqfds are exposed to userspace as a Gunyah VM
function with the name "irqfd". If the VM devicetree is not configured
to create a doorbell with the corresponding label, userspace will still
be able to assert the eventfd but no interrupt will be raised on the
guest.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Change-Id: Ia3a08edfa77f10519c56be9e332f79f08cd89d57
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-25-quic_eberman@quicinc.com/
Gunyah doorbells allow two virtual machines to signal each other using
interrupts. Add the hypercalls needed to assert the interrupt.
Change-Id: I2b7a8a96106e446a701dc53724f72ab8a94c1996
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-24-quic_eberman@quicinc.com/
Gunyah allows host virtual machines to schedule guest virtual machines
and handle their MMIO accesses. vCPUs are presented to the host as a
Gunyah resource and represented to userspace as a Gunyah VM function.
Creating the vcpu VM function will create a file descriptor that:
- can run an ioctl: GH_VCPU_RUN to schedule the guest vCPU until the
next interrupt occurs on the host or when the guest vCPU can no
longer be run.
- can be mmap'd to share a gh_vcpu_run structure which can look up the
reason why GH_VCPU_RUN returned and provide return values for MMIO
access.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Change-Id: I8939bdfa61a9836a5a61c6616818c1eb2078c0f1
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-23-quic_eberman@quicinc.com/
Add framework for VM functions to handle stage-2 write faults from Gunyah
guest virtual machines. IO handlers have a range of addresses which they
apply to. Optionally, they may apply to only when the value written
matches the IO handler's value.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Change-Id: I52339f24463e554b5b659b6bd0a868ffdc6a6915
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-22-quic_eberman@quicinc.com/
Some VM functions need to acquire Gunyah resources. For instance, Gunyah
vCPUs are exposed to the host as a resource. The Gunyah vCPU function
will register a resource ticket and be able to interact with the
hypervisor once the resource ticket is filled.
Resource tickets are the mechanism for functions to acquire ownership of
Gunyah resources. Gunyah functions can be created before the VM's
resources are created and made available to Linux. A resource ticket
identifies a type of resource and a label of a resource which the ticket
holder is interested in.
Resources are created by Gunyah as configured in the VM's devicetree
configuration. Gunyah doesn't process the label and that makes it
possible for userspace to create multiple resources with the same label.
Resource ticket owners need to be prepared for populate to be called
multiple times if userspace created multiple resources with the same
label.
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I34a590dc0010dd5aa6332701cb6e394836d1fb4b
[Elliot: resolve trivial merge conflicts]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-21-quic_eberman@quicinc.com/
Introduce a framework for Gunyah userspace to install VM functions. VM
functions are optional interfaces to the virtual machine. vCPUs,
ioeventfs, and irqfds are examples of such VM functions and are
implemented in subsequent patches.
A generic framework is implemented instead of individual ioctls to
create vCPUs, irqfds, etc., in order to simplify the VM manager core
implementation and allow dynamic loading of VM function modules.
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I616fa24621348bb6a3a23b400a80423cb91a0d78
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-20-quic_eberman@quicinc.com/
[Elliot: gh_vm_free adjustments for gh_rm_vm_reset]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
When booting a Gunyah virtual machine, the host VM may gain capabilities
to interact with resources for the guest virtual machine. Examples of
such resources are vCPUs or message queues. To use those resources, we
need to translate the RM response into a gunyah_resource structure which
are useful to Linux drivers. Presently, Linux drivers need only to know
the type of resource, the capability ID, and an interrupt.
On ARM64 systems, the interrupt reported by Gunyah is the GIC interrupt
ID number and always a SPI.
Change-Id: Ia2ba79a8a12b70906b020ae3952ea2db746ff849
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-19-quic_eberman@quicinc.com/
On Qualcomm platforms, there is a firmware entity which controls access
to physical pages. In order to share memory with another VM, this entity
needs to be informed that the guest VM should have access to the memory.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-16-quic_eberman@quicinc.com/
Change-Id: I58afd74f0a2f0bcfa1e2eb33a64d7146121f4a3e
[eberman: Rename gunyah_rm_platform_ops as gh_rm_platform_ops]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Add remaining ioctls to support non-proxy VM boot:
- Gunyah Resource Manager uses the VM's devicetree to configure the
virtual machine. The location of the devicetree in the guest's
virtual memory can be declared via the SET_DTB_CONFIG ioctl.
- Trigger start of the virtual machine with VM_START ioctl.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-14-quic_eberman@quicinc.com/
Change-Id: Iade2105969dc9bde2274e124696a5fb914478236
[Elliot: fixup gh_vm_free flow to align with future v12 patch]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
When launching a virtual machine, Gunyah userspace allocates memory for
the guest and informs Gunyah about these memory regions through
SET_USER_MEMORY_REGION ioctl.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Change-Id: Iddd31901bb8b0dc4e7db77d98a7692718ad65c2e
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-13-quic_eberman@quicinc.com/
Gunyah resource manager provides API to manipulate stage 2 page tables.
Manipulations are represented as a memory parcel. Memory parcels
describe a list of memory regions (intermediate physical address and
size), a list of new permissions for VMs, and the memory type (DDR or
MMIO). Memory parcels are uniquely identified by a handle allocated by
Gunyah. There are a few types of memory parcel sharing which Gunyah
supports:
- Sharing: the guest and host VM both have access
- Lending: only the guest has access; host VM loses access
- Donating: Permanently lent (not reclaimed even if guest shuts down)
Memory parcels that have been shared or lent can be reclaimed by the
host via an additional call. The reclaim operation restores the original
access the host VM had to the memory parcel and removes the access to
other VM.
One point to note that memory parcels don't describe where in the guest
VM the memory parcel should reside. The guest VM must accept the memory
parcel either explicitly via a "gh_rm_mem_accept" call (not introduced
here) or be configured to accept it automatically at boot. As the guest
VM accepts the memory parcel, it also mentions the IPA it wants to place
memory parcel.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Change-Id: I0b36063c2d809448b8fec68a5043c94dbab23806
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-12-quic_eberman@quicinc.com/
Gunyah VM manager is a kernel moduel which exposes an interface to
Gunyah userspace to load, run, and interact with other Gunyah virtual
machines. The interface is a character device at /dev/gunyah.
Add a basic VM manager driver. Upcoming patches will add more ioctls
into this driver.
Co-developed-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-11-quic_eberman@quicinc.com/
[Elliot: switch ENOIOCTLCMD to ENOTTY]
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I593c754d0a56f274fa92a3f165dde2e31b85af45
The resource manager is a special virtual machine which is always
running on a Gunyah system. It provides APIs for creating and destroying
VMs, secure memory management, sharing/lending of memory between VMs,
and setup of inter-VM communication. Calls to the resource manager are
made via message queues.
This patch implements the basic probing and RPC mechanism to make those
API calls. Request/response calls can be made with gh_rm_call.
Drivers can also register to notifications pushed by RM via
gh_rm_register_notifier
Specific API calls that resource manager supports will be implemented in
subsequent patches.
Change-Id: I118738f2bf0d038b175ce346ec75a648a12653f1
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-9-quic_eberman@quicinc.com/
Gunyah message queues are a unidirectional inter-VM pipe for messages up
to 1024 bytes. This driver supports pairing a receiver message queue and
a transmitter message queue to expose a single mailbox channel.
Change-Id: I46d07e553a6887212d9c294d2a796f7f837e23b2
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-8-quic_eberman@quicinc.com/
Export the version of Gunyah which is reported via the hyp_identify
hypercall. Increments of the major API version indicate possibly
backwards incompatible changes.
Export the hypervisor identity so that Gunyah drivers can act according
to the major API version.
Change-Id: I170271229a851641949076a6eeadc1df32dffe17
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-6-quic_eberman@quicinc.com/
Add hypercalls to identify when Linux is running a virtual machine under
Gunyah.
There are two calls to help identify Gunyah:
1. gh_hypercall_get_uid() returns a UID when running under a Gunyah
hypervisor.
2. gh_hypercall_hyp_identify() returns build information and a set of
feature flags that are supported by Gunyah.
Change-Id: Ie11b9cad6854b3dabcc406e82ea9f7a1c7f67b9c
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-5-quic_eberman@quicinc.com/
When Linux is booted as a guest under the Gunyah hypervisor, the Gunyah
Resource Manager applies a devicetree overlay describing the virtual
platform configuration of the guest VM, such as the message queue
capability IDs for communicating with the Resource Manager. This
information is not otherwise discoverable by a VM: the Gunyah hypervisor
core does not provide a direct interface to discover capability IDs nor
a way to communicate with RM without having already known the
corresponding message queue capability ID. Add the DT bindings that
Gunyah adheres for the hypervisor node and message queues.
Reviewed-by: Rob Herring <robh@kernel.org>
Change-Id: I2e438f59c42e169380d4e3212619af4acf282578
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-3-quic_eberman@quicinc.com/
Gunyah is an open-source Type-1 hypervisor developed by Qualcomm. It
does not depend on any lower-privileged OS/kernel code for its core
functionality. This increases its security and can support a smaller
trusted computing based when compared to Type-2 hypervisors.
Add documentation describing the Gunyah hypervisor and the main
components of the Gunyah hypervisor which are of interest to Linux
virtualization development.
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Change-Id: I471b5ad02732f25e35efe033cd281025c84d0f09
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Bug: 268234781
Link: https://lore.kernel.org/all/20230304010632.2127470-2-quic_eberman@quicinc.com/
Support virtual mailbox controllers and clients which are not platform
devices or come from the devicetree by allowing them to match client to
channel via some other mechanism.
Bug: 268234781
Link: https://lore.kernel.org/all/20230216163804.456714-1-quic_eberman@quicinc.com/
Change-Id: I33bb150bfcd0c40b15d1da634a907b0ffbca16ef
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
The CRC for shmem_file_setup changed after
https://r.android.com/c/2512924/5 rebased on commit due to the bi-weekly
KMI update happening in tandem.
The KMI changes include:
function symbol 'struct file* shmem_file_setup(const char*,
loff_t, unsigned long)' changed
CRC changed from 0x5979e157 to 0xe9ef458b
Also, abi_gki_protected_exports_aarch64 needed an update due to
the hashtag 'kmi-changes-for-2023-03-29'.
Bug: 273448633
Change-Id: Ie174f036ddfbac12e454bbaf927c4a15cf9020f0
Signed-off-by: Will McVicker <willmcvicker@google.com>
Add a trace hook whose callback be used to fill the folio that can be
used for shmem fs. This VH also takes the 'shmem_inode_info' which
can contain the vendor specific data.
Bug: 273448633
Change-Id: Ia48480bba6dba1ee37a3297b69fd61877dae8dc9
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Add vendor specific data in the 'struct shmem_inode_info'.
Bug: 273448633
Change-Id: I83a3ac822275d2464af7eb25b869b816fdb7276e
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Set KMI_GENERATION=3 for 3/29 KMI update
5 function symbol(s) added
'struct page* dmabuf_page_pool_alloc(struct dmabuf_page_pool*)'
'struct dmabuf_page_pool* dmabuf_page_pool_create(gfp_t, unsigned int)'
'void dmabuf_page_pool_destroy(struct dmabuf_page_pool*)'
'void dmabuf_page_pool_free(struct dmabuf_page_pool*, struct page*)'
'unsigned long dmabuf_page_pool_get_size(struct dmabuf_page_pool*)'
function symbol changed from 'void __wake_up(struct wait_queue_head*, unsigned int, int, void*)' to 'int __wake_up(struct wait_queue_head*, unsigned int, int, void*)'
CRC changed from 0x3eeb2322 to 0xe2964344
type changed from 'void(struct wait_queue_head*, unsigned int, int, void*)' to 'int(struct wait_queue_head*, unsigned int, int, void*)'
return type changed from 'void' to 'int'
function symbol changed from 'void cfg80211_ch_switch_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int)' to 'void cfg80211_ch_switch_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int, u16)'
CRC changed from 0xe8432c8b to 0xdcde54a6
type changed from 'void(struct net_device*, struct cfg80211_chan_def*, unsigned int)' to 'void(struct net_device*, struct cfg80211_chan_def*, unsigned int, u16)'
parameter 4 of type 'u16' was added
function symbol changed from 'void cfg80211_ch_switch_started_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool)' to 'void cfg80211_ch_switch_started_notify(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool, u16)'
CRC changed from 0xe086a1f0 to 0x86eba6c4
type changed from 'void(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool)' to 'void(struct net_device*, struct cfg80211_chan_def*, unsigned int, u8, bool, u16)'
parameter 6 of type 'u16' was added
function symbol changed from 'void cfg80211_port_authorized(struct net_device*, const u8*, gfp_t)' to 'void cfg80211_port_authorized(struct net_device*, const u8*, const u8*, u8, gfp_t)'
CRC changed from 0x2ce6ed68 to 0x8ba3e8b9
type changed from 'void(struct net_device*, const u8*, gfp_t)' to 'void(struct net_device*, const u8*, const u8*, u8, gfp_t)'
parameter 3 type changed from 'gfp_t' = 'unsigned int' to 'const u8*'
resolved type changed from 'unsigned int' to 'const u8*'
parameter 4 of type 'u8' was added
parameter 5 of type 'gfp_t' was added
function symbol changed from 'unsigned long drm_gem_lru_scan(struct drm_gem_lru*, unsigned int, bool(*)(struct drm_gem_object*))' to 'unsigned long drm_gem_lru_scan(struct drm_gem_lru*, unsigned int, unsigned long*, bool(*)(struct drm_gem_object*))'
CRC changed from 0x98fde9d to 0x9acfaf20
type changed from 'unsigned long(struct drm_gem_lru*, unsigned int, bool(*)(struct drm_gem_object*))' to 'unsigned long(struct drm_gem_lru*, unsigned int, unsigned long*, bool(*)(struct drm_gem_object*))'
parameter 3 type changed from 'bool(*)(struct drm_gem_object*)' to 'unsigned long*'
pointed-to type changed from 'bool(struct drm_gem_object*)' to 'unsigned long'
parameter 4 of type 'bool(*)(struct drm_gem_object*)' was added
function symbol changed from 'char* kobject_get_path(struct kobject*, gfp_t)' to 'char* kobject_get_path(const struct kobject*, gfp_t)'
CRC changed from 0x6d2bc3a7 to 0x62b056f6
type changed from 'char*(struct kobject*, gfp_t)' to 'char*(const struct kobject*, gfp_t)'
parameter 1 type changed from 'struct kobject*' to 'const struct kobject*'
pointed-to type changed from 'struct kobject' to 'const struct kobject'
qualifier const added
function symbol 'struct block_device* I_BDEV(struct inode*)' changed
CRC changed from 0x66b14c8d to 0xc79e45c3
function symbol 'void __ClearPageMovable(struct page*)' changed
CRC changed from 0xbf6e946f to 0x4cf602fa
function symbol 'void __SetPageMovable(struct page*, const struct movable_operations*)' changed
CRC changed from 0x8c770d3 to 0x60f5778b
... 1724 omitted; 1727 symbols have only CRC changes
type 'enum nl80211_attrs' changed
enumerator 'NL80211_ATTR_TD_BITMAP' (321) was added
enumerator 'NL80211_ATTR_PUNCT_BITMAP' (322) was added
enumerator '__NL80211_ATTR_AFTER_LAST' value changed from 321 to 323
enumerator 'NUM_NL80211_ATTR' value changed from 321 to 323
enumerator 'NL80211_ATTR_MAX' value changed from 320 to 322
type 'struct scsi_device' changed
member 'unsigned int no_vpd_size : 1' was added
type 'struct dma_buf' changed
byte size changed from 264 to 272
member 'struct dma_buf_sysfs_entry* sysfs_entry' was added
type 'struct ufs_hba' changed
member 'unsigned int android_quirks' was added
member 'unsigned int dev_quirks' changed
offset changed by 32
type 'struct cfg80211_connect_resp_params' changed
byte size changed from 472 to 592
member changed from 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; } links[15]' to 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; u16 status; } links[15]'
type changed from 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; }[15]' to 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; u16 status; }[15]'
element type changed from 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; }' to 'struct { const u8* addr; const u8* bssid; struct cfg80211_bss* bss; u16 status; }'
byte size changed from 24 to 32
member 'u16 status' was added
type 'struct station_info' changed
byte size changed from 232 to 256
member 'bool mlo_params_valid' was added
member 'u8 assoc_link_id' was added
member 'u8 mld_addr[6]' was added
member 'const u8* assoc_resp_ies' was added
member 'size_t assoc_resp_ies_len' was added
type 'struct cfg80211_external_auth_params' changed
byte size changed from 64 to 72
member 'u8 mld_addr[6]' was added
type 'struct cfg80211_rx_assoc_resp' changed
byte size changed from 288 to 408
member changed from 'struct { const u8* addr; struct cfg80211_bss* bss; } links[15]' to 'struct { const u8* addr; struct cfg80211_bss* bss; u16 status; } links[15]'
type changed from 'struct { const u8* addr; struct cfg80211_bss* bss; }[15]' to 'struct { const u8* addr; struct cfg80211_bss* bss; u16 status; }[15]'
element type changed from 'struct { const u8* addr; struct cfg80211_bss* bss; }' to 'struct { const u8* addr; struct cfg80211_bss* bss; u16 status; }'
byte size changed from 16 to 24
member 'u16 status' was added
type 'struct cfg80211_update_owe_info' changed
byte size changed from 24 to 40
member 'int assoc_link_id' was added
member 'u8 peer_mld_addr[6]' was added
type 'struct pglist_data' changed
byte size changed from 6976 to 7168
2 members ('unsigned long flags' .. 'struct lru_gen_mm_walk mm_walk') changed
offset changed by 128
member 'struct lru_gen_memcg memcg_lru' was added
3 members ('struct cacheline_padding _pad2_' .. 'atomic_long_t vm_stat[42]') changed
offset changed by 1536
type 'struct pci_host_bridge' changed
member 'unsigned int no_inc_mrrs : 1' was added
9 members ('unsigned int native_aer : 1' .. 'unsigned int msi_domain : 1') changed
offset changed by 1
type 'struct hid_device' changed
member 'unsigned int initial_quirks' was added
member 'bool io_started' changed
offset changed by 32
type 'struct tcpm_port' changed
member 'bool potential_contaminant' was added
type 'struct tcpci' changed
byte size changed from 224 to 232
member 'struct tcpci_data* data' changed
offset changed by 64
type 'struct tcpci_data' changed
byte size changed from 64 to 72
member 'void(* check_contaminant)(struct tcpci*, struct tcpci_data*)' was added
type 'struct blk_mq_tags' changed
byte size changed from 168 to 184
member 'struct sbitmap_queue breserved_tags' changed
offset changed by 64
4 members ('struct request** rqs' .. 'spinlock_t lock') changed
offset changed by 128
type 'struct netns_ct' changed
member 'u8 ctnetlink_has_listener' was removed
6 members ('bool ecache_dwork_pending' .. 'u8 sysctl_checksum') changed
offset changed by -8
type 'struct lruvec' changed
byte size changed from 1208 to 1224
member changed from 'struct lru_gen_struct lrugen' to 'struct lru_gen_folio lrugen'
type changed from 'struct lru_gen_struct' to 'struct lru_gen_folio'
2 members ('struct lru_gen_mm_state mm_state' .. 'struct pglist_data* pgdat') changed
offset changed by 128
type 'struct tcpc_dev' changed
byte size changed from 184 to 192
member 'void(* check_contaminant)(struct tcpc_dev*)' was added
type 'enum tcpm_state' changed
enumerator 'CHECK_CONTAMINANT' (2) was added
enumerator 'SRC_UNATTACHED' value changed from 2 to 3
enumerator 'SRC_ATTACH_WAIT' value changed from 3 to 4
enumerator 'SRC_ATTACHED' value changed from 4 to 5
enumerator 'SRC_STARTUP' value changed from 5 to 6
enumerator 'SRC_SEND_CAPABILITIES' value changed from 6 to 7
enumerator 'SRC_SEND_CAPABILITIES_TIMEOUT' value changed from 7 to 8
enumerator 'SRC_NEGOTIATE_CAPABILITIES' value changed from 8 to 9
enumerator 'SRC_TRANSITION_SUPPLY' value changed from 9 to 10
enumerator 'SRC_READY' value changed from 10 to 11
enumerator 'SRC_WAIT_NEW_CAPABILITIES' value changed from 11 to 12
enumerator 'SNK_UNATTACHED' value changed from 12 to 13
enumerator 'SNK_ATTACH_WAIT' value changed from 13 to 14
enumerator 'SNK_DEBOUNCED' value changed from 14 to 15
enumerator 'SNK_ATTACHED' value changed from 15 to 16
enumerator 'SNK_STARTUP' value changed from 16 to 17
enumerator 'SNK_DISCOVERY' value changed from 17 to 18
enumerator 'SNK_DISCOVERY_DEBOUNCE' value changed from 18 to 19
enumerator 'SNK_DISCOVERY_DEBOUNCE_DONE' value changed from 19 to 20
enumerator 'SNK_WAIT_CAPABILITIES' value changed from 20 to 21
enumerator 'SNK_NEGOTIATE_CAPABILITIES' value changed from 21 to 22
enumerator 'SNK_NEGOTIATE_PPS_CAPABILITIES' value changed from 22 to 23
enumerator 'SNK_TRANSITION_SINK' value changed from 23 to 24
enumerator 'SNK_TRANSITION_SINK_VBUS' value changed from 24 to 25
enumerator 'SNK_READY' value changed from 25 to 26
enumerator 'ACC_UNATTACHED' value changed from 26 to 27
enumerator 'DEBUG_ACC_ATTACHED' value changed from 27 to 28
enumerator 'AUDIO_ACC_ATTACHED' value changed from 28 to 29
enumerator 'AUDIO_ACC_DEBOUNCE' value changed from 29 to 30
enumerator 'HARD_RESET_SEND' value changed from 30 to 31
enumerator 'HARD_RESET_START' value changed from 31 to 32
enumerator 'SRC_HARD_RESET_VBUS_OFF' value changed from 32 to 33
enumerator 'SRC_HARD_RESET_VBUS_ON' value changed from 33 to 34
enumerator 'SNK_HARD_RESET_SINK_OFF' value changed from 34 to 35
enumerator 'SNK_HARD_RESET_WAIT_VBUS' value changed from 35 to 36
enumerator 'SNK_HARD_RESET_SINK_ON' value changed from 36 to 37
enumerator 'SOFT_RESET' value changed from 37 to 38
enumerator 'SRC_SOFT_RESET_WAIT_SNK_TX' value changed from 38 to 39
enumerator 'SNK_SOFT_RESET' value changed from 39 to 40
enumerator 'SOFT_RESET_SEND' value changed from 40 to 41
enumerator 'DR_SWAP_ACCEPT' value changed from 41 to 42
enumerator 'DR_SWAP_SEND' value changed from 42 to 43
enumerator 'DR_SWAP_SEND_TIMEOUT' value changed from 43 to 44
enumerator 'DR_SWAP_CANCEL' value changed from 44 to 45
enumerator 'DR_SWAP_CHANGE_DR' value changed from 45 to 46
enumerator 'PR_SWAP_ACCEPT' value changed from 46 to 47
enumerator 'PR_SWAP_SEND' value changed from 47 to 48
enumerator 'PR_SWAP_SEND_TIMEOUT' value changed from 48 to 49
enumerator 'PR_SWAP_CANCEL' value changed from 49 to 50
enumerator 'PR_SWAP_START' value changed from 50 to 51
enumerator 'PR_SWAP_SRC_SNK_TRANSITION_OFF' value changed from 51 to 52
enumerator 'PR_SWAP_SRC_SNK_SOURCE_OFF' value changed from 52 to 53
enumerator 'PR_SWAP_SRC_SNK_SOURCE_OFF_CC_DEBOUNCED' value changed from 53 to 54
enumerator 'PR_SWAP_SRC_SNK_SINK_ON' value changed from 54 to 55
enumerator 'PR_SWAP_SNK_SRC_SINK_OFF' value changed from 55 to 56
enumerator 'PR_SWAP_SNK_SRC_SOURCE_ON' value changed from 56 to 57
enumerator 'PR_SWAP_SNK_SRC_SOURCE_ON_VBUS_RAMPED_UP' value changed from 57 to 58
enumerator 'VCONN_SWAP_ACCEPT' value changed from 58 to 59
enumerator 'VCONN_SWAP_SEND' value changed from 59 to 60
enumerator 'VCONN_SWAP_SEND_TIMEOUT' value changed from 60 to 61
enumerator 'VCONN_SWAP_CANCEL' value changed from 61 to 62
enumerator 'VCONN_SWAP_START' value changed from 62 to 63
enumerator 'VCONN_SWAP_WAIT_FOR_VCONN' value changed from 63 to 64
enumerator 'VCONN_SWAP_TURN_ON_VCONN' value changed from 64 to 65
enumerator 'VCONN_SWAP_TURN_OFF_VCONN' value changed from 65 to 66
enumerator 'FR_SWAP_SEND' value changed from 66 to 67
enumerator 'FR_SWAP_SEND_TIMEOUT' value changed from 67 to 68
enumerator 'FR_SWAP_SNK_SRC_TRANSITION_TO_OFF' value changed from 68 to 69
enumerator 'FR_SWAP_SNK_SRC_NEW_SINK_READY' value changed from 69 to 70
enumerator 'FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED' value changed from 70 to 71
enumerator 'FR_SWAP_CANCEL' value changed from 71 to 72
enumerator 'SNK_TRY' value changed from 72 to 73
enumerator 'SNK_TRY_WAIT' value changed from 73 to 74
enumerator 'SNK_TRY_WAIT_DEBOUNCE' value changed from 74 to 75
enumerator 'SNK_TRY_WAIT_DEBOUNCE_CHECK_VBUS' value changed from 75 to 76
enumerator 'SRC_TRYWAIT' value changed from 76 to 77
enumerator 'SRC_TRYWAIT_DEBOUNCE' value changed from 77 to 78
enumerator 'SRC_TRYWAIT_UNATTACHED' value changed from 78 to 79
enumerator 'SRC_TRY' value changed from 79 to 80
enumerator 'SRC_TRY_WAIT' value changed from 80 to 81
enumerator 'SRC_TRY_DEBOUNCE' value changed from 81 to 82
enumerator 'SNK_TRYWAIT' value changed from 82 to 83
enumerator 'SNK_TRYWAIT_DEBOUNCE' value changed from 83 to 84
enumerator 'SNK_TRYWAIT_VBUS' value changed from 84 to 85
enumerator 'BIST_RX' value changed from 85 to 86
enumerator 'GET_STATUS_SEND' value changed from 86 to 87
enumerator 'GET_STATUS_SEND_TIMEOUT' value changed from 87 to 88
enumerator 'GET_PPS_STATUS_SEND' value changed from 88 to 89
enumerator 'GET_PPS_STATUS_SEND_TIMEOUT' value changed from 89 to 90
enumerator 'GET_SINK_CAP' value changed from 90 to 91
enumerator 'GET_SINK_CAP_TIMEOUT' value changed from 91 to 92
enumerator 'ERROR_RECOVERY' value changed from 92 to 93
enumerator 'PORT_RESET' value changed from 93 to 94
enumerator 'PORT_RESET_WAIT_OFF' value changed from 94 to 95
enumerator 'AMS_START' value changed from 95 to 96
enumerator 'CHUNK_NOT_SUPP' value changed from 96 to 97
type 'struct cfg80211_ap_settings' changed
byte size changed from 904 to 912
member 'u16 punct_bitmap' was added
type 'struct bss_parameters' changed
member 'int link_id' was added
3 members ('int use_cts_prot' .. 'int use_short_slot_time') changed
offset changed by 32
type 'struct cfg80211_csa_settings' changed
member 'u16 punct_bitmap' was added
type 'struct sbitmap_queue' changed
byte size changed from 56 to 64
member 'atomic_t completion_cnt' was added
member 'atomic_t wakeup_cnt' was added
type 'struct mem_cgroup_per_node' changed
byte size changed from 2080 to 2096
9 members ('struct lruvec_stats_percpu* lruvec_stats_percpu' .. 'struct mem_cgroup* memcg') changed
offset changed by 128
type 'struct sbq_wait_state' changed
member 'atomic_t wait_cnt' was removed
member 'wait_queue_head_t wait' changed
offset changed by -64
type 'struct pkvm_module_ops' changed
byte size changed from 208 to 496
member 'int(* host_share_hyp)(u64)' was added
member 'int(* host_unshare_hyp)(u64)' was added
member 'int(* pin_shared_mem)(void*, void*)' was added
member 'void(* unpin_shared_mem)(void*, void*)' was added
5 members ('void*(* memcpy)(void*, const void*, size_t)' .. 'unsigned long(* kern_hyp_va)(unsigned long)') changed
offset changed by 256
member 'u64 android_kabi_reserved1' was added
member 'u64 android_kabi_reserved2' was added
member 'u64 android_kabi_reserved3' was added
member 'u64 android_kabi_reserved4' was added
member 'u64 android_kabi_reserved5' was added
member 'u64 android_kabi_reserved6' was added
member 'u64 android_kabi_reserved7' was added
member 'u64 android_kabi_reserved8' was added
member 'u64 android_kabi_reserved9' was added
member 'u64 android_kabi_reserved10' was added
member 'u64 android_kabi_reserved11' was added
member 'u64 android_kabi_reserved12' was added
member 'u64 android_kabi_reserved13' was added
member 'u64 android_kabi_reserved14' was added
member 'u64 android_kabi_reserved15' was added
member 'u64 android_kabi_reserved16' was added
member 'u64 android_kabi_reserved17' was added
member 'u64 android_kabi_reserved18' was added
member 'u64 android_kabi_reserved19' was added
member 'u64 android_kabi_reserved20' was added
member 'u64 android_kabi_reserved21' was added
member 'u64 android_kabi_reserved22' was added
member 'u64 android_kabi_reserved23' was added
member 'u64 android_kabi_reserved24' was added
member 'u64 android_kabi_reserved25' was added
member 'u64 android_kabi_reserved26' was added
member 'u64 android_kabi_reserved27' was added
member 'u64 android_kabi_reserved28' was added
member 'u64 android_kabi_reserved29' was added
member 'u64 android_kabi_reserved30' was added
member 'u64 android_kabi_reserved31' was added
member 'u64 android_kabi_reserved32' was added
type 'struct kvm_vcpu' changed
byte size changed from 9696 to 9680
5 members ('struct kvm_vcpu_stat stat' .. 'u64 last_used_slot_gen') changed
offset changed by -128
type 'struct kvm_vcpu_arch' changed
byte size changed from 8464 to 8448
member 'struct task_struct* parent_task' was removed
12 members ('struct { struct kvm_guest_debug_arch regs; u64 pmscr_el1; u64 trfcr_el1; } host_debug_state' .. 'struct { u64 last_steal; gpa_t base; } steal') changed
offset changed by -64
Bug: 273751441
Change-Id: I7a5d2599515e67b55871f17eafd239c6cbf136bd
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Prevent the imminent collision between the upstream quirk bits (now up
to '1 << 19') and the Android quirk bits (starting at '1 << 20') by
moving the Android quirk bits into their own field in struct ufs_hba.
Bug: 162257402
Change-Id: I5373c092734d16f693300d9bd73c7c9063ac921e
Signed-off-by: Eric Biggers <ebiggers@google.com>
Non-protected mode relies on the host to restore its SVE state if
necessary. However, protected VMs shouldn't reveal any
information to the host, including whether they have potentially
dirtied the host's sve state. Therefore, save and restore the
host's sve state at hyp in protected mode.
Currently this behavior applies to protected and non-protected
VMs in protected mode. It could be optimised for non-protected
VMs by applying the same behavior as non-protected mode, which is
to inform the host that it should restore its sve state. But for
now it's kept this way to maintain the same behavior for all VMs
in protected mode.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: Ifbcc64b387c3f821a6c1047e8c843f6250a3f690
The code for deactivating traps, to be able to update the fpsimd
registers, is the only code in this file that is n/vhe specific.
Move it to specialized functions.
This is also needed for the subsequent patch, since the logic for
deciding which traps to enable/disable will get more complex.
No functional change intended.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: Ia0477450aa9319a46a91b3c31c1910ad02fbe246
In subsequent patches, vhe/pKVM(nvhe) will diverge significantly
on saving the host fpsimd/sve state when taking a guest fpsimd
trap. Add a specialized helper to handle that.
No functional change intended.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: Ib6b13cafad8bf568694804e3b55e0a5a4fcd70a4
Allocate memory and donate it to hyp at setup time for tracking
the host sve state at hyp in protected mode. This memory is used
in the subsequent patch.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: If07eec9ea9c7b216d02e2d1ea69bd62d99f08081
The code to determine the maximum sve vector length by the system
isn't trivial. In subsequent patches hyp needs to know it for
allocating memory for the host sve state.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: I2561af67722a99d8a989b26cb47d073eba3869ff
Subsequent patches will augment this state to allocate space for
tracking the host sve state. SVE state size is not static, and
there isn't support for dynamic per_cpu allocation in hyp.
This is done as a first step in allowing us to allocate SVE state
under the same umbrella.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: I0902623a5ab81a80105f5b00a26765d257bc1ceb
The state will be augmented in future patches and accessed in
more than one location. It makes it easier to reason about the
code.
No functional change intended.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: If3a3a9266c201f63c126860b61da9698be9b9faa
Subsequent patches will change how the fpsimd state is allocated,
and add tracking of sve state. Moving this to a helper makes
future code cleaner and patches easier to reason about.
No functional change intended.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: Ic46b8889c1fe11f0cfdd7b5f3d2b98bf412183f0
Before the conversion of the various booleans into an enum
representing the state, this helper clarified things. Since the
introduction of the enum, the helper obfuscates rather than
helps.
No functional change intended.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: I83c870146ed2d910bf10d625d1048b95c8b23736
pKVM maintains its own state for tracking the host fpsimd state.
Therefore, no need to map and share the host's view with it.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: I5e5164a7694881ffa641b5b6a8691a542fd55a14
Expand comment clarifying why the host value representing sve
vector length being restored for ZCR_EL1 on guest exit isn't the
same as it was on guest entry.
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 267291591
Change-Id: I5889407b4391a80dfcf77b31375c3a17705b68da