Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-13 Thread Alexander Graf
On 13.12.2011, at 08:00, Matt Evans m...@ozlabs.org wrote: This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out arch-specific functions (e.g. interrupts, runloop exits) that later patches will provide. The target is an

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Sasha Levin
On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide them. Hm... ioeventfds are located in the generic code and should be available on all

Re: [AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-13 Thread Andreas Hartmann
Hello Don! Am Tue, 13 Dec 2011 01:21:41 +0100 schrieb Andreas Hartmann andihartm...@01019freenet.de: Am Mon, 12 Dec 2011 13:36:36 -0500 schrieb Don Dutile ddut...@redhat.com: On 12/12/2011 06:15 AM, Andreas Hartmann wrote: Hello! I've got a few questions to a problem, which

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-13 Thread Kevin Wolf
Am 13.12.2011 04:41, schrieb lan,Tianyu: On 一, 2011-12-12 at 19:15 +0800, Kevin Wolf wrote: Am 12.12.2011 11:58, schrieb Pekka Enberg: On Mon, 12 Dec 2011, Kevin Wolf wrote: @@ -667,14 +722,11 @@ static struct qcow_refcount_block *qcow_read_refcount_block(struct qcow *q, u64 rft_idx =

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-13 Thread Kevin Wolf
Am 13.12.2011 04:05, schrieb lan,Tianyu: Thanks for your review. On 一, 2011-12-12 at 17:55 +0800, Kevin Wolf wrote: Am 12.12.2011 03:03, schrieb Lan Tianyu: This patch enables allocating new refcount blocks and so then kvm tools could expand qcow2 image much larger. Signed-off-by: Lan

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-13 Thread Pekka Enberg
On Tue, Dec 13, 2011 at 5:16 AM, lan,Tianyu tianyu@intel.com wrote: I have tried to use ERR_PTR(). But when I included linux/err.h, a compile error  was following.  CC       disk/qcow.o In file included from disk/qcow.c:20: ../../include/linux/err.h:22: error: expected '=', ',', ';',

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-13 Thread Pekka Enberg
On Tue, Dec 13, 2011 at 10:57 AM, Kevin Wolf kw...@redhat.com wrote: So the ENOSPEC should be specially dealt with. Does this make sense? :) I'm not saying that your code won't work today, just that it's brittle. If someone adds a different error return code somewhere and doesn't check if

Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance

2011-12-13 Thread Liu ping fan
On Mon, Dec 12, 2011 at 8:54 PM, Gleb Natapov g...@redhat.com wrote: On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction taken when

Re: [Android-virt] [PATCH v5 10/13] ARM: KVM: Guest wait-for-interrupts (WFI) support

2011-12-13 Thread Avi Kivity
On 12/12/2011 09:21 PM, Christoffer Dall wrote: well, if we block, but receive a signal that we want to go back into userspace for, and then come back but the guest should still be waiting, then I want that flag set, and I think it's the most logical control flow. Am I missing something

Re: [AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-13 Thread Andreas Hartmann
Hello Don! Some additional information about the bridge device 00:14.4 itself (both legacy PCI cards are behind this bridge device - it's an output with both legacy devices plugged in): 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40) (prog-if 01 [Subtractive decode])

Re: [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Avi Kivity
On 12/12/2011 09:53 PM, Christoffer Dall wrote: A bigger problem is that you pin all memory; what are the plans wrt mmu notifiers? hmm, I have no plans (yet). I haven't looked into neither MMU shrinker nor MMU notifier. As I see it, the problems of consuming too much memory just for

Re: [PATCH v5 12/13] ARM: KVM: Fix guest view of MPIDR

2011-12-13 Thread Avi Kivity
On 12/12/2011 09:43 PM, Christoffer Dall wrote: ok, focus will be on patch readability for next round then. thanks. Great, please try to keep your submarine surfaced for longer periods of time so we can interact better. -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance

2011-12-13 Thread Gleb Natapov
On Tue, Dec 13, 2011 at 05:29:50PM +0800, Liu ping fan wrote: On Mon, Dec 12, 2011 at 8:54 PM, Gleb Natapov g...@redhat.com wrote: On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm

Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance

2011-12-13 Thread Marcelo Tosatti
On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction taken when its refcnt is zero, and then vcpu MUST and CAN be destroyed before

Re: [PATCH v3] kvm: make vcpu life cycle separated from kvm instance

2011-12-13 Thread Gleb Natapov
On Tue, Dec 13, 2011 at 09:36:28AM -0200, Marcelo Tosatti wrote: On Mon, Dec 12, 2011 at 10:41:23AM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction taken when

Re: What does LP stands for?

2011-12-13 Thread Avi Kivity
On 12/13/2011 04:16 AM, Zhen-Hua Li wrote: Hi all, I saw a line from some document: KVM supports 4096 LPs ,What does LP stands for? Logical processors (on the host). -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [Android-virt] [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Christoffer Dall
On Tue, Dec 13, 2011 at 4:45 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 09:53 PM, Christoffer Dall wrote: A bigger problem is that you pin all memory; what are the plans wrt mmu notifiers? hmm, I have no plans (yet). I haven't looked into neither MMU shrinker nor MMU notifier.

Re: [Android-virt] [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Marc Zyngier
On 13/12/11 13:10, Christoffer Dall wrote: On Tue, Dec 13, 2011 at 4:45 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 09:53 PM, Christoffer Dall wrote: - as far as I know it's not common to have swap space on ARM architectures, but I could be wrong. It will become common once you

Re: [Android-virt] [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Avi Kivity
On 12/13/2011 03:10 PM, Christoffer Dall wrote: the question is just which mappings are the most efficient to reclaim. Do you have accessed bits in those PTEs? nope. We can protect the underlying target pages though, but... Yeah, we have the same issue with one of the vendors.

Re: [Android-virt] [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-13 Thread Christoffer Dall
On Tue, Dec 13, 2011 at 4:37 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 09:36 PM, Christoffer Dall wrote: something like this: if (irq_level-level) {       set_bit(vcpu-arch.irq_lines, bit_nr);       smp_mb();       wake_up_interruptible(vcpu-wq); or,

Re: [PATCH v5 12/13] ARM: KVM: Fix guest view of MPIDR

2011-12-13 Thread Christoffer Dall
On Tue, Dec 13, 2011 at 4:46 AM, Avi Kivity a...@redhat.com wrote: On 12/12/2011 09:43 PM, Christoffer Dall wrote: ok, focus will be on patch readability for next round then. thanks. Great, please try to keep your submarine surfaced for longer periods of time so we can interact better. we

Re: [Android-virt] [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Christoffer Dall
On Tue, Dec 13, 2011 at 8:23 AM, Avi Kivity a...@redhat.com wrote: On 12/13/2011 03:10 PM, Christoffer Dall wrote: the question is just which mappings are the most efficient to reclaim. Do you have accessed bits in those PTEs? nope. We can protect the underlying target pages though,

Re: [Android-virt] [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-13 Thread Avi Kivity
On 12/13/2011 03:36 PM, Christoffer Dall wrote: if (new_virt_intr == IRQ | FIQ virt_intr == FIQ) { /* IRQ raised, FIQ already set */ return; } hmm, so what you want to avoid here is sending an IPI to the other CPU in case we already have FIQ raised? But I think we have to

Re: [Android-virt] [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-13 Thread Marc Zyngier
On 13/12/11 13:36, Christoffer Dall wrote: On Tue, Dec 13, 2011 at 4:37 AM, Avi Kivity a...@redhat.com wrote: if (new_virt_intr == IRQ | FIQ virt_intr == FIQ) { /* IRQ raised, FIQ already set */ return; } hmm, so what you want to avoid here is sending an IPI to the other CPU

Re: [Android-virt] [PATCH v5 08/13] ARM: KVM: Handle guest faults in KVM

2011-12-13 Thread Avi Kivity
On 12/13/2011 03:44 PM, Christoffer Dall wrote: It's not really critical to have efficient reclaim here, since it happens so rarely. It just needs to do something. when would you trigger it - when it reaches a certain limit, or? And then what, free the lot and re-allocate what's

Re: [AMD iommu] pci Failed to assign device hostdev0 : Device or resource busy

2011-12-13 Thread Andreas Hartmann
Hello Don! Am Tue, 13 Dec 2011 01:21:41 +0100 schrieb Andreas Hartmann andihartm...@01019freenet.de: [...] Ok. If I remove the intel card and put in instead a 32 bit PCIe card like TP-Link TG-3468, I could assign each of these two cards to different VMs. Is this correct? No - it isn't

Re: [Android-virt] [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-13 Thread Christoffer Dall
On Dec 13, 2011, at 9:17 AM, Avi Kivity a...@redhat.com wrote: On 12/13/2011 03:36 PM, Christoffer Dall wrote: if (new_virt_intr == IRQ | FIQ virt_intr == FIQ) { /* IRQ raised, FIQ already set */ return; } hmm, so what you want to avoid here is sending an IPI to the other CPU in

KVM call minutes December 13th

2011-12-13 Thread Juan Quintela
Hi - monitor command async framework * how to merge async command? - merge all QAPI (will take until the end of the release) - let things as they are - use a new corroutine for each async command, so the error can be maintained on each corrutine. * currently only one async

handling GPFs in gues

2011-12-13 Thread ret val
I'm trying to find where GPFs in a guest are handled. To start with I'd like to add a simple printk showing when this happens, but I'm having a rough time finding where this is handled. Does anyone happen to know where? Thank you -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: handling GPFs in gues

2011-12-13 Thread Avi Kivity
On 12/13/2011 05:58 PM, ret val wrote: I'm trying to find where GPFs in a guest are handled. To start with I'd like to add a simple printk showing when this happens, but I'm having a rough time finding where this is handled. Does anyone happen to know where? do_general_protection() (kvm is

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-13 Thread Antonios Motakis
On 12/12/2011 04:49 PM, Avi Kivity wrote: On 12/12/2011 05:25 PM, Peter Maydell wrote: On 12 December 2011 15:15, Avi Kivitya...@redhat.com wrote: We need to differentiate in how Linux-as-a-guest acts and how the cpu is supposed to work. A guest operating system can theoretically assign the

Re: [Android-virt] [PATCH v5 04/13] ARM: KVM: Memory virtualization setup

2011-12-13 Thread Christoffer Dall
On Tue, Dec 13, 2011 at 12:10 PM, Antonios Motakis a.mota...@virtualopensystems.com wrote: On 12/12/2011 04:49 PM, Avi Kivity wrote: On 12/12/2011 05:25 PM, Peter Maydell wrote: On 12 December 2011 15:15, Avi Kivitya...@redhat.com  wrote: We need to differentiate in how Linux-as-a-guest acts

Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-13 Thread Pekka Enberg
On Tue, Dec 13, 2011 at 9:00 AM, Matt Evans m...@ozlabs.org wrote: +int irq__register_device(u32 dev, u8 *num, u8 *pin, u8 *line) +{ +       fprintf(stderr, irq__register_device(%d, [%d], [%d], [%d]\n, +               dev, *num, *pin, *line); +       return 0; +} + +void irq__init(struct

Re: [PATCH 1/4] KVM: PPC: Book3s: PR: Disable preemption in vcpu_run

2011-12-13 Thread Scott Wood
On 12/09/2011 05:18 PM, Alexander Graf wrote: On 09.12.2011, at 19:19, Scott Wood wrote: Shouldn't you really have interrupts disabled here, as booke does? Ah, thanks for the reminder. Yeah, we probably want to disable interrupts in parallel to checking for signals (basically from one

Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-13 Thread Matt Evans
On 14 Dec 2011, at 04:43, Pekka Enberg penb...@kernel.org wrote: On Tue, Dec 13, 2011 at 9:00 AM, Matt Evans m...@ozlabs.org wrote: +int irq__register_device(u32 dev, u8 *num, u8 *pin, u8 *line) +{ + fprintf(stderr, irq__register_device(%d, [%d], [%d], [%d]\n, + dev,

Re: [PATCH V3 1/2] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-13 Thread David Evensky
On an x86 32bit system (and using the 32bit CodeSourcery toolchain on a x86_64 system) I get: evensky@machine:~/.../linux-kvm/tools/kvm$ make CC util/util.o util/util.c: In function 'mmap_hugetlbfs': util/util.c:93:17: error: comparison between signed and unsigned integer expressions

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Matt Evans
On 13/12/11 21:23, Sasha Levin wrote: On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide them. Hm... ioeventfds are located in the

[PATCH] virt.kvm_installer: Fix typo

2011-12-13 Thread Lucas Meneghel Rodrigues
Introduced with commit eda2ffce5c2ec514f404719010106bad1400d2bb. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/virt/kvm_installer.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/virt/kvm_installer.py b/client/virt/kvm_installer.py index

Re: [SeaBIOS PATCH v3] hotplug: Add device per func in ACPI DSDT tables

2011-12-13 Thread Kevin O'Connor
On Tue, Dec 06, 2011 at 07:32:55PM -0500, Amos Kong wrote: - Original Message - On Tue, Dec 06, 2011 at 01:39:35PM +0800, Amos Kong wrote: Only func 0 is registered to guest driver (we can only found func 0 in slot-funcs list of driver), the other functions could not be cleaned

Re: [RFC PATCH] kvm tools, qcow: Add support for growing refcount blocks

2011-12-13 Thread lan,Tianyu
oh,yeah. Thanks for your reply. It's a good lesson for me. :) I will update soon. On 二, 2011-12-13 at 16:57 +0800, Kevin Wolf wrote: Am 13.12.2011 04:41, schrieb lan,Tianyu: On 一, 2011-12-12 at 19:15 +0800, Kevin Wolf wrote: Am 12.12.2011 11:58, schrieb Pekka Enberg: On Mon, 12 Dec 2011,

Re: [PATCH V3 1/2] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-13 Thread Matt Evans
On 14/12/11 11:03, David Evensky wrote: On an x86 32bit system (and using the 32bit CodeSourcery toolchain on a x86_64 system) I get: evensky@machine:~/.../linux-kvm/tools/kvm$ make CC util/util.o util/util.c: In function 'mmap_hugetlbfs': util/util.c:93:17: error: comparison

Re: [PATCH] kvm tools: Clean up LINT assignment code

2011-12-13 Thread Matt Evans
Hi Sasha, On 12/12/11 06:50, Sasha Levin wrote: Just set delivery mode directly without going through ugly casting. This cleans up and simplifies the code. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/x86/kvm-cpu.c | 10 ++ 1 files changed, 2

Re: [PATCH V2 4/6] kvm tools: Add PPC64 XICS interrupt controller support

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:48PM +1100, Matt Evans wrote: 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

Re: [PATCH V2 2/6] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:46PM +1100, Matt Evans wrote: 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

Re: [PATCH V2 1/6] kvm tools: Generate SPAPR PPC64 guest device tree

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:45PM +1100, Matt Evans wrote: 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. Some aspects are currently hardwired for simplicity, for example

Re: What does LP stands for?

2011-12-13 Thread Zhen-Hua Li
Thanks to Avi Kivity. I think you are right. On Tue, Dec 13, 2011 at 8:59 PM, Avi Kivity a...@redhat.com wrote: On 12/13/2011 04:16 AM, Zhen-Hua Li wrote: Hi all, I saw a line from some document: KVM  supports 4096 LPs ,    What does LP stands for? Logical processors (on the host). --

[PATCH 1/2] KVM: x86 emulator: Make Group 2 instructions read CL in decoder

2011-12-13 Thread Takuya Yoshikawa
Group 2: D2, D3 ROL, ROR, RCL, RCR, SAL/SHL, SHR, SAR, When these instructions use the CL as their source operands, the emulator reads regs[VCPU_REGS_RCX] and then calls em_grp2(). This patch changes this to be done in the decoder by introducing SrcCL flag like Src2CL. The only semantic

[PATCH 2/2 v2] KVM: x86 emulator: Use opcode::execute for Group 2 instructions

2011-12-13 Thread Takuya Yoshikawa
Group 2: C0, C1, D0, D1, D2, D3 Split em_grp2() into em_rol(), em_ror(), ..., and register them. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/emulate.c | 91 +--- 1 files changed, 55 insertions(+), 36 deletions(-)

data type of member vcpu_id of struct kvm_vcpu

2011-12-13 Thread Zhen-Hua Li
Hi all, I am reading kvm code in 3.2.0-rc4, and found line in virt/kvm/kvm_main.c:kvm_vm_ioctl_create_vcpu if (v-vcpu_id == id) { So I think the member vcpu_id should be u32 type. --- include/linux/kvm_host.h2011-12-02 06:56:01.0 +0800 +++

Re: [PATCH] kvm tools: Clean up LINT assignment code

2011-12-13 Thread Sasha Levin
On Wed, 2011-12-14 at 13:06 +1100, Matt Evans wrote: Hi Sasha, On 12/12/11 06:50, Sasha Levin wrote: Just set delivery mode directly without going through ugly casting. This cleans up and simplifies the code. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Sasha Levin
On Wed, 2011-12-14 at 11:34 +1100, Matt Evans wrote: On 13/12/11 21:23, Sasha Levin wrote: On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't

[PATCH 1/2] kvm tools: Add kvm__has_cap() to check whether a cap is available on the host

2011-12-13 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |2 ++ tools/kvm/kvm.c |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h index 7159952..d24b70a 100644 ---

[PATCH 2/2] kvm tools: Don't use ioeventfds if no KVM_CAP_IOEVENTFD

2011-12-13 Thread Sasha Levin
Check KVM_CAP_IOEVENTFD before using ioeventfds. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c |2 +- tools/kvm/include/kvm/ioeventfd.h |2 +- tools/kvm/ioeventfd.c | 16 +++- 3 files changed, 17 insertions(+), 3

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Sasha Levin
On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide them. Hm... ioeventfds are located in the generic code and should be available on all

Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-13 Thread Pekka Enberg
On Tue, Dec 13, 2011 at 9:00 AM, Matt Evans m...@ozlabs.org wrote: +int irq__register_device(u32 dev, u8 *num, u8 *pin, u8 *line) +{ +       fprintf(stderr, irq__register_device(%d, [%d], [%d], [%d]\n, +               dev, *num, *pin, *line); +       return 0; +} + +void irq__init(struct

Re: [PATCH 1/4] KVM: PPC: Book3s: PR: Disable preemption in vcpu_run

2011-12-13 Thread Scott Wood
On 12/09/2011 05:18 PM, Alexander Graf wrote: On 09.12.2011, at 19:19, Scott Wood wrote: Shouldn't you really have interrupts disabled here, as booke does? Ah, thanks for the reminder. Yeah, we probably want to disable interrupts in parallel to checking for signals (basically from one

Re: [PATCH V2 1/2] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-13 Thread Matt Evans
On 14 Dec 2011, at 04:43, Pekka Enberg penb...@kernel.org wrote: On Tue, Dec 13, 2011 at 9:00 AM, Matt Evans m...@ozlabs.org wrote: +int irq__register_device(u32 dev, u8 *num, u8 *pin, u8 *line) +{ + fprintf(stderr, irq__register_device(%d, [%d], [%d], [%d]\n, + dev,

Re: [PATCH V3 1/2] kvm tools: Add ability to map guest RAM from hugetlbfs

2011-12-13 Thread David Evensky
On an x86 32bit system (and using the 32bit CodeSourcery toolchain on a x86_64 system) I get: evensky@machine:~/.../linux-kvm/tools/kvm$ make CC util/util.o util/util.c: In function 'mmap_hugetlbfs': util/util.c:93:17: error: comparison between signed and unsigned integer expressions

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Matt Evans
On 13/12/11 21:23, Sasha Levin wrote: On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide them. Hm... ioeventfds are located in the

Re: [PATCH V2 4/6] kvm tools: Add PPC64 XICS interrupt controller support

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:48PM +1100, Matt Evans wrote: 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

Re: [PATCH V2 2/6] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:46PM +1100, Matt Evans wrote: 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

Re: [PATCH V2 1/6] kvm tools: Generate SPAPR PPC64 guest device tree

2011-12-13 Thread David Gibson
On Tue, Dec 13, 2011 at 06:10:45PM +1100, Matt Evans wrote: 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. Some aspects are currently hardwired for simplicity, for example

Re: [PATCH V2 0/2] kvm tools: PPC64 basic support

2011-12-13 Thread Sasha Levin
On Wed, 2011-12-14 at 11:34 +1100, Matt Evans wrote: On 13/12/11 21:23, Sasha Levin wrote: On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't