From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6bKD-0002tH-W6 for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:37:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6bK4-0007Aa-Fz for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:37:13 -0500 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:61948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6bK4-00079p-65 for qemu-devel@nongnu.org; Fri, 24 Jan 2014 02:37:04 -0500 Received: by mail-ea0-f182.google.com with SMTP id r15so794325ead.41 for ; Thu, 23 Jan 2014 23:37:03 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52E2181B.9040002@redhat.com> Date: Fri, 24 Jan 2014 08:36:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1390515366-32236-1-git-send-email-wei.liu2@citrix.com> In-Reply-To: <1390515366-32236-1-git-send-email-wei.liu2@citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/5] Xen: introduce Xen PV target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Liu , xen-devel@lists.xen.org, qemu-devel@nongnu.org Cc: anthony.perard@citrix.com, peter.maydell@linaro.org, stefano.stabellini@eu.citrix.com Il 23/01/2014 23:16, Wei Liu ha scritto: > As promised I hacked a prototype based on Paolo's disable TCG series. > However I coded some stubs for TCG anyway. So this series in principle > should work with / without Paolo's series. > > The first 3 patches refactor some code to disentangle Xen PV and HVM > guest. The 4th patch has the real meat. It introduces Xen PV target, > which contains basically a dummy CPU, then hooks up this Xen PV CPU to > QEMU internal structures. > > The last patch introduces xenpv-softmmu, which contains *no* emulation > code. I know that in previous discussion people said that every device > emulation should be included if the target architecture is called null. > But since this target CPU is now called xenpv I don't feel obliged to > include any device emulation in this prototype anymore. :-) > > Please note that the existing Xen QEMU build is not affected at all. You > can still use "--disable-tcg --enable-xen --target-list=i386-softmmu" > (or x86_64-softmmu") to build qemu-system-{i386,x86_64} and use it for > both HVM and PV guest. This series adds another option to build QEMU with > "--disable-tcg --enable-xen --target-list=xenpv-softmmu" and get a QEMU > binary tailored for Xen PV guest. The effect is that we reduce the > binary size from 14MB to 7.3MB. > > What do you think of this idea? I'm all ears. > > Wei. > > Wei Liu (5): > xen: move Xen PV machine files to hw/xenpv > xen: factor out common functions > exec: guard Xen HVM hooks with CONFIG_XEN_I386 > xen: implement Xen PV target > xen: introduce xenpv-softmmu.mak > > Makefile.target | 3 +- > arch_init.c | 2 + > configure | 12 ++- > cpu-exec.c | 2 + > default-configs/i386-softmmu.mak | 1 - > default-configs/x86_64-softmmu.mak | 1 - > default-configs/xenpv-softmmu.mak | 2 + > exec.c | 16 ++++ > hw/i386/Makefile.objs | 2 +- > hw/xenpv/Makefile.objs | 2 + > hw/{i386 => xenpv}/xen_domainbuild.c | 0 > hw/{i386 => xenpv}/xen_domainbuild.h | 0 > hw/{i386 => xenpv}/xen_machine_pv.c | 0 > include/exec/memory-internal.h | 2 + > include/sysemu/arch_init.h | 1 + > target-xenpv/Makefile.objs | 1 + > target-xenpv/cpu-qom.h | 64 ++++++++++++++++ > target-xenpv/cpu.h | 66 ++++++++++++++++ > target-xenpv/helper.c | 32 ++++++++ > target-xenpv/translate.c | 27 +++++++ > xen-common.c | 137 ++++++++++++++++++++++++++++++++++ > xen-all.c => xen-hvm.c | 112 +-------------------------- > xen-stub.c | 4 - > 23 files changed, 368 insertions(+), 121 deletions(-) > create mode 100644 default-configs/xenpv-softmmu.mak > create mode 100644 hw/xenpv/Makefile.objs > rename hw/{i386 => xenpv}/xen_domainbuild.c (100%) > rename hw/{i386 => xenpv}/xen_domainbuild.h (100%) > rename hw/{i386 => xenpv}/xen_machine_pv.c (100%) > create mode 100644 target-xenpv/Makefile.objs > create mode 100644 target-xenpv/cpu-qom.h > create mode 100644 target-xenpv/cpu.h > create mode 100644 target-xenpv/helper.c > create mode 100644 target-xenpv/helper.h > create mode 100644 target-xenpv/translate.c > create mode 100644 xen-common.c > rename xen-all.c => xen-hvm.c (92%) > Mostly looks good! Feel free to take any initial patches you need from my branch, and post them for inclusion together with this series! Paolo