mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jerrin Shaji George" <jerrin.shaji-george@broadcom.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Cyprien Laplace" <cyprien.laplace@broadcom.com>,
	"Keerthana K" <keerthana.kalyanasundaram@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] vmw_balloon: Add arm64 support
Date: Thu, 03 Dec 2026 07:55:04 +0100	[thread overview]
Message-ID: <cb36d040-e98b-4496-9843-6fc813ac76cf@app.fastmail.com> (raw)
In-Reply-To: <20261202213821.22333-3-jerrin.shaji-george@broadcom.com>

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

      reply	other threads:[~2026-12-03  6:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 21:38 [PATCH v1 0/2] " Jerrin Shaji George
2026-12-02 21:38 ` [PATCH v1 1/2] arm64: Add VMware virtual I/O port definitions Jerrin Shaji George
2026-12-02 21:38 ` [PATCH v1 2/2] vmw_balloon: Add arm64 support Jerrin Shaji George
2026-12-03  6:55   ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb36d040-e98b-4496-9843-6fc813ac76cf@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=cyprien.laplace@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jerrin.shaji-george@broadcom.com \
    --cc=keerthana.kalyanasundaram@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®