diff mbox

[v9,00/11] target-arm: mach virt and -cpu host support

Message ID 1385140638-10444-1-git-send-email-peter.maydell@linaro.org
State Accepted
Headers show

Commit Message

Peter Maydell Nov. 22, 2013, 5:17 p.m. UTC
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

Comments

Christoffer Dall Nov. 22, 2013, 6:26 p.m. UTC | #1
On Fri, Nov 22, 2013 at 05:17:07PM +0000, Peter Maydell wrote:
> 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):
> 

I tell myself that too...

Anyway, looked over the series and it looks good to me.

So except for some of the QOM that I can't really wrap around my brain
yet:

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Peter Maydell Dec. 2, 2013, 1:46 p.m. UTC | #2
On 22 November 2013 17:17, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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.

I'm applying this series to target-arm.next (with the typo of
the kernel commit hash in the 'update headers' patch fixed).

thanks!
-- PMM
diff mbox

Patch

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 <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/smp.h>
+#include <linux/clk-provider.h>

 #include <asm/mach/arch.h>

 static void __init virt_init(void)
 {
+       of_clk_init(NULL);
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }