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

2015-11-19 Thread Christian Borntraeger
On 11/19/2015 02:13 PM, Paolo Bonzini wrote: > > > On 19/11/2015 13:55, David Hildenbrand wrote: I'm pretty sure this will cause confusion in the future! ==> Could you maybe name the new function something like "kvm_lookup_vcpu_by_id" or "kvm_get_vcpu_by_id" instead? >> Had th

Re: [PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Christian Borntraeger
On 11/19/2015 10:38 AM, Paolo Bonzini wrote: > > > On 19/11/2015 09:37, Christian Borntraeger wrote: >> >> some more patches for review before I add them in my next pull request. >> Can you review the common code changes and Ack/Nack? >> >> Alex, Paul, >

Re: [PATCH 2/4] KVM: s390: fix wrong lookup of VCPUs by array index

2015-11-19 Thread Christian Borntraeger
Sigh. Seems that my mail script got confused by the # after stable. So please strip down the cc list. On 11/19/2015 09:37 AM, Christian Borntraeger wrote: > From: David Hildenbrand > > For now, VCPUs were always created sequentially with incrementing > VCPU ids. Therefore, the

[PATCH 2/4] KVM: s390: fix wrong lookup of VCPUs by array index

2015-11-19 Thread Christian Borntraeger
index. Reviewed-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger [split stable/non-stable parts] Cc: sta...@vger.kernel.org # c3853a8: KVM: Provide function for VCPU lookup by id --- arch/s390/kvm/sigp.c | 8 ++-- 1 file changed, 2 insertions(+), 6 dele

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

2015-11-19 Thread Christian Borntraeger
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: David Hildenbrand Signed-off-by: Christian Borntraeger [split patch from refactoring patch] --- include/linux/kvm_host.h

[PATCH 3/4] KVM: use heuristic for fast VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand Usually, VCPU ids match the array index. So let's try a fast lookup first before falling back to the slow iteration. Suggested-by: Christian Borntraeger Reviewed-by: Dominik Dingel Reviewed-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-o

[PATCH 0/4] Preview: vcpu lookup by id changes

2015-11-19 Thread Christian Borntraeger
Paolo, some more patches for review before I add them in my next pull request. Can you review the common code changes and Ack/Nack? Alex, Paul, can you review the power changes and Ack/Nack? As I want to have patch 2 in 4.4, I splitted up Davids patch into smaller chunks. David, can you double

[PATCH 4/4] KVM: Use common function for VCPU lookup by id

2015-11-19 Thread Christian Borntraeger
From: David Hildenbrand Let's reuse the new common function for VPCU lookup by id. Reviewed-by: Christian Borntraeger Reviewed-by: Dominik Dingel Signed-off-by: David Hildenbrand Signed-off-by: Christian Borntraeger [split out the new function into a separate patch] --- arch/powerp

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

2015-09-08 Thread Christian Borntraeger
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 wrote: >> >>> >>> >>> On 04.09.15 11:59, Christian Borntraeger wrote: >>>> Am 04.09.2015 um 11:

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

2015-09-04 Thread Christian Borntraeger
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, >>> >>> now that we get memory hotplugging for the spapr machine on qemu-ppc,

Re: KVM memory slots limit on powerpc

2015-09-04 Thread Christian Borntraeger
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, > 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 e

Re: [PATCH] KVM: booke: use __kvm_guest_exit

2015-04-30 Thread Christian Borntraeger
Am 30.04.2015 um 14:40 schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini Reviewed-by: Christian Borntraeger but no way to test it > --- > arch/powerpc/kvm/booke.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kvm/booke.c

Re: [PATCH 1/2] KVM: provide irq_unsafe kvm_guest_{enter|exit}

2015-04-30 Thread Christian Borntraeger
Am 30.04.2015 um 14:02 schrieb Christian Borntraeger: > Am 30.04.2015 um 14:01 schrieb Christian Borntraeger: >> Am 30.04.2015 um 13:50 schrieb Paolo Bonzini: >>> >>> >>> On 30/04/2015 13:43, Christian Borntraeger wrote: >>>> +/* must be calle

Re: [PATCH 1/2] KVM: provide irq_unsafe kvm_guest_{enter|exit}

2015-04-30 Thread Christian Borntraeger
Am 30.04.2015 um 14:01 schrieb Christian Borntraeger: > Am 30.04.2015 um 13:50 schrieb Paolo Bonzini: >> >> >> On 30/04/2015 13:43, Christian Borntraeger wrote: >>> +/* must be called with irqs disabled */ >>> +static inline void __kvm_guest_enter(v

Re: [PATCH 1/2] KVM: provide irq_unsafe kvm_guest_{enter|exit}

2015-04-30 Thread Christian Borntraeger
Am 30.04.2015 um 13:50 schrieb Paolo Bonzini: > > > On 30/04/2015 13:43, Christian Borntraeger wrote: >> +/* must be called with irqs disabled */ >> +static inline void __kvm_guest_enter(void) >> { >> -unsigned long flags; >> - >> -BUG_ON(pre

[PATCHv2 0/2] KVM: micro-optimization and interrupt disabling

2015-04-30 Thread Christian Borntraeger
This rework allows to avoid some cycles by not disabling interrupts twice. Christian Borntraeger (2): KVM: provide irq_unsafe kvm_guest_{enter|exit} KVM: arm/mips/x86/power use __kvm_guest_{enter|exit} arch/arm/kvm/arm.c | 4 ++-- arch/mips/kvm/mips.c | 4 ++-- arch/powerpc

Re: [PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Christian Borntraeger
Am 28.04.2015 um 13:37 schrieb Paolo Bonzini: >> --- a/arch/powerpc/kvm/book3s_pr.c >> +++ b/arch/powerpc/kvm/book3s_pr.c >> @@ -891,7 +891,9 @@ int kvmppc_handle_exit_pr(struct kvm_run *run, struct >> kvm_vcpu *vcpu, >> >> /* We get here with MSR.EE=1 */ >> >> +local_irq_disable(); >

[PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Christian Borntraeger
adoptions. Signed-off-by: Christian Borntraeger --- arch/powerpc/kvm/book3s_hv.c | 2 ++ arch/powerpc/kvm/book3s_pr.c | 2 ++ arch/powerpc/kvm/booke.c | 4 ++-- arch/s390/kvm/kvm-s390.c | 2 ++ arch/x86/kvm/x86.c | 2 ++ include/linux/kvm_host.h | 4 6 files changed, 10

[PATCH/RFC 1/2] KVM: Push down irq_save to architectures before kvm_guest_enter

2015-04-28 Thread Christian Borntraeger
-op change (interrupts are disabled slighty longer). Signed-off-by: Christian Borntraeger --- arch/powerpc/kvm/book3s_hv.c | 2 ++ arch/s390/kvm/kvm-s390.c | 4 ++-- include/linux/kvm_host.h | 14 -- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch

[PATCH/RFC 0/2] KVM: micro-optimization and interrupt disabling

2015-04-28 Thread Christian Borntraeger
do the right thing in the callers. Is that approach acceptible? Does anybody else see some measurable difference for guest exits? Christian Borntraeger (2): KVM: Push down irq_save to architectures before kvm_guest_enter KVM: push down irq_save from kvm_guest_exit arch/powerpc/kvm

Re: [RFC PATCH 0/3] Report guest steal time in host

2015-04-22 Thread Christian Borntraeger
Am 22.04.2015 um 12:24 schrieb Naveen N. Rao: > Steal time accounts the time duration during which a guest vcpu was ready to > run, but was not scheduled to run by the hypervisor. This is particularly > relevant in cloud environment where customers would want to use this as an > indicator that thei

Re: [PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-16 Thread Christian Borntraeger
Am 16.01.2015 um 00:09 schrieb Michael Ellerman: > On Thu, 2015-01-15 at 09:58 +0100, Christian Borntraeger wrote: >> ACCESS_ONCE does not work reliably on non-scalar types. For >> example gcc 4.6 and 4.7 might remove the volatile tag for such >> accesses during the SRA (

Re: [PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 21:01 schrieb Oleg Nesterov: > On 01/15, Christian Borntraeger wrote: >> >> Am 15.01.2015 um 20:38 schrieb Oleg Nesterov: >>> On 01/15, Christian Borntraeger wrote: >>>> >>>> --- a/arch/x86/include/asm/spinlock.h >>>>

Re: [PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 20:38 schrieb Oleg Nesterov: > On 01/15, Christian Borntraeger wrote: >> >> --- a/arch/x86/include/asm/spinlock.h >> +++ b/arch/x86/include/asm/spinlock.h >> @@ -186,7 +186,7 @@ static inline void arch_spin_unlock_wait(arch_spinlock_t >&g

Re: [Xen-devel] [PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 11:43 schrieb David Vrabel: > On 15/01/15 08:58, Christian Borntraeger wrote: >> ACCESS_ONCE does not work reliably on non-scalar types. For >> example gcc 4.6 and 4.7 might remove the volatile tag for such >> accesses during the SRA (scalar replacemen

[PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

2015-01-15 Thread Christian Borntraeger
commit 78bff1c8684f ("x86/ticketlock: Fix spin_unlock_wait() livelock") introduced another ACCESS_ONCE case in x86 spinlock.h. Change that as well. Signed-off-by: Christian Borntraeger Cc: Oleg Nesterov --- arch/x86/include/asm/spinlock.h | 2 +- 1 file changed, 1 insertion(+),

[PATCH 7/8] next: sh: Fix compile error

2015-01-15 Thread Christian Borntraeger
.o] Error 1 Replace ACCESS_ONCE with READ_ONCE to fix the problem. Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE") Cc: Paul E. McKenney Cc: Christian Borntraeger Signed-off-by: Guenter Roeck Reviewed-by: Paul E. McKenney Signed-off-by: Christian Borntraeger --- a

[PATCH 0/8] current ACCESS_ONCE patch queue

2015-01-15 Thread Christian Borntraeger
Folks, fyi, this is my current patch queue for the next merge window. It does contain a patch that will disallow ACCESS_ONCE on non-scalar types. The tree is part of linux-next and can be found at git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git linux-next Christian

[PATCH 2/8] ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
READ_ONCE. Signed-off-by: Christian Borntraeger --- arch/powerpc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5ff4e07..620d0ec 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch

[PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
READ_ONCE. Signed-off-by: Christian Borntraeger --- arch/powerpc/kvm/book3s_hv_rm_xics.c | 8 arch/powerpc/kvm/book3s_xics.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm

[PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
. Signed-off-by: Christian Borntraeger --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index edbc7a6..cb71016 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -554,7 +554,7 @@ static bool alloc_p2m

[PATCH 8/8] kernel: Fix sparse warning for ACCESS_ONCE

2015-01-15 Thread Christian Borntraeger
so use __force on that cast. Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE") Signed-off-by: Christian Borntraeger --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5e186bf..

[PATCH 5/8] mm/gup: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Fixup gup_pmd_range. Signed-off-by: Christian

[PATCH 6/8] kernel: tighten rules for ACCESS ONCE

2015-01-15 Thread Christian Borntraeger
Now that all non-scalar users of ACCESS_ONCE have been converted to READ_ONCE or ASSIGN once, lets tighten ACCESS_ONCE to only work on scalar types. This variant was proposed by Alexei Starovoitov. Signed-off-by: Christian Borntraeger Reviewed-by: Paul E. McKenney --- include/linux/compiler.h

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-30 Thread Christian Borntraeger
Am 23.10.2014 00:34, schrieb Mario Smarduch: > This patch series introduces dirty page logging for ARMv7 and adds some > degree > of generic dirty logging support for x86, armv7 and later armv8. > > I implemented Alex's suggestion after he took a look at the patches at kvm > forum to simplify t

Re: Preparing kvm/next for first pull request of 3.15 merge window

2014-03-25 Thread Christian Borntraeger
On 25/03/14 18:29, Paolo Bonzini wrote: > Hi all, > > I've pushed the last set of updates to kvm/next for the 3.15 merge window. I > don't expect any other changes for either x86 or s390 (thanks Christian!). > The pull request is already pretty beefy. > > I would like to know from ARM and PPC

Re: [PATCH] KVM: Clean up vm creation and release

2010-11-09 Thread Christian Borntraeger
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c > index 985d825..d8d1877 100644 > --- a/arch/s390/kvm/kvm-s390.c > +++ b/arch/s390/kvm/kvm-s390.c > @@ -164,24 +164,18 @@ long kvm_arch_vm_ioctl(struct file *filp, > return r; > } > > -struct kvm *kvm_arch_create_vm(void) >

Re: [PATCH] kvm-userspace: add ibm archs to unifdef header

2008-11-04 Thread Christian Borntraeger
nd s390x, CONFIG_S390 is set on s390 and s390x in the kernel config. This looks right. Acked-by: Christian Borntraeger <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html