public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
	Will Deacon <will@kernel.org>,
	Julien Thierry <julien.thierry.kdev@gmail.com>
Subject: Re: [RFC kvmtool 1/9] Drop support for 32-bit arm
Date: Thu, 20 Mar 2025 16:58:53 +0000	[thread overview]
Message-ID: <Z9xJTZeXnkfWcWNl@raptor> (raw)
In-Reply-To: <20250314222516.1302429-2-oliver.upton@linux.dev>

Hi Oliver,

I tried to apply the patch on top of e48563f5c4a48fe6a6bc2a98a9a7c84a10f043be,
which is the base commit from the cover letter, and I got these errors:

Applying: Drop support for 32-bit arm
error: removal patch leaves file contents
error: arm/aarch32/arm-cpu.c: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/asm/kernel.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/asm/kvm.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/kvm/barrier.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/kvm/fdt-arch.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/kvm/kvm-arch.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/kvm/kvm-config-arch.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/include/kvm/kvm-cpu-arch.h: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/kvm-cpu.c: patch does not apply
error: removal patch leaves file contents
error: arm/aarch32/kvm.c: patch does not apply

When I delete the files manually, the resulting commit has diffs like this for
the deleted files:

diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c
deleted file mode 100644
index 16bba5524caf..000000000000
--- a/arm/aarch32/arm-cpu.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "kvm/kvm.h"
-#include "kvm/kvm-cpu.h"
-#include "kvm/util.h"
-
-#include "arm-common/gic.h"
-#include "arm-common/timer.h"
[..]

.. and so on.

Am I missing a knob for applying the patch? FYI, this happens for all the
patches in this series with files deleted.

One more comment below.

On Fri, Mar 14, 2025 at 03:25:08PM -0700, Oliver Upton wrote:
> Linux dropped support for KVM in 32-bit arm kernels almost 5 years ago
> in the 5.7 kernel release. In addition to that KVM/arm64 never had
> 32-bit compat support, so it is a safe assumption that usage of 32-bit
> kvmtool is pretty much dead at this point.
> 
> Do not despair -- 32-bit guests are still supported with a 64-bit
> userspace.
> 
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> ---
>  INSTALL                                   |   9 +-
>  Makefile                                  |  31 +--
>  arm/aarch32/arm-cpu.c                     |  50 ----
>  arm/aarch32/include/asm/kernel.h          |   8 -
>  arm/aarch32/include/asm/kvm.h             | 311 ----------------------
>  arm/aarch32/include/kvm/barrier.h         |  10 -
>  arm/aarch32/include/kvm/fdt-arch.h        |   6 -
>  arm/aarch32/include/kvm/kvm-arch.h        |  18 --
>  arm/aarch32/include/kvm/kvm-config-arch.h |   8 -
>  arm/aarch32/include/kvm/kvm-cpu-arch.h    |  24 --
>  arm/aarch32/kvm-cpu.c                     | 132 ---------
>  arm/aarch32/kvm.c                         |  14 -
>  12 files changed, 14 insertions(+), 607 deletions(-)
>  delete mode 100644 arm/aarch32/arm-cpu.c
>  delete mode 100644 arm/aarch32/include/asm/kernel.h
>  delete mode 100644 arm/aarch32/include/asm/kvm.h
>  delete mode 100644 arm/aarch32/include/kvm/barrier.h
>  delete mode 100644 arm/aarch32/include/kvm/fdt-arch.h
>  delete mode 100644 arm/aarch32/include/kvm/kvm-arch.h
>  delete mode 100644 arm/aarch32/include/kvm/kvm-config-arch.h
>  delete mode 100644 arm/aarch32/include/kvm/kvm-cpu-arch.h
>  delete mode 100644 arm/aarch32/kvm-cpu.c
>  delete mode 100644 arm/aarch32/kvm.c
> 
> diff --git a/INSTALL b/INSTALL
> index 2a65735..0e1e63e 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -26,7 +26,7 @@ For Fedora based systems:
>  For OpenSUSE based systems:
>  	# zypper install glibc-devel-static
>  
> -Architectures which require device tree (PowerPC, ARM, ARM64, RISC-V) also
> +Architectures which require device tree (PowerPC, ARM64, RISC-V) also
>  require libfdt.
>  	deb: $ sudo apt-get install libfdt-dev
>  	Fedora: # yum install libfdt-devel
> @@ -61,16 +61,15 @@ to the Linux name of the architecture. Architectures supported:
>  - i386
>  - x86_64
>  - powerpc
> -- arm
>  - arm64
>  - mips
>  - riscv
>  If ARCH is not provided, the target architecture will be automatically
>  determined by running "uname -m" on your host, resulting in a native build.
>  
> -To cross-compile to ARM for instance, install a cross-compiler, put the
> +To cross-compile to arm64 for instance, install a cross-compiler, put the
>  required libraries in the cross-compiler's SYSROOT and type:
> -$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm
> +$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
>  
>  Missing libraries when cross-compiling
>  ---------------------------------------
> @@ -82,7 +81,7 @@ On multiarch system you should be able to install those be appending
>  the architecture name after the package (example for ARM64):
>  $ sudo apt-get install libfdt-dev:arm64
>  
> -PowerPC, ARM/ARM64 and RISC-V require libfdt to be installed. If you cannot use
> +PowerPC, ARM64 and RISC-V require libfdt to be installed. If you cannot use
>  precompiled mulitarch packages, you could either copy the required header and
>  library files from an installed target system into the SYSROOT (you will need
>  /usr/include/*fdt*.h and /usr/lib64/libfdt-v.v.v.so and its symlinks), or you
> diff --git a/Makefile b/Makefile
> index d84dc8e..462659b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -166,35 +166,24 @@ ifeq ($(ARCH), powerpc)
>  	ARCH_WANT_LIBFDT := y
>  endif
>  
> -# ARM
> -OBJS_ARM_COMMON		:= arm/fdt.o arm/gic.o arm/gicv2m.o arm/ioport.o \
> -			   arm/kvm.o arm/kvm-cpu.o arm/pci.o arm/timer.o \
> -			   hw/serial.o
> -HDRS_ARM_COMMON		:= arm/include
> -ifeq ($(ARCH), arm)
> -	DEFINES		+= -DCONFIG_ARM

Found a couple of instances of CONFIG_ARM using grep.

There also one instance of the architecture name ARM in a comment in
hw/cfi_flash.c, I think that was a typo and it was meant to say ARM64.

Other than that, looks good.

Thanks,
Alex

> -	OBJS		+= $(OBJS_ARM_COMMON)
> -	OBJS		+= arm/aarch32/arm-cpu.o
> -	OBJS		+= arm/aarch32/kvm-cpu.o
> -	OBJS		+= arm/aarch32/kvm.o
> -	ARCH_INCLUDE	:= $(HDRS_ARM_COMMON)
> -	ARCH_INCLUDE	+= -Iarm/aarch32/include
> -	CFLAGS		+= -march=armv7-a
> -
> -	ARCH_WANT_LIBFDT := y
> -	ARCH_HAS_FLASH_MEM := y
> -endif
> -
>  # ARM64
>  ifeq ($(ARCH), arm64)
>  	DEFINES		+= -DCONFIG_ARM64
> -	OBJS		+= $(OBJS_ARM_COMMON)
> +	OBJS		+= arm/fdt.o
> +	OBJS		+= arm/gic.o
> +	OBJS		+= arm/gicv2m.o
> +	OBJS		+= arm/ioport.o
> +	OBJS		+= arm/kvm.o
> +	OBJS		+= arm/kvm-cpu.o
> +	OBJS		+= arm/pci.o
> +	OBJS		+= arm/timer.o
> +	OBJS		+= hw/serial.o
>  	OBJS		+= arm/aarch64/arm-cpu.o
>  	OBJS		+= arm/aarch64/kvm-cpu.o
>  	OBJS		+= arm/aarch64/kvm.o
>  	OBJS		+= arm/aarch64/pvtime.o
>  	OBJS		+= arm/aarch64/pmu.o
> -	ARCH_INCLUDE	:= $(HDRS_ARM_COMMON)
> +	ARCH_INCLUDE	:= arm/include
>  	ARCH_INCLUDE	+= -Iarm/aarch64/include
>  
>  	ARCH_WANT_LIBFDT := y
> diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c
> deleted file mode 100644
> index 16bba55..0000000
> diff --git a/arm/aarch32/include/asm/kernel.h b/arm/aarch32/include/asm/kernel.h
> deleted file mode 100644
> index 6129609..0000000
> diff --git a/arm/aarch32/include/asm/kvm.h b/arm/aarch32/include/asm/kvm.h
> deleted file mode 100644
> index a4217c1..0000000
> diff --git a/arm/aarch32/include/kvm/barrier.h b/arm/aarch32/include/kvm/barrier.h
> deleted file mode 100644
> index 94913a9..0000000
> diff --git a/arm/aarch32/include/kvm/fdt-arch.h b/arm/aarch32/include/kvm/fdt-arch.h
> deleted file mode 100644
> index e448bf1..0000000
> diff --git a/arm/aarch32/include/kvm/kvm-arch.h b/arm/aarch32/include/kvm/kvm-arch.h
> deleted file mode 100644
> index 0333cf4..0000000
> diff --git a/arm/aarch32/include/kvm/kvm-config-arch.h b/arm/aarch32/include/kvm/kvm-config-arch.h
> deleted file mode 100644
> index acf0d23..0000000
> diff --git a/arm/aarch32/include/kvm/kvm-cpu-arch.h b/arm/aarch32/include/kvm/kvm-cpu-arch.h
> deleted file mode 100644
> index fd0b387..0000000
> diff --git a/arm/aarch32/kvm-cpu.c b/arm/aarch32/kvm-cpu.c
> deleted file mode 100644
> index 95fb1da..0000000
> diff --git a/arm/aarch32/kvm.c b/arm/aarch32/kvm.c
> deleted file mode 100644
> index 768a56b..0000000
> -- 
> 2.39.5
> 
> 

  reply	other threads:[~2025-03-20 16:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 22:25 [RFC kvmtool 0/9] arm: Drop support for 32-bit kvmtool Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 1/9] Drop support for 32-bit arm Oliver Upton
2025-03-20 16:58   ` Alexandru Elisei [this message]
2025-03-25 17:08     ` Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 2/9] arm64: Move arm64-only features into main directory Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 3/9] arm64: Combine kvm.c Oliver Upton
2025-03-20 16:59   ` Alexandru Elisei
2025-03-14 22:25 ` [RFC kvmtool 4/9] arm64: Merge kvm-cpu.c Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 5/9] arm64: Combine kvm-config-arch.h Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 6/9] arm64: Move remaining kvm/* headers Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 7/9] arm64: Move asm headers Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 8/9] arm64: Rename top-level directory Oliver Upton
2025-03-14 22:25 ` [RFC kvmtool 9/9] arm64: Get rid of the 'arm-common' include directory Oliver Upton
2025-03-20 17:01   ` Alexandru Elisei
2025-03-25 17:02     ` Oliver Upton
2025-03-17 10:39 ` [RFC kvmtool 0/9] arm: Drop support for 32-bit kvmtool Alexandru Elisei
2025-03-17 10:51   ` Marc Zyngier
2025-03-18  1:10     ` Oliver Upton
2025-03-19 14:18   ` Andre Przywara
2025-03-17 11:14 ` Marc Zyngier

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=Z9xJTZeXnkfWcWNl@raptor \
    --to=alexandru.elisei@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --cc=will@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