[PATCH][RFC] target/hppa: Avoid nullification for uaddcmt instruction

2024-03-23 Thread Helge Deller
The uaddcmt (UNIT ADD COMPLEMENT AND TRAP ON CONDITION) instruction triggers a trap if the condition is true, and stores the result of the addition in the target register otherwise. It does not use the condition to nullify the following instruction, so drop the calculated condition and do not

Re: [PATCH v2 7/7] target/hppa: Fix EIRR, EIEM versus icount

2024-03-23 Thread Helge Deller
On 3/23/24 18:29, Richard Henderson wrote: Call translator_io_start before write to EIRR. Move evaluation of EIRR vs EIEM to hppa_cpu_exec_interrupt. Exit TB after write to EIEM, but otherwise use a straight store. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Tested-by: Helge

Re: [PATCH v2 5/7] target/hppa: Mark interval timer write as io

2024-03-23 Thread Helge Deller
On 3/23/24 18:29, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Tested-by: Helge Deller Thanks! Helge --- target/hppa/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index

Re: [PATCH v2 6/7] target/hppa: Tidy read of interval timer

2024-03-23 Thread Helge Deller
On 3/23/24 18:29, Richard Henderson wrote: The call to gen_helper_read_interval_timer is identical on both sides of the IF. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Tested-by: Helge Deller Thanks! Helge --- target/hppa/translate.c | 4 +--- 1 file changed, 1

Re: [PATCH v2 1/7] target/hppa: Fix BE,L set of sr0

2024-03-23 Thread Helge Deller
On 3/23/24 18:29, Richard Henderson wrote: The return address comes from IA*Q_Next, and IASQ_Next is always equal to IASQ_Back, not IASQ_Front. Signed-off-by: Richard Henderson Tested-by: Helge Deller --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH-for-9.1 18/21] target/xtensa: Extract MMU API to new mmu.c/mmu.h files

2024-03-23 Thread Max Filippov
On Thu, Mar 21, 2024 at 8:50 AM Philippe Mathieu-Daudé wrote: > > Extract the MMU API and expose it via "mmu.h" so we can > reuse the methods in target/xtensa/ files. The MMU/MPU are replaceable configuration blocks in the xtensa architecture, their internals don't have architecture-wide

[PATCH v2 5/7] target/hppa: Mark interval timer write as io

2024-03-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index ceb739c54a..8c1a564c5d 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2162,6 +2162,9 @@ static bool

[PATCH v2 2/7] target/hppa: Fix B,GATE for wide mode

2024-03-23 Thread Richard Henderson
Do not clobber the high bits of the address by using a 32-bit deposit. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c

[PATCH v2 1/7] target/hppa: Fix BE,L set of sr0

2024-03-23 Thread Richard Henderson
The return address comes from IA*Q_Next, and IASQ_Next is always equal to IASQ_Back, not IASQ_Front. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index

[PATCH v2 4/7] target/hppa: Fix ADD/SUB trap on overflow for narrow mode

2024-03-23 Thread Richard Henderson
From: Sven Schnelle Fixes: c53e401ed9ff ("target/hppa: Remove TARGET_REGISTER_BITS") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240321184228.611897-2-sv...@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 6 ++ 1 file changed,

[PATCH v2 3/7] target/hppa: Handle unit conditions for wide mode

2024-03-23 Thread Richard Henderson
From: Sven Schnelle Wide mode provides two more conditions, add them. Fixes: 59963d8fdf42 ("target/hppa: Pass d to do_unit_cond") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240321184228.611897-1-sv...@stackframe.org> Signed-off-by: Richard Henderson ---

[PATCH v2 7/7] target/hppa: Fix EIRR, EIEM versus icount

2024-03-23 Thread Richard Henderson
Call translator_io_start before write to EIRR. Move evaluation of EIRR vs EIEM to hppa_cpu_exec_interrupt. Exit TB after write to EIEM, but otherwise use a straight store. Signed-off-by: Richard Henderson --- target/hppa/helper.h | 1 - target/hppa/int_helper.c | 14 --

[PATCH for-9.0 v2 0/7] target/hppa: more small fixes

2024-03-23 Thread Richard Henderson
Two new fixes for -icount assertion failures wrt not setting can_do_io properly. With these I can boot Linux with -icount shift=auto enabled. r~ Richard Henderson (5): target/hppa: Fix BE,L set of sr0 target/hppa: Fix B,GATE for wide mode target/hppa: Mark interval timer write as io

[PATCH v2 6/7] target/hppa: Tidy read of interval timer

2024-03-23 Thread Richard Henderson
The call to gen_helper_read_interval_timer is identical on both sides of the IF. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8c1a564c5d..5b8c1b06c3

Re: [PATCH-for-9.1 08/21] target/microblaze: Prefix MMU API with 'mb_'

2024-03-23 Thread Edgar E. Iglesias
On Thu, Mar 21, 2024 at 4:49 PM Philippe Mathieu-Daudé wrote: > MicroBlaze MMU API is exposed in "mmu.h". In order to avoid > name clashing with other targets, prefix the API with 'mb_'. > Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Philippe Mathieu-Daudé > --- >

[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 +--

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

2024-03-23 Thread Thomas Weißschuh
PVPANIC_* defines are imported from the kernel via standard-header/pvpanic.h. For that the kernel needs to pick up the changes from qemu docs/specs/pvpanic.rst which takes time. The actual value of the define is known as the authoritative source comes from the qemu tree in docs/specs/pvpanic.rst,

[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
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. The background is the usage of minimal Linux kernels with different architectures for testing

[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 1/3] ui/cocoa: Fix aspect ratio

2024-03-23 Thread Akihiko Odaki
On 2024/03/22 21:55, Peter Maydell wrote: On Fri, 22 Mar 2024 at 12:25, Akihiko Odaki wrote: On 2024/03/22 21:22, Peter Maydell wrote: On Mon, 18 Mar 2024 at 07:53, Akihiko Odaki wrote: [NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will

[PATCH v2 3/3] ui/cocoa: Use NSTrackingInVisibleRect

2024-03-23 Thread Akihiko Odaki
I observed [NSTrackingArea rect] becomes de-synchronized with the view frame with some unknown condition, and fails to track mouse movement on some area of the view. Specify NSTrackingInVisibleRect option to let Cocoa automatically update NSTrackingArea, which also saves code for synchronization.

[PATCH v2 0/3] Fixes for "ui/cocoa: Let the platform toggle fullscreen"

2024-03-23 Thread Akihiko Odaki
This series contains patches for regressions caused by commit 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen"). Signed-off-by: Akihiko Odaki --- Changes in v2: - Added a comment to [QemuCocoaView fixAspectRatio:]. (Peter Maydell) - Renamed [QemuCocoaView fixAspectRatio:] parameter

[PATCH v2 2/3] ui/cocoa: Resize window after toggling zoom-to-fit

2024-03-23 Thread Akihiko Odaki
Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- ui/cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index

[PATCH v2 1/3] ui/cocoa: Fix aspect ratio

2024-03-23 Thread Akihiko Odaki
[NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will persist if nothing resizes the window. Call [NSWindow setContentSize:] in such a case. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki ---