[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/26] s390/ioinst: fix endianness in ioinst_schib_va
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 02/26] s390/ioinst: fix endianness in ioinst_schib_valid |
Date: |
Wed, 17 Jun 2015 12:42:45 +0200 |
The ioinst_schib_valid gets a SCHIB in guest endianness, we should
byteswap the fields we access.
Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-s390x/ioinst.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-s390x/ioinst.c b/target-s390x/ioinst.c
index e220cea..77f2a1f 100644
--- a/target-s390x/ioinst.c
+++ b/target-s390x/ioinst.c
@@ -129,12 +129,12 @@ void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1)
static int ioinst_schib_valid(SCHIB *schib)
{
- if ((schib->pmcw.flags & PMCW_FLAGS_MASK_INVALID) ||
- (schib->pmcw.chars & PMCW_CHARS_MASK_INVALID)) {
+ if ((be16_to_cpu(schib->pmcw.flags) & PMCW_FLAGS_MASK_INVALID) ||
+ (be32_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_INVALID)) {
return 0;
}
/* Disallow extended measurements for now. */
- if (schib->pmcw.chars & PMCW_CHARS_MASK_XMWME) {
+ if (be32_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_XMWME) {
return 0;
}
return 1;
--
1.7.12.4
- [Qemu-devel] [PULL 01/26] s390/ioinst: fix IO_INT_WORD_ISC macro, (continued)
- [Qemu-devel] [PULL 01/26] s390/ioinst: fix IO_INT_WORD_ISC macro, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 12/26] target-s390x: function to adjust the length wrt page boundary, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 16/26] target-s390x: add get_per_atmid function, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 11/26] softmmu: provide tlb_vaddr_to_host function for user mode, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 26/26] s390x: Switch to s390-ccw machine as default, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 23/26] target-s390x: PER store-using-real-address event support, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 07/26] target-s390x: fix s390_cpu_initial_reset, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 20/26] target-s390x: PER instruction-fetch event support, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 13/26] target-s390x: mvc_fast_memset: access memory through softmmu, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 08/26] target-s390x: wire up DIAG IPL in TCG mode, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 02/26] s390/ioinst: fix endianness in ioinst_schib_valid,
Alexander Graf <=
- [Qemu-devel] [PULL 18/26] target-s390x: basic PER event handling, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 10/26] target-s390x: wire up I/O instructions in TCG mode, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 21/26] translate-all: fix watchpoints if retranslation not possible, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 14/26] target-s390x: mvc_fast_memmove: access memory through softmmu, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 22/26] target-s390x: PER storage-alteration event support, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 25/26] target-s390x: PER: add Breaking-Event-Address register, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 19/26] target-s390x: PER successful-branching event support, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 24/26] target-s390x: PER instruction-fetch nullification event support, Alexander Graf, 2015/06/17
- [Qemu-devel] [PULL 17/26] target-s390x: add get_per_in_range function, Alexander Graf, 2015/06/17
- Re: [Qemu-devel] [PULL 00/26] s390 patch queue 2015-06-17, Christian Borntraeger, 2015/06/17