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