[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/25] s390x/ioinst: Rework memory access in SSCH in
From: |
Jens Freimann |
Subject: |
[Qemu-devel] [PATCH 17/25] s390x/ioinst: Rework memory access in SSCH instruction |
Date: |
Thu, 12 Feb 2015 18:09:34 +0100 |
From: Thomas Huth <address@hidden>
Change the handler for SSCH to use the new logical memory
access functions.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
---
target-s390x/ioinst.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/target-s390x/ioinst.c b/target-s390x/ioinst.c
index 1569df6..0ef7a93 100644
--- a/target-s390x/ioinst.c
+++ b/target-s390x/ioinst.c
@@ -210,11 +210,10 @@ void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1,
uint32_t ipb)
{
int cssid, ssid, schid, m;
SubchDev *sch;
- ORB *orig_orb, orb;
+ ORB orig_orb, orb;
uint64_t addr;
int ret = -ENODEV;
int cc;
- hwaddr len = sizeof(*orig_orb);
CPUS390XState *env = &cpu->env;
addr = decode_basedisp_s(env, ipb);
@@ -222,16 +221,14 @@ void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1,
uint32_t ipb)
program_interrupt(env, PGM_SPECIFICATION, 2);
return;
}
- orig_orb = s390_cpu_physical_memory_map(env, addr, &len, 0);
- if (!orig_orb || len != sizeof(*orig_orb)) {
- program_interrupt(env, PGM_ADDRESSING, 2);
- goto out;
+ if (s390_cpu_virt_mem_read(cpu, addr, &orig_orb, sizeof(orb))) {
+ return;
}
- copy_orb_from_guest(&orb, orig_orb);
+ copy_orb_from_guest(&orb, &orig_orb);
if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid) ||
!ioinst_orb_valid(&orb)) {
program_interrupt(env, PGM_OPERAND, 2);
- goto out;
+ return;
}
trace_ioinst_sch_id("ssch", cssid, ssid, schid);
sch = css_find_subch(m, cssid, ssid, schid);
@@ -253,9 +250,6 @@ void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1,
uint32_t ipb)
break;
}
setcc(cpu, cc);
-
-out:
- s390_cpu_physical_memory_unmap(env, orig_orb, len, 0);
}
void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb)
--
2.1.4
- [Qemu-devel] [PATCH 08/25] s390x/mmu: Fix the exception codes for illegal table entries, (continued)
- [Qemu-devel] [PATCH 08/25] s390x/mmu: Fix the exception codes for illegal table entries, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 05/25] s390x/mmu: Skip exceptions properly when translating addresses for debug, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 04/25] s390x/mmu: Check table length and offset fields, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 09/25] s390x/mmu: Add support for read-only regions, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 03/25] s390x/mmu: Fix the handling of the table levels, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 25/25] s390x/helper: Remove s390_cpu_physical_memory_map, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 07/25] s390x/mmu: Fix exception types when checking the ASCEs, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 14/25] s390x/mmu: Add function for accessing guest memory, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 16/25] s390x/ioinst: Rework memory access in MSCH instruction, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 13/25] s390x/kvm: Add function for injecting pgm access exceptions, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 17/25] s390x/ioinst: Rework memory access in SSCH instruction,
Jens Freimann <=
- [Qemu-devel] [PATCH 02/25] s390x/mmu: Fix the check for the real-space designation bit, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 20/25] s390x/ioinst: Rework memory access in TSCH instruction, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 22/25] s390x/ioinst: Rework memory access in CHSC instruction, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 10/25] s390x/mmu: Renaming related to the ASCE confusion, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 06/25] s390x/mmu: Fix translation exception code in lowcore, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 19/25] s390x/ioinst: Set condition code in ioinst_handle_tsch() handler, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 21/25] s390x/ioinst: Rework memory access in STCRW instruction, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 23/25] s390x/ioinst: Rework memory access in TPI instruction, Jens Freimann, 2015/02/12
- [Qemu-devel] [PATCH 01/25] s390x/mmu: Move mmu_translate() and friends to separate file, Jens Freimann, 2015/02/12