qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: QEMU-devel Developers <qemu-devel@nongnu.org>
Cc: peter.maydell@linaro.org, jan.kiszka@siemens.com,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 03/13] s390x: make kvm exported functions conditional on kvm
Date: Wed,  4 May 2011 14:09:32 +0200	[thread overview]
Message-ID: <1304510982-30810-4-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1304510982-30810-1-git-send-email-agraf@suse.de>

We have some helper functions we use to directly invoke KVM
functionality from device emulation code.

This patch replaces those exported functions with static inline
stubs when not building with KVM enabled.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/cpu.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index a84b3ee..79aa6c9 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -287,10 +287,27 @@ int cpu_s390x_handle_mmu_fault (CPUS390XState *env, target_ulong address, int rw
 #ifndef CONFIG_USER_ONLY
 int s390_virtio_hypercall(CPUState *env, uint64_t mem, uint64_t hypercall);
 
+#ifdef CONFIG_KVM
 void kvm_s390_interrupt(CPUState *env, int type, uint32_t code);
 void kvm_s390_virtio_irq(CPUState *env, int config_change, uint64_t token);
 void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
                                  uint64_t parm64, int vm);
+#else
+static inline void kvm_s390_interrupt(CPUState *env, int type, uint32_t code)
+{
+}
+
+static inline void kvm_s390_virtio_irq(CPUState *env, int config_change,
+                                       uint64_t token)
+{
+}
+
+static inline void kvm_s390_interrupt_internal(CPUState *env, int type,
+                                               uint32_t parm, uint64_t parm64,
+                                               int vm)
+{
+}
+#endif
 CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
 
 #ifndef KVM_S390_SIGP_STOP
-- 
1.6.0.2

  parent reply	other threads:[~2011-05-04 12:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 12:09 [Qemu-devel] [PATCH 00/13] s390x emulation support v5 Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 01/13] tcg: extend max tcg opcodes when using 64-on-32bit Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 02/13] s390x: s390x-linux-user support Alexander Graf
2011-05-04 12:09 ` Alexander Graf [this message]
2011-05-04 12:09 ` [Qemu-devel] [PATCH 04/13] s390x: keep hint on virtio managing size Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 05/13] s390x: Shift variables in CPUState for memset(0) Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 06/13] s390x: helper functions for system emulation Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 07/13] s390x: Implement opcode helpers Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 08/13] s390x: Adjust internal kvm code Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 09/13] s390x: translate engine for s390x CPU Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 10/13] s390x: Adjust GDB stub Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 11/13] s390x: remove compatibility cc field Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 12/13] s390x: build s390x by default Alexander Graf
2011-05-04 12:09 ` [Qemu-devel] [PATCH 13/13] s390x: Fix debugging for unknown sigp order codes Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304510982-30810-4-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=jan.kiszka@siemens.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).