From patchwork Thu May 19 12:12:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9127527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 908646077B for ; Thu, 19 May 2016 13:02:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71C6B281EC for ; Thu, 19 May 2016 12:26:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66B18281EF; Thu, 19 May 2016 12:26:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 57D60281EC for ; Thu, 19 May 2016 12:26:40 +0000 (UTC) Received: from localhost ([::1]:50076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3N2F-0005hU-Hz for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 May 2016 08:26:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Moq-0003Ny-QU for qemu-devel@nongnu.org; Thu, 19 May 2016 08:12:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3Moh-0001Mv-L3 for qemu-devel@nongnu.org; Thu, 19 May 2016 08:12:48 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:35437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Moh-0001MM-8z for qemu-devel@nongnu.org; Thu, 19 May 2016 08:12:39 -0400 Received: by mail-wm0-x242.google.com with SMTP id s63so5921678wme.2 for ; Thu, 19 May 2016 05:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=xSKnyg0D+7jLRKPyCxRbW3nYQPE/MBpjVJghpEn6Lew=; b=AoVBsf8RwbUqvpVTaIHugWtjQVDuh8xowfSlQfNq7pGy2lR70Zzkfpv6DZ/pHhxBKP LEHbX4oE6j72WFtYo1qsv5SISYBo+/mxqgXL/cT6u8afqPQC1yJmV9YpL18bfg8JxqS2 6FMdiv1aSVq1U7Y1pxYVvzPxLfxfJcPhcaWbck6xzMSqLR54Kx9S/msAxtqphvR/Qd2t PWQCtIJRgEHceblBafhYPXVgEvWzBFojmt32ENWPPTp9J0jPXelil9sQDGKKw4x8YvYj RnF1nVdgXzOJ0vHx8zOhMec8QZi5RF/7Yb2i7uzS1ZrBhahaaUKOWvCqZrxITFG0ZB0x OeCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=xSKnyg0D+7jLRKPyCxRbW3nYQPE/MBpjVJghpEn6Lew=; b=mcJtJoFHMXmdEssjYV/S0VP01NY0ngncNaa5rFDJNDut1AcI63Hp7TEaedeXZI8srW uT7IizKNcH6xXnZoNcMTscutYZtg/Ros1EMBVpxQ8OpchgeC3LVozNx+NwaVu8yEYbx9 Ff3/4oWxTIA1uT4nSZtSIEVK+V9vrQyGhV4yHljuBcRCFASmzSZaRtUPXR5xuZO/LOlm iBCBMws9urn1CZJR8GNmVX3yBgYi75p0NEEm05Z/ixXZSumgC714yYMAq21+JcDmIiEz tS3vD/NVbpAA0c2/e2ufstMImwjsXwWX9BEVCVrM0Cpa6qHTa5SWh5o4QuWiaQ42RMfW /HSg== X-Gm-Message-State: AOPr4FWJYiUUlPR7UVV5fxeVaSM9xeS61X2lvptrbvocoSy7hVobNAD6bYdtz1WFlntoPw== X-Received: by 10.194.205.134 with SMTP id lg6mr13032495wjc.153.1463659958634; Thu, 19 May 2016 05:12:38 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id o8sm9582534wjs.19.2016.05.19.05.12.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 05:12:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 14:12:33 +0200 Message-Id: <1463659953-56256-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1463659953-56256-1-git-send-email-pbonzini@redhat.com> References: <1463659953-56256-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL v2 43/52] s390x: reorganize CSS bits between cpu.h and other headers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Move cpu_inject_* to the only C file where they are used. Move ioinst.h declarations that need S390CPU to cpu.h, to make ioinst.h independent of cpu.h. Move channel declarations that only need SubchDev from cpu.h to css.h, to make more channel users independent of cpu.h. Acked-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- hw/s390x/css.c | 4 +- hw/s390x/s390-skeys.c | 1 + hw/s390x/s390-virtio-ccw.c | 4 +- hw/s390x/virtio-ccw.c | 5 +- hw/s390x/virtio-ccw.h | 3 +- {hw => include/hw}/s390x/css.h | 31 +++++++- {target-s390x => include/hw/s390x}/ioinst.h | 16 +--- target-s390x/cpu.h | 113 +++++----------------------- target-s390x/helper.c | 1 + target-s390x/interrupt.c | 66 +++++++++++++++- target-s390x/ioinst.c | 2 +- 11 files changed, 128 insertions(+), 118 deletions(-) rename {hw => include/hw}/s390x/css.h (76%) rename {target-s390x => include/hw/s390x}/ioinst.h (87%) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 3a1d919..1675a19 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -14,8 +14,8 @@ #include "qemu/bitops.h" #include "exec/address-spaces.h" #include "cpu.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "trace.h" #include "hw/s390x/s390_flic.h" diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 6528ffe..d772cfc 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -15,6 +15,7 @@ #include "migration/qemu-file.h" #include "hw/s390x/storage-keys.h" #include "qemu/error-report.h" +#include "sysemu/kvm.h" #define S390_SKEYS_BUFFER_SIZE 131072 /* Room for 128k storage keys */ #define S390_SKEYS_SAVE_FLAG_EOS 0x01 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 4456fce..18bbbfb 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -18,8 +18,8 @@ #include "s390-virtio.h" #include "hw/s390x/sclp.h" #include "hw/s390x/s390_flic.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "virtio-ccw.h" #include "qemu/config-file.h" #include "s390-pci-bus.h" diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index d51642d..a1c1ed9 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -16,6 +16,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "sysemu/sysemu.h" +#include "sysemu/kvm.h" #include "net/net.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-serial.h" @@ -28,8 +29,8 @@ #include "hw/s390x/adapter.h" #include "hw/s390x/s390_flic.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "virtio-ccw.h" #include "trace.h" diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 66c831b..86b9edb 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -24,7 +24,8 @@ #include #include -#include "css.h" +#include +#include #define VIRTUAL_CSSID 0xfe diff --git a/hw/s390x/css.h b/include/hw/s390x/css.h similarity index 76% rename from hw/s390x/css.h rename to include/hw/s390x/css.h index a320eea..98b2e2c 100644 --- a/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -14,7 +14,7 @@ #include "hw/s390x/adapter.h" #include "hw/s390x/s390_flic.h" -#include "ioinst.h" +#include "hw/s390x/ioinst.h" /* Channel subsystem constants. */ #define MAX_SCHID 65535 @@ -67,6 +67,7 @@ typedef struct CMBE { uint32_t reserved[7]; } QEMU_PACKED CMBE; +typedef struct SubchDev SubchDev; struct SubchDev { /* channel-subsystem related things: */ uint8_t cssid; @@ -123,4 +124,32 @@ void css_adapter_interrupt(uint8_t isc); #define CSS_IO_ADAPTER_VIRTIO 1 int css_register_io_adapter(uint8_t type, uint8_t isc, bool swap, bool maskable, uint32_t *id); + +#ifndef CONFIG_USER_ONLY +SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid, + uint16_t schid); +bool css_subch_visible(SubchDev *sch); +void css_conditional_io_interrupt(SubchDev *sch); +int css_do_stsch(SubchDev *sch, SCHIB *schib); +bool css_schid_final(int m, uint8_t cssid, uint8_t ssid, uint16_t schid); +int css_do_msch(SubchDev *sch, const SCHIB *schib); +int css_do_xsch(SubchDev *sch); +int css_do_csch(SubchDev *sch); +int css_do_hsch(SubchDev *sch); +int css_do_ssch(SubchDev *sch, ORB *orb); +int css_do_tsch_get_irb(SubchDev *sch, IRB *irb, int *irb_len); +void css_do_tsch_update_subch(SubchDev *sch); +int css_do_stcrw(CRW *crw); +void css_undo_stcrw(CRW *crw); +int css_do_tpi(IOIntCode *int_code, int lowcore); +int css_collect_chp_desc(int m, uint8_t cssid, uint8_t f_chpid, uint8_t l_chpid, + int rfmt, void *buf); +void css_do_schm(uint8_t mbk, int update, int dct, uint64_t mbo); +int css_enable_mcsse(void); +int css_enable_mss(void); +int css_do_rsch(SubchDev *sch); +int css_do_rchp(uint8_t cssid, uint8_t chpid); +bool css_present(uint8_t cssid); +#endif + #endif diff --git a/target-s390x/ioinst.h b/include/hw/s390x/ioinst.h similarity index 87% rename from target-s390x/ioinst.h rename to include/hw/s390x/ioinst.h index 013cc91..12d44c8 100644 --- a/target-s390x/ioinst.h +++ b/include/hw/s390x/ioinst.h @@ -11,6 +11,7 @@ #ifndef IOINST_S390X_H #define IOINST_S390X_H + /* * Channel I/O related definitions, as defined in the Principles * Of Operation (and taken from the Linux implementation). @@ -227,20 +228,5 @@ typedef struct IOIntCode { int ioinst_disassemble_sch_ident(uint32_t value, int *m, int *cssid, int *ssid, int *schid); -void ioinst_handle_xsch(S390CPU *cpu, uint64_t reg1); -void ioinst_handle_csch(S390CPU *cpu, uint64_t reg1); -void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1); -void ioinst_handle_msch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); -void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); -void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb); -void ioinst_handle_stsch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); -int ioinst_handle_tsch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); -void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb); -int ioinst_handle_tpi(S390CPU *cpu, uint32_t ipb); -void ioinst_handle_schm(S390CPU *cpu, uint64_t reg1, uint64_t reg2, - uint32_t ipb); -void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1); -void ioinst_handle_rchp(S390CPU *cpu, uint64_t reg1); -void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1); #endif diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index c99b7d0..15fb6db 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -473,8 +473,6 @@ int cpu_s390x_signal_handler(int host_signum, void *pinfo, int s390_cpu_handle_mmu_fault(CPUState *cpu, vaddr address, int rw, int mmu_idx); -#include "ioinst.h" - #ifndef CONFIG_USER_ONLY void do_restart_interrupt(CPUS390XState *env); @@ -585,6 +583,26 @@ static inline uint8_t s390_cpu_get_state(S390CPU *cpu) void gtod_save(QEMUFile *f, void *opaque); int gtod_load(QEMUFile *f, void *opaque, int version_id); +void cpu_inject_ext(S390CPU *cpu, uint32_t code, uint32_t param, + uint64_t param64); + +/* ioinst.c */ +void ioinst_handle_xsch(S390CPU *cpu, uint64_t reg1); +void ioinst_handle_csch(S390CPU *cpu, uint64_t reg1); +void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1); +void ioinst_handle_msch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); +void ioinst_handle_ssch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); +void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb); +void ioinst_handle_stsch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); +int ioinst_handle_tsch(S390CPU *cpu, uint64_t reg1, uint32_t ipb); +void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb); +int ioinst_handle_tpi(S390CPU *cpu, uint32_t ipb); +void ioinst_handle_schm(S390CPU *cpu, uint64_t reg1, uint64_t reg2, + uint32_t ipb); +void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1); +void ioinst_handle_rchp(S390CPU *cpu, uint64_t reg1); +void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1); + /* service interrupts are floating therefore we must not pass an cpustate */ void s390_sclp_extint(uint32_t parm); @@ -606,35 +624,7 @@ static inline unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu) void cpu_lock(void); void cpu_unlock(void); -typedef struct SubchDev SubchDev; - -#ifndef CONFIG_USER_ONLY extern void subsystem_reset(void); -SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid, - uint16_t schid); -bool css_subch_visible(SubchDev *sch); -void css_conditional_io_interrupt(SubchDev *sch); -int css_do_stsch(SubchDev *sch, SCHIB *schib); -bool css_schid_final(int m, uint8_t cssid, uint8_t ssid, uint16_t schid); -int css_do_msch(SubchDev *sch, const SCHIB *schib); -int css_do_xsch(SubchDev *sch); -int css_do_csch(SubchDev *sch); -int css_do_hsch(SubchDev *sch); -int css_do_ssch(SubchDev *sch, ORB *orb); -int css_do_tsch_get_irb(SubchDev *sch, IRB *irb, int *irb_len); -void css_do_tsch_update_subch(SubchDev *sch); -int css_do_stcrw(CRW *crw); -void css_undo_stcrw(CRW *crw); -int css_do_tpi(IOIntCode *int_code, int lowcore); -int css_collect_chp_desc(int m, uint8_t cssid, uint8_t f_chpid, uint8_t l_chpid, - int rfmt, void *buf); -void css_do_schm(uint8_t mbk, int update, int dct, uint64_t mbo); -int css_enable_mcsse(void); -int css_enable_mss(void); -int css_do_rsch(SubchDev *sch); -int css_do_rchp(uint8_t cssid, uint8_t chpid); -bool css_present(uint8_t cssid); -#endif #define cpu_init(model) CPU(cpu_s390x_init(model)) #define cpu_exec cpu_s390x_exec @@ -1109,69 +1099,6 @@ static inline uint64_t tod2time(uint64_t t) { return (t * 125) >> 9; } -static inline void cpu_inject_ext(S390CPU *cpu, uint32_t code, uint32_t param, - uint64_t param64) -{ - CPUS390XState *env = &cpu->env; - - if (env->ext_index == MAX_EXT_QUEUE - 1) { - /* ugh - can't queue anymore. Let's drop. */ - return; - } - - env->ext_index++; - assert(env->ext_index < MAX_EXT_QUEUE); - - env->ext_queue[env->ext_index].code = code; - env->ext_queue[env->ext_index].param = param; - env->ext_queue[env->ext_index].param64 = param64; - - env->pending_int |= INTERRUPT_EXT; - cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); -} - -static inline void cpu_inject_io(S390CPU *cpu, uint16_t subchannel_id, - uint16_t subchannel_number, - uint32_t io_int_parm, uint32_t io_int_word) -{ - CPUS390XState *env = &cpu->env; - int isc = IO_INT_WORD_ISC(io_int_word); - - if (env->io_index[isc] == MAX_IO_QUEUE - 1) { - /* ugh - can't queue anymore. Let's drop. */ - return; - } - - env->io_index[isc]++; - assert(env->io_index[isc] < MAX_IO_QUEUE); - - env->io_queue[env->io_index[isc]][isc].id = subchannel_id; - env->io_queue[env->io_index[isc]][isc].nr = subchannel_number; - env->io_queue[env->io_index[isc]][isc].parm = io_int_parm; - env->io_queue[env->io_index[isc]][isc].word = io_int_word; - - env->pending_int |= INTERRUPT_IO; - cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); -} - -static inline void cpu_inject_crw_mchk(S390CPU *cpu) -{ - CPUS390XState *env = &cpu->env; - - if (env->mchk_index == MAX_MCHK_QUEUE - 1) { - /* ugh - can't queue anymore. Let's drop. */ - return; - } - - env->mchk_index++; - assert(env->mchk_index < MAX_MCHK_QUEUE); - - env->mchk_queue[env->mchk_index].type = 1; - - env->pending_int |= INTERRUPT_MCHK; - cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); -} - /* from s390-virtio-ccw */ #define MEM_SECTION_SIZE 0x10000000UL #define MAX_AVAIL_SLOTS 32 diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 92abe7e..423dd72 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -24,6 +24,7 @@ #include "exec/gdbstub.h" #include "qemu/timer.h" #include "exec/cpu_ldst.h" +#include "hw/s390x/ioinst.h" #ifndef CONFIG_USER_ONLY #include "sysemu/sysemu.h" #endif diff --git a/target-s390x/interrupt.c b/target-s390x/interrupt.c index bad60a7..9edef96 100644 --- a/target-s390x/interrupt.c +++ b/target-s390x/interrupt.c @@ -10,13 +10,77 @@ #include "qemu/osdep.h" #include "cpu.h" #include "sysemu/kvm.h" +#include "hw/s390x/ioinst.h" + +#if !defined(CONFIG_USER_ONLY) +void cpu_inject_ext(S390CPU *cpu, uint32_t code, uint32_t param, + uint64_t param64) +{ + CPUS390XState *env = &cpu->env; + + if (env->ext_index == MAX_EXT_QUEUE - 1) { + /* ugh - can't queue anymore. Let's drop. */ + return; + } + + env->ext_index++; + assert(env->ext_index < MAX_EXT_QUEUE); + + env->ext_queue[env->ext_index].code = code; + env->ext_queue[env->ext_index].param = param; + env->ext_queue[env->ext_index].param64 = param64; + + env->pending_int |= INTERRUPT_EXT; + cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); +} + +static void cpu_inject_io(S390CPU *cpu, uint16_t subchannel_id, + uint16_t subchannel_number, + uint32_t io_int_parm, uint32_t io_int_word) +{ + CPUS390XState *env = &cpu->env; + int isc = IO_INT_WORD_ISC(io_int_word); + + if (env->io_index[isc] == MAX_IO_QUEUE - 1) { + /* ugh - can't queue anymore. Let's drop. */ + return; + } + + env->io_index[isc]++; + assert(env->io_index[isc] < MAX_IO_QUEUE); + + env->io_queue[env->io_index[isc]][isc].id = subchannel_id; + env->io_queue[env->io_index[isc]][isc].nr = subchannel_number; + env->io_queue[env->io_index[isc]][isc].parm = io_int_parm; + env->io_queue[env->io_index[isc]][isc].word = io_int_word; + + env->pending_int |= INTERRUPT_IO; + cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); +} + +static void cpu_inject_crw_mchk(S390CPU *cpu) +{ + CPUS390XState *env = &cpu->env; + + if (env->mchk_index == MAX_MCHK_QUEUE - 1) { + /* ugh - can't queue anymore. Let's drop. */ + return; + } + + env->mchk_index++; + assert(env->mchk_index < MAX_MCHK_QUEUE); + + env->mchk_queue[env->mchk_index].type = 1; + + env->pending_int |= INTERRUPT_MCHK; + cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); +} /* * All of the following interrupts are floating, i.e. not per-vcpu. * We just need a dummy cpustate in order to be able to inject in the * non-kvm case. */ -#if !defined(CONFIG_USER_ONLY) void s390_sclp_extint(uint32_t parm) { if (kvm_enabled()) { diff --git a/target-s390x/ioinst.c b/target-s390x/ioinst.c index f5498aa..a5a288b 100644 --- a/target-s390x/ioinst.c +++ b/target-s390x/ioinst.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "ioinst.h" +#include "hw/s390x/ioinst.h" #include "trace.h" #include "hw/s390x/s390-pci-bus.h"