|
|
383d26 |
From 098630a1298aa56f6dfffaeecbddf2d0f39c55a8 Mon Sep 17 00:00:00 2001
|
|
|
383d26 |
From: Thomas Huth <thuth@redhat.com>
|
|
|
383d26 |
Date: Mon, 7 May 2018 07:58:03 +0200
|
|
|
383d26 |
Subject: [PATCH 07/13] s390-ccw: force diag 308 subcode to unsigned long
|
|
|
383d26 |
|
|
|
383d26 |
RH-Author: Thomas Huth <thuth@redhat.com>
|
|
|
383d26 |
Message-id: <1525679888-9234-2-git-send-email-thuth@redhat.com>
|
|
|
383d26 |
Patchwork-id: 80049
|
|
|
383d26 |
O-Subject: [RHEL-7.6 qemu-kvm-ma PATCH 1/6] s390-ccw: force diag 308 subcode to unsigned long
|
|
|
383d26 |
Bugzilla: 1523857
|
|
|
383d26 |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
From: Cornelia Huck <cohuck@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
We currently pass an integer as the subcode parameter. However,
|
|
|
383d26 |
the upper bits of the register containing the subcode need to
|
|
|
383d26 |
be 0, which is not guaranteed unless we explicitly specify the
|
|
|
383d26 |
subcode to be an unsigned long value.
|
|
|
383d26 |
|
|
|
383d26 |
Fixes: d046c51dad3 ("pc-bios/s390-ccw: Get device address via diag 308/6")
|
|
|
383d26 |
Cc: qemu-stable@nongnu.org
|
|
|
383d26 |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
383d26 |
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
|
|
383d26 |
Tested-by: Thomas Huth <thuth@redhat.com>
|
|
|
383d26 |
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
383d26 |
(cherry picked from commit 63d8b5ace31c1e1f3996fe4cd551d6d377594d5a)
|
|
|
383d26 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
---
|
|
|
383d26 |
pc-bios/s390-ccw/iplb.h | 3 ++-
|
|
|
383d26 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
383d26 |
|
|
|
383d26 |
diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.h
|
|
|
383d26 |
index 5357a36..ded20c8 100644
|
|
|
383d26 |
--- a/pc-bios/s390-ccw/iplb.h
|
|
|
383d26 |
+++ b/pc-bios/s390-ccw/iplb.h
|
|
|
383d26 |
@@ -101,10 +101,11 @@ static inline bool manage_iplb(IplParameterBlock *iplb, bool store)
|
|
|
383d26 |
{
|
|
|
383d26 |
register unsigned long addr asm("0") = (unsigned long) iplb;
|
|
|
383d26 |
register unsigned long rc asm("1") = 0;
|
|
|
383d26 |
+ unsigned long subcode = store ? 6 : 5;
|
|
|
383d26 |
|
|
|
383d26 |
asm volatile ("diag %0,%2,0x308\n"
|
|
|
383d26 |
: "+d" (addr), "+d" (rc)
|
|
|
383d26 |
- : "d" (store ? 6 : 5)
|
|
|
383d26 |
+ : "d" (subcode)
|
|
|
383d26 |
: "memory", "cc");
|
|
|
383d26 |
return rc == 0x01;
|
|
|
383d26 |
}
|
|
|
383d26 |
--
|
|
|
383d26 |
1.8.3.1
|
|
|
383d26 |
|