aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/s390-arch.h
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@linux.ibm.com>2019-04-04 10:34:34 -0400
committerThomas Huth <thuth@redhat.com>2019-04-12 12:40:35 +0200
commitefa47d36da89f4b23c315a7cc085fab0d15eb47c (patch)
tree69bee6340357bcd7b5684970a232bb786032e94f /pc-bios/s390-ccw/s390-arch.h
parent69333c36dc85b84b021766747cffc2b53df93ae8 (diff)
s390-bios: Support booting from real dasd device
Allows guest to boot from a vfio configured real dasd device. Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <1554388475-18329-16-git-send-email-jjherne@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/s390-arch.h')
-rw-r--r--pc-bios/s390-ccw/s390-arch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/s390-arch.h b/pc-bios/s390-ccw/s390-arch.h
index 5e92c7a27d..504fc7c2f0 100644
--- a/pc-bios/s390-ccw/s390-arch.h
+++ b/pc-bios/s390-ccw/s390-arch.h
@@ -87,4 +87,17 @@ typedef struct LowCore {
extern LowCore const *lowcore;
+static inline void set_prefix(uint32_t address)
+{
+ asm volatile("spx %0" : : "m" (address) : "memory");
+}
+
+static inline uint32_t store_prefix(void)
+{
+ uint32_t address;
+
+ asm volatile("stpx %0" : "=m" (address));
+ return address;
+}
+
#endif