qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/17] kvm: add kvm stub for arch specific stuff


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH 05/17] kvm: add kvm stub for arch specific stuff
Date: Mon, 18 Apr 2011 20:34:04 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Apr 15, 2011 at 05:32:46PM +0200, Alexander Graf wrote:
> We have a generic stub architecture for kvm calls, but some architectures
> are different from others. So we do want to be able to have stubs for
> architecture specific functionality as well.
> 
> This patch adds kvm stubs for all architectures.
> 
> Signed-off-by: Alexander Graf <address@hidden>
> ---
>  Makefile.target                   |    2 +-
>  target-alpha/kvm-arch-stub.c      |   26 +++++++++++++++++++++++++
>  target-arm/kvm-arch-stub.c        |   26 +++++++++++++++++++++++++
>  target-cris/kvm-arch-stub.c       |   26 +++++++++++++++++++++++++
>  target-i386/kvm-arch-stub.c       |   26 +++++++++++++++++++++++++
>  target-lm32/kvm-arch-stub.c       |   26 +++++++++++++++++++++++++
>  target-m68k/kvm-arch-stub.c       |   26 +++++++++++++++++++++++++
>  target-microblaze/kvm-arch-stub.c |   26 +++++++++++++++++++++++++
>  target-mips/kvm-arch-stub.c       |   26 +++++++++++++++++++++++++
>  target-ppc/kvm-arch-stub.c        |   26 +++++++++++++++++++++++++
>  target-s390x/kvm-arch-stub.c      |   38 
> +++++++++++++++++++++++++++++++++++++
>  target-sh4/kvm-arch-stub.c        |   26 +++++++++++++++++++++++++
>  target-sparc/kvm-arch-stub.c      |   26 +++++++++++++++++++++++++
>  target-unicore32/kvm-arch-stub.c  |   26 +++++++++++++++++++++++++
>  14 files changed, 351 insertions(+), 1 deletions(-)
>  create mode 100644 target-alpha/kvm-arch-stub.c
>  create mode 100644 target-arm/kvm-arch-stub.c
>  create mode 100644 target-cris/kvm-arch-stub.c
>  create mode 100644 target-i386/kvm-arch-stub.c
>  create mode 100644 target-lm32/kvm-arch-stub.c
>  create mode 100644 target-m68k/kvm-arch-stub.c
>  create mode 100644 target-microblaze/kvm-arch-stub.c
>  create mode 100644 target-mips/kvm-arch-stub.c
>  create mode 100644 target-ppc/kvm-arch-stub.c
>  create mode 100644 target-s390x/kvm-arch-stub.c
>  create mode 100644 target-sh4/kvm-arch-stub.c
>  create mode 100644 target-sparc/kvm-arch-stub.c
>  create mode 100644 target-unicore32/kvm-arch-stub.c

Do we really want to create so much files on architectures we will never
see KVM support? Actually I know very few things about KVM, so it would
be better to have this patch reviewed by someone else. Avi or Anthony
maybe?

> diff --git a/Makefile.target b/Makefile.target
> index d5761b7..69ea140 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -197,7 +197,7 @@ obj-$(CONFIG_VHOST_NET) += vhost.o
>  obj-$(CONFIG_REALLY_VIRTFS) += virtio-9p.o
>  obj-y += rwhandler.o
>  obj-$(CONFIG_KVM) += kvm.o kvm-all.o
> -obj-$(CONFIG_NO_KVM) += kvm-stub.o
> +obj-$(CONFIG_NO_KVM) += kvm-stub.o kvm-arch-stub.o
>  LIBS+=-lz
>  
>  QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
> diff --git a/target-alpha/kvm-arch-stub.c b/target-alpha/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-alpha/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-arm/kvm-arch-stub.c b/target-arm/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-arm/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-cris/kvm-arch-stub.c b/target-cris/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-cris/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-i386/kvm-arch-stub.c b/target-i386/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-i386/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-lm32/kvm-arch-stub.c b/target-lm32/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-lm32/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-m68k/kvm-arch-stub.c b/target-m68k/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-m68k/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-microblaze/kvm-arch-stub.c 
> b/target-microblaze/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-microblaze/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-mips/kvm-arch-stub.c b/target-mips/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-mips/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-ppc/kvm-arch-stub.c b/target-ppc/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-ppc/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-s390x/kvm-arch-stub.c b/target-s390x/kvm-arch-stub.c
> new file mode 100644
> index 0000000..16d2340
> --- /dev/null
> +++ b/target-s390x/kvm-arch-stub.c
> @@ -0,0 +1,38 @@
> +/*
> + * QEMU non-KVM stub implementation (s390x)
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> +void kvm_s390_virtio_irq(CPUState *env, int config_change, uint64_t token)
> +{
> +}
> +
> +void kvm_s390_interrupt(CPUState *env, int type, uint32_t code)
> +{
> +}
> +
> +void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
> +                                 uint64_t parm64, int vm)
> +{
> +}
> diff --git a/target-sh4/kvm-arch-stub.c b/target-sh4/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-sh4/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-sparc/kvm-arch-stub.c b/target-sparc/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-sparc/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> diff --git a/target-unicore32/kvm-arch-stub.c 
> b/target-unicore32/kvm-arch-stub.c
> new file mode 100644
> index 0000000..b338995
> --- /dev/null
> +++ b/target-unicore32/kvm-arch-stub.c
> @@ -0,0 +1,26 @@
> +/*
> + * QEMU non-KVM stub implementation
> + *
> + * Copyright (c) 2011 Alexander Graf <address@hidden>
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see 
> <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "hw/hw.h"
> +#include "exec-all.h"
> +#include "gdbstub.h"
> +#include "kvm.h"
> +
> -- 
> 1.6.0.2
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]