qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Fix fallouts from Linux header inclusion
Date: Sun, 26 Jun 2011 21:01:38 +0300	[thread overview]
Message-ID: <BANLkTinjjPrRmr0pSXAGBAjfium=40MwSA@mail.gmail.com> (raw)
In-Reply-To: <4E02F3B8.2060004@web.de>

Thanks, applied.

On Thu, Jun 23, 2011 at 11:05 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This is an all-in-one fix for the smaller and bigger mistakes of the
> build system changes for accompanied Linux headers:
>  - only enable KVM and vhost on Linux hosts
>  - fix powerpc asm header symlink
>  - do not use Linux headers on non-Linux hosts
>  - fix kvmclock for !CONFIG_KVM
>  - fix s390 build on non-Linux hosts
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Let me know if separate patches are preferred for this.
>
>  Makefile.target          |    8 ++++++--
>  configure                |   34 +++++++++++++++++++---------------
>  hw/kvmclock.h            |   10 ++++++++++
>  target-s390x/op_helper.c |    6 +++++-
>  4 files changed, 40 insertions(+), 18 deletions(-)
>
> diff --git a/Makefile.target b/Makefile.target
> index 03d3646..d3971a6 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -14,7 +14,10 @@ endif
>
>  TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
>  $(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
> -QEMU_CFLAGS+= -I.. -I../linux-headers -I$(TARGET_PATH) -DNEED_CPU_H
> +ifdef CONFIG_LINUX
> +QEMU_CFLAGS += -I../linux-headers
> +endif
> +QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H
>
>  include $(SRC_PATH)/Makefile.objs
>
> @@ -234,7 +237,8 @@ obj-i386-y += cirrus_vga.o sga.o apic.o ioapic.o piix_pci.o
>  obj-i386-y += vmport.o
>  obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
>  obj-i386-y += debugcon.o multiboot.o
> -obj-i386-y += pc_piix.o kvmclock.o
> +obj-i386-y += pc_piix.o
> +obj-i386-$(CONFIG_KVM) += kvmclock.o
>  obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
>
>  # shared objects
> diff --git a/configure b/configure
> index 856b41e..e523976 100755
> --- a/configure
> +++ b/configure
> @@ -113,7 +113,7 @@ curl=""
>  curses=""
>  docs=""
>  fdt=""
> -kvm="yes"
> +kvm=""
>  nptl=""
>  sdl=""
>  vnc="yes"
> @@ -129,7 +129,7 @@ xen=""
>  xen_ctrl_version=""
>  linux_aio=""
>  attr=""
> -vhost_net="yes"
> +vhost_net=""
>  xfs=""
>
>  gprof="no"
> @@ -457,6 +457,8 @@ Haiku)
>   linux="yes"
>   linux_user="yes"
>   usb="linux"
> +  kvm="yes"
> +  vhost_net="yes"
>   if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>     audio_possible_drivers="$audio_possible_drivers fmod"
>   fi
> @@ -3444,19 +3446,21 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
>  fi
>
>  # use included Linux headers
> -includes="-I\$(SRC_PATH)/linux-headers $includes"
> -mkdir -p linux-headers
> -case "$cpu" in
> -i386|x86_64)
> -  symlink $source_path/linux-headers/asm-x86 linux-headers/asm
> -  ;;
> -ppcemb|ppc|ppc64)
> -  symlink $source_path/linux-headers/asm-x86 linux-headers/asm
> -  ;;
> -s390x)
> -  symlink $source_path/linux-headers/asm-s390 linux-headers/asm
> -  ;;
> -esac
> +if test "$linux" = "yes" ; then
> +  includes="-I\$(SRC_PATH)/linux-headers $includes"
> +  mkdir -p linux-headers
> +  case "$cpu" in
> +  i386|x86_64)
> +    symlink $source_path/linux-headers/asm-x86 linux-headers/asm
> +    ;;
> +  ppcemb|ppc|ppc64)
> +    symlink $source_path/linux-headers/asm-powerpc linux-headers/asm
> +    ;;
> +  s390x)
> +    symlink $source_path/linux-headers/asm-s390 linux-headers/asm
> +    ;;
> +  esac
> +fi
>
>  echo "LDFLAGS+=$ldflags" >> $config_target_mak
>  echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
> diff --git a/hw/kvmclock.h b/hw/kvmclock.h
> index 7a83cbe..252ea13 100644
> --- a/hw/kvmclock.h
> +++ b/hw/kvmclock.h
> @@ -11,4 +11,14 @@
>  *
>  */
>
> +#ifdef CONFIG_KVM
> +
>  void kvmclock_create(void);
> +
> +#else /* CONFIG_KVM */
> +
> +static inline void kvmclock_create(void)
> +{
> +}
> +
> +#endif /* !CONFIG_KVM */
> diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
> index 9429698..6a3c1f6 100644
> --- a/target-s390x/op_helper.c
> +++ b/target-s390x/op_helper.c
> @@ -23,8 +23,10 @@
>  #include "helpers.h"
>  #include <string.h>
>  #include "kvm.h"
> -#include <linux/kvm.h>
>  #include "qemu-timer.h"
> +#ifdef CONFIG_KVM
> +#include <linux/kvm.h>
> +#endif
>
>  /*****************************************************************************/
>  /* Softmmu support */
> @@ -2332,7 +2334,9 @@ static void program_interrupt(CPUState *env, uint32_t code, int ilc)
>     qemu_log("program interrupt at %#" PRIx64 "\n", env->psw.addr);
>
>     if (kvm_enabled()) {
> +#ifdef CONFIG_KVM
>         kvm_s390_interrupt(env, KVM_S390_PROGRAM_INT, code);
> +#endif
>     } else {
>         env->int_pgm_code = code;
>         env->int_pgm_ilc = ilc;
>
>

  parent reply	other threads:[~2011-06-26 18:02 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 14:10 [Qemu-devel] [PATCH 00/12] [uq/master] Import linux headers and some cleanups Jan Kiszka
2011-06-08 14:10 ` [Qemu-devel] [PATCH 01/12] Add kernel header update script Jan Kiszka
2011-06-08 14:33   ` Peter Maydell
2011-06-08 14:39     ` Jan Kiszka
2011-06-08 14:51       ` Peter Maydell
2011-06-08 15:06   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-06-08 15:57     ` Peter Maydell
2011-06-08 16:22   ` [Qemu-devel] [PATCH v3 " Jan Kiszka
2011-06-08 17:30     ` Peter Maydell
2011-06-08 14:10 ` [Qemu-devel] [PATCH 02/12] Import kernel headers Jan Kiszka
2011-06-08 14:10 ` [Qemu-devel] [PATCH 03/12] Switch build system to accompanied " Jan Kiszka
2011-06-14 11:11   ` Alexander Graf
2011-06-14 11:21     ` Jan Kiszka
2011-06-14 11:28       ` Alexander Graf
2011-06-14 11:32         ` Jan Kiszka
2011-06-22 20:51   ` Stefan Weil
2011-06-22 21:37     ` Jan Kiszka
2011-06-23  5:37       ` Stefan Weil
2011-06-23  7:18         ` Jan Kiszka
2011-06-23  8:05           ` [Qemu-devel] [PATCH] Fix fallouts from Linux header inclusion Jan Kiszka
2011-06-23 10:59             ` Andreas Färber
2011-06-23 15:14             ` Stefan Weil
2011-06-26 18:01             ` Blue Swirl [this message]
2011-06-08 14:10 ` [Qemu-devel] [PATCH 04/12] kvm: Drop CONFIG_KVM_PARA Jan Kiszka
2011-06-08 14:10 ` [Qemu-devel] [PATCH 05/12] kvm: ppc: Drop CONFIG_KVM_PPC_PVR Jan Kiszka
2011-06-14 11:06   ` Alexander Graf
2011-06-08 14:11 ` [Qemu-devel] [PATCH 06/12] kvm: Drop useless zero-initializations Jan Kiszka
2011-06-08 14:11 ` [Qemu-devel] [PATCH 07/12] kvm: Drop KVM_CAP build dependencies Jan Kiszka
2011-06-14 11:05   ` Alexander Graf
2011-06-14 11:07     ` Jan Kiszka
2011-06-14 11:17       ` Alexander Graf
2011-06-14 11:19         ` Jan Kiszka
2011-06-14 11:25           ` Alexander Graf
2011-06-08 14:11 ` [Qemu-devel] [PATCH 08/12] kvm: x86: " Jan Kiszka
2011-06-08 14:11 ` [Qemu-devel] [PATCH 09/12] kvm: ppc: " Jan Kiszka
2011-06-10 18:32   ` Eduardo Habkost
2011-06-11  7:45     ` Jan Kiszka
2011-06-14 11:07   ` Alexander Graf
2011-06-08 14:11 ` [Qemu-devel] [PATCH 10/12] kvm: Clean up stubs Jan Kiszka
2011-06-08 14:11 ` [Qemu-devel] [PATCH 11/12] kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuid Jan Kiszka
2011-06-09 17:33   ` Eduardo Habkost
2011-06-09 17:41     ` Jan Kiszka
2011-06-09 18:08       ` Eduardo Habkost
2011-06-09 19:53         ` Jan Kiszka
2011-06-08 14:11 ` [Qemu-devel] [PATCH 12/12] Remove unneeded kvm.h from cpu-exec.c Jan Kiszka
2011-06-20 18:24 ` [Qemu-devel] [PATCH 00/12] [uq/master] Import linux headers and some cleanups Marcelo Tosatti

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='BANLkTinjjPrRmr0pSXAGBAjfium=40MwSA@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /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).