qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25
@ 2017-04-25 11:42 Alexander Graf
  2017-04-25 11:44 ` [Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Graf @ 2017-04-25 11:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell

Hi Peter,

This is my current patch queue for s390.  Please pull.

Alex


The following changes since commit f4b5b021c847669b1c78050aea26fe9abceef6dd:

  Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-04-25 09:21:54 +0100)

are available in the git repository at:


  git://github.com/agraf/qemu.git tags/signed-s390-for-upstream

for you to fetch changes up to 2cf9953beebd194a432ebd567399807d9b1f6a4d:

  s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL (2017-04-25 13:39:43 +0200)

----------------------------------------------------------------
Patch queue for s390 - 2017-04-25

Two simple fixes this time around:

  - fix BQL for s390 virtio target
  - Fix SIGP emulation

----------------------------------------------------------------
Aurelien Jarno (1):
      s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL

Philipp Kern (1):
      target-s390x: Mask the SIGP order_code to 8bit.

 target/s390x/misc_helper.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit.
  2017-04-25 11:42 [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Alexander Graf
@ 2017-04-25 11:44 ` Alexander Graf
  2017-04-25 11:44 ` [Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL Alexander Graf
  2017-04-25 14:26 ` [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2017-04-25 11:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Philipp Kern

From: Philipp Kern <phil@philkern.de>

According to "CPU Signaling and Response", "Signal-Processor Orders",
the order field is bit position 56-63. Without this, the Linux
guest kernel is sometimes unable to stop emulation and enters
an infinite loop of "XXX unknown sigp: 0xffffffff00000005".

Signed-off-by: Philipp Kern <phil@philkern.de>
Reviewed-by: Thomas Huth <thuth@tuxfamily.org>
[agraf: add comment according to email]
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target/s390x/misc_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 93b0e61..83d3894 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -515,7 +515,8 @@ uint32_t HELPER(sigp)(CPUS390XState *env, uint64_t order_code, uint32_t r1,
     /* Remember: Use "R1 or R1 + 1, whichever is the odd-numbered register"
        as parameter (input). Status (output) is always R1. */
 
-    switch (order_code) {
+    /* sigp contains the order code in bit positions 56-63, mask it here. */
+    switch (order_code & 0xff) {
     case SIGP_SET_ARCH:
         /* switch arch */
         break;
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL
  2017-04-25 11:42 [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Alexander Graf
  2017-04-25 11:44 ` [Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit Alexander Graf
@ 2017-04-25 11:44 ` Alexander Graf
  2017-04-25 14:26 ` [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2017-04-25 11:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Aurelien Jarno

From: Aurelien Jarno <aurelien@aurel32.net>

s390_virtio_hypercall can trigger IO events and interrupts, most notably
when using virtio-ccw devices.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Fixes: 278f5e98c647 ("s390x/misc_helper.c: wrap IO instructions in BQL")
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target/s390x/misc_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 83d3894..eca8244 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -288,7 +288,9 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
     switch (num) {
     case 0x500:
         /* KVM hypercall */
+        qemu_mutex_lock_iothread();
         r = s390_virtio_hypercall(env);
+        qemu_mutex_unlock_iothread();
         break;
     case 0x44:
         /* yield */
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25
  2017-04-25 11:42 [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Alexander Graf
  2017-04-25 11:44 ` [Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit Alexander Graf
  2017-04-25 11:44 ` [Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL Alexander Graf
@ 2017-04-25 14:26 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-04-25 14:26 UTC (permalink / raw)
  To: Alexander Graf; +Cc: QEMU Developers

On 25 April 2017 at 12:42, Alexander Graf <agraf@suse.de> wrote:
> Hi Peter,
>
> This is my current patch queue for s390.  Please pull.
>
> Alex
>
>
> The following changes since commit f4b5b021c847669b1c78050aea26fe9abceef6dd:
>
>   Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-04-25 09:21:54 +0100)
>
> are available in the git repository at:
>
>
>   git://github.com/agraf/qemu.git tags/signed-s390-for-upstream
>
> for you to fetch changes up to 2cf9953beebd194a432ebd567399807d9b1f6a4d:
>
>   s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL (2017-04-25 13:39:43 +0200)
>
> ----------------------------------------------------------------
> Patch queue for s390 - 2017-04-25
>
> Two simple fixes this time around:
>
>   - fix BQL for s390 virtio target
>   - Fix SIGP emulation
>
Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-25 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25 11:42 [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Alexander Graf
2017-04-25 11:44 ` [Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit Alexander Graf
2017-04-25 11:44 ` [Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL Alexander Graf
2017-04-25 14:26 ` [Qemu-devel] [PULL 0/2] s390 patch queue 2017-04-25 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).