From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBtH8-0007KN-Oc for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:34:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBtH6-00066p-M7 for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:34:18 -0400 Received: from hall.aurel32.net ([88.191.126.93]:37685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBtH6-00065y-9t for qemu-devel@nongnu.org; Mon, 18 Apr 2011 14:34:16 -0400 Date: Mon, 18 Apr 2011 20:34:04 +0200 From: Aurelien Jarno Message-ID: <20110418183404.GE16178@volta.aurel32.net> References: <1302881578-5357-1-git-send-email-agraf@suse.de> <1302881578-5357-6-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1302881578-5357-6-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [PATCH 05/17] kvm: add kvm stub for arch specific stuff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: peter.maydell@linaro.org, QEMU-devel Developers , Richard Henderson 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 > --- > 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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 > + * > + * 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 . > + */ > + > +#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 aurelien@aurel32.net http://www.aurel32.net