Since commit 166f1bb7968 ("s390x/ioinst: Rework memory access
in CHSC instruction") the access is no more tied to the page
size. Define CHSC_MAX_REQ_LEN to better express the relation
with the length of the Channel Subsystem Call request.Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/s390x/ioinst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 2320dd4c122..d07773d14a3 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -398,6 +398,7 @@ typedef struct ChscResp { char data[]; } QEMU_PACKED ChscResp; +#define CHSC_MAX_REQ_LEN 0x1000 #define CHSC_MIN_RESP_LEN 0x0008 #define CHSC_SCPD 0x0002 @@ -660,7 +661,7 @@ void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb, uintptr_t ra) uint16_t len; uint16_t command; CPUS390XState *env = &cpu->env; - uint8_t buf[TARGET_PAGE_SIZE]; + uint8_t buf[CHSC_MAX_REQ_LEN]; trace_ioinst("chsc"); reg = (ipb >> 20) & 0x00f; @@ -690,7 +691,7 @@ void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb, uintptr_t ra) s390_program_interrupt(env, PGM_OPERAND, ra); return; } - memset((char *)req + len, 0, TARGET_PAGE_SIZE - len); + memset((char *)req + len, 0, CHSC_MAX_REQ_LEN - len); res = (void *)((char *)req + len); command = be16_to_cpu(req->command); trace_ioinst_chsc_cmd(command, len); -- 2.52.0
