qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Cc: "Blue Swirl" <blauwirbel@gmail.com>,
	"qemu-ppc@nongnu.org list:PowerPC" <qemu-ppc@nongnu.org>,
	"Aurélien Jarno" <aurelien@aurel32.net>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH 03/58] target-ppc: Remove CONFIG_PSERIES dependency in kvm.c
Date: Fri, 22 Mar 2013 15:28:37 +0100	[thread overview]
Message-ID: <1363962572-11025-4-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1363962572-11025-1-git-send-email-agraf@suse.de>

From: David Gibson <david@gibson.dropbear.id.au>

target-ppc/kvm.c has an #ifdef on CONFIG_PSERIES, for the handling of
KVM exits due to a PAPR hypercall from the guest.  However, since commit
e4c8b28cde12d01ada8fe869567dc5717a2dfcb7 "ppc: express FDT dependency of
pSeries and e500 boards via default-configs/", this hasn't worked properly.
That patch altered the configuration setup so that although CONFIG_PSERIES
is visible from the Makefiles, it is not visible from C files.  This broke
the pseries machine when KVM is in use.

This patch makes a quick and dirty fix, by removing the CONFIG_PSERIES
dependency, replacing it with TARGET_PPC64 (since removing it entirely
leads to type mismatch errors).  Technically this breaks the build when
configured with --disable-fdt, since that disables CONFIG_PSERIES on
TARGET_PPC64.  However, it turns out the build was already broken in that
case, so this fixes pseries kvm without breaking anything extra.  I'm
looking into how to fix that build breakage, but I don't think that need
delay applying this patch.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-ppc/kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index e663ff0..9870d60 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -1077,7 +1077,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
         dprintf("handle halt\n");
         ret = kvmppc_handle_halt(cpu);
         break;
-#ifdef CONFIG_PSERIES
+#if defined(TARGET_PPC64)
     case KVM_EXIT_PAPR_HCALL:
         dprintf("handle PAPR hypercall\n");
         run->papr_hcall.ret = spapr_hypercall(cpu,
-- 
1.6.0.2

  parent reply	other threads:[~2013-03-22 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 14:28 [Qemu-devel] [PULL 00/58] ppc patch queue 2013-03-22 Alexander Graf
2013-03-22 14:28 ` [Qemu-devel] [PATCH 01/58] pseries: Fix breakage in CPU QOM conversion Alexander Graf
2013-03-22 14:28 ` [Qemu-devel] [PATCH 02/58] pseries: Remove "busname" property for PCI host bridge Alexander Graf
2013-03-22 14:28 ` Alexander Graf [this message]
2013-03-22 21:57 ` [Qemu-devel] [PULL 00/58] ppc patch queue 2013-03-22 Aurélien Jarno

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=1363962572-11025-4-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).