Update qemu-server to 8.2.8

This commit is contained in:
jiangcuo 2024-11-26 12:54:56 +08:00
parent 443024fb91
commit 81e6245969
19 changed files with 1382 additions and 929 deletions

View File

@ -1,41 +0,0 @@
diff --git a/Makefile b/Makefile
index 133468da..18de31bc 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ MAN5DIR=$(MANDIR)/man5/
BASHCOMPLDIR=$(PREFIX)/share/bash-completion/completions/
ZSHCOMPLDIR=$(PREFIX)/share/zsh/vendor-completions/
export PERLDIR=$(PREFIX)/share/perl5
-PERLINCDIR=$(PERLDIR)/asm-x86_64
+PERLINCDIR=$(PERLDIR)/asm-aarch64
GITVERSION:=$(shell git rev-parse HEAD)
@@ -80,7 +80,7 @@ install: $(PKGSOURCES)
$(BUILDDIR):
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
rsync -a * $(BUILDDIR).tmp
- echo "git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
+ echo "git clone https://github.com/jiangcuo/qemu-server.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
mv $(BUILDDIR).tmp $(BUILDDIR)
.PHONY: deb
@@ -99,11 +99,6 @@ $(DSC): $(BUILDDIR)
sbuild: $(DSC)
sbuild $(DSC)
-.PHONY: test
-test:
- PVE_GENERATING_DOCS=1 perl -I. ./qm verifyapi
- $(MAKE) -C test
-
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEB)
@@ -111,7 +106,6 @@ upload: $(DEB)
.PHONY: clean
clean:
- $(MAKE) -C test $@
rm -rf $(PACKAGE)-*/ *.deb *.build *.buildinfo *.changes *.dsc $(PACKAGE)_*.tar.?z
rm -f *.xml.tmp *.1 *.5 *.8 *{synopsis,opts}.adoc docinfo.xml

File diff suppressed because it is too large Load Diff

View File

@ -1,210 +0,0 @@
diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm
index 1673041b..429d110b 100644
--- a/PVE/QemuServer/PCI.pm
+++ b/PVE/QemuServer/PCI.pm
@@ -151,82 +151,72 @@ sub get_pci_addr_map {
ahci0 => { bus => 0, addr => 7 },
qga0 => { bus => 0, addr => 8 },
spice => { bus => 0, addr => 9 },
- virtio0 => { bus => 0, addr => 10 },
- virtio1 => { bus => 0, addr => 11 },
- virtio2 => { bus => 0, addr => 12 },
- virtio3 => { bus => 0, addr => 13 },
- virtio4 => { bus => 0, addr => 14 },
- virtio5 => { bus => 0, addr => 15 },
- hostpci0 => { bus => 0, addr => 16 },
- hostpci1 => { bus => 0, addr => 17 },
- net0 => { bus => 0, addr => 18 },
- net1 => { bus => 0, addr => 19 },
- net2 => { bus => 0, addr => 20 },
- net3 => { bus => 0, addr => 21 },
- net4 => { bus => 0, addr => 22 },
- net5 => { bus => 0, addr => 23 },
+# pcie.1 => { bus => 0, addr => 10 },
+ net0 => { bus => 0, addr => 11 },
+ hostpci4 => { bus => 0, addr => 12 },
+ hostpci5 => { bus => 0, addr => 13 },
+ hostpci6 => { bus => 0, addr => 14 },
+ hostpci7 => { bus => 0, addr => 15 },
+ hostpci8 => { bus => 0, addr => 16 },
+ hostpci19 => { bus => 0, addr => 17 },
+ hostpci10 => { bus => 0, addr => 18 },
+ 'xhci' => { bus => 0, addr => 19 },
+ hostpci0 => { bus => 0, addr => 22 },
+ hostpci1 => { bus => 0, addr => 23 },
vga1 => { bus => 0, addr => 24 },
vga2 => { bus => 0, addr => 25 },
- vga3 => { bus => 0, addr => 26 },
+# vga3 => { bus => 0, addr => 26 }, #use to pcie2-3,for aarch64
hostpci2 => { bus => 0, addr => 27 },
hostpci3 => { bus => 0, addr => 28 },
- #addr29 : usb-host (pve-usb.cfg)
+# addr29 : usb-host (pve-usb.cfg)
'pci.1' => { bus => 0, addr => 30 },
'pci.2' => { bus => 0, addr => 31 },
- 'net6' => { bus => 1, addr => 1 },
- 'net7' => { bus => 1, addr => 2 },
- 'net8' => { bus => 1, addr => 3 },
- 'net9' => { bus => 1, addr => 4 },
- 'net10' => { bus => 1, addr => 5 },
- 'net11' => { bus => 1, addr => 6 },
- 'net12' => { bus => 1, addr => 7 },
- 'net13' => { bus => 1, addr => 8 },
- 'net14' => { bus => 1, addr => 9 },
- 'net15' => { bus => 1, addr => 10 },
- 'net16' => { bus => 1, addr => 11 },
- 'net17' => { bus => 1, addr => 12 },
- 'net18' => { bus => 1, addr => 13 },
- 'net19' => { bus => 1, addr => 14 },
- 'net20' => { bus => 1, addr => 15 },
- 'net21' => { bus => 1, addr => 16 },
- 'net22' => { bus => 1, addr => 17 },
- 'net23' => { bus => 1, addr => 18 },
- 'net24' => { bus => 1, addr => 19 },
- 'net25' => { bus => 1, addr => 20 },
- 'net26' => { bus => 1, addr => 21 },
- 'net27' => { bus => 1, addr => 22 },
- 'net28' => { bus => 1, addr => 23 },
- 'net29' => { bus => 1, addr => 24 },
- 'net30' => { bus => 1, addr => 25 },
- 'net31' => { bus => 1, addr => 26 },
- 'xhci' => { bus => 1, addr => 27 },
+# 'net0' => { bus => 1, addr => 1 },
+ 'net1' => { bus => 1, addr => 2 },
+ 'net2' => { bus => 1, addr => 3 },
+ 'net3' => { bus => 1, addr => 4 },
+ 'net4' => { bus => 1, addr => 5 },
+ 'net5' => { bus => 1, addr => 6 },
+ 'net6' => { bus => 1, addr => 7 },
+ 'net7' => { bus => 1, addr => 8 },
+ 'net8' => { bus => 1, addr => 9 },
+ 'net9' => { bus => 1, addr => 10 },
+ 'net10' => { bus => 1, addr => 11 },
+ 'net11' => { bus => 1, addr => 12 },
+ 'net12' => { bus => 1, addr => 13 },
+ 'net13' => { bus => 1, addr => 14 },
+ 'net14' => { bus => 1, addr => 15 },
+ 'net15' => { bus => 1, addr => 16 },
+ 'net16' => { bus => 1, addr => 17 },
+ 'net17' => { bus => 1, addr => 18 },
+ 'net18' => { bus => 1, addr => 19 },
+ 'net19' => { bus => 1, addr => 20 },
+ 'net20' => { bus => 1, addr => 21 },
+ 'net21' => { bus => 1, addr => 22 },
+ 'net22' => { bus => 1, addr => 23 },
+ 'net23' => { bus => 1, addr => 24 },
+ 'net24' => { bus => 1, addr => 25 },
'pci.4' => { bus => 1, addr => 28 },
'rng0' => { bus => 1, addr => 29 },
'pci.2-igd' => { bus => 1, addr => 30 }, # replaces pci.2 in case a legacy IGD device is passed through
- 'virtio6' => { bus => 2, addr => 1 },
- 'virtio7' => { bus => 2, addr => 2 },
- 'virtio8' => { bus => 2, addr => 3 },
- 'virtio9' => { bus => 2, addr => 4 },
- 'virtio10' => { bus => 2, addr => 5 },
- 'virtio11' => { bus => 2, addr => 6 },
- 'virtio12' => { bus => 2, addr => 7 },
- 'virtio13' => { bus => 2, addr => 8 },
- 'virtio14' => { bus => 2, addr => 9 },
- 'virtio15' => { bus => 2, addr => 10 },
- 'ivshmem' => { bus => 2, addr => 11 },
- 'audio0' => { bus => 2, addr => 12 },
- hostpci4 => { bus => 2, addr => 13 },
- hostpci5 => { bus => 2, addr => 14 },
- hostpci6 => { bus => 2, addr => 15 },
- hostpci7 => { bus => 2, addr => 16 },
- hostpci8 => { bus => 2, addr => 17 },
- hostpci9 => { bus => 2, addr => 18 },
- hostpci10 => { bus => 2, addr => 19 },
- hostpci11 => { bus => 2, addr => 20 },
- hostpci12 => { bus => 2, addr => 21 },
- hostpci13 => { bus => 2, addr => 22 },
- hostpci14 => { bus => 2, addr => 23 },
- hostpci15 => { bus => 2, addr => 24 },
+ 'virtio0' => { bus => 2, addr => 1 },
+ 'virtio1' => { bus => 2, addr => 2 },
+ 'virtio2' => { bus => 2, addr => 3 },
+ 'virtio3' => { bus => 2, addr => 4 },
+ 'virtio4' => { bus => 2, addr => 5 },
+ 'virtio5' => { bus => 2, addr => 6 },
+ 'virtio6' => { bus => 2, addr => 7 },
+ 'virtio7' => { bus => 2, addr => 8 },
+ 'virtio8' => { bus => 2, addr => 9 },
+ 'virtio9' => { bus => 2, addr => 10 },
+ 'virtio10' => { bus => 2, addr => 11 },
+ 'virtio11' => { bus => 2, addr => 12 },
+ 'virtio12' => { bus => 2, addr => 13 },
+ 'virtio13' => { bus => 2, addr => 14 },
+ 'virtio14' => { bus => 2, addr => 15 },
+ 'virtio15' => { bus => 2, addr => 16 },
+ 'ivshmem' => { bus => 2, addr => 17 },
+ 'audio0' => { bus => 2, addr => 18 },
'virtioscsi0' => { bus => 3, addr => 1 },
'virtioscsi1' => { bus => 3, addr => 2 },
'virtioscsi2' => { bus => 3, addr => 3 },
@@ -576,7 +566,9 @@ sub print_hostpci_devices {
my $kvm_off = 0;
my $gpu_passthrough = 0;
my $legacy_igd = 0;
-
+ if ($arch eq 'aarch64') {
+ push @$devices, '-readconfig', '/usr/share/qemu-server/pve-aarch64.cfg';
+ }
my $pciaddr;
my $pci_devices = choose_hostpci_devices(parse_hostpci_devices($conf), $vmid);
diff --git a/qemu-configs/Makefile b/qemu-configs/Makefile
index f55e9bef..463df4f3 100644
--- a/qemu-configs/Makefile
+++ b/qemu-configs/Makefile
@@ -2,11 +2,12 @@ DESTDIR=
USRSHAREDIR=$(DESTDIR)/usr/share/qemu-server
.PHONY: install
-install: pve-usb.cfg pve-q35.cfg pve-q35-4.0.cfg
+install: pve-usb.cfg pve-q35.cfg pve-q35-4.0.cfg pve-aarch64.cfg
install -d $(USRSHAREDIR)
install -m 0644 pve-usb.cfg $(USRSHAREDIR)
install -m 0644 pve-q35.cfg $(USRSHAREDIR)
install -m 0644 pve-q35-4.0.cfg $(USRSHAREDIR)
+ install -m 0644 pve-aarch64.cfg $(USRSHAREDIR)
.PHONY: clean
clean:
diff --git a/qemu-configs/pve-aarch64.cfg b/qemu-configs/pve-aarch64.cfg
new file mode 100644
index 00000000..9ba549e6
--- /dev/null
+++ b/qemu-configs/pve-aarch64.cfg
@@ -0,0 +1,30 @@
+[device "pcie.1"]
+ driver = "pci-bridge"
+ bus = "pcie.0"
+ addr = "0xa"
+ chassis_nr = "1"
+
+#[device "pciroot"]
+# driver = "pci-bridge"
+# bus = "pci.1"
+# addr = "1.0"
+# chassis_nr = "1"
+
+[device "pcie.2"]
+ driver = "pci-bridge"
+ bus = "pci.1"
+ addr = "1.0"
+ chassis_nr = "2"
+
+
+[device "pcie.3"]
+ driver = "pci-bridge"
+ bus = "pci.2"
+ addr = "1.0"
+ chassis_nr = "3"
+
+[device "pcie.4"]
+ driver = "pci-bridge"
+ bus = "pci.2"
+ addr = "2.0"
+ chassis_nr = "4"

View File

@ -1,20 +0,0 @@
diff --git a/debian/control b/debian/control
index 89a11181..d989cb95 100644
--- a/debian/control
+++ b/debian/control
@@ -21,6 +21,7 @@ Build-Depends: debhelper-compat (= 13),
pve-cluster,
pve-doc-generator (>= 6.2-5),
pve-edk2-firmware,
+ pve-edk2-firmware-aarch64,
pve-firewall,
pve-ha-manager <!nocheck>,
pve-qemu-kvm (>= 7.1~),
@@ -51,6 +52,7 @@ Depends: dbus,
# TODO: make legacy edk2 optional (suggests) for PVE 9 and warn explicitly about it
pve-edk2-firmware-legacy | pve-edk2-firmware (<< 4~),
pve-edk2-firmware-ovmf | pve-edk2-firmware (>= 3.20210831-1),
+ pve-edk2-firmware-aarch64,
pve-firewall (>= 5.0.4),
pve-ha-manager (>= 3.0-9),
pve-qemu-kvm (>= 7.1~),

View File

@ -1,253 +0,0 @@
diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm
index 33f7524f..5ae659a5 100644
--- a/PVE/QemuServer/CPUConfig.pm
+++ b/PVE/QemuServer/CPUConfig.pm
@@ -36,22 +36,22 @@ sub load_custom_model_conf {
#builtin models : reported-model is mandatory
my $builtin_models = {
- 'x86-64-v2' => {
- 'reported-model' => 'qemu64',
- flags => "+popcnt;+pni;+sse4.1;+sse4.2;+ssse3",
- },
- 'x86-64-v2-AES' => {
- 'reported-model' => 'qemu64',
- flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3",
- },
- 'x86-64-v3' => {
- 'reported-model' => 'qemu64',
- flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3;+avx;+avx2;+bmi1;+bmi2;+f16c;+fma;+abm;+movbe;+xsave",
- },
- 'x86-64-v4' => {
- 'reported-model' => 'qemu64',
- flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3;+avx;+avx2;+bmi1;+bmi2;+f16c;+fma;+abm;+movbe;+xsave;+avx512f;+avx512bw;+avx512cd;+avx512dq;+avx512vl",
- },
+ # 'x86-64-v2' => {
+ # 'reported-model' => 'qemu64',
+ # flags => "+popcnt;+pni;+sse4.1;+sse4.2;+ssse3",
+ # },
+ # 'x86-64-v2-AES' => {
+ # 'reported-model' => 'qemu64',
+ # flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3",
+ # },
+ # 'x86-64-v3' => {
+ # 'reported-model' => 'qemu64',
+ # flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3;+avx;+avx2;+bmi1;+bmi2;+f16c;+fma;+abm;+movbe;+xsave",
+ # },
+ # 'x86-64-v4' => {
+ # 'reported-model' => 'qemu64',
+ # flags => "+aes;+popcnt;+pni;+sse4.1;+sse4.2;+ssse3;+avx;+avx2;+bmi1;+bmi2;+f16c;+fma;+abm;+movbe;+xsave;+avx512f;+avx512bw;+avx512cd;+avx512dq;+avx512vl",
+ # },
};
my $depreacated_cpu_map = {
@@ -73,100 +73,97 @@ my $cputypes_32bit = {
my $cpu_vendor_list = {
# Intel CPUs
- 486 => 'GenuineIntel',
- pentium => 'GenuineIntel',
- pentium2 => 'GenuineIntel',
- pentium3 => 'GenuineIntel',
- coreduo => 'GenuineIntel',
- core2duo => 'GenuineIntel',
- Conroe => 'GenuineIntel',
- Penryn => 'GenuineIntel',
- Nehalem => 'GenuineIntel',
- 'Nehalem-IBRS' => 'GenuineIntel',
- Westmere => 'GenuineIntel',
- 'Westmere-IBRS' => 'GenuineIntel',
- SandyBridge => 'GenuineIntel',
- 'SandyBridge-IBRS' => 'GenuineIntel',
- IvyBridge => 'GenuineIntel',
- 'IvyBridge-IBRS' => 'GenuineIntel',
- Haswell => 'GenuineIntel',
- 'Haswell-IBRS' => 'GenuineIntel',
- 'Haswell-noTSX' => 'GenuineIntel',
- 'Haswell-noTSX-IBRS' => 'GenuineIntel',
- Broadwell => 'GenuineIntel',
- 'Broadwell-IBRS' => 'GenuineIntel',
- 'Broadwell-noTSX' => 'GenuineIntel',
- 'Broadwell-noTSX-IBRS' => 'GenuineIntel',
- 'Skylake-Client' => 'GenuineIntel',
- 'Skylake-Client-IBRS' => 'GenuineIntel',
- 'Skylake-Client-noTSX-IBRS' => 'GenuineIntel',
- 'Skylake-Client-v4' => 'GenuineIntel',
- 'Skylake-Server' => 'GenuineIntel',
- 'Skylake-Server-IBRS' => 'GenuineIntel',
- 'Skylake-Server-noTSX-IBRS' => 'GenuineIntel',
- 'Skylake-Server-v4' => 'GenuineIntel',
- 'Skylake-Server-v5' => 'GenuineIntel',
- 'Cascadelake-Server' => 'GenuineIntel',
- 'Cascadelake-Server-v2' => 'GenuineIntel',
- 'Cascadelake-Server-noTSX' => 'GenuineIntel',
- 'Cascadelake-Server-v4' => 'GenuineIntel',
- 'Cascadelake-Server-v5' => 'GenuineIntel',
- 'Cooperlake' => 'GenuineIntel',
- 'Cooperlake-v2' => 'GenuineIntel',
- KnightsMill => 'GenuineIntel',
- 'Icelake-Client' => 'GenuineIntel', # depreacated, removed with QEMU 7.1
- 'Icelake-Client-noTSX' => 'GenuineIntel', # depreacated, removed with QEMU 7.1
- 'Icelake-Server' => 'GenuineIntel',
- 'Icelake-Server-noTSX' => 'GenuineIntel',
- 'Icelake-Server-v3' => 'GenuineIntel',
- 'Icelake-Server-v4' => 'GenuineIntel',
- 'Icelake-Server-v5' => 'GenuineIntel',
- 'Icelake-Server-v6' => 'GenuineIntel',
- 'SapphireRapids' => 'GenuineIntel',
- 'SapphireRapids-v2' => 'GenuineIntel',
- 'GraniteRapids' => 'GenuineIntel',
-
- # AMD CPUs
- athlon => 'AuthenticAMD',
- phenom => 'AuthenticAMD',
- Opteron_G1 => 'AuthenticAMD',
- Opteron_G2 => 'AuthenticAMD',
- Opteron_G3 => 'AuthenticAMD',
- Opteron_G4 => 'AuthenticAMD',
- Opteron_G5 => 'AuthenticAMD',
- EPYC => 'AuthenticAMD',
- 'EPYC-IBPB' => 'AuthenticAMD',
- 'EPYC-v3' => 'AuthenticAMD',
- 'EPYC-v4' => 'AuthenticAMD',
- 'EPYC-Rome' => 'AuthenticAMD',
- 'EPYC-Rome-v2' => 'AuthenticAMD',
- 'EPYC-Rome-v3' => 'AuthenticAMD',
- 'EPYC-Rome-v4' => 'AuthenticAMD',
- 'EPYC-Milan' => 'AuthenticAMD',
- 'EPYC-Milan-v2' => 'AuthenticAMD',
- 'EPYC-Genoa' => 'AuthenticAMD',
-
- # generic types, use vendor from host node
- host => 'default',
- kvm32 => 'default',
- kvm64 => 'default',
- qemu32 => 'default',
- qemu64 => 'default',
- max => 'default',
+ # 486 => 'GenuineIntel',
+ # pentium => 'GenuineIntel',
+ # pentium2 => 'GenuineIntel',
+ # pentium3 => 'GenuineIntel',
+ # coreduo => 'GenuineIntel',
+ # core2duo => 'GenuineIntel',
+ # Conroe => 'GenuineIntel',
+ # Penryn => 'GenuineIntel',
+ # Nehalem => 'GenuineIntel',
+ # 'Nehalem-IBRS' => 'GenuineIntel',
+ # Westmere => 'GenuineIntel',
+ # 'Westmere-IBRS' => 'GenuineIntel',
+ # SandyBridge => 'GenuineIntel',
+ # 'SandyBridge-IBRS' => 'GenuineIntel',
+ # IvyBridge => 'GenuineIntel',
+ # 'IvyBridge-IBRS' => 'GenuineIntel',
+ # Haswell => 'GenuineIntel',
+ # 'Haswell-IBRS' => 'GenuineIntel',
+ # 'Haswell-noTSX' => 'GenuineIntel',
+ # 'Haswell-noTSX-IBRS' => 'GenuineIntel',
+ # Broadwell => 'GenuineIntel',
+ # 'Broadwell-IBRS' => 'GenuineIntel',
+ # 'Broadwell-noTSX' => 'GenuineIntel',
+ # 'Broadwell-noTSX-IBRS' => 'GenuineIntel',
+ # 'Skylake-Client' => 'GenuineIntel',
+ # 'Skylake-Client-IBRS' => 'GenuineIntel',
+ # 'Skylake-Client-noTSX-IBRS' => 'GenuineIntel',
+ # 'Skylake-Client-v4' => 'GenuineIntel',
+ # 'Skylake-Server' => 'GenuineIntel',
+ # 'Skylake-Server-IBRS' => 'GenuineIntel',
+ # 'Skylake-Server-noTSX-IBRS' => 'GenuineIntel',
+ # 'Skylake-Server-v4' => 'GenuineIntel',
+ # 'Skylake-Server-v5' => 'GenuineIntel',
+ # 'Cascadelake-Server' => 'GenuineIntel',
+ # 'Cascadelake-Server-v2' => 'GenuineIntel',
+ # 'Cascadelake-Server-noTSX' => 'GenuineIntel',
+ # 'Cascadelake-Server-v4' => 'GenuineIntel',
+ # 'Cascadelake-Server-v5' => 'GenuineIntel',
+ # 'Cooperlake' => 'GenuineIntel',
+ # 'Cooperlake-v2' => 'GenuineIntel',
+ # KnightsMill => 'GenuineIntel',
+ # 'Icelake-Client' => 'GenuineIntel', # depreacated, removed with QEMU 7.1
+ # 'Icelake-Client-noTSX' => 'GenuineIntel', # depreacated, removed with QEMU 7.1
+ # 'Icelake-Server' => 'GenuineIntel',
+ # 'Icelake-Server-noTSX' => 'GenuineIntel',
+ # 'Icelake-Server-v3' => 'GenuineIntel',
+ # 'Icelake-Server-v4' => 'GenuineIntel',
+ # 'Icelake-Server-v5' => 'GenuineIntel',
+ # 'Icelake-Server-v6' => 'GenuineIntel',
+ # 'SapphireRapids' => 'GenuineIntel',
+
+ # # AMD CPUs
+ # athlon => 'AuthenticAMD',
+ # phenom => 'AuthenticAMD',
+ # Opteron_G1 => 'AuthenticAMD',
+ # Opteron_G2 => 'AuthenticAMD',
+ # Opteron_G3 => 'AuthenticAMD',
+ # Opteron_G4 => 'AuthenticAMD',
+ # Opteron_G5 => 'AuthenticAMD',
+ # EPYC => 'AuthenticAMD',
+ # 'EPYC-IBPB' => 'AuthenticAMD',
+ # 'EPYC-v3' => 'AuthenticAMD',
+ #'EPYC-v4' => 'AuthenticAMD',
+ # 'EPYC-Rome' => 'AuthenticAMD',
+ # 'EPYC-Rome-v2' => 'AuthenticAMD',
+ #'EPYC-Rome-v3' => 'AuthenticAMD',
+ #'EPYC-Rome-v4' => 'AuthenticAMD',
+ #'EPYC-Milan' => 'AuthenticAMD',
+ #'EPYC-Milan-v2' => 'AuthenticAMD',
+ #'EPYC-Genoa' => 'AuthenticAMD',
+
+ # # generic types, use vendor from host node
+ # host => 'default',
+ # kvm32 => 'default',
+ # kvm64 => 'default',
+ # qemu32 => 'default',
+ # qemu64 => 'default',
+ # max => 'default',
+ # virt arm64 cpus
+ 'host' => 'default',
+ 'cortex-a35' => 'default',
+ 'cortex-a53' => 'default',
+ 'cortex-a55' => 'default',
+ 'cortex-a57' => 'default',
+ 'cortex-a72' => 'default',
+ 'cortex-a76' => 'default',
+ 'neoverse-n1' => 'default',
+ 'max' => 'default',
};
my @supported_cpu_flags = (
- 'pcid',
- 'spec-ctrl',
- 'ibpb',
- 'ssbd',
- 'virt-ssbd',
- 'amd-ssbd',
- 'amd-no-ssb',
- 'pdpe1gb',
- 'md-clear',
- 'hv-tlbflush',
- 'hv-evmcs',
'aes'
);
my $cpu_flag_supported_re = qr/([+-])(@{[join('|', @supported_cpu_flags)]})/;
@@ -188,7 +185,7 @@ my $cpu_fmt = {
." Only valid for custom CPU model definitions, default models will always report themselves to the guest OS.",
type => 'string',
enum => [ sort { lc("$a") cmp lc("$b") } keys %$cpu_vendor_list ],
- default => 'kvm64',
+ default => 'host',
optional => 1,
},
hidden => {
@@ -736,7 +733,10 @@ sub get_default_cpu_type {
my ($arch, $kvm) = @_;
my $cputype = $kvm ? 'kvm64' : 'qemu64';
- $cputype = 'cortex-a57' if $arch eq 'aarch64';
+ $cputype = 'host' if $arch eq 'aarch64';
+ $cputype = 'host' if $arch eq 'arm';
+ $cputype = 'rv64' if $arch eq 'riscv64';
+ $cputype = 'la464-loongarch-cpu' if $arch eq 'loongarch64';
return $cputype;
}

View File

@ -1,38 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1370,7 +1375,7 @@ sub print_tabletdevice_full {
# we use uhci for old VMs because tablet driver was buggy in older qemu
my $usbbus;
if ($q35 || $arch eq 'aarch64') {
- $usbbus = 'ehci';
+ $usbbus = 'qemu-xhci';
} else {
$usbbus = 'uhci';
}
@@ -1383,7 +1388,7 @@ sub print_keyboarddevice_full {
return if $arch ne 'aarch64';
- return "usb-kbd,id=keyboard,bus=ehci.0,port=2";
+ return "usb-kbd,id=keyboard,bus=qemu-xhci.0,port=2";
}
my sub get_drive_id {
diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index 49957444..c7b5033f 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -134,8 +134,8 @@ sub get_usb_controllers {
my $is_q35 = PVE::QemuServer::Machine::machine_type_is_q35($conf);
if ($arch eq 'aarch64') {
- $pciaddr = print_pci_addr('ehci', $bridges, $arch, $machine);
- push @$devices, '-device', "usb-ehci,id=ehci$pciaddr";
+ $pciaddr = print_pci_addr('qemu-xhci', $bridges, $arch, $machine);
+ push @$devices, '-device', "qemu-xhci,id=qemu-xhci";
} elsif (!$is_q35) {
$pciaddr = print_pci_addr("piix3", $bridges, $arch, $machine);
push @$devices, '-device', "piix3-usb-uhci,id=uhci$pciaddr.0x2";

View File

@ -1,55 +0,0 @@
diff --git a/PVE/API2/Qemu/Machine.pm b/PVE/API2/Qemu/Machine.pm
index afb535c2..db6c3d80 100644
--- a/PVE/API2/Qemu/Machine.pm
+++ b/PVE/API2/Qemu/Machine.pm
@@ -38,7 +38,7 @@ __PACKAGE__->register_method({
},
type => {
type => 'string',
- enum => ['q35', 'i440fx'],
+ enum => ['q35', 'virt'],
description => "The machine type.",
},
version => {
@@ -50,7 +50,7 @@ __PACKAGE__->register_method({
},
code => sub {
my $machines = eval {
- my $raw = file_get_contents('/usr/share/kvm/machine-versions-x86_64.json');
+ my $raw = file_get_contents('/usr/share/kvm/machine-versions-aarch64.json');
return from_json($raw, { utf8 => 1 });
};
die "could not load supported machine versions - $@\n" if $@;
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4112,19 +4125,15 @@ sub config_to_command {
$machine_type_min =~ s/\+pve\d+$//;
$machine_type_min .= "+pve$required_pve_version";
}
- push @$machineFlags, "type=${machine_type_min}";
-
- PVE::QemuServer::Machine::assert_valid_machine_property($conf, $machine_conf);
-
- if (my $viommu = $machine_conf->{viommu}) {
- if ($viommu eq 'intel') {
- unshift @$devices, '-device', 'intel-iommu,intremap=on,caching-mode=on';
- push @$machineFlags, 'kernel-irqchip=split';
- } elsif ($viommu eq 'virtio') {
- push @$devices, '-device', 'virtio-iommu-pci';
+ if ($arch eq 'aarch64'){
+ if (!$kvm){
+ push @$machineFlags, "type=${machine_type_min}";
+ }else{
+ push @$machineFlags, "type=${machine_type_min},gic-version=host";
}
+ }else{
+ push @$machineFlags, "type=${machine_type_min}";
}
-
push @$cmd, @$devices;
push @$cmd, '-rtc', join(',', @$rtcFlags) if scalar(@$rtcFlags);
push @$cmd, '-machine', join(',', @$machineFlags) if scalar(@$machineFlags);

View File

@ -1,40 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -184,7 +200,7 @@ my $vga_fmt = {
default => 'std',
optional => 1,
default_key => 1,
- enum => [qw(cirrus qxl qxl2 qxl3 qxl4 none serial0 serial1 serial2 serial3 std virtio virtio-gl vmware)],
+ enum => [qw(cirrus qxl qxl2 qxl3 qxl4 none serial0 serial1 serial2 serial3 std virtio virtio-gl vmware ramfb)],
},
memory => {
description => "Sets the VGA memory (in MiB). Has no effect with serial display.",
@@ -1775,7 +1780,8 @@ my $vga_map = {
'std' => 'VGA',
'vmware' => 'vmware-svga',
'virtio' => 'virtio-vga',
- 'virtio-gl' => 'virtio-vga-gl',
+ 'virtio-gl' => 'virtio-gpu-gl',
+ 'ramfb' => 'ramfb',
};
sub print_vga_device {
@@ -3793,9 +3803,12 @@ sub config_to_command {
push @$cmd, '-no-reboot' if defined($conf->{reboot}) && $conf->{reboot} == 0;
if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga->{type} ne 'none'){
- push @$devices, '-device', print_vga_device(
- $conf, $vga, $arch, $machine_version, $machine_type, undef, $qxlnum, $bridges);
-
+ if ($vga->{type} eq 'ramfb'){
+ push @$devices, '-device', 'ramfb';
+ } else {
+ push @$devices, '-device', print_vga_device(
+ $conf, $vga, $arch, $machine_version, $machine_type, undef, $qxlnum, $bridges);
+ }
push @$cmd, '-display', 'egl-headless,gl=core' if $vga->{type} eq 'virtio-gl'; # VIRGL
my $socket = PVE::QemuServer::Helpers::vnc_socket($vmid);

View File

@ -1,17 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3125,7 +3131,14 @@ sub add_tpm_device {
push @$devices, "-chardev", "socket,id=tpmchar,path=$paths->{socket}";
push @$devices, "-tpmdev", "emulator,id=tpmdev,chardev=tpmchar";
+
+ #https://bugzilla.proxmox.com/show_bug.cgi?id=4219
+ my $arch = $conf->{arch} // get_host_arch();
+ if ($arch eq 'x86_64'){
push @$devices, "-device", "tpm-tis,tpmdev=tpmdev";
+ }else{
+ push @$devices, "-device", "tpm-tis-device,tpmdev=tpmdev";
+ }
}

View File

@ -1,44 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -97,6 +97,22 @@ my $OVMF = {
],
},
aarch64 => {
+ '4m-no-smm' => [
+ "$EDK2_FW_BASE/AAVMF_CODE.fd",
+ "$EDK2_FW_BASE/AAVMF_VARS.fd",
+ ],
+ '4m-no-smm-ms' => [
+ "$EDK2_FW_BASE/AAVMF_CODE.ms.fd",
+ "$EDK2_FW_BASE/AAVMF_VARS.ms.fd",
+ ],
+ '4m' => [
+ "$EDK2_FW_BASE/AAVMF_CODE.fd",
+ "$EDK2_FW_BASE/AAVMF_VARS.fd",
+ ],
+ '4m-ms' => [
+ "$EDK2_FW_BASE/AAVMF_CODE.ms.fd",
+ "$EDK2_FW_BASE/AAVMF_VARS.ms.fd",
+ ],
default => [
"$EDK2_FW_BASE/AAVMF_CODE.fd",
"$EDK2_FW_BASE/AAVMF_VARS.fd",
@@ -3295,13 +3308,9 @@ sub get_ovmf_files($$$) {
or die "no OVMF images known for architecture '$arch'\n";
my $type = 'default';
- if ($arch eq 'x86_64') {
- if (defined($efidisk->{efitype}) && $efidisk->{efitype} eq '4m') {
- $type = $smm ? "4m" : "4m-no-smm";
- $type .= '-ms' if $efidisk->{'pre-enrolled-keys'};
- } else {
- # TODO: log_warn about use of legacy images for x86_64 with Promxox VE 9
- }
+ if (defined($efidisk->{efitype}) && $efidisk->{efitype} eq '4m') {
+ $type = $smm ? "4m" : "4m-no-smm";
+ $type .= '-ms' if $efidisk->{'pre-enrolled-keys'};
}
my ($ovmf_code, $ovmf_vars) = $types->{$type}->@*;

View File

@ -1,35 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -404,8 +420,7 @@ my $confdesc = {
ostype => {
optional => 1,
type => 'string',
- # NOTE: When extending, also consider extending `%guest_types` in `Import/ESXi.pm`.
- enum => [qw(other wxp w2k w2k3 w2k8 wvista win7 win8 win10 win11 l24 l26 solaris)],
+ enum => [qw(win11 l26 other)],
description => "Specify guest operating system.",
verbose_description => <<EODESC,
Specify guest operating system. This is used to enable special
@@ -413,18 +428,8 @@ optimization/features for specific operating systems:
[horizontal]
other;; unspecified OS
-wxp;; Microsoft Windows XP
-w2k;; Microsoft Windows 2000
-w2k3;; Microsoft Windows 2003
-w2k8;; Microsoft Windows 2008
-wvista;; Microsoft Windows Vista
-win7;; Microsoft Windows 7
-win8;; Microsoft Windows 8/2012/2012r2
-win10;; Microsoft Windows 10/2016/2019
-win11;; Microsoft Windows 11/2022/2025
-l24;; Linux 2.4 Kernel
+win11;; Microsoft Windows 11/2022
l26;; Linux 2.6 - 6.X Kernel
-solaris;; Solaris/OpenSolaris/OpenIndiania kernel
EODESC
},
boot => {

View File

@ -1,24 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3374,7 +3383,8 @@ sub query_supported_cpu_flags {
'-chardev', "socket,id=qmp,path=/var/run/qemu-server/$fakevmid.qmp,server=on,wait=off",
'-mon', 'chardev=qmp,mode=control',
'-pidfile', $pidfile,
- '-S', '-daemonize'
+ '-S', '-daemonize',
+ '-cpu', 'max'
];
if (!$kvm) {
@@ -3389,7 +3399,7 @@ sub query_supported_cpu_flags {
$fakevmid,
'query-cpu-model-expansion',
type => 'full',
- model => { name => 'host' }
+ model => { name => 'max' }
);
my $props = $cmd_result->{model}->{props};

View File

@ -1,16 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -391,8 +407,8 @@ my $confdesc = {
optional => 1,
type => 'string',
description => "SCSI controller model",
- enum => [qw(lsi lsi53c810 virtio-scsi-pci virtio-scsi-single megasas pvscsi)],
- default => 'lsi',
+ enum => [qw(virtio-scsi-pci virtio-scsi-single)],
+ default => 'virtio-scsi-pci',
},
description => {
optional => 1,

View File

@ -1,38 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -599,9 +604,9 @@ EODESCR
},
cdrom => {
optional => 1,
- type => 'string', format => 'pve-qm-ide',
+ type => 'string', format => 'pve-qm-scsi',
typetext => '<volume>',
- description => "This is an alias for option -ide2",
+ description => "This is an alias for option -scsi",
},
cpu => {
optional => 1,
@@ -2394,7 +2400,7 @@ sub parse_vm_config {
if ($@) {
$handle_error->("vm $vmid - unable to parse value of '$key' - $@");
} else {
- $key = 'ide2' if $key eq 'cdrom';
+ $key = 'scsi2' if $key eq 'cdrom';
my $fmt = $confdesc->{$key}->{format};
if ($fmt && $fmt =~ /^pve-qm-(?:ide|scsi|virtio|sata)$/) {
my $v = parse_drive($key, $value);
@@ -2426,8 +2432,8 @@ sub write_vm_config {
delete $conf->{snapstate}; # just to be sure
if ($conf->{cdrom}) {
- die "option ide2 conflicts with cdrom\n" if $conf->{ide2};
- $conf->{ide2} = $conf->{cdrom};
+ die "option scsi2 conflicts with cdrom\n" if $conf->{scsi2};
+ $conf->{scsi2} = $conf->{cdrom};
delete $conf->{cdrom};
}
sub start_swtpm {

View File

@ -1,13 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3679,7 +3689,7 @@ sub config_to_command {
push @$cmd, $fixups->@*;
}
- if ($conf->{vmgenid}) {
+ if ($conf->{vmgenid} && $arch eq 'x86_64') {
push @$devices, '-device', 'vmgenid,guid='.$conf->{vmgenid};
}

View File

@ -1,13 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1835,7 +1841,7 @@ sub print_vga_device {
}
if ($vga->{type} eq 'virtio-gl') {
- my $base = '/usr/lib/x86_64-linux-gnu/lib';
+ my $base = '/usr/lib/aarch64-linux-gnu/lib';
die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1";

View File

@ -1,16 +0,0 @@
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index b26da505..fc8ca388 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3354,8 +3363,8 @@ sub query_supported_cpu_flags {
# FIXME: Once this is merged, the code below should work for ARM as well:
# https://lists.nongnu.org/archive/html/qemu-devel/2019-06/msg04947.html
- die "QEMU/KVM cannot detect CPU flags on ARM (aarch64)\n" if
- $arch eq "aarch64";
+ # die "QEMU/KVM cannot detect CPU flags on ARM (aarch64)\n" if
+ # $arch eq "aarch64";
my $kvm_supported = defined(kvm_version());
my $qemu_cmd = get_command_for_arch($arch);

View File

@ -1,55 +0,0 @@
diff --git a/debian/changelog b/debian/changelog
index ddb70dc8..ba7366c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -121,6 +121,20 @@ qemu-server (8.1.2) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Fri, 19 Apr 2024 16:09:18 +0200
+qemu-server (8.1.1+port2) bookworm; urgency=medium
+
+ * fix query_supported_cpu_flags on aarch64
+
+ -- jiangcuo <jiangcuo@bingsin.com> Wed, 27 Mar 2024 09:26:45 +0800
+
+qemu-server (8.1.1+port1) bookworm; urgency=medium
+
+ * update to 8.1.1
+
+ * remove qemu cpu flags check
+
+ -- jiangcuo <jiangcuo@bingsin.com> Fri, 22 Mar 2024 21:11:29 +0800
+
qemu-server (8.1.1) bookworm; urgency=medium
* config: pending network: avoid undef-warning on old/new comparison
@@ -173,6 +187,12 @@ qemu-server (8.1.0) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Fri, 08 Mar 2024 15:00:25 +0100
+qemu-server (8.0.10+pve1) bookworm; urgency=medium
+
+ * add pve-edk2-firmware-aarch64 depends
+
+ -- jiangcuo <jiangcuo@bingsin.com> Sun, 03 Dec 2023 01:46:23 -0500
+
qemu-server (8.0.10) bookworm; urgency=medium
* sdn: pass vmid and hostname to allow requesting a new mapping
@@ -191,6 +211,16 @@ qemu-server (8.0.9) bookworm; urgency=medium
-- Proxmox Support Team <support@proxmox.com> Tue, 21 Nov 2023 15:40:27 +0100
+qemu-server (8.0.8-1) bookworm; urgency=medium
+
+ * remove some scshw
+
+ * add new cputype
+
+ * add virt machine
+
+ -- jiangcuo <jiangcuo@bingsin.com> Sun, 19 Nov 2023 14:29:21 +0800
+
qemu-server (8.0.8) bookworm; urgency=medium
* fix #2816: restore: remove timeout when allocating disks

@ -1 +1 @@
Subproject commit 00d68b8d1a166e03d59b7dffde50f960063bb2fb
Subproject commit 7547eb37a96a648a7946c584400295eab23f594e