From patchwork Fri Aug 11 07:46:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 9895177 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 D8DF0602DA for ; Fri, 11 Aug 2017 07:54:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA0A4280B0 for ; Fri, 11 Aug 2017 07:54:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEBEE288B7; Fri, 11 Aug 2017 07:54:25 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 43332280B0 for ; Fri, 11 Aug 2017 07:54:25 +0000 (UTC) Received: from localhost ([::1]:45998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg4m0-0006Gv-JP for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Aug 2017 03:54:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg4fE-0001qi-A5 for qemu-devel@nongnu.org; Fri, 11 Aug 2017 03:47:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dg4fD-0003Gl-0s for qemu-devel@nongnu.org; Fri, 11 Aug 2017 03:47:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44564) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dg4fC-0003Gb-NS for qemu-devel@nongnu.org; Fri, 11 Aug 2017 03:47:22 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 680DCC0C2E5E; Fri, 11 Aug 2017 07:47:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 680DCC0C2E5E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com Received: from t460s.redhat.com (ovpn-116-163.ams2.redhat.com [10.36.116.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35B6669AF6; Fri, 11 Aug 2017 07:47:15 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Fri, 11 Aug 2017 09:46:51 +0200 Message-Id: <20170811074652.31474-5-david@redhat.com> In-Reply-To: <20170811074652.31474-1-david@redhat.com> References: <20170811074652.31474-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 11 Aug 2017 07:47:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 4/5] target/s390x: remove all CONFIG_KVM from cpu.h 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: , Cc: thuth@redhat.com, david@redhat.com, cohuck@redhat.com, borntraeger@de.ibm.com, Aurelien Jarno , rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Let's move everything into internal.h Signed-off-by: David Hildenbrand Reviewed-by: Richard Henderson --- target/s390x/cpu.h | 62 ------------------------------------------------- target/s390x/internal.h | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 62 deletions(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 87dea80..dc1eb77 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -406,22 +406,6 @@ int cpu_s390x_signal_handler(int host_signum, void *pinfo, void s390_enable_css_support(S390CPU *cpu); int s390_virtio_hypercall(CPUS390XState *env); - -#ifdef CONFIG_KVM -int kvm_s390_inject_flic(struct kvm_s390_irq *irq); -int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_clock); -int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_clock); -#else -static inline int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) -{ - return -ENOSYS; -} -static inline int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low) -{ - return -ENOSYS; -} -#endif - int s390_get_clock(uint8_t *tod_high, uint64_t *tod_low); int s390_set_clock(uint8_t *tod_high, uint64_t *tod_low); @@ -688,52 +672,6 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uint8_t ar, void *hostbuf, #define ILEN_AUTO 0xff void program_interrupt(CPUS390XState *env, uint32_t code, int ilen); -#ifdef CONFIG_KVM -void kvm_s390_enable_css_support(S390CPU *cpu); -int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, - int vq, bool assign); -int kvm_s390_cpu_restart(S390CPU *cpu); -int kvm_s390_get_memslot_count(KVMState *s); -int kvm_s390_cmma_active(void); -void kvm_s390_cmma_reset(void); -void kvm_s390_reset_vcpu(S390CPU *cpu); -int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, uint64_t *hw_limit); -void kvm_s390_crypto_reset(void); -#else - -static inline void kvm_s390_enable_css_support(S390CPU *cpu) -{ -} -static inline int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, - uint32_t sch, int vq, - bool assign) -{ - return -ENOSYS; -} -static inline int kvm_s390_cpu_restart(S390CPU *cpu) -{ - return -ENOSYS; -} -static inline void kvm_s390_cmma_reset(void) -{ -} -static inline int kvm_s390_get_memslot_count(KVMState *s) -{ - return MAX_AVAIL_SLOTS; -} -static inline void kvm_s390_reset_vcpu(S390CPU *cpu) -{ -} -static inline int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, - uint64_t *hw_limit) -{ - return 0; -} -static inline void kvm_s390_crypto_reset(void) -{ -} -#endif - int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit); void s390_cmma_reset(void); int s390_cpu_restart(S390CPU *cpu); diff --git a/target/s390x/internal.h b/target/s390x/internal.h index 9a55271..c3e98b4 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -491,6 +491,19 @@ void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu); int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu); int kvm_s390_get_ri(void); int kvm_s390_get_gs(void); +int kvm_s390_inject_flic(struct kvm_s390_irq *irq); +int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_clock); +int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_clock); +void kvm_s390_enable_css_support(S390CPU *cpu); +int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, + int vq, bool assign); +int kvm_s390_cpu_restart(S390CPU *cpu); +int kvm_s390_get_memslot_count(KVMState *s); +int kvm_s390_cmma_active(void); +void kvm_s390_cmma_reset(void); +void kvm_s390_reset_vcpu(S390CPU *cpu); +int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, uint64_t *hw_limit); +void kvm_s390_crypto_reset(void); #else static inline void kvm_s390_service_interrupt(uint32_t parm) { @@ -535,6 +548,45 @@ static inline int kvm_s390_get_gs(void) { return 0; } +static inline int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_low) +{ + return -ENOSYS; +} +static inline int kvm_s390_set_clock(uint8_t *tod_high, uint64_t *tod_low) +{ + return -ENOSYS; +} +static inline void kvm_s390_enable_css_support(S390CPU *cpu) +{ +} +static inline int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, + uint32_t sch, int vq, + bool assign) +{ + return -ENOSYS; +} +static inline int kvm_s390_cpu_restart(S390CPU *cpu) +{ + return -ENOSYS; +} +static inline void kvm_s390_cmma_reset(void) +{ +} +static inline int kvm_s390_get_memslot_count(KVMState *s) +{ + return MAX_AVAIL_SLOTS; +} +static inline void kvm_s390_reset_vcpu(S390CPU *cpu) +{ +} +static inline int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, + uint64_t *hw_limit) +{ + return 0; +} +static inline void kvm_s390_crypto_reset(void) +{ +} #endif /* CONFIG_KVM */