From patchwork Fri Nov 22 17:17:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 21709 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 816FE23FE1 for ; Fri, 22 Nov 2013 17:17:27 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf4559725obb.2 for ; Fri, 22 Nov 2013 09:17:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=LpJ++1P11JOJ8TNJ6DAy3/1N+W24pDVttq2IBhfvTPo=; b=HXqOVcBldzxsOgQCVF3z0a9u9fQU1IfB/CCKMLCU38wahlp4Hn01I58wIP8b00DPD8 kItAZDDlQ368YRoSuL9iq0aPm5KAtIzSoHKQ3P5oqwfyPAJ+SIVeJp5N6YcKmi+RpBUD ERA0Q+4ZWzb3vCAFCA1MzZXGdo11NtwHPJPvUAn1IrrmIMogWkXMP2J6ur5JaZp1ofPx VfY0ytEmahC6NjkeUyB6YuxmWFXaTt5vUla3zxaqEhSMIsFaPfFgo24iZmn+5YHt1YBP W4AOhYJGy04cjMlxr/p8bE0WptGru1AhWJQveqmOCoagejj75x75JgvmuKvIyrvT4wNu +YQw== X-Gm-Message-State: ALoCoQmq2yljE8qdF8uFW4CwrrfORUE2TpKEbG0MO8eBwHq9XS73s6jmQ2dduILU8Rt7uoeUlQ0x X-Received: by 10.43.74.133 with SMTP id yw5mr3609242icb.15.1385140647074; Fri, 22 Nov 2013 09:17:27 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.170 with SMTP id ll10ls1097734qeb.34.gmail; Fri, 22 Nov 2013 09:17:26 -0800 (PST) X-Received: by 10.52.32.37 with SMTP id f5mr10131670vdi.17.1385140646966; Fri, 22 Nov 2013 09:17:26 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id td8si12910519vdc.105.2013.11.22.09.17.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Nov 2013 09:17:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id lc6so1038802vcb.41 for ; Fri, 22 Nov 2013 09:17:26 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr12231459vet.3.1385140646887; Fri, 22 Nov 2013 09:17:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp54996vcz; Fri, 22 Nov 2013 09:17:26 -0800 (PST) X-Received: by 10.60.142.8 with SMTP id rs8mr11632125oeb.34.1385140642526; Fri, 22 Nov 2013 09:17:22 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id ju5si22292564oeb.150.2013.11.22.09.17.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 Nov 2013 09:17:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VjuM2-0002iv-Qg; Fri, 22 Nov 2013 17:17:18 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v9 00/11] target-arm: mach virt and -cpu host support Date: Fri, 22 Nov 2013 17:17:07 +0000 Message-Id: <1385140638-10444-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patchset combines the 'virt' machine definition and -cpu host support patchsets I've posted previous versions of. I think these are now ready to go in once 1.8 opens up; review appreciated. Changes since previous versions: * added in -cpu host patchset, since it really only makes sense with mach-virt * rearranged virt address space a bit to allow space for a reasonable sized boot flash device and possible PCI window if a PCI controller model ever becomes possible * fixed bug where we weren't starting secondary CPUs in "PSCI power-down" state (by adding a CPU property which lets the board specify that the CPU starts powered down) [thanks to Giridhar Maruthy for tracking this down] * includes a KVM header update against current mainline * includes (previously RFC'd) patch which provides defines of some kernel KVM constants we can use even if not CONFIG_KVM * put the KVM CPU type into the CPU object rather than having a silly 'QOM object type => constant' lookup table * put dtb 'compatible' string into CPU object rather than having the board model need to know about it * abstracted out the "create a scratch vcpu for querying for capabilities" code; this is currently only called in one place, but the abstraction will be needed for 64 bit KVM ARM support Mostly this is cleanup and streamlining which I noticed was either possible or necessary in the course of putting 64 bit KVM ARM control on top of this patchset. The kernel patch to get the PL011 to work is still needed (Christoffer tells me he's working on getting a proper fix done for this): John Rigby (1): hw/arm/boot: Allow boards to provide an fdt blob Peter Maydell (10): target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM device_tree.c: Terminate the empty reservemap in create_device_tree() target-arm: Provide PSCI constants to generic QEMU code target-arm: Add ARMCPU field for Linux device-tree 'compatible' string target-arm: Allow secondary KVM CPUs to be booted via PSCI hw/arm: Add 'virt' platform linux-headers: Update from mainline target-arm: Don't hardcode KVM target CPU to be A15 target-arm: Provide '-cpu host' when running KVM hw/arm/virt: Support -cpu host device_tree.c | 4 + hw/arm/Makefile.objs | 2 +- hw/arm/boot.c | 32 ++- hw/arm/virt.c | 452 ++++++++++++++++++++++++++++++ include/hw/arm/arm.h | 7 + linux-headers/asm-arm/kvm.h | 3 +- linux-headers/asm-powerpc/epapr_hcalls.h | 4 +- linux-headers/asm-powerpc/kvm.h | 86 +++++- linux-headers/asm-x86/hyperv.h | 19 ++ linux-headers/asm-x86/kvm.h | 6 +- linux-headers/linux/kvm.h | 11 + target-arm/cpu-qom.h | 11 + target-arm/cpu.c | 59 ++++ target-arm/cpu.h | 13 +- target-arm/helper.c | 6 + target-arm/kvm-consts.h | 64 +++++ target-arm/kvm.c | 243 +++++++++++++++- target-arm/kvm_arm.h | 55 ++++ 18 files changed, 1033 insertions(+), 44 deletions(-) create mode 100644 hw/arm/virt.c create mode 100644 target-arm/kvm-consts.h Reviewed-by: Christoffer Dall diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c index b184e57..2b6aceb 100644 --- a/arch/arm/mach-virt/virt.c +++ b/arch/arm/mach-virt/virt.c @@ -21,11 +21,13 @@ #include #include #include +#include #include static void __init virt_init(void) { + of_clk_init(NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }