Re: [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-30 Thread Pekka Enberg
On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans wrote: > +static struct cpu_info cpu_power7_info = { > +       "POWER7", > +       power7_page_sizes_prop, sizeof(power7_page_sizes_prop), > +       power7_segment_sizes_prop, sizeof(power7_segment_sizes_prop), > +       32,             /* SLB size */ >

[PATCH V4 5/7] kvm tools: Add PPC64 XICS interrupt controller support

2012-01-30 Thread Matt Evans
This patch adds XICS emulation code (heavily borrowed from QEMU), and wires this into kvm_cpu__irq() to fire a CPU IRQ via KVM. A device tree entry is also added. IPIs work, xics_alloc_irqnum() is added to allocate an external IRQ (which will later be used by the PHB PCI code) and finally, kvm__i

[PATCH V4 6/7] kvm tools: Add PPC64 PCI Host Bridge

2012-01-30 Thread Matt Evans
This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each. Signed-off-by: Matt Evans --- tools/kvm/powerpc/include/kvm/kvm-arch.h |3 + tools/kvm/powerpc/irq.c

[PATCH V4 3/7] kvm tools: Add SPAPR PPC64 hcall & rtascall structure

2012-01-30 Thread Matt Evans
This patch adds the basic structure for HV calls, their registration and some of the simpler calls. A similar layout for RTAS calls is also added, again with some of the simpler RTAS calls used by the guest. The SPAPR RTAS stub is generated inline. Also, nodes for RTAS are added to the device tr

[PATCH V4 7/7] kvm tools: Add PPC64 kvm_cpu__emulate_io()

2012-01-30 Thread Matt Evans
This is the final piece of the puzzle for PPC SPAPR PCI; this function splits MMIO accesses into the two PHB windows & directs things to MMIO/IO emulation as appropriate. Signed-off-by: Matt Evans --- tools/kvm/Makefile |1 + tools/kvm/powerpc/include/kvm/kvm-cpu-ar

[PATCH V4 4/7] kvm tools: Add SPAPR PPC64 HV console

2012-01-30 Thread Matt Evans
This adds the console code, plus VIO HV terminal nodes are added to the device tree so the guest kernel will pick it up. Signed-off-by: Matt Evans --- tools/kvm/Makefile |1 + tools/kvm/powerpc/kvm.c | 33 tools/kvm/powerpc/spapr_hvcons.c | 102

[PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-30 Thread Matt Evans
The generated DT is the bare minimum structure required for SPAPR (on which subsequent patches for VIO, XICS, PCI etc. will build); root node, cpus, memory. The DT contains CPU-specific configuration; a very simple 'cpu info' mechanism is added to recognise/differentiate DT entries for POWER7 and

[PATCH V4 1/7] kvm tools: PPC64, add HPT/SDR1 for -PR KVM

2012-01-30 Thread Matt Evans
Allocate a page table and point SDR1 to it in order to support the -PR PPC64 KVM mode. (The alternative, -HV mode, is available only on a small set of machines.) This patch also removes the previous dependency on mapping guest RAM with huge pages; PR KVM doesn't require them so the user isn't for

[PATCH V4 0/7] Add initial SPAPR PPC64 architecture support

2012-01-30 Thread Matt Evans
This series adds support for a PPC64 platform, SPAPR, on top of the previous more general PPC64 CPU support. This platform is paravirtualised, with most of the MMU hypercalls being dealt with in the kernel. Userland needs to describe the environment to the machine with a device tree, cope with so

[PATCH] KVM: PPC: Book3s: PR: Add SPAPR H_BULK_REMOVE support

2012-01-30 Thread Matt Evans
SPAPR support includes various in-kernel hypercalls, improving performance by cutting out the exit to userspace. H_BULK_REMOVE is implemented in this patch. Signed-off-by: Matt Evans --- Alex, my "zomg, ls SIGILLs!" on IRC was due to a former broken version of this patch skipping an inval