Similar to what is already done for x86_64.

Signed-off-by: Fiona Ebner <[email protected]>
---
 debian/parse-machines.pl | 2 +-
 debian/rules             | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/debian/parse-machines.pl b/debian/parse-machines.pl
index a0f449c..a6c0e8d 100755
--- a/debian/parse-machines.pl
+++ b/debian/parse-machines.pl
@@ -14,7 +14,7 @@ while (<STDIN>) {
 
     s/^\s+//;
     my @machine = split(/\s+/);
-    next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/;
+    next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/ && $machine[0] !~ 
m/^(virt)-(.+)$/;
     push @$machines, {
         'id' => $machine[0],
         'type' => $1,
diff --git a/debian/rules b/debian/rules
index 7c08331..c407172 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,9 @@ PACKAGE=pve-qemu-kvm
 destdir := $(CURDIR)/debian/$(PACKAGE)
 
 flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
-machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+
+machine_file_x86_64 := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+machine_file_aarch64 := $(destdir)/usr/share/kvm/machine-versions-aarch64.json
 
 # default QEMU out-of-tree build directory is ./build
 BUILDDIR=build
@@ -119,7 +121,10 @@ install: build
 
        # CPU flags are static for QEMU version, allows avoiding more costly 
checks
        $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | 
./debian/parse-cpu-flags.pl > $(flagfile)
-       $(destdir)/usr/bin/qemu-system-x86_64 -machine help | 
./debian/parse-machines.pl > $(machinefile)
+
+       # Supported machine versions are static for a given QEMU binary.
+       $(destdir)/usr/bin/qemu-system-x86_64 -machine help | 
./debian/parse-machines.pl > $(machine_file_x86_64)
+       $(destdir)/usr/bin/qemu-system-aarch64 -machine help | 
./debian/parse-machines.pl > $(machine_file_aarch64)
 
 # Build architecture-independent files here.
 binary-indep: build install
-- 
2.47.3




Reply via email to