]> TLD Linux GIT Repositories - packages/qemu.git/commitdiff
- ACPI fix
authorMarcin Krol <hawk@tld-linux.org>
Wed, 13 Apr 2022 23:32:44 +0000 (01:32 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 13 Apr 2022 23:32:44 +0000 (01:32 +0200)
acpi.patch [new file with mode: 0644]
qemu.spec

diff --git a/acpi.patch b/acpi.patch
new file mode 100644 (file)
index 0000000..d7f41cf
--- /dev/null
@@ -0,0 +1,28 @@
+diff --git a/hw/acpi/core.c b/hw/acpi/core.c
+index 1e004d0078..3e811bf03c 100644
+--- a/hw/acpi/core.c
++++ b/hw/acpi/core.c
+@@ -345,8 +345,8 @@ int acpi_get_slic_oem(AcpiSlicOem *oem)
+         struct acpi_table_header *hdr = (void *)(u - sizeof(hdr->_length));
+         if (memcmp(hdr->sig, "SLIC", 4) == 0) {
+-            oem->id = hdr->oem_id;
+-            oem->table_id = hdr->oem_table_id;
++            oem->id = g_strndup(hdr->oem_id, 6);
++            oem->table_id = g_strndup(hdr->oem_table_id, 8);
+             return 0;
+         }
+     }
+diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
+index a99c6e4fe3..570f82997b 100644
+--- a/hw/i386/acpi-build.c
++++ b/hw/i386/acpi-build.c
+@@ -2721,6 +2721,8 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
+     /* Cleanup memory that's no longer used. */
+     g_array_free(table_offsets, true);
++    g_free(slic_oem.id);
++    g_free(slic_oem.table_id);
+ }
+ static void acpi_ram_update(MemoryRegion *mr, GArray *data)
index 26203dba5ae969e3f4942c475336973f9becec0e..12277c74e82af5f0b5b6a32e14576d5288ec1ec9 100644 (file)
--- a/qemu.spec
+++ b/qemu.spec
@@ -44,7 +44,7 @@ Summary:      QEMU CPU Emulator
 Summary(pl.UTF-8):     QEMU - emulator procesora
 Name:          qemu
 Version:       6.2.0
 Summary(pl.UTF-8):     QEMU - emulator procesora
 Name:          qemu
 Version:       6.2.0
-Release:       1
+Release:       2
 License:       GPL v2, BSD (edk2 firmware files)
 Group:         Applications/Emulators
 Source0:       https://download.qemu.org/%{name}-%{version}.tar.xz
 License:       GPL v2, BSD (edk2 firmware files)
 Group:         Applications/Emulators
 Source0:       https://download.qemu.org/%{name}-%{version}.tar.xz
@@ -66,6 +66,7 @@ Patch2:               %{name}-user-execve.patch
 Patch3:                %{name}-xattr.patch
 Patch4:                libjpeg-boolean.patch
 Patch5:                x32.patch
 Patch3:                %{name}-xattr.patch
 Patch4:                libjpeg-boolean.patch
 Patch5:                x32.patch
+Patch6:                acpi.patch
 URL:           https://www.qemu.org/
 %{?with_opengl:BuildRequires:  Mesa-libgbm-devel}
 %{?with_opengl:BuildRequires:  OpenGL-GLX-devel}
 URL:           https://www.qemu.org/
 %{?with_opengl:BuildRequires:  Mesa-libgbm-devel}
 %{?with_opengl:BuildRequires:  OpenGL-GLX-devel}
@@ -915,6 +916,7 @@ Sondy systemtap/dtrace dla QEMU.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %{__sed} -i '1s,/usr/bin/env python3,%{__python3},' scripts/qemu-trace-stap
 
 
 %{__sed} -i '1s,/usr/bin/env python3,%{__python3},' scripts/qemu-trace-stap