[PATCH v8 2/8] linux-headers: update to 6.10-rc1

2024-05-27 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- include/standard-headers/linux/ethtool.h| 55 +++ include/standard-headers/linux/pci_regs.h | 6 ++ include/standard-headers/linux/pvpanic.h| 7 +- include/standard-headers/linux/virtio_bt.h | 1 - include/standard-headers/linux

[PATCH v8 6/8] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

2024-05-27 Thread Thomas Weißschuh
From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN) that also issue the guest-shutdown cause.

[PATCH v8 8/8] Revert "docs/specs/pvpanic: mark shutdown event as not implemented"

2024-05-27 Thread Thomas Weißschuh
The missing functionality has been implemented now. This reverts commit e739d1935c461d0668057e9dbba9d06f728d29ec. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst index

[PATCH v8 7/8] tests/qtest/pvpanic: add tests for pvshutdown event

2024-05-27 Thread Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Weißschuh Reviewed-by: Thomas Huth --- tests/qtest/pvpanic-pci-test.c | 39 +++ tests/qtest/pvpanic-test.c | 29 + 2 files

[PATCH v8 1/8] scripts/update-linux-headers: Copy setup_data.h to correct directory

2024-05-27 Thread Thomas Weißschuh
Add the missing "include/" path component, so the files ends up in the correct place like the other headers. Fixes: 66210a1a30f2 ("scripts/update-linux-headers: Add setup_data.h to import list") Signed-off-by: Thomas Weißschuh --- scripts/update-linux-headers.sh | 2 +

[PATCH v8 4/8] tests/qtest/pvpanic: use centralized definition of supported events

2024-05-27 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4

[PATCH v8 5/8] hw/misc/pvpanic: add support for normal shutdowns

2024-05-27 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic.c | 5

[PATCH v8 0/8] update linux headers to v6.10-rc1 and shutdown support for pvpanic

2024-05-27 Thread Thomas Weißschuh
. Tsirkin To: Cornelia Huck To: Paolo Bonzini To: Thomas Huth To: Laurent Vivier To: Eric Blake To: Markus Armbruster Cc: qemu-devel@nongnu.org Cc: Alejandro Jimenez Cc: k...@vger.kernel.org Signed-off-by: Thomas Weißschuh Changes in v8: - Import linux headers from v6.10-rc1 (and update series

[PATCH v8 3/8] hw/misc/pvpanic: centralize definition of supported events

2024-05-27 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc

[PATCH] hw: debugexit: use runstate API instead of plain exit()

2024-05-23 Thread Thomas Weißschuh
Directly calling exit() prevents any kind of management or handling. Instead use the corresponding runstate API. The default behavior of the runstate API is the same as exit(). Signed-off-by: Thomas Weißschuh --- hw/misc/debugexit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [PATCH v3 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-03-28 Thread Thomas Weißschuh
Hi Hanna and Kevin, any updates? On Mon, Mar 11, 2024 at 02:29:25PM +0100, Markus Armbruster wrote: > Thomas Weißschuh writes: > > > Only a small subset of all blockdev drivers make sense for firmware > > images. Introduce and use a new enum to represent this. > &g

[PATCH v7 4/7] hw/misc/pvpanic: add support for normal shutdowns

2024-03-23 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic.c | 5

[PATCH v7 2/7] tests/qtest/pvpanic: use centralized definition of supported events

2024-03-23 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4

[PATCH v7 7/7] Revert "docs/specs/pvpanic: mark shutdown event as not implemented"

2024-03-23 Thread Thomas Weißschuh
The missing functionality has been implemented now. This reverts commit e739d1935c461d0668057e9dbba9d06f728d29ec. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst index

[PATCH v7 1/7] hw/misc/pvpanic: centralize definition of supported events

2024-03-23 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc

[PATCH v7 3/7] hw/misc/pvpanic: add local definition for PVPANIC_SHUTDOWN

2024-03-23 Thread Thomas Weißschuh
, where it was added in commit 73279cecca03 ("docs/specs/pvpanic: document shutdown event"). Signed-off-by: Thomas Weißschuh --- include/hw/misc/pvpanic.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index 947468b81b1a..92

[PATCH v7 6/7] tests/qtest/pvpanic: add tests for pvshutdown event

2024-03-23 Thread Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Weißschuh Reviewed-by: Thomas Huth --- tests/qtest/pvpanic-pci-test.c | 39 +++ tests/qtest/pvpanic-test.c | 29 + 2 files

[PATCH v7 0/7] hw/misc/pvpanic: add support for normal shutdowns

2024-03-23 Thread Thomas Weißschuh
the request was voiced to drop move away from a pvpanic uapi header in Linux. [0] https://lore.kernel.org/lkml/20231104-pvpanic-shutdown-v1-1-5ee7c9b3e...@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Changes in v7: - Keep standard-header/pvpanic.h - Predefine PVPANIC_SHUTDOWN in include/hw/misc

[PATCH v7 5/7] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

2024-03-23 Thread Thomas Weißschuh
From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN) that also issue the guest-shutdown cause.

Re: [PATCH] hw/virtio: Add support for VDPA network simulation devices

2024-03-13 Thread Thomas Weißschuh
On 2024-02-21 15:38:02+0800, Hao Chen wrote: > This patch adds support for VDPA network simulation devices. > The device is developed based on virtio-net and tap backend, > and supports hardware live migration function. > > For more details, please refer to "docs/system/devices/vdpa-net.rst" > >

[PATCH] docs/specs/pvpanic: mark shutdown event as not implemented

2024-03-13 Thread Thomas Weißschuh
Mention the fact that this event is not yet implemented to avoid confusion. As requested by Michael. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.rst b/docs/specs/pvpanic.rst index 61a80480edb8

Re: [PATCH v3 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-03-11 Thread Thomas Weißschuh
On Mon, Mar 11, 2024 at 01:08:19PM +0100, Philippe Mathieu-Daudé wrote: > On 11/3/24 12:46, Thomas Weißschuh wrote: > > Only a small subset of all blockdev drivers make sense for firmware > > images. Introduce and use a new enum to represent this. > > > > This

[PATCH v3 3/3] docs: add test for firmware.json QAPI

2024-03-11 Thread Thomas Weißschuh
To make sure that the QAPI description stays valid add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b8...@linaro.org/ Signed-off-by: Thomas Weißschuh --- docs/meson.build | 5 + 1 file changed, 5 insertions

[PATCH v3 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-03-11 Thread Thomas Weißschuh
Only a small subset of all blockdev drivers make sense for firmware images. Introduce and use a new enum to represent this. This also reduces the dependency of firmware.json on the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs/interop

[PATCH v3 0/3] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-11 Thread Thomas Weißschuh
docs/interop/firmware.json is currently not usable with qapi-gen.py due to various non-functional issues. Fix those issue to provide compatibility. Signed-off-by: Thomas Weißschuh --- Changes in v3: - Drop already picked up patches - Drop include of pragma.json - Introduce new enums

[PATCH v3 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture

2024-03-11 Thread Thomas Weißschuh
Only a small subset of all architectures supported by qemu make use of firmware files. Introduce and use a new enum to represent this. This also removes the dependency of firmware.json on the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs

[PATCH] docs/specs/pvpanic: document shutdown event

2024-03-10 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- This patch was split out from my earlier pvpanic-shutdown

Re: [PATCH 3/4] docs/interop/firmware.json: Use full include paths

2024-03-08 Thread Thomas Weißschuh
On Fri, Mar 08, 2024 at 04:19:42PM +0100, Markus Armbruster wrote: > Thomas Weißschuh writes: > > > The included files are part of the toplevel QAPI directory and need to > > be included from there. > > > > Signed-off-by: Thomas Weißschuh > > --- > >

[PATCH v2 0/5] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-07 Thread Thomas Weißschuh
docs/interop/firmware.json is currently not usable with qapi-gen.py due to various non-functional issues. Fix those issue to provide compatibility. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Add review tag from Philippe - Add Fixes tag (Philippe) - Add testcase (Philippe) - Link to v1

[PATCH v2 5/5] docs: add test for firmware.json QAPI

2024-03-07 Thread Thomas Weißschuh
To make sure that the QAPI description stays valid add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b8...@linaro.org/ Signed-off-by: Thomas Weißschuh --- docs/meson.build | 5 + 1 file changed, 5 insertions

[PATCH v2 4/5] docs/interop/firmware.json: Include pragma.json

2024-03-07 Thread Thomas Weißschuh
The files included by firmware.json use names that do not satisfy the generators requirements. By including pragma.json these errors are suppressed. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/interop/firmware.json b

[PATCH v2 3/5] docs/interop/firmware.json: Use full include paths

2024-03-07 Thread Thomas Weißschuh
The included files are part of the toplevel QAPI directory and need to be included from there. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index

[PATCH v2 1/5] docs/interop/firmware.json: Align examples

2024-03-07 Thread Thomas Weißschuh
The QAPI generator now validates the alignment and rejects this file. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 384 ++--- 1 file changed, 192 insertions(+), 192 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop

[PATCH v2 2/5] docs/interop/firmware.json: Fix doc for FirmwareFlashMode

2024-03-07 Thread Thomas Weißschuh
The doc title did not match the actual definition. Fixes: 2720ceda05 ("docs: expand firmware descriptor to allow flash without NVRAM") Signed-off-by: Thomas Weißschuh Reviewed-by: Philippe Mathieu-Daudé --- docs/interop/firmware.json | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 0/4] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-06 Thread Thomas Weißschuh
On Wed, Mar 06, 2024 at 05:15:34PM +0100, Philippe Mathieu-Daudé wrote: > On 6/3/24 11:31, Thomas Weißschuh wrote: > > docs/interop/firmware.json is currently not usable with qapi-gen.py due > > to various non-functional issues. > > Fix those issue to provide compatibility. &

[PATCH 3/4] docs/interop/firmware.json: Use full include paths

2024-03-06 Thread Thomas Weißschuh
The included files are part of the toplevel QAPI directory and need to be included from there. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index

[PATCH 1/4] docs/interop/firmware.json: Align examples

2024-03-06 Thread Thomas Weißschuh
The QAPI generator now validates the alignment and rejects this file. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 384 ++--- 1 file changed, 192 insertions(+), 192 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop

[PATCH 0/4] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-06 Thread Thomas Weißschuh
docs/interop/firmware.json is currently not usable with qapi-gen.py due to various non-functional issues. Fix those issue to provide compatibility. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (4): docs/interop/firmware.json: Align examples docs/interop/firmware.json: Fix doc

[PATCH 4/4] docs/interop/firmware.json: Include pragma.json

2024-03-06 Thread Thomas Weißschuh
The files included by firmware.json use names that do not satisfy the generators requirements. By including pragma.json these errors are suppressed. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/interop/firmware.json b

[PATCH 2/4] docs/interop/firmware.json: Fix doc for FirmwareFlashMode

2024-03-06 Thread Thomas Weißschuh
The doc title did not match the actual definition. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index a024f1b9bf3f..54a1fc6c1041 100644 --- a/docs

Re: [PATCH] net/slirp: Use newer slirp_*_hostxfwd API

2024-02-22 Thread Thomas Weißschuh
Hi Nicholas, On Tue, Mar 22, 2022 at 06:58:36PM -0700, Nicholas Ngai wrote: > Pinging this. It’s a bit old, though the patch still applies cleanly to > master as far as I can tell. > > Link to patchew is > https://patchew.org/QEMU/20210925214820.18078-1-nicho...@ngai.me/. > > I’d love to get

[PATCH v6 1/6] linux-headers: drop pvpanic.h

2024-02-08 Thread Thomas Weißschuh
-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c| 1 - hw/misc/pvpanic-pci.c| 1 - hw/misc/pvpanic.c| 1 - include/hw/misc/pvpanic.h| 3 +++ include/standard-headers/linux/pvpanic.h | 9 - scripts/update-linux-headers.sh

[PATCH v6 4/6] hw/misc/pvpanic: add support for normal shutdowns

2024-02-08 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst| 2 ++ hw

[PATCH v6 5/6] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

2024-02-08 Thread Thomas Weißschuh
From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN) that also issue the guest-shutdown cause.

[PATCH v6 2/6] hw/misc/pvpanic: centralize definition of supported events

2024-02-08 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 2 +- hw/misc

[PATCH v6 3/6] tests/qtest/pvpanic: use centralized definition of supported events

2024-02-08 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4

[PATCH v6 0/6] hw/misc/pvpanic: add support for normal shutdowns

2024-02-08 Thread Thomas Weißschuh
-by: Thomas Weißschuh --- Changes in v6: - Replace magic constant "4" in tests with PVPANIC_SHUTDOWN - Link to v5: https://lore.kernel.org/r/20240129-pvpanic-shutdown-v5-0-f5a060b87...@t-8ch.de Changes in v5: - Add patch from Alejandro to emit a QMP event. - Update cover letter. - Add tes

[PATCH v6 6/6] tests/qtest/pvpanic: add tests for pvshutdown event

2024-02-08 Thread Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Weißschuh Reviewed-by: Thomas Huth --- tests/qtest/pvpanic-pci-test.c | 39 +++ tests/qtest/pvpanic-test.c | 29 + 2 files

[PATCH v5 1/6] linux-headers: drop pvpanic.h

2024-01-29 Thread Thomas Weißschuh
-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c| 1 - hw/misc/pvpanic-pci.c| 1 - hw/misc/pvpanic.c| 1 - include/hw/misc/pvpanic.h| 3 +++ include/standard-headers/linux/pvpanic.h | 9 - scripts/update-linux-headers.sh

[PATCH v5 3/6] tests/qtest/pvpanic: use centralized definition of supported events

2024-01-29 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4

[PATCH v5 2/6] hw/misc/pvpanic: centralize definition of supported events

2024-01-29 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 2 +- hw/misc

[PATCH v5 4/6] hw/misc/pvpanic: add support for normal shutdowns

2024-01-29 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Acked-by: Cornelia Huck Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst| 2 ++ hw

[PATCH v5 6/6] tests/qtest/pvpanic: add tests for pvshutdown event

2024-01-29 Thread Thomas Weißschuh
Validate that a shutdown via the pvpanic device emits the correct QMP events. Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 39 +++ tests/qtest/pvpanic-test.c | 29 + 2 files changed, 68 insertions

[PATCH v5 5/6] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

2024-01-29 Thread Thomas Weißschuh
From: Alejandro Jimenez Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical SHUTDOWN event will be sent, it will be indistinguishable from a shutdown originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN) that also issue the guest-shutdown cause.

[PATCH v5 0/6] hw/misc/pvpanic: add support for normal shutdowns

2024-01-29 Thread Thomas Weißschuh
-by: Thomas Weißschuh --- Changes in v5: - Add patch from Alejandro to emit a QMP event. - Update cover letter. - Add tests. - Link to v4: https://lore.kernel.org/r/20240107-pvpanic-shutdown-v4-0-81500a7e4...@t-8ch.de Changes in v4: - Rebase on 8.2 master - Resend after tree reopened and holidays

Re: Re: [PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-26 Thread Thomas Weißschuh
Hi Alejandro, On 2024-01-26 13:47:33-0500, Alejandro Jimenez wrote: > On 1/7/24 09:05, Thomas Weißschuh wrote: > > Shutdown requests are normally hardware dependent. > > By extending pvpanic to also handle shutdown requests, guests can > > submit such requests with an

[PATCH v3 0/2] linux-user: two fixes to coredump generation

2024-01-20 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- Changes in v3: - Add braces to if statements - Add Reviewed-by from Richard - Link to v2: https://lore.kernel.org/r/20240107-qemu-user-dumpable-v2-0-54e3bcfc0...@t-8ch.de Changes in v2: - Rebase on 8.2 master - Resend after closed tree and holidays - Link

[PATCH v3 1/2] linux-user/elfload: test return value of getrlimit

2024-01-20 Thread Thomas Weißschuh
Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Reviewed-by: Richard Henderson Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v3 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-20 Thread Thomas Weißschuh
ard Henderson Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index c5968719380a..daf7ef843564 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2,6 +2,7 @@ #include "qemu

Re: Re: [PATCH v2 0/2] linux-user: two fixes to coredump generation

2024-01-09 Thread Thomas Weißschuh
On 2024-01-10 08:33:11+1100, Richard Henderson wrote: > On 1/8/24 01:01, Thomas Weißschuh wrote: > > Signed-off-by: Thomas Weißschuh > > --- > > Changes in v2: > > - Rebase on 8.2 master > > - Resend after closed tree and holidays > > - Link to v1: >

[PATCH v4 3/4] tests/qtest/pvpanic: use centralized definition of supported events

2024-01-07 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests

[PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-07 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst| 2 ++ hw/misc/pvpanic.c

[PATCH v4 2/4] hw/misc/pvpanic: centralize definition of supported events

2024-01-07 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 2 +- hw/misc/pvpanic-pci.c | 2 +- hw/misc/pvpanic.c | 2

[PATCH v4 1/4] linux-headers: drop pvpanic.h

2024-01-07 Thread Thomas Weißschuh
. The kernel prefers to drop the header anyways. Prepare for the removal from the Linux UAPI headers by moving the contents to the existing pvpanic.h header. Link: https://lore.kernel.org/lkml/2023110431-pacemaker-pruning-0e4c@gregkh/ Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c

[PATCH v4 0/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-07 Thread Thomas Weißschuh
-7420ec315...@t-8ch.de/ [1] https://lore.kernel.org/lkml/20231104-pvpanic-shutdown-v1-1-5ee7c9b3e...@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Changes in v4: - Rebase on 8.2 master - Resend after tree reopened and holidays - Link to v3: https://lore.kernel.org/r/20231129-pvpanic-shutdown

[PATCH v2 0/2] linux-user: two fixes to coredump generation

2024-01-07 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- Changes in v2: - Rebase on 8.2 master - Resend after closed tree and holidays - Link to v1: https://lore.kernel.org/r/20231115-qemu-user-dumpable-v1-0-edbe7f0fb...@t-8ch.de --- Thomas Weißschuh (2): linux-user/elfload: test return value of getrlimit

[PATCH v2 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-07 Thread Thomas Weißschuh
A process can opt-out of coredump creation by calling prctl(PR_SET_DUMPABLE, 0). linux-user passes this call from the guest through to the operating system. >From there it can be read back again to avoid creating coredumps from qemu-user itself if the guest chose so. Signed-off-by: Tho

[PATCH v2 1/2] linux-user/elfload: test return value of getrlimit

2024-01-07 Thread Thomas Weißschuh
Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user

[PATCH v3 4/4] hw/misc/pvpanic: add support for normal shutdowns

2023-11-29 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst| 2 ++ hw/misc/pvpanic.c

[PATCH v3 3/4] tests/qtest/pvpanic: use centralized definition of supported events

2023-11-29 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests

[PATCH v3 2/4] hw/misc/pvpanic: centralize definition of supported events

2023-11-29 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 2 +- hw/misc/pvpanic-pci.c | 2 +- hw/misc/pvpanic.c | 2

[PATCH v3 1/4] linux-headers: drop pvpanic.h

2023-11-29 Thread Thomas Weißschuh
. The kernel prefers to drop the header anyways. Prepare for the removal from the Linux UAPI headers by moving the contents to the existing pvpanic.h header. Link: https://lore.kernel.org/lkml/2023110431-pacemaker-pruning-0e4c@gregkh/ Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c

[PATCH v3 0/4] hw/misc/pvpanic: add support for normal shutdowns

2023-11-29 Thread Thomas Weißschuh
-7420ec315...@t-8ch.de/ [1] https://lore.kernel.org/lkml/20231104-pvpanic-shutdown-v1-1-5ee7c9b3e...@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Changes in v3: - Drop from Linux imported pvpanic header as discussed with Cornelia and requested by Greg - Link to v2: https://lore.kernel.org

Re: [PATCH v2 3/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-29 Thread Thomas Weißschuh
On 2023-11-29 14:15:14+0100, Cornelia Huck wrote: > On Wed, Nov 29 2023, Thomas Weißschuh wrote: > > On 2023-11-29 09:23:46+0100, Cornelia Huck wrote: > >> On Tue, Nov 28 2023, Thomas Weißschuh wrote: > >> > diff --git a/include/standard-headers/linux/pvpanic.h >

Re: [PATCH v2 3/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-29 Thread Thomas Weißschuh
On 2023-11-29 09:23:46+0100, Cornelia Huck wrote: > On Tue, Nov 28 2023, Thomas Weißschuh wrote: > > > Shutdown requests are normally hardware dependent. > > By extending pvpanic to also handle shutdown requests, guests can > > submit such requests with an easily implemen

[PATCH v2 3/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-28 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 ++ hw/misc

[PATCH v2 2/3] tests/qtest/pvpanic: use centralized definition of supported events

2023-11-28 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Acked-by: Thomas Huth Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests

[PATCH v2 0/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-28 Thread Thomas Weißschuh
and 2 are general cleanups, that seems useful even without this proposal being implemented. I'll send the corresponding Linux patch to LKML. [0] https://lore.kernel.org/all/984794aa-4af0-4c68-a74e-7420ec315...@t-8ch.de/ Signed-off-by: Thomas Weißschuh --- Changes in v2: - Remove RFC status - Add Ack

[PATCH v2 1/3] hw/misc/pvpanic: centralize definition of supported events

2023-11-28 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc/pvpanic-pci.c | 3 +-- hw/misc/pvpanic.c | 3

[PATCH 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2023-11-15 Thread Thomas Weißschuh
A process can opt-out of coredump creation by calling prctl(PR_SET_DUMPABLE, 0). linux-user passes this call from the guest through to the operating system. >From there it can be read back again to avoid creating coredumps from qemu-user itself if the guest chose so. Signed-off-by: Tho

[PATCH 0/2] linux-user: two fixes to coredump generation

2023-11-15 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): linux-user/elfload: test return value of getrlimit linux-user/elfload: check PR_GET_DUMPABLE before creating coredump linux-user/elfload.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- base-commit

[PATCH 1/2] linux-user/elfload: test return value of getrlimit

2023-11-15 Thread Thomas Weißschuh
Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user

[PATCH RFC 2/3] tests/qtest/pvanic: use centralized definition of supported events

2023-11-04 Thread Thomas Weißschuh
Avoid the necessity to update all tests when new events are added to the device. Signed-off-by: Thomas Weißschuh --- tests/qtest/pvpanic-pci-test.c | 5 +++-- tests/qtest/pvpanic-test.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qtest/pvpanic-pci-test.c

[PATCH RFC 1/3] hw/misc/pvpanic: centralize definition of supported events

2023-11-04 Thread Thomas Weißschuh
The different components of pvpanic duplicate the list of supported events. Move it to the shared header file to minimize changes when new events are added. Signed-off-by: Thomas Weißschuh --- hw/misc/pvpanic-isa.c | 3 +-- hw/misc/pvpanic-pci.c | 3 +-- hw/misc/pvpanic.c | 3

[PATCH RFC 3/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-04 Thread Thomas Weißschuh
Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh --- docs/specs/pvpanic.rst | 2 ++ hw/misc

[PATCH RFC 0/3] hw/misc/pvpanic: add support for normal shutdowns

2023-11-04 Thread Thomas Weißschuh
and 2 are general cleanups, that seems useful even without this proposal being implemented. I'll send the corresponding Linux patch to LKML. [0] https://lore.kernel.org/all/984794aa-4af0-4c68-a74e-7420ec315...@t-8ch.de/ Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (3): hw/misc/pvpanic

[RFC] pvpanic notifications for non-panic reboot events

2023-10-26 Thread Thomas Weißschuh
Hi everybody, the mechanism for a (Linux) guest to signal a regular shutdown event to QEMU seems fairly architecture specific and dependent on kernel configuration. The existing pvpanic protocol [0] could be extended fairly easily to also cover these events. Any thoughts? Thanks, Thomas [0]

[PATCH v2] hw/loongarch: remove global loaderparams variable

2023-10-10 Thread Thomas Weißschuh
Passing the struct around explicitly makes the control-flow more obvious. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Weißschuh --- Changes in v2: - Drop initialize loaderparams variable - Link to v1: https://lore.kernel.org/qemu-devel/20231009210018.249776-1-tho...@t-8ch.de

[PATCH] hw/loongarch: remove global loaderparams variable

2023-10-09 Thread Thomas Weißschuh
Passing the struct around explicitly makes the control-flow more obvious. Signed-off-by: Thomas Weißschuh --- hw/loongarch/virt.c | 50 - 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index

[PATCH] linux-user: report ENOTTY for unknown ioctls

2023-04-26 Thread Thomas Weißschuh
what qemu is trying to express and what userspace is prepared to handle. Signed-off-by: Thomas Weißschuh --- linux-user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 69f740ff98c8..c5955313a063 100644 --- a/linux-user

[PATCH 1/2] linux-user: Add move_mount() syscall

2023-04-24 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- linux-user/syscall.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 69f740ff98c8..95e370130cee 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9139,6 +9139,33

[PATCH 2/2] linux-user: Add open_tree() syscall

2023-04-24 Thread Thomas Weißschuh
Signed-off-by: Thomas Weißschuh --- linux-user/syscall.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 95e370130cee..140bd2c36e0f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9166,6 +9166,32

Re: [PATCH 1/2] tests/tcg/multiarch: Make the system memory test work on big-endian

2023-04-22 Thread Thomas Weißschuh
On 2023-04-22 02:58:07+0200, Ilya Leoshkevich wrote: > Make sure values are stored in memory as little-endian regardless of > the host endianness. > > Signed-off-by: Ilya Leoshkevich > --- > tests/tcg/multiarch/system/memory.c | 24 > 1 file changed, 24 insertions(+) >

[PATCH v2 0/2] linux-user: Fix mincore() with PROT_NONE

2023-04-22 Thread Thomas Weißschuh
The kernel does not require PROT_READ for addresses passed to mincore. v1: https://lore.kernel.org/qemu-devel/20230416195103.607948-1-tho...@t-8ch.de/ v1 -> v2: * Introduce symbolic flag VERIFY_NONE instead of hardcoding "0" Thomas Weißschuh (2): linux-user: Add new flag VERIFY

[PATCH v2 1/2] linux-user: Add new flag VERIFY_NONE

2023-04-22 Thread Thomas Weißschuh
This can be used to validate that an address range is mapped but without being readable or writable. It will be used by an updated implementation of mincore(). Signed-off-by: Thomas Weißschuh --- linux-user/qemu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/qemu.h b/linux

[PATCH v2 2/2] linux-user: Don't require PROT_READ for mincore

2023-04-22 Thread Thomas Weißschuh
/self/exe $ qemu-x86_64 /usr/bin/fincore /proc/self/exe fincore: failed to do mincore: /proc/self/exe: Cannot allocate memory With this patch: $ ./build/qemu-x86_64 /usr/bin/fincore /proc/self/exe RES PAGES SIZE FILE 24K 6 22.1K /proc/self/exe Signed-off-by: Thomas Weißschuh --- linux-user

[PATCH] linux-user: Don't require PROT_READ for mincore

2023-04-16 Thread Thomas Weißschuh
/self/exe $ qemu-x86_64 /usr/bin/fincore /proc/self/exe fincore: failed to do mincore: /proc/self/exe: Cannot allocate memory With this patch: $ ./build/qemu-x86_64 /usr/bin/fincore /proc/self/exe RES PAGES SIZE FILE 24K 6 22.1K /proc/self/exe Signed-off-by: Thomas Weißschuh --- linux-user

[PATCH] firmware: qemu_fw_cfg: make kobj_type structure constant

2023-02-26 Thread Thomas Weißschuh
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh --- drivers/firmware/qemu_fw

[PATCH v2] vmdk: allow specification of tools version

2021-09-13 Thread Thomas Weißschuh
the guest tools installed and indeed the VMware tools also unconditionally add this attribute. (Defaulting to the value "2147483647", as is done in this patch) Signed-off-by: Thomas Weißschuh --- v1: https://lore.kernel.org/qemu-devel/20210908174250.12946-1-thomas.weissschuh@

[PATCH] vmdk: allow specification of tools version

2021-09-08 Thread Thomas Weißschuh
the guest tools installed and indeed the VMware tools also unconditionally add this attribute. (Defaulting to the value "2147483647", as is done in this patch) Signed-off-by: Thomas Weißschuh --- block/vmdk.c | 24 qapi/block-core.json | 2 ++

  1   2   >