Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg

2009-04-26 Thread Gleb Natapov
On Sun, Apr 26, 2009 at 10:38:39AM +0300, Michael S. Tsirkin wrote: Make kvm configure script and Makefile work again after things have been moved around, so that you can do 'cd kvm ./configure' to get a kvm-enabled qemu. Also, guard against infinite recursion in case of 'cd' commands

Re: [PULL 0/4] ppc patch queue 2012-12-18

2012-12-18 Thread Gleb Natapov
Alex The following changes since commit e11ae1a102b46f76441e328a2743ae5d6e201423: Gleb Natapov (1): KVM: remove unused variable. are available in the git repository at: git://github.com/agraf/linux-2.6.git kvm-ppc-next Alexander Graf (2): KVM: PPC: Only WARN

Re: [PATCH 2/4] KVM: PPC: Only WARN on invalid emulation

2012-12-19 Thread Gleb Natapov
On Wed, Dec 19, 2012 at 12:01:19AM +0100, Alexander Graf wrote: On 18.12.2012, at 23:54, Scott Wood wrote: On 12/18/2012 06:38:41 AM, Alexander Graf wrote: When we hit an emulation result that we didn't expect, that is an error, but it's nothing that warrants a BUG(), because it can be

Re: [PULL 0/4] ppc patch queue 2012-12-18

2012-12-19 Thread Gleb Natapov
On Tue, Dec 18, 2012 at 05:35:57PM +0100, Alexander Graf wrote: On 12/18/2012 04:20 PM, Gleb Natapov wrote: On Tue, Dec 18, 2012 at 01:38:39PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Is this for 3.8 or 3.9? This is for 3.9

Re: [PATCH 2/4] KVM: PPC: Only WARN on invalid emulation

2012-12-19 Thread Gleb Natapov
On Wed, Dec 19, 2012 at 10:59:28AM +0100, Alexander Graf wrote: On 19.12.2012, at 10:37, Gleb Natapov wrote: On Wed, Dec 19, 2012 at 12:01:19AM +0100, Alexander Graf wrote: On 18.12.2012, at 23:54, Scott Wood wrote: On 12/18/2012 06:38:41 AM, Alexander Graf wrote: When we hit

Re: [PULL 0/8] ppc patch queue 2013-01-10

2013-01-17 Thread Gleb Natapov
On Thu, Jan 17, 2013 at 11:53:38AM +0100, Alexander Graf wrote: On 14.01.2013, at 10:03, Gleb Natapov wrote: On Thu, Jan 10, 2013 at 01:45:04PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights this time

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-18 Thread Gleb Natapov
On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction.

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-21 Thread Gleb Natapov
On Fri, Jan 18, 2013 at 07:23:53AM -0500, Ben Collins wrote: On Jan 18, 2013, at 7:14 AM, Alexander Graf ag...@suse.de wrote: On 18.01.2013, at 11:55, Gleb Natapov wrote: On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-24 Thread Gleb Natapov
On Thu, Jan 24, 2013 at 07:23:10PM +0100, Alexander Graf wrote: On 22.01.2013, at 00:36, Marcelo Tosatti wrote: On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug

Re: [RFC PATCH 0/6] kvm/ppc/mpic: in-kernel irqchip

2013-02-18 Thread Gleb Natapov
Can you tell us why mpic should be in kernel? Is it used often by modern guests or may be they prefer MSI for interrupt delivery (hmm may be MSIs are delivered through mpic too)? On x86 we actually would've preferred to move PIC/IOAPIC form the kernel and leave only LAPIC there (but for historical

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-18 Thread Gleb Natapov
Copying Christoffer since ARM has in kernel irq chip too. On Wed, Feb 13, 2013 at 11:49:15PM -0600, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-19 Thread Gleb Natapov
On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood wrote: On 02/18/2013 06:21:59 AM, Gleb Natapov wrote: Copying Christoffer since ARM has in kernel irq chip too. On Wed, Feb 13, 2013 at 11:49:15PM -0600, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-19 Thread Gleb Natapov
On Mon, Feb 18, 2013 at 09:50:44PM -0800, Christoffer Dall wrote: +static int kvm_ioctl_create_device(struct kvm *kvm, + struct kvm_create_device *cd) +{ + struct kvm_device *dev = NULL; + bool test = cd-flags KVM_CREATE_DEVICE_TEST;

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-21 Thread Gleb Natapov
On Wed, Feb 20, 2013 at 08:05:12PM -0600, Scott Wood wrote: On 02/20/2013 07:09:49 AM, Gleb Natapov wrote: On Tue, Feb 19, 2013 at 03:16:37PM -0600, Scott Wood wrote: On 02/19/2013 06:24:18 AM, Gleb Natapov wrote: On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood wrote: The ability

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-24 Thread Gleb Natapov
On Wed, Feb 20, 2013 at 06:20:51PM -0600, Scott Wood wrote: On 02/20/2013 01:58:54 PM, Marcelo Tosatti wrote: This is probably a stupid question, but why the KVM_SET_IRQCHIP/KVM_SET_GSI_ROUTING interface is not appropriate for your purposes? x86 sets up a default GSI-IRQCHIP PIN mapping on

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-25 Thread Gleb Natapov
On Mon, Feb 25, 2013 at 12:11:19PM +1100, Paul Mackerras wrote: On Mon, Feb 18, 2013 at 02:21:59PM +0200, Gleb Natapov wrote: Copying Christoffer since ARM has in kernel irq chip too. On Wed, Feb 13, 2013 at 11:49:15PM -0600, Scott Wood wrote: Currently, devices that are emulated inside

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 10:40:18AM +0100, Paolo Bonzini wrote: Il 05/03/2013 16:25, Gleb Natapov ha scritto: 1) We need to set the generic interrupt type of the system before we create vcpus. This is a new ioctl that sets the overall system interrupt controller type to a specific

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 11:04:21AM +0100, Alexander Graf wrote: Am 06.03.2013 um 10:58 schrieb Gleb Natapov g...@redhat.com: On Wed, Mar 06, 2013 at 10:40:18AM +0100, Paolo Bonzini wrote: Il 05/03/2013 16:25, Gleb Natapov ha scritto: 1) We need to set the generic interrupt type

Re: [RFC PATCH 1/6] kvm: add device control API

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 01:48:33PM +1100, Benjamin Herrenschmidt wrote: On Wed, 2013-02-13 at 23:49 -0600, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 05:38:33AM -0500, Paolo Bonzini wrote: - Messaggio originale - Da: Gleb Natapov g...@redhat.com A: Paolo Bonzini pbonz...@redhat.com Cc: Alexander Graf ag...@suse.de, k...@vger.kernel.org, kvm-ppc@vger.kernel.org, Stuart Yoder stuart.yo

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 12:46:52PM +0100, Alexander Graf wrote: On 06.03.2013, at 12:44, Paolo Bonzini wrote: So what is the difference between calling this special ioctl before creating vcpus and calling create device ioctl instead and create QEMU proxy device at whatever point in

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 02:22:15PM +0100, Alexander Graf wrote: On 06.03.2013, at 14:14, Gleb Natapov wrote: On Wed, Mar 06, 2013 at 01:20:39PM +0100, Alexander Graf wrote: The problem would only start if KVM_SET_IRQCHIP_TYPE (new name of KVM_CREATE_IRQCHIP_ARGS) forced you to later

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 02:41:04PM +0100, Paolo Bonzini wrote: Il 06/03/2013 14:14, Gleb Natapov ha scritto: The problem would only start if KVM_SET_IRQCHIP_TYPE (new name of KVM_CREATE_IRQCHIP_ARGS) forced you to later call KVM_CREATE_DEVICE. Ah, I see. I don't see why it would

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 03:03:53PM +0100, Alexander Graf wrote: On 06.03.2013, at 14:56, Gleb Natapov wrote: On Wed, Mar 06, 2013 at 02:22:15PM +0100, Alexander Graf wrote: On 06.03.2013, at 14:14, Gleb Natapov wrote: On Wed, Mar 06, 2013 at 01:20:39PM +0100, Alexander Graf wrote

Re: in-kernel interrupt controller steering

2013-03-06 Thread Gleb Natapov
On Wed, Mar 06, 2013 at 03:48:54PM +0100, Alexander Graf wrote: On 06.03.2013, at 15:41, Gleb Natapov wrote: On Wed, Mar 06, 2013 at 03:03:53PM +0100, Alexander Graf wrote: On 06.03.2013, at 14:56, Gleb Natapov wrote: On Wed, Mar 06, 2013 at 02:22:15PM +0100, Alexander Graf wrote

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-03-24 Thread Gleb Natapov
On Fri, Mar 22, 2013 at 03:25:56PM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Changes include: - race-free in-kernel watchdog handling api - e500 mmu fixes Alex Pulled, thanks. The following changes since commit

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-03-25 Thread Gleb Natapov
On Tue, Mar 26, 2013 at 12:35:09AM +0100, Alexander Graf wrote: On 26.03.2013, at 00:16, Scott Wood wrote: On 03/25/2013 05:59:39 PM, Alexander Graf wrote: On 25.03.2013, at 23:54, Scott Wood wrote: On 03/25/2013 05:32:11 PM, Alexander Graf wrote: On 25.03.2013, at 23:21, Scott Wood

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-03-31 Thread Gleb Natapov
On Tue, Mar 26, 2013 at 11:37:42AM -0500, Scott Wood wrote: On 03/25/2013 08:33:12 PM, Gleb Natapov wrote: On Tue, Mar 26, 2013 at 12:35:09AM +0100, Alexander Graf wrote: On 26.03.2013, at 00:16, Scott Wood wrote: On 03/25/2013 05:59:39 PM, Alexander Graf wrote: On 25.03.2013, at 23

Re: [RFC PATCH v3 5/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-03 Thread Gleb Natapov
On Tue, Apr 02, 2013 at 08:57:52PM -0500, Scott Wood wrote: Hook the MPIC code up to the KVM interfaces, add locking, etc. TODO: irqfd support, split up into multiple patches, KVM_IRQ_LINE support Signed-off-by: Scott Wood scottw...@freescale.com --- [skip] diff --git

Re: [RFC PATCH v2 1/6] kvm: add device control API

2013-04-04 Thread Gleb Natapov
On Wed, Apr 03, 2013 at 07:39:52PM +0200, Alexander Graf wrote: On 03.04.2013, at 19:37, Scott Wood wrote: On 04/03/2013 08:22:37 AM, Alexander Graf wrote: On 03.04.2013, at 04:17, Paul Mackerras wrote: On Tue, Apr 02, 2013 at 08:19:56PM -0500, Scott Wood wrote: On 04/02/2013

Re: [RFC PATCH v3 1/6] kvm: add device control API

2013-04-04 Thread Gleb Natapov
On Tue, Apr 02, 2013 at 08:57:48PM -0500, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through

Re: [RFC PATCH v3 1/6] kvm: add device control API

2013-04-08 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:47:45PM -0500, Scott Wood wrote: On 04/04/2013 05:41:35 AM, Gleb Natapov wrote: On Tue, Apr 02, 2013 at 08:57:48PM -0500, Scott Wood wrote: +struct kvm_device_attr { + __u32 flags; /* no flags currently defined */ + __u32 group; /* device

Re: [RFC PATCH v3 1/6] kvm: add device control API

2013-04-08 Thread Gleb Natapov
On Fri, Apr 05, 2013 at 12:02:06PM +1100, Paul Mackerras wrote: On Thu, Apr 04, 2013 at 01:41:35PM +0300, Gleb Natapov wrote: Since now each device has its own fd is it an advantage to enforce common interface between different devices? If we do so though why not handle file creation

Re: [RFC PATCH v3 5/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-08 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:33:38PM -0500, Scott Wood wrote: On 04/04/2013 12:59:02 AM, Gleb Natapov wrote: On Wed, Apr 03, 2013 at 03:58:04PM -0500, Scott Wood wrote: KVM_DEV_MPIC_* could go elsewhere if you want to avoid cluttering the main kvm.h. The arch header would be OK, since the non

Re: [PULL 0/5] ppc patch queue 2013-04-17

2013-04-22 Thread Gleb Natapov
On Wed, Apr 17, 2013 at 09:04:04PM +0200, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull for 3.10. Pulled. Thanks. Changes include: - KVM: PPC: Fix in-kernel MMIO loads - KVM: PPC: BookE: Fix 64-bit guest kernels with SMP Alex

Re: [PATCH 0/7] KVM: irqfd generalization prepare patch set

2013-04-24 Thread Gleb Natapov
On Tue, Apr 16, 2013 at 07:26:08PM +0200, Alexander Graf wrote: The concept of an irqfd and interrupt routing are nothing particularly tied into the IOAPIC implementation. In fact, most of the code already is perfectly generic. This patch set decouples most bits of the existing irqchip and

Re: [PATCH 0/7] KVM: irqfd generalization prepare patch set

2013-04-25 Thread Gleb Natapov
On Wed, Apr 24, 2013 at 01:20:31PM +0300, Gleb Natapov wrote: On Tue, Apr 16, 2013 at 07:26:08PM +0200, Alexander Graf wrote: The concept of an irqfd and interrupt routing are nothing particularly tied into the IOAPIC implementation. In fact, most of the code already is perfectly generic

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 12:47:39PM +0200, Alexander Graf wrote: On 25.04.2013, at 11:43, Gleb Natapov wrote: On Fri, Apr 12, 2013 at 07:08:42PM -0500, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-25 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 03:45:14PM +0200, Alexander Graf wrote: Please move struct definitions and KVM_CREATE_DEVICE_TEST define out from ioctl definition block. Let me change that in my tree... So are you sending this via your tree and I should not apply it directly? I was hoping

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-26 Thread Gleb Natapov
On Thu, Apr 25, 2013 at 01:59:20PM -0500, Scott Wood wrote: On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: On 04/25/2013 05:47:39 AM, Alexander Graf wrote: On 25.04.2013, at 11:43, Gleb Natapov wrote: +void kvm_device_put

Re: [PATCH v4 1/6] kvm: add device control API

2013-04-26 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 11:55:27AM +0200, Alexander Graf wrote: On 26.04.2013, at 11:53, Gleb Natapov wrote: On Thu, Apr 25, 2013 at 01:59:20PM -0500, Scott Wood wrote: On 04/25/2013 01:22:04 PM, Gleb Natapov wrote: On Thu, Apr 25, 2013 at 11:51:08AM -0500, Scott Wood wrote: On 04/25

Re: [PATCH 16/42] KVM: Add KVM_IRQCHIP_NUM_PINS in addition to KVM_IOAPIC_NUM_PINS

2013-04-27 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 08:30:11PM +0200, Alexander Graf wrote: The concept of routing interrupt lines to an irqchip is nothing that is IOAPIC specific. Every irqchip has a maximum number of pins that can be linked to irq lines. So let's add a new define that allows us to reuse generic code

Re: [PATCH 34/42] kvm: destroy emulated devices on VM exit

2013-04-27 Thread Gleb Natapov
On Fri, Apr 26, 2013 at 08:30:29PM +0200, Alexander Graf wrote: From: Scott Wood scottw...@freescale.com The hassle of getting refcounting right was greater than the hassle of keeping a list of devices to destroy on VM exit. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by:

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held. The srcu read lock, OTOH, is required. Signed-off-by: Scott Wood scottw...@freescale.com Marcelo, could you

Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write

2013-05-02 Thread Gleb Natapov
On Thu, May 02, 2013 at 12:53:44PM +0200, Alexander Graf wrote: On 02.05.2013, at 09:18, Gleb Natapov wrote: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: On 27.04.2013, at 02:53, Scott Wood wrote: Nobody is actually calling these functions with slots_lock held

Re: [PATCH 0/8] kvm/ppc: fixes for 3.10

2013-06-09 Thread Gleb Natapov
On Thu, Jun 06, 2013 at 07:16:28PM -0500, Scott Wood wrote: Most of these have been posted before, but I grouped them together as there are some contextual dependencies between them. Gleb/Paolo: As Alex doesn't appear to be back yet, can you apply these if there's no objection over the next

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-15 Thread Gleb Natapov
On Mon, Jul 15, 2013 at 01:44:46PM +0200, Alexander Graf wrote: On 15.07.2013, at 13:30, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 04:41:17PM +0530, Bharat Bhushan wrote: KVM_HC_VM_RESET: Requests that the virtual machine be reset. KVM_HC_VM_SHUTDOWN: Requests that the virtual machine

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-15 Thread Gleb Natapov
On Mon, Jul 15, 2013 at 02:21:51PM +0200, Alexander Graf wrote: On 15.07.2013, at 14:15, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 01:44:46PM +0200, Alexander Graf wrote: On 15.07.2013, at 13:30, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 04:41:17PM +0530, Bharat Bhushan wrote

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-15 Thread Gleb Natapov
On Mon, Jul 15, 2013 at 02:26:38PM +0200, Alexander Graf wrote: On 15.07.2013, at 14:24, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 02:21:51PM +0200, Alexander Graf wrote: On 15.07.2013, at 14:15, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 01:44:46PM +0200, Alexander Graf wrote

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-16 Thread Gleb Natapov
On Mon, Jul 15, 2013 at 01:17:33PM -0500, Scott Wood wrote: On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 04:41:17PM +0530, Bharat Bhushan wrote: KVM_HC_VM_RESET: Requests that the virtual machine be reset. KVM_HC_VM_SHUTDOWN: Requests that the virtual machine

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-17 Thread Gleb Natapov
On Tue, Jul 16, 2013 at 06:04:34PM -0500, Scott Wood wrote: On 07/16/2013 01:35:55 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 01:17:33PM -0500, Scott Wood wrote: On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: There is no much sense to share hypercalls between architectures

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-24 Thread Gleb Natapov
Copying Andrea for him to verify that I am not talking nonsense :) On Wed, Jul 24, 2013 at 10:25:20AM +0200, Alexander Graf wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1580dd4..5e8635b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -102,6 +102,10

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-24 Thread Gleb Natapov
On Wed, Jul 24, 2013 at 12:09:42PM +0200, Alexander Graf wrote: On 24.07.2013, at 12:01, Gleb Natapov wrote: Copying Andrea for him to verify that I am not talking nonsense :) On Wed, Jul 24, 2013 at 10:25:20AM +0200, Alexander Graf wrote: diff --git a/virt/kvm/kvm_main.c b/virt/kvm

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-24 Thread Gleb Natapov
On Wed, Jul 24, 2013 at 12:25:18PM +0200, Alexander Graf wrote: On 24.07.2013, at 12:19, Gleb Natapov wrote: On Wed, Jul 24, 2013 at 12:09:42PM +0200, Alexander Graf wrote: On 24.07.2013, at 12:01, Gleb Natapov wrote: Copying Andrea for him to verify that I am not talking nonsense

Re: [PATCH 2/2] kvm: powerpc: set cache coherency only for kernel managed pages

2013-07-25 Thread Gleb Natapov
On Thu, Jul 25, 2013 at 06:07:55PM +0200, Alexander Graf wrote: On 25.07.2013, at 10:50, Gleb Natapov wrote: On Wed, Jul 24, 2013 at 03:32:49PM -0500, Scott Wood wrote: On 07/24/2013 04:39:59 AM, Alexander Graf wrote: On 24.07.2013, at 11:35, Gleb Natapov wrote: On Wed, Jul 24

Re: [PATCH 0/2] kvm: use anon_inode_getfd() with O_CLOEXEC flag

2013-08-26 Thread Gleb Natapov
On Sat, Aug 24, 2013 at 10:14:06PM +0200, Yann Droneaud wrote: Hi, Following a patchset asking to change calls to get_unused_flag() [1] to use O_CLOEXEC, Alex Williamson [2][3] decided to change VFIO to use the flag. Since it's a related subsystem to KVM, using O_CLOEXEC for file

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-26 Thread Gleb Natapov
On Wed, Aug 14, 2013 at 10:51:14AM +1000, Benjamin Herrenschmidt wrote: On Thu, 2013-08-01 at 14:44 +1000, Alexey Kardashevskiy wrote: This is to reserve a capablity number for upcoming support of H_PUT_TCE_INDIRECT and H_STUFF_TCE pseries hypercalls which support mulptiple DMA map/unmap

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 02:22:42PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2013-08-27 at 14:19 +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-08-26 at 15:37 +0300, Gleb Natapov wrote: Gleb, any chance you can put this (and the next one) into a tree to lock in the numbers

Re: [PATCH 02/10] KVM: PPC: reserve a capability number for multitce support

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 02:19:58PM +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-08-26 at 15:37 +0300, Gleb Natapov wrote: Gleb, any chance you can put this (and the next one) into a tree to lock in the numbers ? Applied it. Sorry for slow response, was on vocation and still go

Re: [PULL 00/19] ppc patch queue 2013-08-29

2013-08-30 Thread Gleb Natapov
On Thu, Aug 29, 2013 at 12:21:58PM +0200, Alexander Graf wrote: Hi Paolo / Gleb, This is my current patch queue for ppc. Please pull. Pulled, thanks. Changes include: - Book3S HV: CMA based memory allocator for linear memory - A few bug fixes Alex The following changes

Re: [PATCH v9 00/13] KVM: PPC: IOMMU in-kernel handling of VFIO

2013-08-30 Thread Gleb Natapov
On Fri, Aug 30, 2013 at 08:26:54PM +1000, Alexey Kardashevskiy wrote: On 08/28/2013 06:37 PM, Alexey Kardashevskiy wrote: This accelerates VFIO DMA operations on POWER by moving them into kernel. This depends on VFIO external API patch which is on its way to upstream. Changes: v9:

Re: [PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO

2013-09-01 Thread Gleb Natapov
On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote: This reserves a capability number for upcoming support of VFIO-IOMMU DMA operations in real mode. This reserves a number for a new SPAPR TCE IOMMU KVM device which is going to manage lifetime of SPAPR TCE IOMMU object.

Re: [PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO

2013-09-01 Thread Gleb Natapov
On Sun, Sep 01, 2013 at 09:39:23PM +1000, Alexey Kardashevskiy wrote: On 09/01/2013 09:27 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote: This reserves a capability number for upcoming support of VFIO-IOMMU DMA operations in real mode

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-01 Thread Gleb Natapov
On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests targeted an IOMMU TCE table without passing them to user space which saves time on switching to user space and back. Both real

[PATCH] KVM: PPC: fix couple of memory leaks in MPIC/XICS devices

2013-09-01 Thread Gleb Natapov
XICS failed to free xics structure on error path. MPIC destroy handler forgot to delete kvm_device structure. Signed-off-by: Gleb Natapov g...@redhat.com --- Be warned that this is not even compiled tested. diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c index

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-03 Thread Gleb Natapov
On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy wrote: On 09/01/2013 10:06 PM, Gleb Natapov wrote: On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests targeted

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-06 Thread Gleb Natapov
On Fri, Sep 06, 2013 at 09:38:21AM +1000, Alexey Kardashevskiy wrote: On 09/06/2013 04:10 AM, Gleb Natapov wrote: On Wed, Sep 04, 2013 at 02:01:28AM +1000, Alexey Kardashevskiy wrote: On 09/03/2013 08:53 PM, Gleb Natapov wrote: On Mon, Sep 02, 2013 at 01:14:29PM +1000, Alexey Kardashevskiy

Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-06 Thread Gleb Natapov
On Thu, Sep 05, 2013 at 02:05:09PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2013-09-03 at 13:53 +0300, Gleb Natapov wrote: Or supporting all IOMMU links (and leaving emulated stuff as is) in on device is the last thing I have to do and then you'll ack the patch? I am concerned

Re: [PATCH v10 12/13] KVM: PPC: Add support for IOMMU in-kernel handling

2013-09-08 Thread Gleb Natapov
On Fri, Sep 06, 2013 at 08:40:26PM +1000, Alexey Kardashevskiy wrote: This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests targeted an IOMMU TCE table without passing them to user space which saves time on switching to user space and back. Both real

Re: [PATCH 1/2] KVM: Implement default IRQ routing

2013-09-23 Thread Gleb Natapov
On Mon, Sep 23, 2013 at 09:24:14PM +1000, Paul Mackerras wrote: On Sun, Sep 22, 2013 at 03:32:53PM +0300, Gleb Natapov wrote: On Tue, Sep 17, 2013 at 07:18:40PM +1000, Paul Mackerras wrote: This implements a simple way to express the case of IRQ routing where there is one in-kernel PIC

Re: [RFC PATCH 09/11] kvm: simplify processor compat check

2013-09-29 Thread Gleb Natapov
On Sat, Sep 28, 2013 at 09:06:47PM +0530, Aneesh Kumar K.V wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 27/09/2013 15:13, Aneesh Kumar K.V ha scritto: Alexander Graf ag...@suse.de writes: On 27.09.2013, at 12:03, Aneesh Kumar K.V wrote: From: Aneesh Kumar K.V

Re: [PATCH 1/2] KVM: Implement default IRQ routing

2013-09-29 Thread Gleb Natapov
On Thu, Sep 26, 2013 at 10:00:59AM +1000, Paul Mackerras wrote: On Mon, Sep 23, 2013 at 09:34:01PM +0300, Gleb Natapov wrote: On Mon, Sep 23, 2013 at 09:24:14PM +1000, Paul Mackerras wrote: On Sun, Sep 22, 2013 at 03:32:53PM +0300, Gleb Natapov wrote: On Tue, Sep 17, 2013 at 07:18:40PM

Re: [RFC PATCH 09/11] kvm: simplify processor compat check

2013-09-29 Thread Gleb Natapov
On Sun, Sep 29, 2013 at 08:35:16PM +0530, Aneesh Kumar K.V wrote: Gleb Natapov g...@redhat.com writes: On Sat, Sep 28, 2013 at 09:06:47PM +0530, Aneesh Kumar K.V wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 27/09/2013 15:13, Aneesh Kumar K.V ha scritto: Alexander Graf ag

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Gleb Natapov
On Tue, Oct 01, 2013 at 06:34:26PM +1000, Michael Ellerman wrote: On Thu, Sep 26, 2013 at 11:06:59AM +0200, Paolo Bonzini wrote: Il 26/09/2013 08:31, Michael Ellerman ha scritto: Some powernv systems include a hwrng. Guests can access it via the H_RANDOM hcall. Is there any reason to

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Gleb Natapov
On Tue, Oct 01, 2013 at 07:23:20PM +1000, Paul Mackerras wrote: On Tue, Oct 01, 2013 at 11:39:08AM +0300, Gleb Natapov wrote: On Tue, Oct 01, 2013 at 06:34:26PM +1000, Michael Ellerman wrote: On Thu, Sep 26, 2013 at 11:06:59AM +0200, Paolo Bonzini wrote: Il 26/09/2013 08:31, Michael

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 11:50:50AM +0200, Alexander Graf wrote: On 02.10.2013, at 11:11, Alexander Graf wrote: On 02.10.2013, at 11:06, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 10:46 +0200, Paolo Bonzini wrote: Thanks. Any chance you can give some numbers of a

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 11:57:55PM +1000, Michael Ellerman wrote: On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 11:50:50AM +0200, Alexander Graf wrote: On 02.10.2013, at 11:11, Alexander Graf wrote: So how do you solve live migration between

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 04:33:18PM +0200, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha scritto: The hwrng is accessible by host userspace via /dev/mem. A guest should live on the same permission level as a user space application. If you run QEMU as UID 1000 without access

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:02:20AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: Yes, I alluded to it in my email to Paul and Paolo asked also. How this interface is disabled? Also hwrnd is MMIO in a host why guest needs to use hypercall

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-02 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha scritto: The hwrng is accessible by host userspace via /dev/mem.

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:21:20AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 17:37 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 04:33:18PM +0200, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha scritto: The hwrng is accessible by host userspace via

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:07:22AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: Yes, I alluded to it in my email to Paul and Paolo asked also. How this interface is disabled? Also hwrnd is MMIO in a host why guest needs to use hypercall

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:06:30PM +1000, Paul Mackerras wrote: On Thu, Oct 03, 2013 at 08:48:03AM +0300, Gleb Natapov wrote: On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33

Re: [PATCH 0/6] Get rid of mandatory huge page defines

2013-10-13 Thread Gleb Natapov
On Sat, Oct 12, 2013 at 10:36:36AM -0700, Christoffer Dall wrote: On Wed, Oct 02, 2013 at 02:22:27PM -0700, Christoffer Dall wrote: The current KVM code relies on a number of definitions to exist for each architecture: KVM_HPAGE_GFN_SHIFT KVM_NR_HPAGE_SIZES KVM_PAGES_PER_HPAGE

Re: [PATCH 0/6] Get rid of mandatory huge page defines

2013-10-13 Thread Gleb Natapov
On Sun, Oct 13, 2013 at 06:41:22PM +0100, Christoffer Dall wrote: On Sun, Oct 13, 2013 at 12:31:29PM +0300, Gleb Natapov wrote: On Sat, Oct 12, 2013 at 10:36:36AM -0700, Christoffer Dall wrote: On Wed, Oct 02, 2013 at 02:22:27PM -0700, Christoffer Dall wrote: The current KVM code relies

Re: [PATCH 0/6] Get rid of mandatory huge page defines

2013-10-14 Thread Gleb Natapov
On Sun, Oct 13, 2013 at 08:29:43PM +0100, Christoffer Dall wrote: On Sun, Oct 13, 2013 at 08:49:28PM +0300, Gleb Natapov wrote: On Sun, Oct 13, 2013 at 06:41:22PM +0100, Christoffer Dall wrote: On Sun, Oct 13, 2013 at 12:31:29PM +0300, Gleb Natapov wrote: On Sat, Oct 12, 2013 at 10:36

Re: [PULL 34/51] powerpc: move debug registers in a structure

2013-11-03 Thread Gleb Natapov
On Thu, Oct 31, 2013 at 10:18:19PM +0100, Alexander Graf wrote: From: Bharat Bhushan r65...@freescale.com This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Signed-off-by: