[PATCH v4 0/3] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip

2015-08-17 Thread Pavel Fedin
This patch set brings back functionality which was broken in v4.0. Unfortunately because of restrictions of such a hardware is is impossible to take advantage of virtual architected timer, therefore guest, running in such restricted mode, has to use some memory-mapped timer. But it is still better

[PATCH v4 1/3] Fix NULL pointer dereference if KVM is used without in-kernel irqchip

2015-08-17 Thread Pavel Fedin
Makes qemu working again with kernel-irqchip=off option, allowing to use GIC emulation in userspace. Previously kvm_vgic_map_resources() used to include irqchip_in_kernel() check, and vgic_v2_map_resources() still has it, but now vm_ops are not initialized before kvm_vgic_create(). Therefore

[PATCH v4 3/3] Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-08-17 Thread Pavel Fedin
Now at least ARM is able to determine whether the machine has virtualization support for irqchip or not at runtime. Obviously, irqfd requires irqchip. Signed-off-by: Pavel Fedin p.fe...@samsung.com --- virt/kvm/kvm_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v4 2/3] Detect vGIC presence at runtime

2015-08-17 Thread Pavel Fedin
Before commit 662d9715840aef44dcb573b0f9fab9e8319c868a is was possible to compile the kernel without vGIC and vTimer support. Commit message says about possibility to detect vGIC support in runtine, but this has never been implemented. This patch introdices runtime check, restoring the lost

Debian 8

2015-08-17 Thread Mathieu Charrette
Hi, I'm trying to install KVM on the latest version of Debian (so Debian 8) and it's not working. It always gives me a dependencies error. But when I install it on Debian 7.8, it works no problem. I was wondering if you would have any solution for me. -- Thank you/Merci Mathieu Charrette

Re: [PATCH v2 13/15] KVM: arm64: implement ITS command queue command handlers

2015-08-17 Thread Eric Auger
On 07/10/2015 04:21 PM, Andre Przywara wrote: The connection between a device, an event ID, the LPI number and the allocated CPU is stored in in-memory tables in a GICv3, but their format is not specified by the spec. Instead software uses a command queue in a ring buffer to let the ITS

Re: [PATCH v2 14/15] KVM: arm64: implement MSI injection in ITS emulation

2015-08-17 Thread Eric Auger
On 07/10/2015 04:21 PM, Andre Przywara wrote: When userland wants to inject a MSI into the guest, we have to use our data structures to find the LPI number and the VCPU to receive the interrupt. Use the wrapper functions to iterate the linked lists and find the proper Interrupt Translation

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-17 Thread Paolo Bonzini
On 16/08/2015 13:27, Avi Kivity wrote: On 08/05/2015 07:33 PM, Radim Krčmář wrote: The guest can use KVM_USER_EXIT instead of a signal-based exiting to userspace. Availability depends on KVM_CAP_USER_EXIT. Only x86 is implemented so far. Signed-off-by: Radim Krčmář rkrc...@redhat.com ---

Re: [Qemu-devel] Help debugging a regression in KVM Module

2015-08-17 Thread Peter Lieven
Am 14.08.2015 um 22:01 schrieb Alex Bennée: Peter Lieven p...@kamp.de writes: Hi, some time a go I stumbled across a regression in the KVM Module that has been introduced somewhere between 3.17 and 3.19. I have a rather old openSUSE guest with an XFS filesystem which realiably crashes

Re: [PATCH v2 2/4] irqchip: GICv3: Don't deactivate interrupts forwarded to a guest

2015-08-17 Thread Eric Auger
Reviewed-by: Eric Auger eric.au...@linaro.org On 08/13/2015 10:28 AM, Marc Zyngier wrote: Commit 0a4377de3056 (genirq: Introduce irq_set_vcpu_affinity() to target an interrupt to a VCPU) added just what we needed at the lowest level to allow an interrupt to be deactivated by a guest. When

x2apic

2015-08-17 Thread Ozgur Ozan Kilic
I was trying to have more than 256 vcpu with using x2apic but Paolo tell me that KVM doesn't support more than 256 VCPUs, even with x2APIC enabled in the guest. I wonder what the restriction of that and is it possible to modify the code to support it Thanks Ozgur Ozan Kilic-- To unsubscribe

Re: [PATCH v3 03/10] VFIO: platform: single handler using function pointer

2015-08-17 Thread Eric Auger
Alex, On 08/12/2015 08:56 PM, Alex Williamson wrote: On Mon, 2015-08-10 at 15:20 +0200, Eric Auger wrote: A single handler now is registered whatever the use case: automasked or not. A function pointer is set according to the wished behavior and the handler calls this function. The irq lock

Re: [PATCH v3 05/10] VFIO: platform: add vfio_platform_is_active

2015-08-17 Thread Eric Auger
On 08/12/2015 08:56 PM, Alex Williamson wrote: On Mon, 2015-08-10 at 15:20 +0200, Eric Auger wrote: This function returns whether the IRQ is active at irqchip level or VFIO masked. If either is true, it is considered the IRQ is active. Currently there is no way to differentiate userspace

Re: [PATCH v3 06/10] VFIO: platform: add irq bypass producer management

2015-08-17 Thread Eric Auger
Hi Alex, On 08/12/2015 08:56 PM, Alex Williamson wrote: On Mon, 2015-08-10 at 15:21 +0200, Eric Auger wrote: This patch populates the IRQ bypass callacks: - stop/start producer simply consist in disabling/enabling the host irq - add/del consumer: basically set the automasked flag to false/true

Re: Debian 8

2015-08-17 Thread Bandan Das
Mathieu Charrette mathieu.charre...@phoenixsolutions.ca writes: Hi, I'm trying to install KVM on the latest version of Debian (so Debian 8) and it's not working. It always gives me a dependencies error. But when I install it on Debian 7.8, it works no problem. I was wondering if you would

Re: [PATCH v3 01/10] VFIO: platform: registration of a dummy IRQ bypass producer

2015-08-17 Thread Eric Auger
Hi Alex, On 08/12/2015 08:56 PM, Alex Williamson wrote: On Mon, 2015-08-10 at 15:20 +0200, Eric Auger wrote: Register a dummy producer with void callbacks Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: - rename vfio_platform_irq_bypass_resume into *_start ---

Re: [PATCH v3 04/10] VFIO: platform: add vfio_platform_set_automasked

2015-08-17 Thread Eric Auger
On 08/12/2015 08:56 PM, Alex Williamson wrote: On Mon, 2015-08-10 at 15:20 +0200, Eric Auger wrote: This function makes possible to change the automasked mode. Signed-off-by: Eric Auger eric.au...@linaro.org --- v1 - v2: - set forwarded flag ---

Re: [PATCH v2 1/4] irqchip: GICv3: Convert to EOImode == 1

2015-08-17 Thread Eric Auger
Hi Marc, On 08/13/2015 10:28 AM, Marc Zyngier wrote: So far, GICv3 has been used in with EOImode == 0. The effect of this mode is to perform the priority drop and the deactivation of the interrupt at the same time. While this works perfectly for Linux (we only have a single priority), it

Re: [PATCH v2 3/4] irqchip: GIC: Convert to EOImode == 1

2015-08-17 Thread Eric Auger
On 08/13/2015 10:28 AM, Marc Zyngier wrote: So far, GICv2 has been used in with EOImode == 0. The effect of this in with? mode is to perform the priority drop and the deactivation of the interrupt at the same time. While this works perfectly for Linux (we only have a single priority), it

Re: [patch -rt 1/2] KVM: use simple waitqueue for vcpu-wq

2015-08-17 Thread Thomas Gleixner
On Fri, 7 Aug 2015, Peter Zijlstra wrote: On Fri, Aug 07, 2015 at 12:57:38PM +0200, Peter Zijlstra wrote: +void __finish_swait(struct swait_queue_head *q, struct swait_queue *wait) this one has no users the __ suggests that it is locked edition. Maybe it is for the completions…