Skip to contentSkip to conversation

s390 patch queue 2017-04-25

GIT PULL Applied Alexander Graf 2 participants 4 messages Apr 25, 2017

lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

[Qemu-devel] [PULL 1/2] target-s390x: Mask the SIGP order_code to 8bit.

From: Philipp Kern <[email protected]>

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".

[agraf: add comment according to email]
---
 target/s390x/misc_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
target/s390x/misc_helper.c +2 -1
index 93b0e61..83d3894 100644
@@ -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;
Signature · 1 line
1.8.5.6
#2 lore raw

[Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL

In reply to Alexander Graf

From: Aurelien Jarno <[email protected]>

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

Fixes 278f5e98c647 ("s390x/misc_helper.c: wrap IO instructions in BQL")
---
 target/s390x/misc_helper.c | 2 ++
 1 file changed, 2 insertions(+)
target/s390x/misc_helper.c +2 -0
index 83d3894..eca8244 100644
@@ -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 */
Signature · 1 line
1.8.5.6
#3 lore raw
In reply to Alexander Graf
Quoted 20 lines · Alexander Graf

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)

Quoted 8 lines

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