[PATCH v5 1/3] powerpc/eeh: Move PE state constants around

2015-03-25 Thread Gavin Shan
There are two equivalent sets of PE state constants, defined in arch/powerpc/include/asm/eeh.h and include/uapi/linux/vfio.h. Though the names are different, their corresponding values are exactly same. The former is used by EEH core and the latter is used by userspace. The patch moves those const

[PATCH v5 0/3] EEH Error Injection Support for VFIO Devices

2015-03-25 Thread Gavin Shan
The series of patches are extention to EEH support for VFIO PCI devices, which allows to inject EEH errors to VFIO PCI devices from userspace for testing purpose. Changelog = v4 -> v5: * Adjusted commit log for PATCH[1] * Dropped the last patch which deletes VFIO_EEH_PE_STA

[PATCH v5 2/3] powerpc/eeh: Introduce eeh_pe_inject_err()

2015-03-25 Thread Gavin Shan
The patch defines PCI error types and functions in uapi/asm/eeh.h and exports function eeh_pe_inject_err(), which will be called by VFIO driver to inject the specified PCI error to the indicated PE for testing purpose. Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- arch/powerpc/include

[PATCH v5 3/3] drivers/vfio: Support EEH error injection

2015-03-25 Thread Gavin Shan
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) to inject the specified EEH error, which is represented by (struct vfio_eeh_pe_err), to the indicated PE for testing purpose. Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- Documentation/vfio.txt| 12

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Gavin Shan
On Wed, Mar 25, 2015 at 07:55:41PM -0600, Alex Williamson wrote: >On Thu, 2015-03-26 at 11:59 +1100, Gavin Shan wrote: >> On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: >> >On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: >> >> The set of constants for PE states defined in uap

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Bandan Das
Hi Andrey, Andrey Korolyov writes: > On Mon, Mar 16, 2015 at 10:17 PM, Andrey Korolyov wrote: >> For now, it looks like bug have a mixed Murphy-Heisenberg nature, as >> it appearance is very rare (compared to the number of actual launches) >> and most probably bounded to the physical characteri

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread David Gibson
On Thu, Mar 26, 2015 at 11:59:03AM +1100, Gavin Shan wrote: > On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: > >On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: > >> The set of constants for PE states defined in uapi/linux/vfio.h is > >> duplicated to uapi/asm/eeh.h. The patch

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Alex Williamson
On Thu, 2015-03-26 at 11:59 +1100, Gavin Shan wrote: > On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: > >On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: > >> The set of constants for PE states defined in uapi/linux/vfio.h is > >> duplicated to uapi/asm/eeh.h. The patch remove

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Gavin Shan
On Thu, Mar 26, 2015 at 12:01:57PM +1100, David Gibson wrote: >On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: >> On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: >> > The set of constants for PE states defined in uapi/linux/vfio.h is >> > duplicated to uapi/asm/eeh.h. The patc

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread David Gibson
On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: > On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: > > The set of constants for PE states defined in uapi/linux/vfio.h is > > duplicated to uapi/asm/eeh.h. The patch removes the set from the > > former. > > > > Signed-off-by: Gav

Re: [Qemu-devel] PCI passthrough of 40G ethernet interface (Openstack/KVM)

2015-03-25 Thread Shannon Nelson
On Tue, Mar 24, 2015 at 8:04 AM, jacob jacob wrote: > > The issue is running dpdk from within the vm itself. Is it possible > that the igb_uio driver needs additional updates/functionality to be > at parity with 1.2.37 version of i40e driver? > At this point I think you need to work with the DPDK

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Gavin Shan
On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote: >On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: >> The set of constants for PE states defined in uapi/linux/vfio.h is >> duplicated to uapi/asm/eeh.h. The patch removes the set from the >> former. >> >> Signed-off-by: Gavin Sha

Re: [PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Alex Williamson
On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote: > The set of constants for PE states defined in uapi/linux/vfio.h is > duplicated to uapi/asm/eeh.h. The patch removes the set from the > former. > > Signed-off-by: Gavin Shan > --- > include/uapi/linux/vfio.h | 5 - > 1 file changed, 5 de

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Kevin O'Connor
On Thu, Mar 26, 2015 at 02:35:58AM +0300, Andrey Korolyov wrote: > Thanks, strangely the reboot is always failing now and always reaching > seabios greeting. May be prints straightened up a race (e.g. it is not > int19 problem really). > > object file part: > > d331 : > irq_trampoline_0x19():

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Andrey Korolyov
On Thu, Mar 26, 2015 at 2:02 AM, Kevin O'Connor wrote: > On Thu, Mar 26, 2015 at 01:31:11AM +0300, Andrey Korolyov wrote: >> On Wed, Mar 25, 2015 at 11:54 PM, Kevin O'Connor wrote: >> > >> > Can you add something like: >> > >> > -chardev file,path=seabioslog.`date +%s`,id=seabios -device >> >

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Andy Lutomirski
On Wed, Mar 25, 2015 at 4:13 PM, Marcelo Tosatti wrote: > On Wed, Mar 25, 2015 at 03:48:02PM -0700, Andy Lutomirski wrote: >> On Wed, Mar 25, 2015 at 3:41 PM, Marcelo Tosatti wrote: >> > On Wed, Mar 25, 2015 at 03:33:10PM -0700, Andy Lutomirski wrote: >> >> On Mar 25, 2015 2:29 PM, "Marcelo Tosat

[PATCH v4 4/4] drivers/vfio: Remove duplicated PE states

2015-03-25 Thread Gavin Shan
The set of constants for PE states defined in uapi/linux/vfio.h is duplicated to uapi/asm/eeh.h. The patch removes the set from the former. Signed-off-by: Gavin Shan --- include/uapi/linux/vfio.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/uapi/linux/vfio.h b/include/uapi/lin

[PATCH v4 1/4] powerpc/eeh: Eliminate duplicated PE states

2015-03-25 Thread Gavin Shan
There are two equivalent sets of constants for PE states, defined in arch/powerpc/include/asm/eeh.h and include/uapi/linux/vfio.h. The former is used by EEH core and the latter is used by userspace. The patch moves those constants from arch/powerpc/include/asm/eeh.h to arch/powerpc/include/uapi/asm

[PATCH v4 3/4] drivers/vfio: Support EEH error injection

2015-03-25 Thread Gavin Shan
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) to inject the specified EEH error, which is represented by (struct vfio_eeh_pe_err), to the indicated PE for testing purpose. Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- Documentation/vfio.txt| 12

[PATCH v4 2/4] powerpc/eeh: Introduce eeh_pe_inject_err()

2015-03-25 Thread Gavin Shan
The patch defines PCI error types and functions in uapi/asm/eeh.h and exports function eeh_pe_inject_err(), which will be called by VFIO driver to inject the specified PCI error to the indicated PE for testing purpose. Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- arch/powerpc/include

[PATCH v4 0/4] EEH Error Injection Support for VFIO Devices

2015-03-25 Thread Gavin Shan
The series of patches are extention to EEH support for VFIO PCI devices, which allows to inject EEH errors to VFIO PCI devices from userspace for testing purpose. Changelog = v3 -> v4: * Move constants for EEH PE states defined in uapi/linux/vfio.h to uapi/asm/eeh.h. v2 -

Re: [PULL 0/3] 4.0 patch queue 2015-03-25

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 10:58:54PM +0100, Alexander Graf wrote: > Hi Paolo, > > This is my current patch queue for 4.0. Please pull. > > Alex > > > The following changes since commit f710a12d73dfa1c3a5d2417f2482b970f03bb850: > > Merge tag 'kvm-arm-fixes-4.0-rc5' of > git://git.kernel.org/p

Re: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-03-25 Thread Marcelo Tosatti
On Mon, Mar 16, 2015 at 11:42:06AM +, Wu, Feng wrote: > > Do you have any reason why having the code at vcpu_put/vcpu_load is > > better than the proposal to have the code at kvm_vcpu_block? > > I think your proposal is good, I just want to better understand your idea > here.:) Reduce the ov

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 03:48:02PM -0700, Andy Lutomirski wrote: > On Wed, Mar 25, 2015 at 3:41 PM, Marcelo Tosatti wrote: > > On Wed, Mar 25, 2015 at 03:33:10PM -0700, Andy Lutomirski wrote: > >> On Mar 25, 2015 2:29 PM, "Marcelo Tosatti" wrote: > >> > > >> > On Wed, Mar 25, 2015 at 01:52:15PM +

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Kevin O'Connor
On Thu, Mar 26, 2015 at 01:31:11AM +0300, Andrey Korolyov wrote: > On Wed, Mar 25, 2015 at 11:54 PM, Kevin O'Connor wrote: > > > > Can you add something like: > > > > -chardev file,path=seabioslog.`date +%s`,id=seabios -device > > isa-debugcon,iobase=0x402,chardev=seabios > > > > to the qemu co

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Andy Lutomirski
On Wed, Mar 25, 2015 at 3:41 PM, Marcelo Tosatti wrote: > On Wed, Mar 25, 2015 at 03:33:10PM -0700, Andy Lutomirski wrote: >> On Mar 25, 2015 2:29 PM, "Marcelo Tosatti" wrote: >> > >> > On Wed, Mar 25, 2015 at 01:52:15PM +0100, Radim Krčmář wrote: >> > > 2015-03-25 12:08+0100, Radim Krčmář: >> >

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 03:33:10PM -0700, Andy Lutomirski wrote: > On Mar 25, 2015 2:29 PM, "Marcelo Tosatti" wrote: > > > > On Wed, Mar 25, 2015 at 01:52:15PM +0100, Radim Krčmář wrote: > > > 2015-03-25 12:08+0100, Radim Krčmář: > > > > Reverting the patch protects us from any migration, but I do

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Andy Lutomirski
On Mar 25, 2015 2:29 PM, "Marcelo Tosatti" wrote: > > On Wed, Mar 25, 2015 at 01:52:15PM +0100, Radim Krčmář wrote: > > 2015-03-25 12:08+0100, Radim Krčmář: > > > Reverting the patch protects us from any migration, but I don't think we > > > need to care about changing VCPUs as long as we read a c

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Andrey Korolyov
On Wed, Mar 25, 2015 at 11:54 PM, Kevin O'Connor wrote: > On Wed, Mar 25, 2015 at 11:43:31PM +0300, Andrey Korolyov wrote: >> On Mon, Mar 16, 2015 at 10:17 PM, Andrey Korolyov wrote: >> > For now, it looks like bug have a mixed Murphy-Heisenberg nature, as >> > it appearance is very rare (compare

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 05:09:13PM +, Marc Zyngier wrote: > On 23/03/15 15:58, Andre Przywara wrote: > > In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, > > especially before calling kvm_arch_destroy_vm(). To avoid > > unregistering devices from the already destroyed bus, let's m

[PULL 3/3] KVM: PPC: Book3S HV: Fix instruction emulation

2015-03-25 Thread Alexander Graf
From: Paul Mackerras Commit 4a157d61b48c ("KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register") had the side effect that we no longer reset vcpu->arch.last_inst to -1 on guest exit in the cases where the instruction is not fetched from the guest. This means that if ins

[PULL 1/3] KVM: PPC: Book3S HV: Fix spinlock/mutex ordering issue in kvmppc_set_lpcr()

2015-03-25 Thread Alexander Graf
From: Paul Mackerras Currently, kvmppc_set_lpcr() has a spinlock around the whole function, and inside that does mutex_lock(&kvm->lock). It is not permitted to take a mutex while holding a spinlock, because the mutex_lock might call schedule(). In addition, this causes lockdep to warn about a l

[PULL 2/3] KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count

2015-03-25 Thread Alexander Graf
From: Paul Mackerras The VPA (virtual processor area) is defined by PAPR and is therefore big-endian, so we need a be32_to_cpu when reading it in kvmppc_get_yield_count(). Without this, H_CONFER always fails on a little-endian host, causing SMP guests to waste time spinning on spinlocks. Signed

[PULL 0/3] 4.0 patch queue 2015-03-25

2015-03-25 Thread Alexander Graf
Hi Paolo, This is my current patch queue for 4.0. Please pull. Alex The following changes since commit f710a12d73dfa1c3a5d2417f2482b970f03bb850: Merge tag 'kvm-arm-fixes-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm (2015-03-16 20:08:56 -0300) are available in t

Re: [PATCH v2 04/12] KVM: x86: remove now unneeded include directory from Makefile

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 05:01:52PM +, Marc Zyngier wrote: > On 23/03/15 15:58, Andre Przywara wrote: > > virt/kvm was never really a good include directory for anything else > > than locally included headers. > > With the move of iodev.h there is no need anymore to add this > > directory the co

Re: [PATCH v2 02/12] KVM: move iodev.h from virt/kvm/ to include/kvm

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 05:00:02PM +, Marc Zyngier wrote: > On 23/03/15 15:58, Andre Przywara wrote: > > iodev.h contains definitions for the kvm_io_bus framework. This is > > needed both by the generic KVM code in virt/kvm as well as by > > architecture specific code under arch/. Putting the h

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Marcelo Tosatti
On Wed, Mar 25, 2015 at 01:52:15PM +0100, Radim Krčmář wrote: > 2015-03-25 12:08+0100, Radim Krčmář: > > Reverting the patch protects us from any migration, but I don't think we > > need to care about changing VCPUs as long as we read a consistent data > > from kvmclock. (VCPU can change outside o

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Kevin O'Connor
On Wed, Mar 25, 2015 at 11:43:31PM +0300, Andrey Korolyov wrote: > On Mon, Mar 16, 2015 at 10:17 PM, Andrey Korolyov wrote: > > For now, it looks like bug have a mixed Murphy-Heisenberg nature, as > > it appearance is very rare (compared to the number of actual launches) > > and most probably boun

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Andrey Korolyov
> - attach serial console (I am using virsh list for this exact purpose), virsh console of course, sorry -- 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: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-25 Thread Andrey Korolyov
On Mon, Mar 16, 2015 at 10:17 PM, Andrey Korolyov wrote: > For now, it looks like bug have a mixed Murphy-Heisenberg nature, as > it appearance is very rare (compared to the number of actual launches) > and most probably bounded to the physical characteristics of my > production nodes. As soon as

Re: [PATCH 0/9] qspinlock stuff -v15

2015-03-25 Thread Konrad Rzeszutek Wilk
On Mon, Mar 16, 2015 at 02:16:13PM +0100, Peter Zijlstra wrote: > Hi Waiman, > > As promised; here is the paravirt stuff I did during the trip to BOS last > week. > > All the !paravirt patches are more or less the same as before (the only real > change is the copyright lines in the first patch).

Re: [PATCH] KVM: arm/arm64: fix MMIO handling on userland induced accesses

2015-03-25 Thread Marc Zyngier
On 24/03/15 16:03, Andre Przywara wrote: > The guest is not the only user of the MMIO handling routines, userland > can also read and write to those handlers. Since we don't use the > KVM iobus framework in this case, we have to set the data pointer to > some actual memory before executing the hand

Re: [PATCH v2 12/12] KVM: arm/arm64: remove now obsolete VGIC specific MMIO handling code

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > With all of the virtual GIC emulation code now being registered with > the kvm_io_bus, we can remove all of the old MMIO handling code and > its dispatching functionality. > > Signed-off-by: Andre Przywara Reviewed-by: Marc Zyngier M. -- Jazz

Re: [PATCH v2 10/12] KVM: arm/arm64: prepare GICv3 emulation to use kvm_io_bus MMIO handling

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > Using the framework provided by the recent vgic.c changes, we > register a kvm_io_bus device on mapping the virtual GICv3 resources. > The distributor mapping is pretty straight forward, but the > redistributors need some more love, since they need to be t

Re: [PATCH v2 09/12] KVM: arm/arm64: prepare GICv2 emulation to be handled by kvm_io_bus

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > Using the framework provided by the recent vgic.c changes we register > a kvm_io_bus device when initializing the virtual GICv2. > > Signed-off-by: Andre Przywara Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny... -- To

Re: [Xen-devel] ARM: KVM/XEN: how should we support virt-what?

2015-03-25 Thread Stefano Stabellini
On Wed, 25 Mar 2015, Ian Campbell wrote: > On Wed, 2015-03-25 at 10:44 +0100, Andrew Jones wrote: > > Hello ARM virt maintainers, > > > > I'd like to start a discussion about supporting virt-what[1]. virt-what > > allows userspace to determine if the system it's running on is running > > in a gues

Re: [PATCH v2 08/12] KVM: arm/arm64: implement kvm_io_bus MMIO handling for the VGIC

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > Currently we use a lot of VGIC specific code to do the MMIO > dispatching. > Use the previous reworks to add kvm_io_bus style MMIO handlers. > > Those are not yet called by the MMIO abort handler, also the actual > VGIC emulator function do not make use o

Re: [PATCH v2 07/12] KVM: arm/arm64: simplify vgic_find_range() and callers

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > The vgic_find_range() function in vgic.c takes a struct kvm_exit_mmio > argument, but actually only used the length field in there. Since we > need to get rid of that structure in that part of the code anyway, > let's rework the function (and it's callers)

Re: [PATCH v2 06/12] KVM: mark kvm->buses as empty once they were destroyed

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > In kvm_destroy_vm() we call kvm_io_bus_destroy() pretty early, > especially before calling kvm_arch_destroy_vm(). To avoid > unregistering devices from the already destroyed bus, let's mark > the bus with NULL to let other users know it has been destroyed

Re: [PATCH v2 04/12] KVM: x86: remove now unneeded include directory from Makefile

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > virt/kvm was never really a good include directory for anything else > than locally included headers. > With the move of iodev.h there is no need anymore to add this > directory the compiler's include path, so remove it from the x86 kvm > Makefile. > > Si

Re: [PATCH v2 05/12] KVM: arm/arm64: rename struct kvm_mmio_range to vgic_io_range

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > The name "kvm_mmio_range" is a bit bold, given that it only covers > the VGIC's MMIO ranges. To avoid confusion with kvm_io_range, rename > it to vgic_io_range. > > Signed-off-by: Andre Przywara > Acked-by: Christoffer Dall Reviewed-by: Marc Zyngier

Re: [PATCH v2 03/12] KVM: arm/arm64: remove now unneeded include directory from Makefile

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > virt/kvm was never really a good include directory for anything else > than locally included headers. > With the move of iodev.h there is no need anymore to add this > directory the compiler's include path, so remove it from the arm and > arm64 kvm Makefil

Re: [PATCH v2 02/12] KVM: move iodev.h from virt/kvm/ to include/kvm

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > iodev.h contains definitions for the kvm_io_bus framework. This is > needed both by the generic KVM code in virt/kvm as well as by > architecture specific code under arch/. Putting the header file in > virt/kvm and using local includes in the architecture

Re: [PATCH v2 01/12] KVM: Redesign kvm_io_bus_ API to pass VCPU structure to the callbacks.

2015-03-25 Thread Marc Zyngier
On 23/03/15 15:58, Andre Przywara wrote: > From: Nikolay Nikolaev > > This is needed in e.g. ARM vGIC emulation, where the MMIO handling > depends on the VCPU that does the access. > > Signed-off-by: Nikolay Nikolaev > Signed-off-by: Andre Przywara > Acked-by: Paolo Bonzini > Acked-by: Christ

Guest memory backed by PCI BAR (x86)

2015-03-25 Thread Nate Case
Hello, I have an unusual goal of presenting SDRAM located on a real PCIe device (exposed via BAR) to a guest as normal memory. Eventually I'd like to split up guest memory between PCI memory and host memory as different NUMA nodes to optimize performance; but for now I'm focusing on just getting

[PATCH 3.16.y-ckt 070/165] KVM: MIPS: Fix trace event to save PC directly

2015-03-25 Thread Luis Henriques
3.16.7-ckt9 -stable review patch. If anyone has any objections, please let me know. -- From: James Hogan commit b3cffac04eca9af46e1e23560a8ee22b1bd36d43 upstream. Currently the guest exit trace event saves the VCPU pointer to the structure, and the guest PC is retrieved by de

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Radim Krčmář
2015-03-23 20:21-0300, Marcelo Tosatti: > The following point: > > 2. per-CPU pvclock time info is updated if the >underlying CPU changes. > > Is not true anymore since "KVM: x86: update pvclock area conditionally, > on cpu migration". > > Add task migration notification back. > > P

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Radim Krčmář
2015-03-25 12:08+0100, Radim Krčmář: > Reverting the patch protects us from any migration, but I don't think we > need to care about changing VCPUs as long as we read a consistent data > from kvmclock. (VCPU can change outside of this loop too, so it doesn't > matter if we return a value not fit f

Re: ARM: KVM/XEN: how should we support virt-what?

2015-03-25 Thread Marc Zyngier
On 25/03/15 09:44, Andrew Jones wrote: > Hello ARM virt maintainers, > > I'd like to start a discussion about supporting virt-what[1]. virt-what > allows userspace to determine if the system it's running on is running > in a guest, and of what type (KVM, Xen, etc.). Despite it being a best > effor

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Radim Krčmář
2015-03-24 19:59-0300, Marcelo Tosatti: > On Tue, Mar 24, 2015 at 04:34:12PM +0100, Radim Krčmář wrote: > > 2015-03-23 20:21-0300, Marcelo Tosatti: > > > The following point: > > > > > > 2. per-CPU pvclock time info is updated if the > > >underlying CPU changes. > > > > > > Is not tru

Re: [Xen-devel] ARM: KVM/XEN: how should we support virt-what?

2015-03-25 Thread Ian Campbell
On Wed, 2015-03-25 at 10:44 +0100, Andrew Jones wrote: > Hello ARM virt maintainers, > > I'd like to start a discussion about supporting virt-what[1]. virt-what > allows userspace to determine if the system it's running on is running > in a guest, and of what type (KVM, Xen, etc.). Despite it bein

Re: x86: kvm: Revert "remove sched notifier for cross-cpu migrations"

2015-03-25 Thread Radim Krčmář
2015-03-24 15:33-0700, Andy Lutomirski: > On Tue, Mar 24, 2015 at 8:34 AM, Radim Krčmář wrote: > > What is the problem? > > The kvmclock spec says that the host will increment a version field to > an odd number, then update stuff, then increment it to an even number. > The host is buggy and doesn

Re: ARM: KVM/XEN: how should we support virt-what?

2015-03-25 Thread Paolo Bonzini
On 25/03/2015 10:44, Andrew Jones wrote: > 2) create a specific DT node that will get exposed through sysfs, or >somewhere. Looking at custom DT nodes is what PowerPC does. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.ker

[PATCH v2 8/9] mips/kvm: Support FPU in MIPS KVM guests

2015-03-25 Thread James Hogan
Support the new KVM_CAP_MIPS_FPU capability, which allows the host's FPU to be exposed to the KVM guest. The capability is enabled if the guest core has an FPU according to its Config1 register. Various config bits are now writeable so that KVM is aware of the configuration (Config1.FP) and so tha

[PATCH v2 6/9] mips/kvm: Support unsigned KVM registers

2015-03-25 Thread James Hogan
Add KVM register access functions for the uint32_t type. This is required for FP and MSA control registers, which are represented as unsigned 32-bit integers. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Leon Alrae Cc: Aurelien Jarno --- target-mips/kvm.c | 29

[PATCH v2 1/9] DONT APPLY: linux-headers: Update MIPS KVM headers

2015-03-25 Thread James Hogan
This patch updates the linux headers based solely on the changes in my "MIPS: KVM: Guest FPU & SIMD (MSA) support" KVM patchset. It is provided for reference since those changes haven't been merged yet. The stored headers will need to be synced after my KVM patches are merged and before the rest of

[PATCH v2 9/9] mips/kvm: Support MSA in MIPS KVM guests

2015-03-25 Thread James Hogan
Support the new KVM_CAP_MIPS_MSA capability, which allows MIPS SIMD Architecture (MSA) to be exposed to the KVM guest. The capability is enabled if the guest core has MSA according to its Config3 register. Various config bits are now writeable so that KVM is aware of the configuration (Config3.MSA

[PATCH v2 2/9] mips/kvm: Sync with newer MIPS KVM headers

2015-03-25 Thread James Hogan
The KVM_REG_MIPS_COUNT_* definitions are now included in linux-headers/asm-mips/kvm.h since commit b061808d39fa ("linux-headers: update linux headers to kvm/next"), therefore the duplicate definitions in target-mips/kvm.c can now be dropped. The MIPS_C0_{32,64} macros are also updated to utilise d

[PATCH v2 5/9] mips/kvm: Implement Config CP0 registers

2015-03-25 Thread James Hogan
Implement saving and restoring to KVM state of the Config CP0 registers (namely Config, Config1, Config2, Config3, Config4, and Config5). These control the features available to a guest, and a few of the fields will soon be writeable by a guest so QEMU needs to know about them so as not to clobber

[PATCH v2 3/9] mips/kvm: Remove a couple of noisy DPRINTFs

2015-03-25 Thread James Hogan
The DPRINTFs in cpu_mips_io_interrupts_pending() and kvm_arch_pre_run() are particularly noisy during normal execution, and also not particularly helpful. Remove them so that more important debug messages can be more easily seen. Signed-off-by: James Hogan Reviewed-by: Leon Alrae Cc: Paolo Bonzi

[PATCH v2 4/9] mips/kvm: Implement PRid CP0 register

2015-03-25 Thread James Hogan
Implement saving and restoring to KVM state of the Processor ID (PRid) CP0 register. This allows QEMU to control the PRid exposed to the guest instead of using the default set by KVM. Signed-off-by: James Hogan Reviewed-by: Leon Alrae Cc: Paolo Bonzini Cc: Aurelien Jarno --- target-mips/kvm.c

[PATCH v2 7/9] mips/kvm: Support signed 64-bit KVM registers

2015-03-25 Thread James Hogan
Rename kvm_mips_{get,put}_one_reg64() to kvm_mips_{get,put}_one_ureg64() since they take an int64_t pointer, and add separate signed 64-bit accessors. These will be used for double precision floating point registers. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Leon Alrae Cc: Aurelien Jarno

[PATCH v2 0/9] mips/kvm: Support FPU & SIMD (MSA) in MIPS KVM guests

2015-03-25 Thread James Hogan
Review on v1 has gone quiet, so here's v2 which addresses the feedback received for v1. Thanks to all who have taken the time to review it so far. This patchset primarily adds support for FPU and MIPS SIMD Architecture (MSA) in MIPS KVM guests to QEMU. It depends on the KVM patchset which I recent

ARM: KVM/XEN: how should we support virt-what?

2015-03-25 Thread Andrew Jones
Hello ARM virt maintainers, I'd like to start a discussion about supporting virt-what[1]. virt-what allows userspace to determine if the system it's running on is running in a guest, and of what type (KVM, Xen, etc.). Despite it being a best effort tool, see the Caveat emptor in [1], it has become