Re: [PATCH] arm64: KVM: Do not inject a 64bit fault for a 32bit guest

2015-08-27 Thread Russell King - ARM Linux
On Thu, Aug 27, 2015 at 03:05:47PM +0100, Marc Zyngier wrote: When injecting a fault into a 32bit guest, it seems rather idiotic to also inject a 64bit fault that is only going to corrupt the guest state, and lead to a situation where we restore an illegal context. Just fix the stupid bug

Re: [PATCH v4 0/4] irqchip: GICv2/v3: Add support for irq_vcpu_affinity

2015-08-27 Thread Eric Auger
Hi Marc, I tested the series on Calxeda Midway with VFIO use case. Also reviewed it again without finding anything new. Tested-by: Eric Auger eric.au...@linaro.org Reviewed-by: Eric Auger eric.au...@linaro.org Best Regards Eric On 08/26/2015 06:00 PM, Marc Zyngier wrote: The GICv2 and GICv3

[PATCH] iommu/s390: add iommu api for s390 pci devices

2015-08-27 Thread Gerald Schaefer
This adds an IOMMU API implementation for s390 PCI devices. Reviewed-by: Sebastian Ott seb...@linux.vnet.ibm.com Signed-off-by: Gerald Schaefer gerald.schae...@de.ibm.com --- MAINTAINERS | 7 + arch/s390/Kconfig | 1 + arch/s390/include/asm/pci.h | 4 +

Re: [PATCH v4 0/4] irqchip: GICv2/v3: Add support for irq_vcpu_affinity

2015-08-27 Thread Marc Zyngier
Hi Eric, On 27/08/15 14:03, Eric Auger wrote: Hi Marc, I tested the series on Calxeda Midway with VFIO use case. Also reviewed it again without finding anything new. Tested-by: Eric Auger eric.au...@linaro.org Reviewed-by: Eric Auger eric.au...@linaro.org Thanks a lot Eric, much

Re: [PATCH] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-08-27 Thread Christoffer Dall
On Thu, Aug 27, 2015 at 02:51:22PM +0300, Pavel Fedin wrote: Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr() function with additional vgic_dist_irq_is_pending() check before setting LR_STATE_PENDING bit.

Re: [PATCH v2 10/15] KVM: arm64: add data structures to model ITS interrupt translation

2015-08-27 Thread Eric Auger
Hi Andre, On 08/25/2015 01:15 PM, Andre Przywara wrote: Hi Eric, On 13/08/15 16:46, Eric Auger wrote: On 07/10/2015 04:21 PM, Andre Przywara wrote: The GICv3 Interrupt Translation Service (ITS) uses tables in memory to allow a sophisticated interrupt routing. It features device tables, an

[PATCH] arm64: KVM: Do not inject a 64bit fault for a 32bit guest

2015-08-27 Thread Marc Zyngier
When injecting a fault into a 32bit guest, it seems rather idiotic to also inject a 64bit fault that is only going to corrupt the guest state, and lead to a situation where we restore an illegal context. Just fix the stupid bug that has been there from day 1. Cc: sta...@vger.kernel.org

Re: A question about vring operation

2015-08-27 Thread Michael S. Tsirkin
On Thu, Aug 27, 2015 at 01:18:47AM +, Wang, Wei W wrote: Hi all, I have a question about the vring_avail: It only includes an idx (equivalent to the ring tail), which is used by the frontend (virtio_net) to fill bufs. The backend (e.g. vhost_net) maintains the ring head

Re: add multiple times opening support to a virtserialport

2015-08-27 Thread Christopher Covington
On 07/24/2015 08:00 AM, Matt Ma wrote: Hi all, Linaro has developed the foundation for the new Android Emulator code base based on a fairly recent upstream QEMU code base, when we re-based the code, we updated the device model to be more virtio based (for example the drives are now virtio

[GIT PULL] Late arm64 KVM fix for 4.2

2015-08-27 Thread Will Deacon
Hi Linus, I appreciate that it's extremely late in the cycle, but we've uncovered a nasty bug in the arm64 KVM code which allows a badly behaved 32-bit guest to bring down the host. The fix is simple (it's what I believe we call a brown paper bag bug) and I don't think it makes sense to sit on

[PATCH v2] arm64: KVM: Do not inject a 64bit fault for a 32bit guest

2015-08-27 Thread Marc Zyngier
When injecting a fault into a misbehaving 32bit guest, it seems rather idiotic to also inject a 64bit fault that is only going to corrupt the guest state. This leads to a situation where we perform an illegal exception return at EL2 causing the host to crash instead of killing the guest. Just fix

Re: [PATCH v2 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-27 Thread David Matlack
On Thu, Aug 27, 2015 at 2:59 AM, Wanpeng Li wanpeng...@hotmail.com wrote: Hi David, On 8/26/15 1:19 AM, David Matlack wrote: Thanks for writing v2, Wanpeng. On Mon, Aug 24, 2015 at 11:35 PM, Wanpeng Li wanpeng...@hotmail.com wrote: There is a downside of halt_poll_ns since poll is still

Re: add multiple times opening support to a virtserialport

2015-08-27 Thread Christoffer Dall
On Thu, Aug 27, 2015 at 10:23:38AM -0400, Christopher Covington wrote: On 07/24/2015 08:00 AM, Matt Ma wrote: Hi all, Linaro has developed the foundation for the new Android Emulator code base based on a fairly recent upstream QEMU code base, when we re-based the code, we updated the

Re: [PATCH v2 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-27 Thread Wanpeng Li
On 8/28/15 12:25 AM, David Matlack wrote: On Thu, Aug 27, 2015 at 2:59 AM, Wanpeng Li wanpeng...@hotmail.com wrote: Hi David, On 8/26/15 1:19 AM, David Matlack wrote: Thanks for writing v2, Wanpeng. On Mon, Aug 24, 2015 at 11:35 PM, Wanpeng Li wanpeng...@hotmail.com wrote: There is a

Re: [Qemu-devel] add multiple times opening support to a virtserialport

2015-08-27 Thread Asias He
Hello Christoffer, On Fri, Aug 28, 2015 at 2:30 AM, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Aug 27, 2015 at 10:23:38AM -0400, Christopher Covington wrote: On 07/24/2015 08:00 AM, Matt Ma wrote: Hi all, Linaro has developed the foundation for the new Android Emulator

RE: A question about vring operation

2015-08-27 Thread Wang, Wei W
On 24/07/2015 21:36, Michael S. Tsirkin wrote: On Thu, Aug 27, 2015 at 01:18:47AM +, Wang, Wei W wrote: Hi all, I have a question about the vring_avail: It only includes an idx (equivalent to the ring tail), which is used by the frontend (virtio_net) to fill bufs. The backend

[PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-27 Thread Wanpeng Li
v3 - v4: * bring back grow vcpu-halt_poll_ns when interrupt arrives and shrinks when idle VCPU is detected v2 - v3: * grow/shrink vcpu-halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink * drop the macros and hard coding the numbers in the param definitions * update the comments

[PATCH v4 3/3] KVM: trace kvm_halt_poll_ns grow/shrink

2015-08-27 Thread Wanpeng Li
Tracepoint for dynamic halt_pool_ns, fired on every potential change. Signed-off-by: Wanpeng Li wanpeng...@hotmail.com --- include/trace/events/kvm.h | 30 ++ virt/kvm/kvm_main.c| 8 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git

[PATCH v4 1/3] KVM: make halt_poll_ns per-VCPU

2015-08-27 Thread Wanpeng Li
Change halt_poll_ns into per-VCPU variable, seeded from module parameter, to allow greater flexibility. Signed-off-by: Wanpeng Li wanpeng...@hotmail.com --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v4 0/3] KVM: Dynamic Halt-Polling

2015-08-27 Thread Wanpeng Li
v3 - v4: * bring back grow vcpu-halt_poll_ns when interrupt arrives and shrinks when idle VCPU is detected v2 - v3: * grow/shrink vcpu-halt_poll_ns by *halt_poll_ns_grow or /halt_poll_ns_shrink * drop the macros and hard coding the numbers in the param definitions * update the comments

[PATCH v4 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-27 Thread Wanpeng Li
There is a downside of halt_poll_ns since poll is still happen for idle VCPU which can waste cpu usage. This patchset add the ability to adjust halt_poll_ns dynamically, grows halt_poll_ns if an interrupt arrives and shrinks halt_poll_ns when idle VCPU is detected. There are two new kernel

Re: [PATCH v2 2/3] KVM: dynamic halt_poll_ns adjustment

2015-08-27 Thread Wanpeng Li
Hi David, On 8/26/15 1:19 AM, David Matlack wrote: Thanks for writing v2, Wanpeng. On Mon, Aug 24, 2015 at 11:35 PM, Wanpeng Li wanpeng...@hotmail.com wrote: There is a downside of halt_poll_ns since poll is still happen for idle VCPU which can waste cpu usage. This patch adds the ability to

[PATCH] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-08-27 Thread Pavel Fedin
Commit 71760950bf3dc796e5e53ea3300dec724a09f593 (arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn) introduced vgic_queue_irq_to_lr() function with additional vgic_dist_irq_is_pending() check before setting LR_STATE_PENDING bit. In some cases it started causing the following situation if the

[PATCH 2/2] pci-test: allow bar 4k

2015-08-27 Thread Michael S. Tsirkin
vmexit using test assumes BAR size is exactly 4K. Remove this restriction, allow any BAR size. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- x86/vmexit.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index

[PATCH] Correct type based on checkpatch.pl

2015-08-27 Thread Minjune Kim
Signed-off-by: Minjune Kim infinite.minjune@gmail.com --- arch/arm/kvm/interrupts.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index 900ef6d..30bded6 100644 --- a/arch/arm/kvm/interrupts.S +++

[PATCH 1/2] pci: add bar sizing

2015-08-27 Thread Michael S. Tsirkin
Will be used for pci-testdev. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- lib/x86/pci.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/lib/x86/pci.c b/lib/x86/pci.c index 231668a..5116dac 100644 --- a/lib/x86/pci.c +++ b/lib/x86/pci.c @@ -19,6 +19,13 @@

KVM: Security Policy

2015-08-27 Thread Stefan Geißler
Hello kvm mailing list, I assume, this is a rather uncommon mailing list post since it is not directly related to the usage or development of KVM. Instead, the following is the case: I am a student of computer science and am currently working on my masters thesis. The work in progress topic