Re: [GIT PULL] Please pull my kvm-ppc-fixes branch

2015-12-11 Thread Paolo Bonzini
On 10/12/2015 04:12, Paul Mackerras wrote: > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git > kvm-ppc-fixes Pulled, thanks. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info

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

2015-11-19 Thread Paolo Bonzini
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 that in a previous version but decided to name it tha

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

2015-11-19 Thread Paolo Bonzini
On 19/11/2015 10:51, Christian Borntraeger wrote: > > I can apply patch 1 and 2 now to kvm/master. By the time kvm/next forks > > from Linus's tree (sometime next week, since kvm/queue is already > > largish) they will be in. > > I have 2or 3 more patches for 4.4 and I will prepare a pull reque

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

2015-11-19 Thread Paolo Bonzini
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, > can you review the power changes and Ack/Nack? > > As I want to have patch 2 in 4.4, I splitte

Re: [PATCH] KVM: powerpc: kvmppc_visible_gpa can be boolean

2015-11-18 Thread Paolo Bonzini
On 16/11/2015 04:10, Yaowei Bai wrote: > In another patch kvm_is_visible_gfn is maken return bool due to this > function only returns zero or one as its return value, let's also make > kvmppc_visible_gpa return bool to keep consistent. > > No functional change. > > Signed-off-by: Yaowei Bai >

Re: [GIT PULL] Please pull my kvm-ppc-fixes branch

2015-11-12 Thread Paolo Bonzini
On 12/11/2015 06:35, Paul Mackerras wrote: > Paolo, > > I have two fixes for HV KVM which I would like to have included in > v4.4-rc1. The first one is a fix for a bug identified by Red Hat > which causes occasional guest crashes. The second one fixes a bug > which causes host stalls and timeo

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

2015-11-03 Thread Paolo Bonzini
On 03/11/2015 08:08, Thomas Huth wrote: > 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 th

Re: [GIT PULL] Please pull my kvm-ppc-next branch

2015-11-02 Thread Paolo Bonzini
On 26/10/2015 05:17, Paul Mackerras wrote: > Paolo, > > Here is my current patch queue for KVM on PPC. There's nothing much > in the way of new features this time; it's mostly bug fixes, plus > Nikunj has implemented support for KVM_CAP_NR_MEMSLOTS. These are > intended for the "next" branch of

Fwd: Re: [PATCH v3 2/4] KVM: use simple waitqueue for vcpu->wq

2015-10-20 Thread Paolo Bonzini
ter Zijlstra To: Daniel Wagner CC: linux-ker...@vger.kernel.org, linux-rt-us...@vger.kernel.org, Marcelo Tosatti , Paolo Bonzini , Paul E. McKenney , Paul Gortmaker , Thomas Gleixner On Tue, Oct 20, 2015 at 09:28:08AM +0200, Daniel Wagner wrote: > diff --git a/arch/powerpc/kvm/book3s_hv.c

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

2015-09-21 Thread Paolo Bonzini
On 21/09/2015 09:59, Paul Mackerras wrote: > I was going to send you a > pull request tomorrow, but if you are about to send stuff off to Linus > you could pull now from: > > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git kvm-ppc-fixes Ok, I'll pull from here tomorrow. The pu

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

2015-09-20 Thread Paolo Bonzini
On 21/09/2015 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_load() and -store() functions are

Re: [PATCH] vfio: Enable VFIO device for powerpc

2015-09-07 Thread Paolo Bonzini
On 26/08/2015 20:54, Paul Mackerras wrote: > On Wed, Aug 26, 2015 at 11:34:26AM +0200, Alexander Graf wrote: >> >> >> On 13.08.15 03:15, David Gibson wrote: >>> ec53500f "kvm: Add VFIO device" added a special KVM pseudo-device which is >>> used to handle any necessary interactions between KVM and

Re: [GIT PULL] Please pull my kvm-ppc-next branch

2015-09-07 Thread Paolo Bonzini
On 05/09/2015 09:45, Paul Mackerras wrote: > Paolo, > > Please pull the commits listed below into your tree. I would like > them to go in for 4.3 as they are all small bug fixes not new > features, and they all can only affect HV-mode KVM on IBM server > machines (in fact one has no effect on c

Re: [PULL 00/12] ppc patch queue 2015-08-22

2015-08-24 Thread Paolo Bonzini
On 24/08/2015 06:49, Alexander Graf wrote: > > > Hi Paolo, > > > > > > This is my current patch queue for ppc. Please pull. > > > > Done, but this queue has not been in linux-next. Please push to > > kvm-ppc-next on your github Linux tree as well; please keep an eye on > > Ah, sorry. I pushed

Re: [PULL 00/12] ppc patch queue 2015-08-22

2015-08-22 Thread Paolo Bonzini
On 22/08/2015 02:21, Alexander Graf wrote: > Hi Paolo, > > This is my current patch queue for ppc. Please pull. Done, but this queue has not been in linux-next. Please push to kvm-ppc-next on your github Linux tree as well; please keep an eye on Steven Rothwell's messages in the next few days

Re: [PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread Paolo Bonzini
On 07/08/2015 15:47, Nicholas Krause wrote: > - kvm_set_irq_routing(opp->kvm, routing, 0, 0); > + ret = kvm_set_irq_routing(opp->kvm, routing, 0, 0); > + if (ret) { > + kfree(routing); > + return ret; > + } > > kfree(routing); > return 0; You

Re: [PATCH] kvm:powerpc:Fix error handling in the function mpic_set_default_irq_routing

2015-08-07 Thread Paolo Bonzini
On 06/08/2015 19:13, Nicholas Krause wrote: > diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c > index 6249cdc..5a18859 100644 > --- a/arch/powerpc/kvm/mpic.c > +++ b/arch/powerpc/kvm/mpic.c > @@ -1641,13 +1641,16 @@ static void mpic_destroy(struct kvm_device *dev) > static int mpi

Re: [kvm-unit-tests PATCH 11/14] powerpc/ppc64: add rtas_power_off

2015-08-04 Thread Paolo Bonzini
On 04/08/2015 09:47, Andrew Jones wrote: >> > In early development we did have a hypercall mediated virtio model, >> > but it was abandoned once we got PCI working. > So I think by yours and Alex's responses, if we want testdev support > then we should target using pci to expose it. I'm ok with t

Re: [kvm-unit-tests PATCH 11/14] powerpc/ppc64: add rtas_power_off

2015-08-03 Thread Paolo Bonzini
On 03/08/2015 16:41, Andrew Jones wrote: > Add enough RTAS support to support power-off, and apply it to > exit(). > > Signed-off-by: Andrew Jones Why not use virtio-mmio + testdev on ppc as well? Similar to how we're not using PSCI on ARM or ACPI on x86. Paolo -- To unsubscribe from this li

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

2015-08-03 Thread Paolo Bonzini
On 03/08/2015 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. > (Yes, the word 'series' is four times in that sentence. And now I've > typed 'series' five times! Wait, now six times!

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

2015-07-09 Thread Paolo Bonzini
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 guests in >> the vhost and tun code should only be available on systems >> that support cross-endian guests. > > I'm sure I misunderstand something, but

Re: [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need

2015-06-23 Thread Paolo Bonzini
On 23/06/2015 12:31, Andre Przywara wrote: >> > >> > Because it's not part of the kernel API, never was, still isn't. > Technically it may not - if I get this correctly it is more a platform > API defined by the architecture, like ACPI or PSCI on ARM. > But if I get this correctly Linux re-uses

Re: [PATCH 1/2] powerpc: Define the hcall opcodes & return values we need

2015-06-23 Thread Paolo Bonzini
On 19/06/2015 09:21, Michael Ellerman wrote: > Now that we don't have the kernel header on hand, just define the > minimum set of hcall opcodes and return values we need in order to > build. > > Signed-off-by: Michael Ellerman > --- > powerpc/spapr.h | 25 - > 1 file ch

Re: [PATCH] kvmtool: Makefile: allow overriding CC and LD

2015-06-19 Thread Paolo Bonzini
On 18/06/2015 17:50, Andre Przywara wrote: > Currently we set CC unconditionally to ${CROSS_COMPILE}gcc, the same > for LD. > Allow people to override the compiler name by specifying it explicitly > on the command line or via the environment. > Beside calling a certain compiler binary this allows

Re: [PATCH] KVM: PPC: Book3S HV: Fix list traversal in error case

2015-05-10 Thread Paolo Bonzini
On 09/05/2015 21:50, Alexander Graf wrote: > Reviewed-by: Alexander Graf > > Paolo, can you please take this patch into 4.1 directly? Sure. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at

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

2015-04-30 Thread 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(preemptible()); Please keep the BUG_ON() in kvm_guest_enter. Otherwise looks good, thanks! Paolo > -

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

2015-04-28 Thread Paolo Bonzini
On 28/04/2015 16:10, Christian Borntraeger wrote: > > Alternatively, the irq-disabled versions could be called > > __kvm_guest_{enter,exit}. Then you can use those directly when it makes > > sense. > > ..having a special __kvm_guest_{enter,exit} without the WARN_ON might be even > the cheapest

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

2015-04-28 Thread Paolo Bonzini
On 28/04/2015 12:32, Christian Borntraeger wrote: > Some architectures already have irq disabled when calling > kvm_guest_exit. Push down the disabling into the architectures > to avoid double disabling. This also allows to replace > irq_save with irq_disable which might be cheaper. > arm and mip

Re: [PATCH v2 00/12] Remaining improvements for HV KVM

2015-04-16 Thread Paolo Bonzini
On 15/04/2015 22:19, Alexander Graf wrote: > > Since you already did send out the first pull request, just let me know > when you pulled linus' tree back into kvm/next (or kvm/master) so that I > can fast-forward merge this in my kvm-ppc-next branch and then rebase my > queue on top, merge it in

Re: [PATCH v2 00/12] Remaining improvements for HV KVM

2015-04-09 Thread Paolo Bonzini
On 09/04/2015 00:57, Alexander Graf wrote: >> >> The last patch in this series needs a definition of PPC_MSGCLR that is >> added by the patch "powerpc/powernv: Fixes for hypervisor doorbell >> handling", which has now gone upstream into Linus' tree as commit >> 755563bc79c7 via the linuxppc-dev m

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

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 08:45, David Gibson wrote: > + case H_LOGICAL_CI_LOAD: > + ret = kvmppc_h_logical_ci_load(vcpu); > + if (ret == H_TOO_HARD) { > + printk("Punting H_LOGICAL_CI_LOAD\n"); > + return RESUME_HOST; > + } > +

Re: [PULL 00/18] ppc patch queue 2014-12-18

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 01:46, Alexander Graf wrote: > Hi Paolo, > > This is my current patch queue for ppc. Please pull. > > After the merge with Linus' tree, e500v2 compilation will be broken because > commit 69111bac42f5 broke it upstream. Could you please take care to apply the > fix I CC'ed you on

Re: [PATCH v14 3/7] KVM: x86: switch to kvm_get_dirty_log_protect

2014-12-09 Thread Paolo Bonzini
* 4. Flush TLB's if needed. > */ > " > > On 11/22/2014 11:19 AM, Christoffer Dall wrote: >> On Thu, Nov 13, 2014 at 05:57:44PM -0800, Mario Smarduch wrote: >>> From: Paolo Bonzini >>> >>> We now have a generic function that does most of

Re: [PATCH v14 3/7] KVM: x86: switch to kvm_get_dirty_log_protect

2014-11-14 Thread Paolo Bonzini
On 14/11/2014 03:06, Mario Smarduch wrote: > Hi Paolo, > > I changed your patch a little to use a Kconfig symbol, > hope that's fine with you. Of course, thanks. Paolo > - Mario > > On 11/13/2014 05:57 PM, Mario Smarduch wrote: >> From: Paolo Bonzini >

Re: [PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 20:47, Mario Smarduch wrote: >> That can happen if the error occurred in the final >> copy to userspace, after page tables have been modified. > > Upon error return userspace should terminate logging, error out whether > used for migration or other use cases, with some stale spte TL

Re: [PATCH v13 2/7] KVM: Add generic support for dirty page logging

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 10:07, Cornelia Huck wrote: >> > +#if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) >> > || \ >> > +defined(CONFIG_IA64) || defined(CONFIG_X86) || defined(CONFIG_ARM) || >> > \ >> > +defined(CONFIG_ARM64) > Does this deserve a config symbol that can b

Re: [PATCH v13 3/7] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Paolo Bonzini
d-by: Mario Smarduch > Signed-off-by: Paolo Bonzini You should have a "Signed-off-by: Mario Smarduch ..." here, and you should also add my authorship. You can do the latter with "git rebase -i", adding x git commit --amend -C HEAD --author 'Paolo Bonzini ' aft

Re: [PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 01:40, Mario Smarduch wrote: > Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl > calls. We call kvm_get_dirty_log_protect() function to do most of the work. > > Signed-off-by: Mario Smarduch > --- > arch/arm/kvm/arm.c | 37 ++

Re: [PATCH v12 2/6] KVM: Add generic support for dirty page logging

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 00:05, Mario Smarduch wrote: > On 11/05/2014 08:09 AM, Paolo Bonzini wrote: >> >> >> On 01/11/2014 11:12, James Hogan wrote: >>> AFAICT all of the arch implementations of kvm_vm_ioctl_get_dirty_log() >>> except x86 and ppc hv (i.e. ia60, mips

Re: [PATCH v12 1/6] KVM: Add architecture-defined TLB flush support

2014-11-05 Thread Paolo Bonzini
void kvm_flush_remote_tlbs(struct kvm *kvm) > { > long dirty_count = kvm->tlbs_dirty; > @@ -194,6 +195,7 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) > cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); > } > EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); > +#endif &

Re: [PATCH v12 2/6] KVM: Add generic support for dirty page logging

2014-11-05 Thread Paolo Bonzini
On 01/11/2014 11:12, James Hogan wrote: > AFAICT all of the arch implementations of kvm_vm_ioctl_get_dirty_log() > except x86 and ppc hv (i.e. ia60, mips, ppc pv, s390) already make use > of the existing generic function kvm_get_dirty_log() to help implement > their kvm_vm_ioctl_get_dirty_log fun

Re: lockdep warning with 2d65a9f48fcdf7866aab6457bc707ca233e0c791

2014-10-28 Thread Paolo Bonzini
On 10/15/2014 07:28 PM, Aneesh Kumar K.V wrote: > > = > [ INFO: possible recursive locking detected ] > 3.17.0+ #31 Not tainted > - > qemu-system-ppc/9112 is trying to acquire lock: > (&(&vcpu->arch.tbacct_l

Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode

2014-09-29 Thread Paolo Bonzini
Il 29/09/2014 13:57, Alexander Graf ha scritto: > > > On 29.09.14 13:48, Paolo Bonzini wrote: >> Il 29/09/2014 10:28, Alexander Graf ha scritto: >>> >>> >>> On 29.09.14 10:02, Aneesh Kumar K.V wrote: >>>> We use cma reserved area for creatin

Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode

2014-09-29 Thread Paolo Bonzini
Il 29/09/2014 10:28, Alexander Graf ha scritto: > > > On 29.09.14 10:02, Aneesh Kumar K.V wrote: >> We use cma reserved area for creating guest hash page table. >> Don't do the reservation in non-hypervisor mode. This avoids unnecessary >> CMA reservation when booting with limited memory configs

Re: [PULL 00/24] ppc patch queue 2014-09-24

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 22:43, Alexander Graf ha scritto: > Hi Paolo, > > This is my current patch queue for ppc. Please pull. > > Alex > > > The following changes since commit f51770ed465e6eb41da7fa16fd92eb67069600cf: > > kvm: Make init_rmode_identity_map() return 0 on success. (2014-09-17 > 13:10:

Re: [PATCH] powerpc/kvm/cma: Fix panic introduces by signed shift operation

2014-09-03 Thread Paolo Bonzini
Il 02/09/2014 18:13, Laurent Dufour ha scritto: > fc95ca7284bc54953165cba76c3228bd2cdb9591 introduces a memset in > kvmppc_alloc_hpt since the general CMA doesn't clear the memory it > allocates. > > However, the size argument passed to memset is computed from a signed value > and its signed bit i

Re: Basic Query regarding kvm_init

2014-09-02 Thread Paolo Bonzini
Il 01/09/2014 20:49, Amit Tomar ha scritto: > I'm new to KVM and have basic query regarding kvm_init call from inside > e500.c? > > I'm aware that first argument in "kvm_init" for x86 is the kvm_callbacks > structure to specify the handlers to be called when I/O or some > system-sensitive instruct

[PATCH] KVM: Move more code under CONFIG_HAVE_KVM_IRQFD

2014-08-06 Thread Paolo Bonzini
-off-by: Paolo Bonzini --- include/linux/kvm_host.h | 2 + include/trace/events/kvm.h | 8 +-- virt/kvm/eventfd.c | 122 ++--- virt/kvm/kvm_main.c| 2 + 4 files changed, 69 insertions(+), 65 deletions(-) diff --git a/include/linux

Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS

2014-08-06 Thread Paolo Bonzini
Il 05/08/2014 14:27, Paolo Bonzini ha scritto: > Il 30/06/2014 12:51, Paul Mackerras ha scritto: >> This series of patches provides a way to implement IRQFD support >> without having to implement IRQ routing, and adds IRQFD support for >> the XICS interrupt controller emu

Re: [PATCH] KVM: PPC: drop duplicate tracepoint

2014-08-05 Thread Paolo Bonzini
Il 05/08/2014 12:35, Paolo Bonzini ha scritto: > diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c > index e96b50d0bdab..2325168ad1ff 100644 > --- a/arch/powerpc/kvm/emulate.c > +++ b/arch/powerpc/kvm/emulate.c > @@ -300,3 +300,5 @@ int kvmppc_emulate_instruction

Re: [PATCH 0/6] IRQFD without IRQ routing, enabled for XICS

2014-08-05 Thread Paolo Bonzini
Il 30/06/2014 12:51, Paul Mackerras ha scritto: > This series of patches provides a way to implement IRQFD support > without having to implement IRQ routing, and adds IRQFD support for > the XICS interrupt controller emulation. (XICS is the interrupt > controller defined for the pSeries machine ty

[PATCH] KVM: PPC: drop duplicate tracepoint

2014-08-05 Thread Paolo Bonzini
cate definition of the tracepoint in trace.h and trace_pr.h. Because the tracepoint is still used by Book3S HV code, and because the PR code does include trace.h, just remove the duplicate definition from trace_pr.h, and export it from kvm.o. Reported-by: Stephen Rothwell Signed-off-by: Paolo Bon

Re: [PATCH] KVM: PPC: HV: Remove generic instruction emulation

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 20:57, Alexander Graf ha scritto: > Yes, this is perfectly possible. As of my last patch set we will never > enter the generic emulator for HV KVM, so that race is moot (we just > inject a PROGRAM interrupt into the guest). With this patch even the > code to emulate these bits doesn't

Re: [PATCH] KVM: PPC: HV: Remove generic instruction emulation

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 15:27, Alexander Graf ha scritto: > Now that we have properly split load/store instruction emulation and generic > instruction emulation, we can move the generic one from kvm.ko to kvm-pr.ko > on book3s_64. > > This reduces the attack surface and amount of code loaded on HV KVM kerne

Re: [PATCH 0/3] KVM: Make KVM_CHECK_EXTENSION a VM ioctl

2014-07-15 Thread Paolo Bonzini
include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 59 --- 9 files changed, 51 insertions(+), 39 deletions(-) Acked-by: Paolo Bonzini Feel free to include it in your pull request. Paolo -- To unsubscribe from this list: send the line &

Re: [PULL 3.16 0/6] 3.16 patch queue 2014-07-08

2014-07-08 Thread Paolo Bonzini
Il 08/07/2014 12:04, Alexander Graf ha scritto: Hi Paolo / Marcelo, This is my current patch queue for 3.16. Please pull. Alex The following changes since commit 5c02c392cd2320e8d612376d6b72b6548a680923: Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/r

Re: [RFC PATCH 3/3] PPC, KVM, CMA: use general CMA reserved area management framework

2014-06-03 Thread Paolo Bonzini
: Paolo Bonzini Aneesh, can you test this series? Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PULL 33/41] KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 18:08, Alexander Graf ha scritto: What happens if it returns EINVAL? Also, reset should certainly try to write all registers, what happens if one is missed. If it returns EINVAL we just ignore the register. I wonder if it's the right thing to do. You remember how you were bit

Re: [PULL 33/41] KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 17:58, Alexander Graf ha scritto: Would new userspace with old kernel be able to detect that POWER8 support isn't quite complete? It couldn't, no. It would try to run a guest - if it happens to work we're lucky ;). That's why I'm considering a revert. Even then the only thing

Re: [PULL 33/41] KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 17:53, Alexander Graf ha scritto: This is an ABI break, this symbol was added in 3.14. I think I should revert this. Can you convince me otherwise? There's nothing bad happening with the change. Newer user space won't be able to read WORT on older kernels, but there were more th

Re: [PULL 33/41] KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 14:42, Alexander Graf ha scritto: From: Paul Mackerras Commit b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs") added a definition of KVM_REG_PPC_WORT with the same register number as the existing KVM_REG_PPC_VRSAVE (though in fact the definitions are not identi

Re: [PULL 00/41] ppc patch queue 2014-05-30

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 14:42, Alexander Graf ha scritto: Hi Paolo / Marcelo, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 1f854112553a1d65363ab27d4ee3dfb4b27075fb: KVM: vmx: DR7 masking on task switch emulation is wrong (2014-05-22 17:47:18 +0200)

Re: [PULL 3.15 0/4] 3.15 patch queue 2014-05-12

2014-05-13 Thread Paolo Bonzini
Il 12/05/2014 22:26, Alexander Graf ha scritto: Hi Paolo / Marcelo, This is my current patch queue for 3.15. Please pull. Alex The following changes since commit 0f689a33ad17845363acdc6d52783befd6ad116c: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Re: [GIT PULL] PPC Book3S HV updates for 3.15

2014-03-29 Thread Paolo Bonzini
Il 29/03/2014 11:31, Paul Mackerras ha scritto: Paolo, The following changes since commit e724f080f5dd03881bc6d378750c37f7374cae7e: KVM: PPC: Book3S HV: Fix register usage when loading/saving VRSAVE (2014-03-13 10:47:01 +0100) are available in the git repository at: git://git.kernel.org/

Re: [PATCH v3] KVM: Specify byte order for KVM_EXIT_MMIO

2014-03-29 Thread Paolo Bonzini
Il 28/01/2014 17:28, Christoffer Dall ha scritto: The KVM API documentation is not clear about the semantics of the data field on the mmio struct on the kvm_run struct. This has become problematic when supporting ARM guests on big-endian host systems with guests of both endianness types, because

Re: [PATCH 1/2] KVM: PPC: Book3S HV: Make TM avoid program check

2014-03-28 Thread Paolo Bonzini
Il 28/03/2014 12:08, Paul Mackerras ha scritto: > Currently using kvmppc_set_one_reg() a transaction could be setup without > TEXASR Failure Summary (FS) not set. When this is switched back in by the > host, this will result in a TM Bad Thing (ie 0x700 program check) when the > trechkpt is run.

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

2014-03-26 Thread Paolo Bonzini
Il 25/03/2014 21:35, Christian Borntraeger ha scritto: On 25/03/14 18:29, Paolo Bonzini wrote: Also, the pull requests I got in the last couple of months were a bit messy, and I'm already fearing that Linus notices. In the future, I'll tag kvm-3.x-base (e.g. kvm-3.16-base) when I ope

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

2014-03-26 Thread Paolo Bonzini
Il 26/03/2014 04:51, Paul Mackerras ha scritto: > I would like to know from ARM and PPC maintainers *now* (before the > merge window opens) what will be in 3.15. Also, PPC guys, please > make sure the pull requests will be based on commit e724f080f5dd > (KVM: PPC: Book3S HV: Fix register usage w

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

2014-03-25 Thread Paolo Bonzini
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 maintainers *now* (before the merge window opens)

Re: [PATCH 0/2] Fixes for HV KVM on PPC for 3.14

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 10:01, Paul Mackerras ha scritto: These two patches fix two things in hypervisor-mode KVM for the IBM POWER server processors. The first patch removes a hunk of extraneous code that got in as a result of a mistake I made in cleaning up after rebasing a patch. The second fixes a bu

Re: [PATCH 1/2] Revert "KVM: PPC: Book3S HV: Add new state for transactional memory"

2014-03-10 Thread Paolo Bonzini
Il 10/03/2014 11:50, Paul Mackerras ha scritto: We can either do this revert, or apply a patch removing the extra hunk, but one or the other should go in for 3.14 since it's quite broken as it is (that is, HV-mode KVM on powerpc is broken). Paolo, do you have a preference about revert vs. fix?

Re: [PULL 00/36] ppc patch queue 2014-01-29

2014-01-29 Thread Paolo Bonzini
Il 29/01/2014 17:12, Alexander Graf ha scritto: git://github.com/agraf/linux-2.6.git kvm-ppc-next Pulled. There were a couple of conflicts, but I didn't have to scratch my head too long. :) Thanks, Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of

Re: [RFC PATCH] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Paolo Bonzini
Il 24/01/2014 16:23, Victor Kamensky ha scritto: Also if you use ints on real bus as description, you may want to clarify restrictions on mmio.len. Basically on 32 bit platform (i.e like V7 ARM) one cannot have mmio.len=8, because one cannot have 64bit value on 32bit data bus. Without such clarif

Re: [RFC PATCH] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-24 Thread Paolo Bonzini
Il 24/01/2014 01:01, Peter Maydell ha scritto: > > +The 'data' member byte order is host kernel native endianness, regardless of > +the endianness of the guest, and represents the the value as it would go on the > +bus in real hardware. The host kernel should always be able to do: > + val = *((

Re: [PATCH] kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub

2014-01-15 Thread Paolo Bonzini
Il 10/01/2014 01:43, Scott Wood ha scritto: > Commit 7940876e1330671708186ac3386aa521ffb5c182 ("kvm: make local > functions static") broke KVM PPC builds due to removing (rather than > moving) the stub version of kvm_vcpu_eligible_for_directed_yield(). > > This patch reintroduces it. > > Signed-o

Re: [PULL 00/12] 3.13 patch queue 2013-12-18 for 3.13

2013-12-20 Thread Paolo Bonzini
Il 18/12/2013 17:01, Alexander Graf ha scritto: > Hi Paolo / Gleb, > > This is my current patch queue for 3.13. > > It fixes some grave issues we've only found after 3.13-rc1: > > - Make the modularized HV/PR book3s kvm work well as modules > - Fix some race conditions > - Fix compilation

Re: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 10:32, Bhushan Bharat-R65777 ha scritto: > > >> -Original Message----- >> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo >> Bonzini >> Sent: Monday, October 07, 2013 5:35 PM >> To: Alexander Graf >> Cc: Bhushan

Re: [PATCH] KVM: PPC: Book3S HV: Fix typo in saving DSCR

2013-10-07 Thread Paolo Bonzini
Il 04/10/2013 15:10, Alexander Graf ha scritto: > > On 21.09.2013, at 01:53, Paul Mackerras wrote: > >> This fixes a typo in the code that saves the guest DSCR (Data Stream >> Control Register) into the kvm_vcpu_arch struct on guest exit. The >> effect of the typo was that the DSCR value was sav

Re: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-07 Thread Paolo Bonzini
Il 04/10/2013 15:38, Alexander Graf ha scritto: > > On 07.08.2013, at 12:03, Bharat Bhushan wrote: > >> When the MM code is invalidating a range of pages, it calls the KVM >> kvm_mmu_notifier_invalidate_range_start() notifier function, which calls >> kvm_unmap_hva_range(), which arranges to flush

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

2013-10-02 Thread Paolo Bonzini
Il 02/10/2013 16:36, Alexander Graf ha scritto: >> > >> > With Michael's earlier patch in this series, the hwrng is accessible by >> > host userspace via /dev/hwrng, no? > Yes, but there's not token from user space that gets passed into the > kernel to check whether access is ok or not. So while Q

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

2013-10-02 Thread Paolo Bonzini
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 to /dev/mem, why > should the guest suddenly be able to directl

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

2013-10-02 Thread Paolo Bonzini
Il 02/10/2013 07:09, Paul Mackerras ha scritto: > On Tue, Oct 01, 2013 at 01:19:06PM +0200, Paolo Bonzini wrote: > >> Anyhow, I would like to know more about this hwrng and hypercall. >> >> Does the hwrng return random numbers (like rdrand) or real entropy (like >>

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

2013-10-02 Thread Paolo Bonzini
Il 01/10/2013 23:44, Benjamin Herrenschmidt ha scritto: > On Tue, 2013-10-01 at 13:19 +0200, Paolo Bonzini wrote: >> Il 01/10/2013 11:38, Benjamin Herrenschmidt ha scritto: >>> So for the sake of that dogma you are going to make us do something that >>> is about 100 t

Re: [RFC PATCH 00/11 Allow PR and HV KVM to coexist in one kernel

2013-10-01 Thread Paolo Bonzini
Il 01/10/2013 13:36, Alexander Graf ha scritto: >>> Yes, so we should verify in the machine models that we're runnable with >>> the currently selected type at least, to give the user a sensible error >>> message. >> Something like the below > > I like that one a lot. Andreas, Paolo, what do y

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

2013-10-01 Thread Paolo Bonzini
Il 01/10/2013 11:38, Benjamin Herrenschmidt ha scritto: > So for the sake of that dogma you are going to make us do something that > is about 100 times slower ? (and possibly involves more lines of code) If it's 100 times slower there is something else that's wrong. It's most likely not 100 times

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

2013-10-01 Thread Paolo Bonzini
Il 01/10/2013 10:34, Michael Ellerman ha scritto: >> If you really want to have the hypercall, implementing it in QEMU means >> that you can support it on all systems, in fact even when running >> without KVM. > > Sure, I can add a fallback to /dev/hwrng for full emulation. > >> The QEMU comman

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

2013-09-27 Thread Paolo Bonzini
Il 27/09/2013 15:13, Aneesh Kumar K.V ha scritto: > Alexander Graf writes: > >> On 27.09.2013, at 12:03, Aneesh Kumar K.V wrote: >> >>> From: "Aneesh Kumar K.V" >> >> Missing patch description. >> >>> Signed-off-by: Aneesh Kumar K.V >> >> I fail to see how this really simplifies things, but at

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

2013-09-26 Thread Paolo Bonzini
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. > > We add a real mode implementation of H_RANDOM when a hwrng is found. > Userspace can detect the presence of the hwrng by quering the > KVM_CAP_PPC_HWRNG capa

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

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 10:23, Yann Droneaud ha scritto: > > Sounds a lot like InfiniBand subsystem behavor: IB file descriptors > are of no use accross exec() since memory mappings tied to those fds > won't be available in the new process: > > https://lkml.org/lkml/2013/7/8/380 > http://mid.gmane.org/f585

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

2013-08-26 Thread Paolo Bonzini
Il 25/08/2013 17:04, Alexander Graf ha scritto: > > On 24.08.2013, at 21:14, Yann Droneaud wrote: > >> KVM uses anon_inode_get() to allocate file descriptors as part >> of some of its ioctls. But those ioctls are lacking a flag argument >> allowing userspace to choose options for the newly opened

Re: [PULL 0/7] ppc patch queue 2013-06-30

2013-07-02 Thread Paolo Bonzini
Il 30/06/2013 03:38, Alexander Graf ha scritto: > Hi Marcelo / Gleb, > > This is my current patch queue for ppc. Please pull and apply to next, so it > makes its way into 3.11. > > Changes include: > > - Book3S PR: Add support for 1TB segments > - Book3S PR fixes > > Alex > > > The follo

Re: [PATCH 4/4] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-17 Thread Paolo Bonzini
Il 05/06/2013 08:11, Alexey Kardashevskiy ha scritto: > +/* > + * The KVM guest can be backed with 16MB pages (qemu switch > + * -mem-path /var/lib/hugetlbfs/global/pagesize-16MB/). Nitpick: we try to avoid references to QEMU, so perhaps s/qemu switch/for example, with QEMU you can use the comman

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

2013-06-17 Thread Paolo Bonzini
Il 10/06/2013 21:52, Scott Wood ha scritto: > On 06/09/2013 03:09:21 AM, Gleb Natapov wrote: >> 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. >> > >> >

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-27 Thread Paolo Bonzini
Il 27/05/2013 16:26, Alexey Kardashevskiy ha scritto: > On 05/27/2013 08:23 PM, Paolo Bonzini wrote: >> Il 25/05/2013 04:45, David Gibson ha scritto: >>>>> + case KVM_CREATE_SPAPR_TCE_IOMMU: { >>>>> + struct kvm_create_spapr_tce_iommu create_tce

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-27 Thread Paolo Bonzini
Il 25/05/2013 04:45, David Gibson ha scritto: >> >+ case KVM_CREATE_SPAPR_TCE_IOMMU: { >> >+ struct kvm_create_spapr_tce_iommu create_tce_iommu; >> >+ struct kvm *kvm = filp->private_data; >> >+ >> >+ r = -EFAULT; >> >+ if (copy_from_user(&create_tce_iommu,

Re: [PATCH 1/4] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-27 Thread Paolo Bonzini
Il 21/05/2013 05:06, Alexey Kardashevskiy ha scritto: > This adds real mode handlers for the H_PUT_TCE_INDIRECT and > H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio > devices or emulated PCI. Do you mean vio? virtio (without getting into whether that's good or bad) will bypass th

Re: [PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP

2013-04-17 Thread Paolo Bonzini
Il 17/04/2013 14:10, Alexander Graf ha scritto: >>> Still, __KVM_HAVE_IRQCHIP is clearly a subset of >>> __KVM_HAVE_IOAPIC; defining one without the other makes no sense >>> and will cause compilation or link errors for trace_kvm_ack_irq. >>> >>> Either we drop it altogether, or we should not brea

Re: [PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP

2013-04-17 Thread Paolo Bonzini
Il 17/04/2013 13:59, Alexander Graf ha scritto: >> > Well, we just got a patch to make it at least compile, > That was really just Yang (blindly?) fixing an issue I pointed out on > ARM. There is no kvm user space support for IA64. The kernel side has > been KConfig depending on BROKEN for a year a

Re: [PATCH 5/7] KVM: Extract generic irqchip logic into irqchip.c

2013-04-17 Thread Paolo Bonzini
Il 16/04/2013 19:26, Alexander Graf ha scritto: > +#ifdef kvm_irqchip > TP_printk("irqchip %s pin %u", > __print_symbolic(__entry->irqchip, kvm_irqchips), >__entry->pin) > +#else > + TP_printk("irqchip %d pin %u", __entry->irqchip, __entry->pin) > +#endif

Re: [PATCH 2/7] KVM: Introduce __KVM_HAVE_IRQCHIP

2013-04-17 Thread Paolo Bonzini
Il 17/04/2013 13:53, Alexander Graf ha scritto: >>> >> arch/x86/include/uapi/asm/kvm.h |1 + >>> >> include/linux/kvm_host.h|4 ++-- >>> >> include/uapi/linux/kvm.h|2 +- >>> >> virt/kvm/eventfd.c |6 +++--- >>> >> 4 files changed, 7 insertions(+), 6 deletio

  1   2   >