Re: [PATCH net V2] vhost: net: switch to use data copy if pending DMAs exceed the limit

2014-03-13 Thread Jason Wang
On 03/10/2014 04:03 PM, Michael S. Tsirkin wrote: On Fri, Mar 07, 2014 at 01:28:27PM +0800, Jason Wang wrote: We used to stop the handling of tx when the number of pending DMAs exceeds VHOST_MAX_PEND. This is used to reduce the memory occupation of both host and guest. But it was too

kernel panic with 3.13.6

2014-03-13 Thread Vasiliy Tolstov
Hello. Where i can get help? I'm using 9p_virtio to provide rootfs for vm sometimes (3 - 6 times in 10 vps starts) when i have massive read/write i get: [ 2478.288105] PANIC: double fault, error_code: 0x0 [ 2478.301397] CPU: 1 PID: 5268 Comm: bash Not tainted 3.13.6 #3 [ 2478.301397] Hardware

[PATCH 1/2] KVM: PPC: Book3S HV: Remove bogus duplicate code

2014-03-13 Thread Paul Mackerras
Commit 7b490411c37f (KVM: PPC: Book3S HV: Add new state for transactional memory) incorrectly added some duplicate code to the guest exit path because I didn't manage to clean up after a rebase correctly. This removes the extraneous material. The presence of this extraneous code causes host

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

2014-03-13 Thread Paul Mackerras
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 bug that causes host memory corruption. Both

[PATCH 2/2] KVM: PPC: Book3S HV: Fix register usage when loading/saving VRSAVE

2014-03-13 Thread Paul Mackerras
Commit 595e4f7e697e (KVM: PPC: Book3S HV: Use load/store_fp_state functions in HV guest entry/exit) changed the register usage in kvmppc_save_fp() and kvmppc_load_fp() but omitted changing the instructions that load and save VRSAVE. The result is that the VRSAVE value was loaded from a constant

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

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

2014-03-13 Thread Paul Mackerras
On Thu, Mar 13, 2014 at 10:50:29AM +0100, Paolo Bonzini wrote: 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

Re: [RFC PATCH v2] kvm: x86: ignore ioapic polarity

2014-03-13 Thread Paolo Bonzini
Il 28/02/2014 05:06, Gabriel L. Somlo ha scritto: +NOTE: For each level-triggered interrupt managed by a virtual ioapic, +the guest OS may set a polarity value (bit 13 of each corresponding I/O +redirection table register). The polarity bit defines the relationship +between an irq line's

Re: [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 11:54, David Vrabel ha scritto: On 12/03/14 18:54, Waiman Long wrote: Locking is always an issue in a virtualized environment as the virtual CPU that is waiting on a lock may get scheduled out and hence block any progress in lock acquisition even when the lock has been freed. One

Re: [PATCH] KVM: SVM: fix cr8 intercept window

2014-03-13 Thread Gleb Natapov
On Wed, Mar 12, 2014 at 06:20:01PM +0100, Paolo Bonzini wrote: Il 12/03/2014 11:40, Radim Krčmář ha scritto: 2014-03-11 22:05-0300, Marcelo Tosatti: On Tue, Mar 11, 2014 at 07:11:18PM +0100, Radim Krčmář wrote: We always disable cr8 intercept in its handler, but only re-enable it if handling

Re: [RFC PATCH v2] kvm: x86: ignore ioapic polarity

2014-03-13 Thread Gabriel L. Somlo
On Thu, Mar 13, 2014 at 11:53:04AM +0100, Paolo Bonzini wrote: Instead of this, I'm adding the following to the KVM_IRQ_LINE ioctl: +On real hardware, interrupt pins can be active-low or active-high. This +does not matter for the level field of struct kvm_irq_level: 1 always +means active

Re: [PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 12:21, David Vrabel ha scritto: On 12/03/14 18:54, Waiman Long wrote: This patch adds para-virtualization support to the queue spinlock in the same way as was done in the PV ticket lock code. In essence, the lock waiters will spin for a specified number of times (QSPIN_THRESHOLD =

Re: [PATCH RFC v6 10/11] pvqspinlock, x86: Enable qspinlock PV support for KVM

2014-03-13 Thread Paolo Bonzini
Il 12/03/2014 19:54, Waiman Long ha scritto: @@ -807,8 +889,13 @@ void __init kvm_spinlock_init(void) if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) return; +#ifdef CONFIG_QUEUE_SPINLOCK + pv_lock_ops.kick_cpu = kvm_kick_cpu_type; + pv_lock_ops.hibernate =

[PULL for-2.0-rc0 36/58] cpu: Move watchpoint fields from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 5 +++-- exec.c | 33 - gdbstub.c | 8 include/exec/cpu-defs.h | 10 -- include/qom/cpu.h | 10 ++ linux-user/main.c |

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

2014-03-13 Thread Scott Wood
On Thu, 2014-03-13 at 20:01 +1100, Paul Mackerras wrote: 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

[RFC PATCH 1/4] ARM: KVM: on unhandled IO mem abort, route the call to the KVM MMIO bus

2014-03-13 Thread Antonios Motakis
On an unhandled IO memory abort, use the kvm_io_bus_* API in order to handle the MMIO access through any registered read/write callbacks. This is a dependency for eventfd support (ioeventfd and irqfd). However, accesses to the VGIC are still left implemented independently, since the kvm_io_bus_*

[RFC PATCH 4/4] ARM: KVM: enable KVM_CAP_IOEVENTFD

2014-03-13 Thread Antonios Motakis
KVM on ARM can now advertise support for the ioeventfd capability. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev n.nikol...@virtualopensystems.com --- arch/arm/kvm/arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kvm/arm.c

[RFC PATCH 2/4] KVM: irqfd should depend on CONFIG_HAVE_KVM_IRQ_ROUTING

2014-03-13 Thread Antonios Motakis
With an ARM VGIC we have an IRQ chip in the kernel (using the hardware support), but the irqfd feature is still not available due to a dependency on IRQ routing. The prototypes of kvm_irqfd and kvm_irqfd_release should be conditionally compiled depending on HAVE_KVM_IRQ_ROUTING instead of

[RFC PATCH 3/4] ARM: KVM: enable linking against eventfd

2014-03-13 Thread Antonios Motakis
This enables and compiles the ioeventfd capability of KVM on ARM. The irqfd feature will not be included in a build, due to the lack of IRQ routing in the VGIC implementation of KVM. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev

Re: [PATCH] KVM: SVM: fix cr8 intercept window

2014-03-13 Thread Radim Krčmář
2014-03-13 15:52+0200, Gleb Natapov: On Wed, Mar 12, 2014 at 06:20:01PM +0100, Paolo Bonzini wrote: Il 12/03/2014 11:40, Radim Krčmář ha scritto: 2014-03-11 22:05-0300, Marcelo Tosatti: On Tue, Mar 11, 2014 at 07:11:18PM +0100, Radim Krčmář wrote: We always disable cr8 intercept in its

Re: [PATCH 2/3] bridge: trigger a bridge calculation upon port changes

2014-03-13 Thread Cong Wang
On Wed, Mar 12, 2014 at 8:15 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: spin_lock_bh(p-br-lock); err = br_setport(p, tb); + changed = br_stp_recalculate_bridge_id(p-br); Looks like you only want to check if the mac

QEMU KVM tracing and KVM toggling

2014-03-13 Thread Michał Matoga
Hi, I'm working on system calls tracing using QEMU KVM. 1. Is it possible to force emulation of instructions when VM is running? Then I might be able to enable/disable KVM acceleration whenever I want to. 2. I know I can get full trace from QEMU without KVM (log in_asm). For example during

Re: [PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support

2014-03-13 Thread Waiman Long
On 03/13/2014 09:57 AM, Paolo Bonzini wrote: Il 13/03/2014 12:21, David Vrabel ha scritto: On 12/03/14 18:54, Waiman Long wrote: This patch adds para-virtualization support to the queue spinlock in the same way as was done in the PV ticket lock code. In essence, the lock waiters will spin for

Re: [Qemu-devel] [PATCH v3 6/9] target-mips: kvm: Add main KVM support for MIPS

2014-03-13 Thread Andreas Färber
Am 06.03.2014 18:09, schrieb James Hogan: From: Sanjay Lal sanj...@kymasys.com Implement the main KVM arch API for MIPS. Signed-off-by: Sanjay Lal sanj...@kymasys.com Signed-off-by: James Hogan james.ho...@imgtec.com Cc: Aurelien Jarno aurel...@aurel32.net Cc: Gleb Natapov

Re: [Qemu-devel] [PATCH v3 7/9] hw/mips: In KVM mode, inject IRQ2 (I/O) interupts via ioctls

2014-03-13 Thread Andreas Färber
Am 06.03.2014 18:09, schrieb James Hogan: From: Sanjay Lal sanj...@kymasys.com COP0 emulation is in-kernel for KVM, so inject IRQ2 (I/O) interrupts via ioctls. Signed-off-by: Sanjay Lal sanj...@kymasys.com Signed-off-by: James Hogan james.ho...@imgtec.com Reviewed-by: Aurelien Jarno

Re: [PATCH 3/3] bridge: fix bridge root block on designated port

2014-03-13 Thread Stephen Hemminger
On Wed, 12 Mar 2014 20:15:27 -0700 Luis R. Rodriguez mcg...@do-not-panic.com wrote: --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -150,6 +150,7 @@ struct net_bridge_port u8 priority; u8 state; u16

Re: [Qemu-devel] [PATCH v3 6/9] target-mips: kvm: Add main KVM support for MIPS

2014-03-13 Thread Peter Maydell
On 13 March 2014 21:28, Andreas Färber afaer...@suse.de wrote: int32 is a type used in softfloat that has weird at-least-as-wide semantics and bit us in the past. I'm coming round to the opinion that we should just change all those to int32_t c. I know we had a discussion about efficiency at

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

2014-03-13 Thread Christoffer Dall
On Tue, Jan 28, 2014 at 08:28:42AM -0800, Christoffer Dall wrote: 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

I/O redirection Guest VM

2014-03-13 Thread Shiva
Hello, I am working on building an Storage Intrusion Detection System(SIDS) App inside a VM on KVM hypervisor. I wanted I/O's from other vm's to first contact this App VM and then finally write to the disk.I went with the network storage as an option to achieve this objective. But wanted

Re: I/O redirection Guest VM

2014-03-13 Thread Fam Zheng
On Fri, 03/14 04:46, Shiva wrote: Hello, I am working on building an Storage Intrusion Detection System(SIDS) App inside a VM on KVM hypervisor. I wanted I/O's from other vm's to first contact this App VM and then finally write to the disk.I went with the network storage as an

Re: [PATCH v3 10/52] arm, kvm: Fix CPU hotplug callback registration

2014-03-13 Thread Srivatsa S. Bhat
On 03/13/2014 04:51 AM, Christoffer Dall wrote: On Tue, Mar 11, 2014 at 02:05:38AM +0530, Srivatsa S. Bhat wrote: Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below:

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

2014-03-13 Thread Paul Mackerras
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 bug that causes host memory corruption. Both

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

2014-03-13 Thread Scott Wood
On Thu, 2014-03-13 at 20:01 +1100, Paul Mackerras wrote: 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

[PATCH 05/10] powerpc/booke64: Use SPRG7 for VDSO

2014-03-13 Thread Scott Wood
Previously SPRG3 was marked for use by both VDSO and critical interrupts (though critical interrupts were not fully implemented). In commit 8b64a9dfb091f1eca8b7e58da82f1e7d1d5fe0ad (powerpc/booke64: Use SPRG0/3 scratch for bolted TLB miss crit int), Mihai Caraman made an attempt to resolve this

[PATCH 06/10] powerpc/booke64: Use SPRG_TLB_EXFRAME on bolted handlers

2014-03-13 Thread Scott Wood
While bolted handlers (including e6500) do not need to deal with a TLB miss recursively causing another TLB miss, nested TLB misses can still happen with crit/mc/debug exceptions -- so we still need to honor SPRG_TLB_EXFRAME. We don't need to spend time modifying it in the TLB miss fastpath,

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

2014-03-13 Thread Christoffer Dall
On Tue, Jan 28, 2014 at 08:28:42AM -0800, Christoffer Dall wrote: 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