Re: [PATCH v1 2/2] vmw_balloon: Add arm64 support
From: Arnd Bergmann
Date: Thu Dec 03 2026 - 01:55:37 EST
On Wed, Dec 2, 2026, at 22:38, Jerrin Shaji George wrote:
> This patch adds arm64 support for the VMware balloon driver. On
> arm64 the hypervisor handles the balloon's x86 I/O port protocol
> through HVC #0x86.
>
> The hypervisor assumes 4 KiB pages, so depend on ARM64_4K_PAGES, and
> keep big-endian excluded.
CPU_BIG_ENDIAN is no longer available on arm64, so no need for that.
Can you clarify the requirement for 4KiB pages? Is that not just
a bug in the hypervisor that will eventually get fixed?
> Return -ENODEV unless the guest is VMware. On arm64 that means the SMCCC
> conduit is HVC and the DMI system vendor is "VMware, Inc.", which
> VMware's arm64 firmware reports in SMBIOS.
This looks like a layering violation to me, I feel the device driver
should not directly look at top-level DMI data or the conduit, as both
could change in future versions of the hypervisor, or may be the same
for other hypervisors versions that don't have the same interface.
There is probably an ACPI device that you could probe for by
changing the module into a normal platform_driver.
> + /* x1 carries the full target when 64-bit targets are negotiated. */
> + asm volatile ("hvc %[magic]"
> + : "+r" (x0), "+r" (x1), "+r" (w2), "+r" (w3), "+r" (x4)
> + : "r" (w7), [magic] "i" (X86_IO_MAGIC)
> + : "cc", "memory");
> +
Please change this to the regular smccc interfaces instead of
duplicating the low-level details.
Arnd