From: Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
To: gregkh@linuxfoundation.org, arnd@arndb.de
Cc: Cyprien Laplace <cyprien.laplace@broadcom.com>,
Keerthana K <keerthana.kalyanasundaram@broadcom.com>,
Jerrin Shaji George <jerrin.shaji-george@broadcom.com>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Alexey Makhalov <alexey.makhalov@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-kernel@vger.kernel.org, virtualization@lists.linux.dev,
x86@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 1/2] arm64: Add VMware virtual I/O port definitions
Date: Wed, 2 Dec 2026 21:38:20 +0000 [thread overview]
Message-ID: <20261202213821.22333-2-jerrin.shaji-george@broadcom.com> (raw)
In-Reply-To: <20261202213821.22333-1-jerrin.shaji-george@broadcom.com>
VMware's hypervisor lets arm64 guests use x86 I/O port interfaces by
executing HVC #0x86. The guest places the x86 registers AX through BP
in x0-x6 and describes the instruction to emulate in w7.
Add arch/arm64/include/asm/vmware.h with the definitions needed to
build the w7 value. This will be used by the VMware balloon driver.
Based on the VMware Photon OS arm64 patches by Cyprien Laplace and
Keerthana K.
Link: https://github.com/vmware/photon/blob/5.0/SPECS/92/linux/aarch64/0004-arm64-kmsg-dumper-for-VMware-hypervisor.patch
Co-developed-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
Signed-off-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
Signed-off-by: Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
---
MAINTAINERS | 1 +
arch/arm64/include/asm/vmware.h | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 arch/arm64/include/asm/vmware.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 44540a1eb2b8..055ac1a3229d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -29966,6 +29966,7 @@ L: virtualization@lists.linux.dev
L: x86@kernel.org
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vmware
+F: arch/arm64/include/asm/vmware.h
F: arch/x86/include/asm/vmware.h
F: arch/x86/kernel/cpu/vmware.c
diff --git a/arch/arm64/include/asm/vmware.h b/arch/arm64/include/asm/vmware.h
new file mode 100644
index 000000000000..2b92a8f87011
--- /dev/null
+++ b/arch/arm64/include/asm/vmware.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/*
+ * Copyright (C) 2021, VMware, Inc.
+ */
+#ifndef _ASM_ARM64_VMWARE_H
+#define _ASM_ARM64_VMWARE_H
+
+#include <linux/bits.h>
+
+/*
+ * VMware virtualizes x86 I/O port instructions on arm64 using HVC #0x86.
+ * Registers x0 through x6 correspond to x86 AX, BX, CX, DX, SI, DI and BP.
+ * Register w7 describes the I/O instruction to emulate.
+ */
+#define X86_IO_MAGIC 0x86
+
+/* Transfer size in w7[1:0]: 0 = byte, 1 = word, 2 = doubleword. */
+#define X86_IO_W7_SIZE_SHIFT 0
+
+/* Read from the port (IN), rather than write to it (OUT). */
+#define X86_IO_W7_DIR BIT(2)
+
+/* Use the port number in DX (w3), rather than an immediate port number. */
+#define X86_IO_W7_WITH BIT(3)
+
+#endif /* _ASM_ARM64_VMWARE_H */
--
2.52.0
next prev parent reply other threads:[~2026-12-02 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 21:38 [PATCH v1 0/2] vmw_balloon: Add arm64 support Jerrin Shaji George
2026-12-02 21:38 ` Jerrin Shaji George [this message]
2026-12-02 21:38 ` [PATCH v1 2/2] " Jerrin Shaji George
2026-12-03 6:55 ` Arnd Bergmann
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=20261202213821.22333-2-jerrin.shaji-george@broadcom.com \
--to=jerrin.shaji-george@broadcom.com \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=catalin.marinas@arm.com \
--cc=cyprien.laplace@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=keerthana.kalyanasundaram@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=virtualization@lists.linux.dev \
--cc=will@kernel.org \
--cc=x86@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®