Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Thomas Huth
On 16/12/15 06:56, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log and deliver machine

Re: [PATCH v2] KVM: PPC: Exit guest upon fatal machine check exception

2015-12-16 Thread Thomas Huth
On 16/12/15 06:56, Aravinda Prasad wrote: > This patch modifies KVM to cause a guest exit with > KVM_EXIT_NMI instead of immediately delivering a 0x200 > interrupt to guest upon machine check exception in > guest address. Exiting the guest enables QEMU to build > error log and deliver machine

Re: [PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-12-09 Thread Thomas Huth
On 09/12/15 04:28, Paul Mackerras wrote: > On Wed, Nov 04, 2015 at 10:03:48AM +0100, Thomas Huth wrote: >> Only using 32 memslots for KVM on powerpc is way too low, you can >> nowadays hit this limit quite fast by adding a couple of PCI devices >> and/or pluggable memory DIMMs

Re: [PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-12-09 Thread Thomas Huth
On 09/12/15 04:28, Paul Mackerras wrote: > On Wed, Nov 04, 2015 at 10:03:48AM +0100, Thomas Huth wrote: >> Only using 32 memslots for KVM on powerpc is way too low, you can >> nowadays hit this limit quite fast by adding a couple of PCI devices >> and/or pluggable memory DIMMs

[PATCH] KVM: PPC: Increase memslots to 512

2015-12-09 Thread Thomas Huth
-specific header since this gets defined in the generic kvm_host.h header anyway. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/i

[PATCH] KVM: PPC: Increase memslots to 512

2015-12-09 Thread Thomas Huth
-specific header since this gets defined in the generic kvm_host.h header anyway. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/i

Re: [PATCH] KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

2015-12-07 Thread Thomas Huth
On 20/11/15 09:11, Thomas Huth wrote: > In the old DABR register, the BT (Breakpoint Translation) bit > is bit number 61. In the new DAWRX register, the WT (Watchpoint > Translation) bit is bit number 59. So to move the DABR-BT bit > into the position of the DAWRX-WT bit, it has t

Re: [PATCH] KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

2015-12-07 Thread Thomas Huth
On 20/11/15 09:11, Thomas Huth wrote: > In the old DABR register, the BT (Breakpoint Translation) bit > is bit number 61. In the new DAWRX register, the WT (Watchpoint > Translation) bit is bit number 59. So to move the DABR-BT bit > into the position of the DAWRX-WT bit, it has t

[PATCH] KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

2015-11-20 Thread Thomas Huth
watchpoints in gdb of older guests that only use the H_SET_DABR/X interface instead of the new H_SET_MODE interface. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/power

[PATCH] KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8

2015-11-20 Thread Thomas Huth
watchpoints in gdb of older guests that only use the H_SET_DABR/X interface instead of the new H_SET_MODE interface. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/power

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Thomas Huth
On 19/11/15 09:37, Christian Borntraeger wrote: > From: David Hildenbrand > > Let's provide a function to lookup a VCPU by id. > > Reviewed-by: Christian Borntraeger > Reviewed-by: Dominik Dingel > Signed-off-by:

Re: [PATCH 1/4] KVM: Provide function for VCPU lookup by id

2015-11-19 Thread Thomas Huth
On 19/11/15 09:37, Christian Borntraeger wrote: > From: David Hildenbrand > > Let's provide a function to lookup a VCPU by id. > > Reviewed-by: Christian Borntraeger > Reviewed-by: Dominik Dingel > Signed-off-by:

Re: [PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-11-18 Thread Thomas Huth
On 04/11/15 10:03, Thomas Huth wrote: > Only using 32 memslots for KVM on powerpc is way too low, you can > nowadays hit this limit quite fast by adding a couple of PCI devices > and/or pluggable memory DIMMs to the guest. > x86 already increased the limit to 512 in total, to

Re: [PATCH] KVM: PPC: Exit guest upon fatal machine check exception

2015-11-12 Thread Thomas Huth
On 13/11/15 07:26, Aravinda Prasad wrote: > > On Friday 13 November 2015 07:20 AM, David Gibson wrote: >> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote: [...] >>> So thinking whether qemu should explicitly enable the new NMI >>> behavior. >> >> So, I think the reasoning above

Re: [PATCH] KVM: PPC: Exit guest upon fatal machine check exception

2015-11-12 Thread Thomas Huth
On 13/11/15 07:26, Aravinda Prasad wrote: > > On Friday 13 November 2015 07:20 AM, David Gibson wrote: >> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote: [...] >>> So thinking whether qemu should explicitly enable the new NMI >>> behavior. >> >> So, I think the reasoning above

Re: [kvm-unit-tests PATCH v2 02/19] trivial: lib: fail hard on failed mallocs

2015-11-09 Thread Thomas Huth
On 09/11/15 21:53, Andrew Jones wrote: > It's pretty safe to not even bother checking for NULL when > using malloc and friends, but if we do check, then fail > hard. > > Signed-off-by: Andrew Jones <drjo...@redhat.com> > --- > v2: no code in asserts [Thomas Huth]

Re: [kvm-unit-tests PATCH 02/18] trivial: lib: fail hard on failed mallocs

2015-11-06 Thread Thomas Huth
On 06/11/15 01:24, Andrew Jones wrote: > It's pretty safe to not even bother checking for NULL when > using malloc and friends, but if we do check, then fail > hard. > > Signed-off-by: Andrew Jones > --- > lib/virtio-mmio.c | 7 ++- > 1 file changed, 2 insertions(+), 5

[PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-11-04 Thread Thomas Huth
). And while we're at it, also remove the KVM_MEM_SLOTS_NUM definition from the powerpc-specific header since this gets defined in the generic kvm_host.h header anyway. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion

[PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-11-04 Thread Thomas Huth
). And while we're at it, also remove the KVM_MEM_SLOTS_NUM definition from the powerpc-specific header since this gets defined in the generic kvm_host.h header anyway. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion

[PATCH 0/1] KVM: PPC: Increase memslots

2015-11-04 Thread Thomas Huth
to me for the time being (but in the long run, we should really make this dynamically instead, I think). Thomas Huth (1): KVM: PPC: Increase memslots to 320 arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list

[PATCH 0/1] KVM: PPC: Increase memslots

2015-11-04 Thread Thomas Huth
to me for the time being (but in the long run, we should really make this dynamically instead, I think). Thomas Huth (1): KVM: PPC: Increase memslots to 320 arch/powerpc/include/asm/kvm_host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list

Re: [kvm-unit-tests PATCH 00/14] ppc64: initial drop

2015-11-02 Thread Thomas Huth
On 03/08/15 16:41, Andrew Jones wrote: > This series is the first series of a series of series that will > bring support to kvm-unit-tests for ppc64, and eventually ppc64le. Hi Andrew, may I ask about the current state of ppc64 support in the kvm-unit-tests? Is there a newer version available

Re: [kvm-unit-tests PATCH 00/14] ppc64: initial drop

2015-11-02 Thread Thomas Huth
On 03/08/15 16:41, Andrew Jones wrote: > This series is the first series of a series of series that will > bring support to kvm-unit-tests for ppc64, and eventually ppc64le. Hi Andrew, may I ask about the current state of ppc64 support in the kvm-unit-tests? Is there a newer version available

Re: [PATCH] KVM: PPC: Book3S HV: Synthesize segment fault if SLB lookup fails

2015-11-02 Thread Thomas Huth
On 27/10/15 06:13, Paul Mackerras wrote: > When handling a hypervisor data or instruction storage interrupt (HDSI > or HISI), we look up the SLB entry for the address being accessed in > order to translate the effective address to a virtual address which can > be looked up in the guest HPT. This

Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-27 Thread Thomas Huth
On 26/10/15 06:15, Paul Mackerras wrote: > On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote: >> Yes, we'll likely need this soon! 32 slots are not enough... > > Would anyone object if I raised the limit for PPC to 512 slots? In the long run we should really ma

Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-27 Thread Thomas Huth
On 26/10/15 06:15, Paul Mackerras wrote: > On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote: >> Yes, we'll likely need this soon! 32 slots are not enough... > > Would anyone object if I raised the limit for PPC to 512 slots? In the long run we should really ma

Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-16 Thread Thomas Huth
ak; > case KVM_CAP_MAX_VCPUS: > r = KVM_MAX_VCPUS; > break; Yes, we'll likely need this soon! 32 slots are not enough... Reviewed-by: Thomas Huth <th...@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the

Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-16 Thread Thomas Huth
ak; > case KVM_CAP_MAX_VCPUS: > r = KVM_MAX_VCPUS; > break; Yes, we'll likely need this soon! 32 slots are not enough... Reviewed-by: Thomas Huth <th...@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-21 Thread Thomas Huth
On 21/09/15 04:10, David Gibson wrote: > On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: >> On Thu, 17 Sep 2015 10:49:41 +0200 >> Thomas Huth <th...@redhat.com> wrote: >> >>> The PAPR interface defines a hypercall to pass high-quality >>>

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-21 Thread Thomas Huth
On 21/09/15 03:37, David Gibson wrote: > On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: >> Access to the kvm->buses (like with the kvm_io_bus_read() and -write() >> functions) has to be protected via the kvm->srcu lock. >> The kvmppc_h_logical_ci_lo

Re: [PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-21 Thread Thomas Huth
On 21/09/15 03:37, David Gibson wrote: > On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: >> Access to the kvm->buses (like with the kvm_io_bus_read() and -write() >> functions) has to be protected via the kvm->srcu lock. >> The kvmppc_h_logical_ci_lo

Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-21 Thread Thomas Huth
On 21/09/15 10:01, Greg Kurz wrote: > On Mon, 21 Sep 2015 12:10:00 +1000 > David Gibson <da...@gibson.dropbear.id.au> wrote: > >> On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: >>> On Thu, 17 Sep 2015 10:49:41 +0200 >>> Thomas Huth <th...@redh

Re: [PATCH] KVM: PPC: Book3S HV: Fix handling of interrupted VCPUs

2015-09-18 Thread Thomas Huth
t; another vcore. In that case we need to wait for the vcpu to finish > executing inside the guest, and then remove this vcore from the > preempted vcores list. That way, we avoid leaving this vcpu's vcore > on the preempted vcores list when the vcpu gets interrupted. > > Fixes: e

Re: [PATCH] KVM: PPC: Book3S HV: Fix handling of interrupted VCPUs

2015-09-18 Thread Thomas Huth
t; another vcore. In that case we need to wait for the vcpu to finish > executing inside the guest, and then remove this vcore from the > preempted vcores list. That way, we avoid leaving this vcpu's vcore > on the preempted vcores list when the vcpu gets interrupted. > > Fixes: e

[PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-18 Thread Thomas Huth
;suspicious RCU usage" when lock debugging is enabled. Fixes: 99342cf8044420eebdf9297ca03a14cb6a7085a1 Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/kvm/book3s.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/

[PATCH] KVM: PPC: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store()

2015-09-18 Thread Thomas Huth
;suspicious RCU usage" when lock debugging is enabled. Fixes: 99342cf8044420eebdf9297ca03a14cb6a7085a1 Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/kvm/book3s.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/

Re: suspicious RCU usage with kvm_pr

2015-09-18 Thread Thomas Huth
On 16/09/15 12:59, Denis Kirjanov wrote: > On 9/16/15, Thomas Huth <th...@redhat.com> wrote: >> On 16/09/15 10:51, Denis Kirjanov wrote: >>> Hi, >>> >>> I see the following trace on qemu startup (ps700 blade): >>>

Re: suspicious RCU usage with kvm_pr

2015-09-18 Thread Thomas Huth
On 16/09/15 12:59, Denis Kirjanov wrote: > On 9/16/15, Thomas Huth <th...@redhat.com> wrote: >> On 16/09/15 10:51, Denis Kirjanov wrote: >>> Hi, >>> >>> I see the following trace on qemu startup (ps700 blade): >>>

[PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-17 Thread Thomas Huth
rng,id=gid0 \ -device spapr-rng,rng=gid0 ... See http://wiki.qemu-project.org/Features-Done/VirtIORNG for other example of specifying RngBackends. Signed-off-by: Thomas Huth <th...@redhat.com> --- hw/ppc/Makefile.objs | 2 +- hw/ppc/spapr.c

Re: suspicious RCU usage with kvm_pr

2015-09-16 Thread Thomas Huth
On 16/09/15 10:51, Denis Kirjanov wrote: > Hi, > > I see the following trace on qemu startup (ps700 blade): > > v4.2-11169-g64d1def > > > [ 143.369638] === > [ 143.369640] [ INFO: suspicious RCU usage. ] > [ 143.369643] 4.2.0-11169-g64d1def #10 Tainted: G S > [

Re: suspicious RCU usage with kvm_pr

2015-09-16 Thread Thomas Huth
On 16/09/15 10:51, Denis Kirjanov wrote: > Hi, > > I see the following trace on qemu startup (ps700 blade): > > v4.2-11169-g64d1def > > > [ 143.369638] === > [ 143.369640] [ INFO: suspicious RCU usage. ] > [ 143.369643] 4.2.0-11169-g64d1def #10 Tainted: G S > [

Re: [PATCH v3] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-14 Thread Thomas Huth
On 14/09/15 04:15, David Gibson wrote: > On Fri, Sep 11, 2015 at 11:17:01AM +0200, Thomas Huth wrote: >> The PAPR interface defines a hypercall to pass high-quality >> hardware generated random numbers to guests. Recent kernels can >> already provide this hypercall to t

[PATCH v3] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-11 Thread Thomas Huth
0 \ -device spapr-rng,backend=rng0 ... See http://wiki.qemu-project.org/Features-Done/VirtIORNG for other example of specifying RngBackends. Signed-off-by: Thomas Huth <th...@redhat.com> --- v3: - Completely reworked the patch set accordingly to discussion on the m

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-08 Thread Thomas Huth
On 07/09/15 16:31, Igor Mammedov wrote: > On Fri, 4 Sep 2015 12:04:41 +0200 > Alexander Graf <ag...@suse.de> wrote: > >> >> >> On 04.09.15 11:59, Christian Borntraeger wrote: >>> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>>> >

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-08 Thread Thomas Huth
On 07/09/15 16:31, Igor Mammedov wrote: > On Fri, 4 Sep 2015 12:04:41 +0200 > Alexander Graf <ag...@suse.de> wrote: > >> >> >> On 04.09.15 11:59, Christian Borntraeger wrote: >>> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>>> >

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-08 Thread Thomas Huth
On 08/09/15 09:11, Christian Borntraeger wrote: > Am 08.09.2015 um 08:05 schrieb Thomas Huth: >> On 07/09/15 16:31, Igor Mammedov wrote: >>> On Fri, 4 Sep 2015 12:04:41 +0200 >>> Alexander Graf <ag...@suse.de> wrote: >>>> On 04.09.15 11:59, Christian Bo

KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
Hi all, now that we get memory hotplugging for the spapr machine on qemu-ppc, too, it seems like we easily can hit the amount of KVM-internal memory slots now ("#define KVM_USER_MEM_SLOTS 32" in arch/powerpc/include/asm/kvm_host.h). For example, start qemu-system-ppc64 with a couple of "-device

KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
Hi all, now that we get memory hotplugging for the spapr machine on qemu-ppc, too, it seems like we easily can hit the amount of KVM-internal memory slots now ("#define KVM_USER_MEM_SLOTS 32" in arch/powerpc/include/asm/kvm_host.h). For example, start qemu-system-ppc64 with a couple of "-device

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
On 04/09/15 12:07, Christian Borntraeger wrote: > Am 04.09.2015 um 12:04 schrieb Alexander Graf: >> >> >> On 04.09.15 11:59, Christian Borntraeger wrote: >>> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>>> >>>> Hi all, >>>> >

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
On 04/09/15 12:07, Christian Borntraeger wrote: > Am 04.09.2015 um 12:04 schrieb Alexander Graf: >> >> >> On 04.09.15 11:59, Christian Borntraeger wrote: >>> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>>> >>>> Hi all, >>>> >

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
On 04/09/15 12:04, Alexander Graf wrote: > > > On 04.09.15 11:59, Christian Borntraeger wrote: >> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>> >>> Hi all, >>> >>> now that we get memory hotplugging for the spapr machine on qemu-ppc, >>

Re: [Qemu-ppc] KVM memory slots limit on powerpc

2015-09-04 Thread Thomas Huth
On 04/09/15 12:04, Alexander Graf wrote: > > > On 04.09.15 11:59, Christian Borntraeger wrote: >> Am 04.09.2015 um 11:35 schrieb Thomas Huth: >>> >>> Hi all, >>> >>> now that we get memory hotplugging for the spapr machine on qemu-ppc, >>

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:24, Paul Mackerras wrote: > On Tue, Sep 01, 2015 at 11:41:18PM +0200, Thomas Huth wrote: >> The size of the Problem State Priority Boost Register is only >> 32 bits, so let's change the type of the corresponding variable >> accordingly to avoid future trou

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:24, Paul Mackerras wrote: > On Tue, Sep 01, 2015 at 11:41:18PM +0200, Thomas Huth wrote: >> The size of the Problem State Priority Boost Register is only >> 32 bits, so let's change the type of the corresponding variable >> accordingly to avoid future trou

[PATCH v2] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
t the current code is broken on big endian hosts: kvmppc_get_one_reg_hv() will only return zero for this register since it is using the wrong half of the pspb variable. Let's fix this problem by adjusting the size of the pspb field in the kvm_vcpu_arch structure. Signed-off-by: Thomas Huth <

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 10:26, Alexander Graf wrote: > >> Am 02.09.2015 um 09:26 schrieb Thomas Huth <th...@redhat.com>: >> >>> On 02/09/15 00:55, Benjamin Herrenschmidt wrote: >>>> On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >>>> On Wed, Se

[PATCH v2] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
t the current code is broken on big endian hosts: kvmppc_get_one_reg_hv() will only return zero for this register since it is using the wrong half of the pspb variable. Let's fix this problem by adjusting the size of the pspb field in the kvm_vcpu_arch structure. Signed-off-by: Thomas Huth <

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:55, Benjamin Herrenschmidt wrote: > On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >> On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt >> wrote: >>> On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wrote: >>>> The size

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 10:26, Alexander Graf wrote: > >> Am 02.09.2015 um 09:26 schrieb Thomas Huth <th...@redhat.com>: >> >>> On 02/09/15 00:55, Benjamin Herrenschmidt wrote: >>>> On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >>>> On Wed, Se

Re: [PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-02 Thread Thomas Huth
On 02/09/15 00:55, Benjamin Herrenschmidt wrote: > On Wed, 2015-09-02 at 08:45 +1000, Paul Mackerras wrote: >> On Wed, Sep 02, 2015 at 08:25:05AM +1000, Benjamin Herrenschmidt >> wrote: >>> On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wrote: >>>> The size

[PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-01 Thread Thomas Huth
The size of the Problem State Priority Boost Register is only 32 bits, so let's change the type of the corresponding variable accordingly to avoid future trouble. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion

[PATCH] KVM: ppc: Fix size of the PSPB register

2015-09-01 Thread Thomas Huth
The size of the Problem State Priority Boost Register is only 32 bits, so let's change the type of the corresponding variable accordingly to avoid future trouble. Signed-off-by: Thomas Huth <th...@redhat.com> --- arch/powerpc/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion

Re: [PATCH] powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-29 Thread Thomas Huth
this issue by introducing a new rtas_get_sensor_fast() function that does not use rtas_busy_delay() - and thus can only be used for sensors that do not cause a BUSY condition (which should be the case for the sensor that is queried by the EPOW IRQ handler). Signed-off-by: Thomas Huth th

Re: powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-22 Thread Thomas Huth
On 22/07/15 13:25, Michael Ellerman wrote: On Fri, 2015-17-07 at 10:46:58 UTC, Thomas Huth wrote: The EPOW interrupt handler uses rtas_get_sensor(), which in turn uses rtas_busy_delay() to wait for RTAS becoming ready in case it is necessary. But rtas_busy_delay() is annotated with might_sleep

[PATCH] powerpc/rtas: Introduce rtas_get_sensor_fast() for IRQ handlers

2015-07-17 Thread Thomas Huth
() function that does not use rtas_busy_delay() - and thus can only be used for sensors that do not cause a BUSY condition (which should be the case for the sensor that is queried by the EPOW IRQ handler). Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/include/asm/rtas.h | 1

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-16 Thread Thomas Huth
On 07/15/2015 09:58 PM, Nathan Fontenot wrote: On 07/15/2015 09:35 AM, Thomas Huth wrote: On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use mdelay() instead of msleep

Re: [PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-07-16 Thread Thomas Huth
to 64 bits. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com Reviewed-by: Thomas Huth th...@redhat.com Actually this patch also fixes a bug that SLOF sometimes crashes when a vCPU gets kicked out of kernel mode (see the following URL for details: https://bugzilla.redhat.com/show_bug.cgi?id

Re: BUG: sleeping function called from ras_epow_interrupt context

2015-07-15 Thread Thomas Huth
On 07/14/2015 11:22 PM, Benjamin Herrenschmidt wrote: On Tue, 2015-07-14 at 20:43 +0200, Thomas Huth wrote: Any suggestions how to fix this? Simply revert 587f83e8dd50d? Use mdelay() instead of msleep() in rtas_busy_delay()? Something more fancy? A proper fix would be more fancy

BUG: sleeping function called from ras_epow_interrupt context

2015-07-14 Thread Thomas Huth
Hi all! A colleague recently ran into some kernel BUG messages that happen when hot-plugging a virtio disk to a KVM guest on powerpc (with virsh attach-disk), and IIRC CONFIG_DEBUG_ATOMIC_SLEEP enabled. I've tried to re-create the problem with an up-to-date kernel (4.2.0-rc2) and the problem

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-09 Thread Thomas Huth
On Thu, 9 Jul 2015 16:07:47 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 09, 2015 at 02:57:33PM +0200, Paolo Bonzini wrote: On 09/07/2015 11:48, Laurent Vivier wrote: On 09/07/2015 09:49, Thomas Huth wrote: The option for supporting cross-endianness legacy

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-09 Thread Thomas Huth
On Thu, 9 Jul 2015 16:07:47 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 09, 2015 at 02:57:33PM +0200, Paolo Bonzini wrote: On 09/07/2015 11:48, Laurent Vivier wrote: On 09/07/2015 09:49, Thomas Huth wrote: The option for supporting cross-endianness legacy

[PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-09 Thread Thomas Huth
The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support cross-endian guests. Signed-off-by: Thomas Huth th...@redhat.com --- arch/arm/kvm/Kconfig | 1 + arch/arm64/kvm/Kconfig | 1 + arch/powerpc/kvm/Kconfig | 1

[PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-09 Thread Thomas Huth
The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support cross-endian guests. Signed-off-by: Thomas Huth th...@redhat.com --- arch/arm/kvm/Kconfig | 1 + arch/arm64/kvm/Kconfig | 1 + arch/powerpc/kvm/Kconfig | 1

Re: [PULL] virtio/vhost: cross endian support

2015-07-07 Thread Thomas Huth
On Thu, 2 Jul 2015 11:32:52 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 02, 2015 at 11:12:56AM +0200, Greg Kurz wrote: On Thu, 2 Jul 2015 08:01:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: ... Yea, well - support for legacy BE guests on the new LE hosts is exactly

[PATCH] KVM: PPC: Fix warnings from sparse

2015-05-22 Thread Thomas Huth
to the constant PPC_MPPE_ADDRESS_MASK. Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/include/asm/ppc-opcode.h| 2 +- arch/powerpc/kvm/book3s.c| 3 ++- arch/powerpc/kvm/book3s_32_mmu_host.c| 1 + arch/powerpc/kvm/book3s_64_mmu_host.c| 1 + arch/powerpc/kvm

[PATCH] KVM: PPC: Fix warnings from sparse

2015-05-22 Thread Thomas Huth
to the constant PPC_MPPE_ADDRESS_MASK. Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/include/asm/ppc-opcode.h| 2 +- arch/powerpc/kvm/book3s.c| 3 ++- arch/powerpc/kvm/book3s_32_mmu_host.c| 1 + arch/powerpc/kvm/book3s_64_mmu_host.c| 1 + arch/powerpc/kvm

[PATCH] KVM: PPC: Remove PPC970 from KVM_BOOK3S_64_HV text in Kconfig

2015-05-22 Thread Thomas Huth
Since the PPC970 support has been removed from the kvm-hv kernel module recently, we should also reflect this change in the help text of the corresponding Kconfig option. Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/kvm/Kconfig | 8 1 file changed, 4 insertions(+), 4

[PATCH] KVM: PPC: Remove PPC970 from KVM_BOOK3S_64_HV text in Kconfig

2015-05-22 Thread Thomas Huth
Since the PPC970 support has been removed from the kvm-hv kernel module recently, we should also reflect this change in the help text of the corresponding Kconfig option. Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/kvm/Kconfig | 8 1 file changed, 4 insertions(+), 4

[PATCH] KVM: PPC: Book3S HV: Replace kvmppc_find_vcpu() with kvm_get_vcpu()

2015-05-07 Thread Thomas Huth
Both functions are doing the same thing - looking up the struct kvm_vcpu pointer for a given vCPU ID. So there's no need for the kvmppc_find_vcpu() function, simply use the common function instead. Signed-off-by: Thomas Huth th...@redhat.com --- arch/powerpc/kvm/book3s_hv.c | 22

Re: [PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper

2015-04-23 Thread Thomas Huth
Am Thu, 23 Apr 2015 17:26:20 +0200 schrieb Greg Kurz gk...@linux.vnet.ibm.com: Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_config.h

Re: [PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper

2015-04-23 Thread Thomas Huth
Am Thu, 23 Apr 2015 19:22:15 +0200 schrieb Thomas Huth th...@redhat.com: Am Thu, 23 Apr 2015 17:26:20 +0200 schrieb Greg Kurz gk...@linux.vnet.ibm.com: Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/linux/virtio_config.h | 17 +++-- 1 file changed, 11

Re: [PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper

2015-04-23 Thread Thomas Huth
); + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); } Reviewed-by: Thomas Huth th...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v5 2/8] tun: add tun_is_little_endian() helper

2015-04-23 Thread Thomas Huth
); + return __cpu_to_virtio16(tun_is_little_endian(tun), val); } Reviewed-by: Thomas Huth th...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 4/8] vringh: introduce vringh_is_little_endian() helper

2015-04-23 Thread Thomas Huth
__cpu_to_virtio64(vrh-little_endian, val); + return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); } #endif /* _LINUX_VRINGH_H */ Reviewed-by: Thomas Huth th...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v5 5/8] vhost: introduce vhost_is_little_endian() helper

2015-04-23 Thread Thomas Huth
(vhost_is_little_endian(vq), val); } #endif Reviewed-by: Thomas Huth th...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 3/8] macvtap: introduce macvtap_is_little_endian() helper

2015-04-23 Thread Thomas Huth
) { - return __cpu_to_virtio16(q-flags MACVTAP_VNET_LE, val); + return __cpu_to_virtio16(macvtap_is_little_endian(q), val); } Reviewed-by: Thomas Huth th...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH v5 6/8] virtio: add explicit big-endian support to memory accessors

2015-04-23 Thread Thomas Huth
On Thu, 23 Apr 2015 17:29:06 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: The current memory accessors logic is: - little endian if little_endian - native endian (i.e. no byteswap) if !little_endian If we want to fully support cross-endian vhost, we also need to be able to convert to

Re: [PATCHv4] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-04-21 Thread Thomas Huth
Am Tue, 21 Apr 2015 10:41:51 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On POWER, storage caching is usually configured via the MMU - attributes such as cache-inhibited are stored in the TLB and the hashed page table. This makes correctly performing cache inhibited IO accesses

Re: [PATCHv4] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-04-21 Thread Thomas Huth
Am Tue, 21 Apr 2015 10:41:51 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On POWER, storage caching is usually configured via the MMU - attributes such as cache-inhibited are stored in the TLB and the hashed page table. This makes correctly performing cache inhibited IO accesses

Re: [PATCHv4] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-04-21 Thread Thomas Huth
Am Tue, 21 Apr 2015 16:51:21 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On Tue, Apr 21, 2015 at 08:37:02AM +0200, Thomas Huth wrote: Am Tue, 21 Apr 2015 10:41:51 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On POWER, storage caching is usually configured via

Re: [PATCHv4] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-04-21 Thread Thomas Huth
Am Tue, 21 Apr 2015 16:51:21 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On Tue, Apr 21, 2015 at 08:37:02AM +0200, Thomas Huth wrote: Am Tue, 21 Apr 2015 10:41:51 +1000 schrieb David Gibson da...@gibson.dropbear.id.au: On POWER, storage caching is usually configured via

Re: [PATCH/RFC 4/9] KVM: s390: Add MEMOP ioctls for reading/writing guest memory

2015-03-19 Thread Thomas Huth
Date: Wed, 18 Mar 2015 21:23:48 -0300 From: Marcelo Tosatti mtosa...@redhat.com On Mon, Mar 16, 2015 at 09:51:40AM +0100, Christian Borntraeger wrote: From: Thomas Huth th...@linux.vnet.ibm.com On s390, we've got to make sure to hold the IPTE lock while accessing logical memory. So

Re: [PATCH] KVM: Get rid of kvm_kvfree()

2015-03-09 Thread Thomas Huth
On Tue, 24 Feb 2015 21:29:25 +0100 Thomas Huth th...@linux.vnet.ibm.com wrote: kvm_kvfree() provides exactly the same functionality as the new common kvfree() function - so let's simply replace the kvm function with the common function. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Thomas Huth
, rewrite using wait_woken. Cc: sta...@vger.kernel.org Reported-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v1: remove wait_event_interruptible noticed by Cornelia Huck cornelia.h...@de.ibm.com drivers

Re: [PATCH 1/9] Fix WARNING: quoted string split across lines in kvm_main.c

2015-02-25 Thread Thomas Huth
On Thu, 26 Feb 2015 14:58:18 +0800 Xiubo Li lixi...@cmss.chinamobile.com wrote: WARNING: quoted string split across lines + printk(KERN_INFO kvm: enabling virtualization on + CPU%d failed\n, cpu); When fails to enable virtualization on CPUx for kvm, this log will be

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Thomas Huth
On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: The deeper problem

virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Thomas Huth
Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: [0.839687] do not call blocking ops when !TASK_RUNNING; state=1 set at [00174a1e] prepare_to_wait_event+0x7e/0x108 [0.839694] [

[PATCH] KVM: Get rid of kvm_kvfree()

2015-02-24 Thread Thomas Huth
kvm_kvfree() provides exactly the same functionality as the new common kvfree() function - so let's simply replace the kvm function with the common function. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |8 include/linux/kvm_host.h |1 - virt

Re: [PATCH] KVM: s390: Add MEMOP ioctls for reading/writing guest memory

2015-02-19 Thread Thomas Huth
On Thu, 19 Feb 2015 10:47:29 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Mon, 16 Feb 2015 13:16:41 +0100 Thomas Huth th...@linux.vnet.ibm.com wrote: On s390, we've got to make sure to hold the IPTE lock while accessing logical memory. So let's add an ioctl for reading

[PATCH] KVM: s390: Add MEMOP ioctls for reading/writing guest memory

2015-02-16 Thread Thomas Huth
On s390, we've got to make sure to hold the IPTE lock while accessing logical memory. So let's add an ioctl for reading and writing logical memory to provide this feature for userspace, too. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com --- Documentation/virtual/kvm/api.txt | 45

  1   2   >