diff mbox

[v2,10/10] target-mips: Enable KVM support in build system

Message ID 1387203165-5553-11-git-send-email-james.hogan@imgtec.com
State Superseded
Headers show

Commit Message

James Hogan Dec. 16, 2013, 2:12 p.m. UTC
From: Sanjay Lal <sanjayl@kymasys.com>

Enable KVM support for MIPS in the build system.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
---
Changes in v2:
 - Expand commit message
 - Remove GIC code
 - Create asm-mips symlink using generic code and move above default
   case (Peter Maydell)
 - Remove redundant check of target_name = cpu = mips
 - Remove mipsel cross compilation fix, which is now fixed by
   commit 61cc919f73ea (configure: detect endian via compile test)
---
 configure                 | 6 +++++-
 target-mips/Makefile.objs | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Aurelien Jarno Dec. 21, 2013, 3:38 p.m. UTC | #1
On Mon, Dec 16, 2013 at 02:12:45PM +0000, James Hogan wrote:
> From: Sanjay Lal <sanjayl@kymasys.com>
> 
> Enable KVM support for MIPS in the build system.
> 
> Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> ---
> Changes in v2:
>  - Expand commit message
>  - Remove GIC code
>  - Create asm-mips symlink using generic code and move above default
>    case (Peter Maydell)
>  - Remove redundant check of target_name = cpu = mips
>  - Remove mipsel cross compilation fix, which is now fixed by
>    commit 61cc919f73ea (configure: detect endian via compile test)
> ---
>  configure                 | 6 +++++-
>  target-mips/Makefile.objs | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 0666228..7d86eea 100755
> --- a/configure
> +++ b/configure
> @@ -4329,6 +4329,9 @@ if test "$linux" = "yes" ; then
>    aarch64)
>      linux_arch=arm64
>      ;;
> +  mips64)
> +    linux_arch=mips
> +    ;;
>    *)
>      # For most CPUs the kernel architecture name and QEMU CPU name match.
>      linux_arch="$cpu"
> @@ -4518,7 +4521,7 @@ case "$target_name" in
>    *)
>  esac
>  case "$target_name" in
> -  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
> +  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x|mipsel|mips)
>      # Make sure the target and host cpus are compatible
>      if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
>        \( "$target_name" = "$cpu" -o \
> @@ -4526,6 +4529,7 @@ case "$target_name" in
>        \( "$target_name" = "ppc64"  -a "$cpu" = "ppc" \) -o \
>        \( "$target_name" = "ppc"    -a "$cpu" = "ppc64" \) -o \
>        \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
> +      \( "$target_name" = "mipsel" -a "$cpu" = "mips" \) -o \
>        \( "$target_name" = "x86_64" -a "$cpu" = "i386"   \) -o \
>        \( "$target_name" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
>        echo "CONFIG_KVM=y" >> $config_target_mak
> diff --git a/target-mips/Makefile.objs b/target-mips/Makefile.objs
> index 0277d56..716244f 100644
> --- a/target-mips/Makefile.objs
> +++ b/target-mips/Makefile.objs
> @@ -1,3 +1,4 @@
>  obj-y += translate.o dsp_helper.o op_helper.o lmi_helper.o helper.o cpu.o
>  obj-y += gdbstub.o
>  obj-$(CONFIG_SOFTMMU) += machine.o
> +obj-$(CONFIG_KVM) += kvm.o

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Peter Maydell Dec. 21, 2013, 6:59 p.m. UTC | #2
On 16 December 2013 14:12, James Hogan <james.hogan@imgtec.com> wrote:
> From: Sanjay Lal <sanjayl@kymasys.com>
>
> Enable KVM support for MIPS in the build system.
>
> Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> ---
> Changes in v2:
>  - Expand commit message
>  - Remove GIC code
>  - Create asm-mips symlink using generic code and move above default
>    case (Peter Maydell)
>  - Remove redundant check of target_name = cpu = mips
>  - Remove mipsel cross compilation fix, which is now fixed by
>    commit 61cc919f73ea (configure: detect endian via compile test)
> ---
>  configure                 | 6 +++++-
>  target-mips/Makefile.objs | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 0666228..7d86eea 100755
> --- a/configure
> +++ b/configure
> @@ -4329,6 +4329,9 @@ if test "$linux" = "yes" ; then
>    aarch64)
>      linux_arch=arm64
>      ;;
> +  mips64)
> +    linux_arch=mips
> +    ;;
>    *)
>      # For most CPUs the kernel architecture name and QEMU CPU name match.
>      linux_arch="$cpu"
> @@ -4518,7 +4521,7 @@ case "$target_name" in
>    *)
>  esac
>  case "$target_name" in
> -  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
> +  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x|mipsel|mips)
>      # Make sure the target and host cpus are compatible
>      if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
>        \( "$target_name" = "$cpu" -o \
> @@ -4526,6 +4529,7 @@ case "$target_name" in
>        \( "$target_name" = "ppc64"  -a "$cpu" = "ppc" \) -o \
>        \( "$target_name" = "ppc"    -a "$cpu" = "ppc64" \) -o \
>        \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
> +      \( "$target_name" = "mipsel" -a "$cpu" = "mips" \) -o \
>        \( "$target_name" = "x86_64" -a "$cpu" = "i386"   \) -o \
>        \( "$target_name" = "i386"   -a "$cpu" = "x86_64" \) \) ; then

Really no support for mips64 or mips64el targets?

thanks
-- PMM
James Hogan Dec. 23, 2013, 12:31 p.m. UTC | #3
Hi Peter,

On 21/12/13 18:59, Peter Maydell wrote:
>> @@ -4526,6 +4529,7 @@ case "$target_name" in
>>        \( "$target_name" = "ppc64"  -a "$cpu" = "ppc" \) -o \
>>        \( "$target_name" = "ppc"    -a "$cpu" = "ppc64" \) -o \
>>        \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
>> +      \( "$target_name" = "mipsel" -a "$cpu" = "mips" \) -o \
>>        \( "$target_name" = "x86_64" -a "$cpu" = "i386"   \) -o \
>>        \( "$target_name" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
> 
> Really no support for mips64 or mips64el targets?

At present the MIPS Linux kernel only supports KVM T&E for MIPS32r2. I
would expect that to change eventually.

Thanks
James
diff mbox

Patch

diff --git a/configure b/configure
index 0666228..7d86eea 100755
--- a/configure
+++ b/configure
@@ -4329,6 +4329,9 @@  if test "$linux" = "yes" ; then
   aarch64)
     linux_arch=arm64
     ;;
+  mips64)
+    linux_arch=mips
+    ;;
   *)
     # For most CPUs the kernel architecture name and QEMU CPU name match.
     linux_arch="$cpu"
@@ -4518,7 +4521,7 @@  case "$target_name" in
   *)
 esac
 case "$target_name" in
-  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
+  arm|i386|x86_64|ppcemb|ppc|ppc64|s390x|mipsel|mips)
     # Make sure the target and host cpus are compatible
     if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \
       \( "$target_name" = "$cpu" -o \
@@ -4526,6 +4529,7 @@  case "$target_name" in
       \( "$target_name" = "ppc64"  -a "$cpu" = "ppc" \) -o \
       \( "$target_name" = "ppc"    -a "$cpu" = "ppc64" \) -o \
       \( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
+      \( "$target_name" = "mipsel" -a "$cpu" = "mips" \) -o \
       \( "$target_name" = "x86_64" -a "$cpu" = "i386"   \) -o \
       \( "$target_name" = "i386"   -a "$cpu" = "x86_64" \) \) ; then
       echo "CONFIG_KVM=y" >> $config_target_mak
diff --git a/target-mips/Makefile.objs b/target-mips/Makefile.objs
index 0277d56..716244f 100644
--- a/target-mips/Makefile.objs
+++ b/target-mips/Makefile.objs
@@ -1,3 +1,4 @@ 
 obj-y += translate.o dsp_helper.o op_helper.o lmi_helper.o helper.o cpu.o
 obj-y += gdbstub.o
 obj-$(CONFIG_SOFTMMU) += machine.o
+obj-$(CONFIG_KVM) += kvm.o