various fixes (CI, Xen, warnings)
The following changes since commit b50ea0d54bbca7d440315c3d0c0f7a4d6537b180:
Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20201113-1' into staging (2020-11-14 11:22:07 +0000)
are available in the Git repository at:
https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-161120-1
for you to fetch changes up to 7025111a199b97ae806817788bec50f456c47d85:
.gitlab-ci.d/check-patch: tweak output for CI logs (2020-11-16 11:08:40 +0000)
----------------------------------------------------------------
Various fixes
- fix resource leak in a couple of plugin
- fix build of Xen enabled i386 image on Aarch64
- maybe unitialized warning fix
- disable unstable Spartan-3A acceptance test
- terser output of gitlab checkpatch check
----------------------------------------------------------------
Alex Bennée (5):
meson.build: fix building of Xen support for aarch64 include/hw/xen.h: drop superfluous struct stubs/xen-hw-stub: drop xenstore_store_pv_console_info stub accel/stubs: drop unused cpu.h include .gitlab-ci.d/check-patch: tweak output for CI logs
Alex Chen (2):
plugins: Fix resource leak in connect_socket()
plugins: Fix two resource leaks in setup_socket()
Philippe Mathieu-Daudé (2):
hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off tests/acceptance: Disable Spartan-3A DSP 1800A test
meson.build | 7 +++++- include/hw/xen/xen.h | 2 +- accel/stubs/hax-stub.c | 1 - contrib/plugins/lockstep.c | 3 +++ hw/i386/acpi-build.c | 41 ++++++++++++++++------------------ stubs/xen-hw-stub.c | 4 ---- .gitlab-ci.d/check-patch.py | 4 ++-- tests/acceptance/boot_linux_console.py | 2 ++ tests/acceptance/replay_kernel.py | 2 ++ 9 files changed, 35 insertions(+), 31 deletions(-)
Signature · 1 line
2.20.1
[PULL 4/9] include/hw/xen.h: drop superfluous struct
Chardev is already a typedef'ed struct.
Message-Id: <[email protected]>
include/hw/xen/xen.h +1 -1
@@ -28,7 +28,7 @@ int xen_is_pirq_msi(uint32_t msi_data);qemu_irq *xen_interrupt_controller_init (void ); -void xenstore_store_pv_console_info (int i,struct Chardev *chr); +void xenstore_store_pv_console_info (int i,Chardev *chr);void xen_register_framebuffer (struct MemoryRegion *mr);
Signature · 1 line
2.20.1
[PULL 5/9] stubs/xen-hw-stub: drop xenstore_store_pv_console_info stub
In reply to Alex BennéeWe should never build something that calls this without having it.
Message-Id: <[email protected]>
stubs/xen-hw-stub.c +0 -4
@@ -10,10 +10,6 @@#include "hw/xen/xen.h" #include "hw/xen/xen-x86.h" -void xenstore_store_pv_console_info (int i,Chardev *chr) -{ -} -int xen_pci_slot_get_pirq (PCIDevice *pci_dev,int irq_num) {return -1 ;
Signature · 1 line
2.20.1
[PULL 1/9] plugins: Fix resource leak in connect_socket()
In reply to Alex BennéeFrom: Alex Chen <[email protected]>
Close the fd when the connect() fails.
Message-Id: <[email protected]>
Message-Id: <[email protected]>
contrib/plugins/lockstep.c +1 -0
@@ -292,6 +292,7 @@ static bool connect_socket(const char *path)if (connect (fd, (struct sockaddr *)&sockaddr,sizeof (sockaddr)) <0 ) {perror ("failed to connect" ); +close (fd);return false; }
Signature · 1 line
2.20.1
[PULL 3/9] meson.build: fix building of Xen support for aarch64
In reply to Alex BennéeXen is supported on ARM although weirdly using the i386-softmmu model. Checking based on the host CPU meant we never enabled Xen support. It would be nice to enable CONFIG_XEN for aarch64-softmmu to make it not seem weird but that will require further build surgery.
Message-Id: <[email protected]>
meson.build +6 -1
@@ -74,10 +74,15 @@ else endif accelerator_targets = { 'CONFIG_KVM': kvm_targets } +if cpu in ['x86', 'x86_64', 'arm', 'aarch64'] + # i368 emulator provides xenpv machine type for multiple architectures + accelerator_targets += { + 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'], + } +endif if cpu in ['x86', 'x86_64'] accelerator_targets += { 'CONFIG_HAX': ['i386-softmmu', 'x86_64-softmmu'], - 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'], 'CONFIG_HVF': ['x86_64-softmmu'], 'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'], }
Signature · 1 line
2.20.1
[PULL 2/9] plugins: Fix two resource leaks in setup_socket()
In reply to Alex BennéeFrom: Alex Chen <[email protected]>
Either accept() fails or exits normally, we need to close the fd.
Message-Id: <[email protected]>
Message-Id: <[email protected]>
contrib/plugins/lockstep.c +2 -0
@@ -268,11 +268,13 @@ static bool setup_socket(const char *path) socket_fd =accept (fd,NULL ,NULL );if (socket_fd <0 && errno !=EINTR ) {perror ("accept socket" ); +close (fd);return false; }qemu_plugin_outs ("setup_socket::ready\n" ); +close (fd);return true; }
Signature · 1 line
2.20.1
[PULL 6/9] accel/stubs: drop unused cpu.h include
In reply to Alex BennéeMessage-Id: <[email protected]>
accel/stubs/hax-stub.c +0 -1
@@ -14,7 +14,6 @@*/ #include "qemu/osdep.h" -#include "cpu.h" #include "sysemu/hax.h" int hax_sync_vcpus (void )
Signature · 1 line
2.20.1
[PULL 7/9] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
In reply to Alex BennéeFrom: Philippe Mathieu-Daudé <[email protected]>
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code is already in the "if (bsel || pcihp_bridge_en)" block statement, but it isn't smart enough to figure it out.
Restrict the code to be used only in the "if (bsel || pcihp_bridge_en)" block statement to fix (on Ubuntu):
../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized in this function [-Werror=maybe-uninitialized]
496 | aml_append(parent_scope, method);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Message-Id: <[email protected]>
Message-Id: <[email protected]>
hw/i386/acpi-build.c +19 -22
@@ -465,34 +465,31 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,*/ if (bsel || pcihp_bridge_en) { method =aml_method ("PCNT" ,0 ,AML_NOTSERIALIZED ); - } -/* If bus supports hotplug select it and notify about local events */ -if (bsel) { -uint64_t bsel_val =qnum_get_uint (qobject_to (QNum, bsel)); -aml_append (method,aml_store (aml_int (bsel_val),aml_name ("BNUM" ))); -aml_append (method, -aml_call2 ("DVNT" ,aml_name ("PCIU" ),aml_int (1 )/* Device Check */ ) - ); -aml_append (method, -aml_call2 ("DVNT" ,aml_name ("PCID" ),aml_int (3 )/* Eject Request */ ) - ); - } +/* If bus supports hotplug select it and notify about local events */ +if (bsel) { +uint64_t bsel_val =qnum_get_uint (qobject_to (QNum, bsel)); -/* Notify about child bus events in any case */ -if (pcihp_bridge_en) { - QLIST_FOREACH(sec, &bus->child, sibling) { -int32_t devfn = sec->parent_dev->devfn; +aml_append (method,aml_store (aml_int (bsel_val),aml_name ("BNUM" ))); +aml_append (method,aml_call2 ("DVNT" ,aml_name ("PCIU" ), +aml_int (1 )));/* Device Check */ +aml_append (method,aml_call2 ("DVNT" ,aml_name ("PCID" ), +aml_int (3 )));/* Eject Request */ + } -if (pci_bus_is_root (sec) ||pci_bus_is_express (sec)) { -continue ; - } +/* Notify about child bus events in any case */ +if (pcihp_bridge_en) { + QLIST_FOREACH(sec, &bus->child, sibling) { +int32_t devfn = sec->parent_dev->devfn; + +if (pci_bus_is_root (sec) ||pci_bus_is_express (sec)) { +continue ; + } -aml_append (method,aml_name ("^S%.02X.PCNT" , devfn)); +aml_append (method,aml_name ("^S%.02X.PCNT" , devfn)); + } } - } -if (bsel || pcihp_bridge_en) {aml_append (parent_scope, method); }qobject_unref (bsel);
Signature · 1 line
2.20.1
Re: [PULL 7/9] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
Quoted 14 lines · Alex Bennée
From: Philippe Mathieu-Daudé <[email protected]>
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code is already in the "if (bsel ||
pcihp_bridge_en)" block statement, but it isn't smart enough to figure it out.Restrict the code to be used only in the "if (bsel ||
pcihp_bridge_en)" block statement to fix (on Ubuntu):
../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized in this function [-Werror=maybe-uninitialized]496 | aml_append(parent_scope, method); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 8 lines
cc1: all warnings being treated as errors
Fixes df4008c9c59 ("piix4: don't reserve hw resources when hotplug is off globally")Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Alex Bennée <[email protected]>Reviewed-by Igor Mammedov <[email protected]>Message-Id: <[email protected]>
Message-Id: <[email protected]>
BTW it's in my pull request alredy.
Not sure why you are merging it too ...
Quoted 60 lines
hw/i386/acpi-build.c +19
-22@@ -465,34 +465,31 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,*/ if (bsel || pcihp_bridge_en) { method =aml_method ("PCNT" ,0 ,AML_NOTSERIALIZED ); - } -/* If bus supports hotplug select it and notify about local events */ -if (bsel) { -uint64_t bsel_val =qnum_get_uint (qobject_to (QNum, bsel)); -aml_append (method,aml_store (aml_int (bsel_val),aml_name ("BNUM" ))); -aml_append (method, -aml_call2 ("DVNT" ,aml_name ("PCIU" ),aml_int (1 )/* Device Check */ ) - ); -aml_append (method, -aml_call2 ("DVNT" ,aml_name ("PCID" ),aml_int (3 )/* Eject Request */ ) - ); - } +/* If bus supports hotplug select it and notify about local events */ +if (bsel) { +uint64_t bsel_val =qnum_get_uint (qobject_to (QNum, bsel)); -/* Notify about child bus events in any case */ -if (pcihp_bridge_en) { - QLIST_FOREACH(sec, &bus->child, sibling) { -int32_t devfn = sec->parent_dev->devfn; +aml_append (method,aml_store (aml_int (bsel_val),aml_name ("BNUM" ))); +aml_append (method,aml_call2 ("DVNT" ,aml_name ("PCIU" ), +aml_int (1 )));/* Device Check */ +aml_append (method,aml_call2 ("DVNT" ,aml_name ("PCID" ), +aml_int (3 )));/* Eject Request */ + } -if (pci_bus_is_root (sec) ||pci_bus_is_express (sec)) { -continue ; - } +/* Notify about child bus events in any case */ +if (pcihp_bridge_en) { + QLIST_FOREACH(sec, &bus->child, sibling) { +int32_t devfn = sec->parent_dev->devfn; + +if (pci_bus_is_root (sec) ||pci_bus_is_express (sec)) { +continue ; + } -aml_append (method,aml_name ("^S%.02X.PCNT" , devfn)); +aml_append (method,aml_name ("^S%.02X.PCNT" , devfn)); + } } - } -if (bsel || pcihp_bridge_en) {aml_append (parent_scope, method); }qobject_unref (bsel);Signature · 1 line
2.20.1
Re: [PULL 7/9] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
Quoted 24 lines · Michael S. Tsirkin
Quoted 14 lines · Alex Bennée
From: Philippe Mathieu-Daudé <[email protected]>
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code is already in the "if (bsel ||
pcihp_bridge_en)" block statement, but it isn't smart enough to figure it out.Restrict the code to be used only in the "if (bsel ||
pcihp_bridge_en)" block statement to fix (on Ubuntu):
../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized in this function [-Werror=maybe-uninitialized]496 | aml_append(parent_scope, method); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 8 lines
cc1: all warnings being treated as errors
Fixes df4008c9c59 ("piix4: don't reserve hw resources when hotplug is off globally")Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Alex Bennée <[email protected]>Reviewed-by Igor Mammedov <[email protected]>Message-Id: <[email protected]>
Message-Id: <[email protected]>
Quoted 2 lines
BTW it's in my pull request alredy.
Not sure why you are merging it too ...
I suppose to unbreak Gitlab-CI...
There is no policy w.r.t. CI so maintainer don't have to use it, but this breaking it delay the workflow of others subsystems.
I'm not asking you to use it, just explaining why this patch is in Alex's queue.
Regards,
Phil.
Re: [PULL 7/9] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
Quoted 33 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Michael S. Tsirkin
Quoted 14 lines · Alex Bennée
From: Philippe Mathieu-Daudé <[email protected]>
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code is already in the "if (bsel ||
pcihp_bridge_en)" block statement, but it isn't smart enough to figure it out.Restrict the code to be used only in the "if (bsel ||
pcihp_bridge_en)" block statement to fix (on Ubuntu):
../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized in this function [-Werror=maybe-uninitialized]496 | aml_append(parent_scope, method); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 8 lines
cc1: all warnings being treated as errors
Fixes df4008c9c59 ("piix4: don't reserve hw resources when hotplug is off globally")Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Alex Bennée <[email protected]>Reviewed-by Igor Mammedov <[email protected]>Message-Id: <[email protected]>
Message-Id: <[email protected]>Quoted 2 lines
BTW it's in my pull request alredy.
Not sure why you are merging it too ...I suppose to unbreak Gitlab-CI...
There is no policy w.r.t. CI so maintainer don't have to use it, but this breaking it delay the workflow of others subsystems.
Quoted 6 lines
I'm not asking you to use it, just explaining why this patch is in Alex's queue.
Regards,
Phil.
Not sure I understand.
It's in my pull request from Nov 15. I'm not sure how does it help anyone to also have it in another request from Nov 16...
Signature · 1 line
MST
Re: [PULL 7/9] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
Quoted 37 lines · Michael S. Tsirkin
Quoted 36 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Michael S. Tsirkin
Quoted 14 lines · Alex Bennée
From: Philippe Mathieu-Daudé <[email protected]>
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code is already in the "if (bsel ||
pcihp_bridge_en)" block statement, but it isn't smart enough to figure it out.Restrict the code to be used only in the "if (bsel ||
pcihp_bridge_en)" block statement to fix (on Ubuntu):
../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized in this function [-Werror=maybe-uninitialized]496 | aml_append(parent_scope, method); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 8 lines
cc1: all warnings being treated as errors
Fixes df4008c9c59 ("piix4: don't reserve hw resources when hotplug is off globally")Signed-off-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Alex Bennée <[email protected]>Reviewed-by Igor Mammedov <[email protected]>Message-Id: <[email protected]>
Message-Id: <[email protected]>Quoted 2 lines
BTW it's in my pull request alredy.
Not sure why you are merging it too ...I suppose to unbreak Gitlab-CI...
There is no policy w.r.t. CI so maintainer don't have to use it, but this breaking it delay the workflow of others subsystems.
I'm not asking you to use it, just explaining why this patch is in Alex's queue.
Quoted 7 lines
Quoted 3 lines
Regards,
Phil.
Not sure I understand.
It's in my pull request from Nov 15. I'm not sure how does it help anyone to also have it in another request from Nov 16...
I didn't see your PR had gone in, it shouldn't matter though because git should be smart enough to deal with it being in two places at once.
Signature · 1 line
Alex Bennée
[PULL 8/9] tests/acceptance: Disable Spartan-3A DSP 1800A test
In reply to Alex BennéeFrom: Philippe Mathieu-Daudé <[email protected]>
This test is regularly failing on CI:
(05/34) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_microblaze_s3adsp1800:
Linux version 4.11.3 ([email protected]) (gcc version 6.4.0 (Buildroot 2018.05.2) ) #5 Tue Dec 11 11:56:23 CET 2018
...
Freeing unused kernel memory: 1444K
This architecture does not have kernel memory protection.
[nothing happens here]
Runner error occurred: Timeout reached (90.91 s)
This is a regression. Until someone figure out the problem, disable the test to keep CI pipeline useful.
Message-Id: <[email protected]>
Message-Id: <[email protected]>
tests/acceptance/boot_linux_console.py +2 -0
@@ -13,6 +13,7 @@ import lzma import gzip import shutil +from avocado import skip from avocado import skipUnless from avocado_qemu import Test from avocado_qemu import exec_command_and_wait_for_pattern
@@ -1025,6 +1026,7 @@ class BootLinuxConsole(LinuxKernelTest): tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c' self.do_test_advcal_2018('07', tar_hash, 'sanity-clause.elf') + @skip("Test currently broken") # Console stuck as of 5.2-rc1 def test_microblaze_s3adsp1800(self): """ :avocado: tags=arch:microblaze
tests/acceptance/replay_kernel.py +2 -0
@@ -14,6 +14,7 @@ import shutil import logging import time +from avocado import skip from avocado import skipIf from avocado import skipUnless from avocado_qemu import wait_for_console_pattern
@@ -280,6 +281,7 @@ class ReplayKernelNormal(ReplayKernelBase): file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) self.do_test_advcal_2018(file_path, 'sanity-clause.elf') + @skip("Test currently broken") # Console stuck as of 5.2-rc1 def test_microblaze_s3adsp1800(self): """ :avocado: tags=arch:microblaze
Signature · 1 line
2.20.1
[PULL 9/9] .gitlab-ci.d/check-patch: tweak output for CI logs
In reply to Alex BennéeWe don't need running commentary for the CI logs and by keeping it short we might just see the problem on the first page. While we are at it flush the previous line so order is maintained between script and sub process.
Message-Id: <[email protected]>
.gitlab-ci.d/check-patch.py +2 -2
@@ -45,9 +45,9 @@ if log == "": errors = False -print("\nChecking all commits since %s...\n" % ancestor) +print("\nChecking all commits since %s...\n" % ancestor, flush=True) -ret = subprocess.run(["scripts/checkpatch.pl", ancestor + "..."]) +ret = subprocess.run(["scripts/checkpatch.pl", "--terse", ancestor + "..."]) if ret.returncode != 0: print(" ❌ FAIL one or more commits failed scripts/checkpatch.pl")
Signature · 1 line
2.20.1
Peter Maydell
AppliedQuoted 13 lines · Alex Bennée
The following changes since commit
b50ea0d54bbca7d440315c3d0c0f7a4d6537b180:Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20201113-1' into staging (2020-11-14 11:22:07 +0000)
are available in the Git repository at:
https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-161120-1
for you to fetch changes up to
7025111a199b97ae806817788bec50f456c47d85:.gitlab-ci.d/check-patch: tweak output for CI logs (2020-11-16 11:08:40 +0000)
Quoted 8 lines
----------------------------------------------------------------
Various fixes- fix resource leak in a couple of plugin
- fix build of Xen enabled i386 image on Aarch64
- maybe unitialized warning fix
- disable unstable Spartan-3A acceptance test
- terser output of gitlab checkpatch check
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.
-- PMM