Re: Some more basic questions..

2014-06-03 Thread Zhang Haoyu
1. If IO to a block device goes through QEMU and not vhost, are there data copies between kernel and user mode if I do IO to a block device or is it zero copy? Kind of related to Question (2) also. I'm not sure, it perhaps depend on which IO mode you chose, qemu pthreads IO, or linux AIO?

RE: Some more basic questions..

2014-06-03 Thread Venkateswara Rao Nandigam
1. If IO to a block device goes through QEMU and not vhost, are there data copies between kernel and user mode if I do IO to a block device or is it zero copy? Kind of related to Question (2) also. An additional copy will be avoided only by using vhost, so if you are using vhost you can call

Re: [RFC PATCH 1/3] CMA: generalize CMA reserved area management functionality

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the kvm on powerpc. They have their own code to manage CMA reserved area even if they looks really similar. From my guess, it is caused by some needs on bitmap

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

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal Nazarewicz min...@mina86.com diff --git

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

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal Nazarewicz min...@mina86.com -- Best regards,

Re: [PATCH v2 09/13] MIPS: Add functions for hypervisor call

2014-06-03 Thread Ralf Baechle
On Wed, May 28, 2014 at 11:52:12PM +0200, Andreas Herrmann wrote: +/* + * Hypercalls for KVM. + * + * Hypercall number is passed in v0. + * Return value will be placed in v0. + * Up to 3 arguments are passed in a0, a1, and a2. + */ +static inline unsigned long kvm_hypercall0(unsigned long

Re: kvm enable over cortex-a53?

2014-06-03 Thread Marc Zyngier
On Tue, Jun 03 2014 at 3:14:33 am BST, Lei Wen adrian.w...@gmail.com wrote: Hi Marc, On Mon, Jun 2, 2014 at 5:27 PM, Marc Zyngier marc.zyng...@arm.com wrote: kvmtool tells you where the console lives (it is one of the virtio-mmio devices that it prints out when it starts). The address you

Re: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 21:25, Gabriel L. Somlo ha scritto: Would it make sense to make this a module parameter, (e.g., int emulate_mwait) ? Default would be 0 (no emulation). 1 would mean emulate as nop, and if anyone ever figures out how to do proper page-locking based emulation we could use 2 to

Re: [PATCH] kvm: Enable -cpu option to hide KVM

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 19:28, Alex Williamson ha scritto: The latest Nvidia driver (337.88) specifically checks for KVM as the hypervisor and reports Code 43 for the driver in a Windows guest when found. Removing or changing the KVM signature is sufficient for the driver to load and work. This patch

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

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 09:02, Michal Nazarewicz ha scritto: On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal

Re: RE: Some more basic questions..

2014-06-03 Thread Zhang Haoyu
A few additional questions:) 1. If IO to a block device goes through QEMU and not vhost, are there data copies between kernel and user mode if I do IO to a block device or is it zero copy? Kind of related to Question (2) also. An additional copy will be avoided only by using vhost, so if you are

RE: RE: Some more basic questions..

2014-06-03 Thread Venkateswara Rao Nandigam
I know that kvm support network tx zero-copy when using vhost, but rx copy is still performed in vhost, because the NIC cannot determine DMA to which VM's rx buffers before L2 switching(unless vhost using page-flip between HVA-HPA and GPA-HPA, or macvtap over SRIOV-VF is used). Storage has

[PATCH] KVM: add missing cleanup_srcu_struct

2014-06-03 Thread Paolo Bonzini
Reported-by: hrg hrgstep...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- virt/kvm/kvm_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 95b4c2b3906a..c86be0f983db 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c

Re: [PATCH] arch: x86: kvm: x86.c: Cleaning up uninitialized variables

2014-06-03 Thread Paolo Bonzini
Il 01/06/2014 01:05, Rickard Strandqvist ha scritto: There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se No,

[PATCH] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation

2014-06-03 Thread Aneesh Kumar K.V
We use time base for PURR and SPURR emulation with PR KVM since we are emulating a single threaded core. When using time base we need to make sure that we don't accumulate time spent in the host in PURR and SPURR value. Also we don't need to emulate mtspr because both the registers are hypervisor

Re: [PULL 2/2] vhost: replace rcu with mutex

2014-06-03 Thread Paolo Bonzini
Il 02/06/2014 23:58, Eric Dumazet ha scritto: This looks dubious What about using kfree_rcu() instead ? It would lead to unbound allocation from userspace. translate_desc() still uses rcu_read_lock(), its not clear if the mutex is really held. Yes, vhost_get_vq_desc must be called with

RE: Some more basic questions..

2014-06-03 Thread Zhang Haoyu
A few additional questions:) 1. If IO to a block device goes through QEMU and not vhost, are there data copies between kernel and user mode if I do IO to a block device or is it zero copy? Kind of related to Question (2) also. An additional copy will be avoided only by using vhost, so if you are

Re: [PATCH] arch: x86: kvm: x86.c: Cleaning up uninitialized variables

2014-06-03 Thread Michael Tokarev
03.06.2014 16:04, Paolo Bonzini wrote: Il 01/06/2014 01:05, Rickard Strandqvist ha scritto: There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist

Re: [PATCH] arch: x86: kvm: x86.c: Cleaning up uninitialized variables

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 15:06, Michael Tokarev ha scritto: 03.06.2014 16:04, Paolo Bonzini wrote: Il 01/06/2014 01:05, Rickard Strandqvist ha scritto: There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called

Re: [PULL 2/2] vhost: replace rcu with mutex

2014-06-03 Thread Vlad Yasevich
On 06/03/2014 08:48 AM, Paolo Bonzini wrote: Il 02/06/2014 23:58, Eric Dumazet ha scritto: This looks dubious What about using kfree_rcu() instead ? It would lead to unbound allocation from userspace. translate_desc() still uses rcu_read_lock(), its not clear if the mutex is really

Re: [PULL 2/2] vhost: replace rcu with mutex

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 15:35, Vlad Yasevich ha scritto: Yes, vhost_get_vq_desc must be called with the vq mutex held. The rcu_read_lock/unlock in translate_desc is unnecessary. If that's true, then does dev-memory really needs to be rcu protected? It appears to always be read under mutex. It's

Re: [PULL 2/2] vhost: replace rcu with mutex

2014-06-03 Thread Eric Dumazet
On Tue, 2014-06-03 at 14:48 +0200, Paolo Bonzini wrote: Il 02/06/2014 23:58, Eric Dumazet ha scritto: This looks dubious What about using kfree_rcu() instead ? It would lead to unbound allocation from userspace. Look at how we did this in commit c3059477fce2d956a0bb3e04357324780c5d8eeb

Re: [PULL 2/2] vhost: replace rcu with mutex

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 15:57, Eric Dumazet ha scritto: On Tue, 2014-06-03 at 14:48 +0200, Paolo Bonzini wrote: Il 02/06/2014 23:58, Eric Dumazet ha scritto: This looks dubious What about using kfree_rcu() instead ? It would lead to unbound allocation from userspace. Look at how we did this in

Re: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop

2014-06-03 Thread Gabriel L. Somlo
On Tue, Jun 03, 2014 at 11:17:48AM +0200, Paolo Bonzini wrote: I think it's fine as it is now. :) On Mon, Jun 02, 2014 at 09:55:18PM -0400, Gabriel L. Somlo wrote: W.r.t. monitor/mwait, a guest can do one of the following: 1. Never check CPUID, and never use monitor/mwait - This

Re: [PATCH v2 09/13] MIPS: Add functions for hypervisor call

2014-06-03 Thread Andreas Herrmann
On Tue, Jun 03, 2014 at 10:30:31AM +0200, Ralf Baechle wrote: On Wed, May 28, 2014 at 11:52:12PM +0200, Andreas Herrmann wrote: +/* + * Hypercalls for KVM. + * + * Hypercall number is passed in v0. + * Return value will be placed in v0. + * Up to 3 arguments are passed in a0, a1,

KVM call for 2014-06-10

2014-06-03 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. * Machine as QOM (Marcel) - Solve the 'sensible' issues. - Choose as first tasks the ones that will be more useful. - Select solutions agreed by everyone. Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two

Re: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop

2014-06-03 Thread Alexander Graf
On 06/03/2014 04:21 PM, Gabriel L. Somlo wrote: On Tue, Jun 03, 2014 at 11:17:48AM +0200, Paolo Bonzini wrote: I think it's fine as it is now. :) On Mon, Jun 02, 2014 at 09:55:18PM -0400, Gabriel L. Somlo wrote: W.r.t. monitor/mwait, a guest can do one of the following: 1. Never check CPUID,

Re: [PATCH v2 09/13] MIPS: Add functions for hypervisor call

2014-06-03 Thread Pinski, Andrew
On Jun 3, 2014, at 9:40 AM, Daney, David david.da...@caviumnetworks.com wrote: In cases like this, I always wonder WWPD (What Would Pinski Do)... Let's get him to opine. Andrew, the patch in question is: http://www.linux-mips.org/archives/linux-mips/2014-05/msg00309.html Yes

Re: [PATCH v2 09/13] MIPS: Add functions for hypervisor call

2014-06-03 Thread David Daney
In cases like this, I always wonder WWPD (What Would Pinski Do)... Let's get him to opine. Andrew, the patch in question is: http://www.linux-mips.org/archives/linux-mips/2014-05/msg00309.html Thanks, David Daney On 06/03/2014 08:03 AM, Andreas Herrmann wrote: On Tue, Jun 03, 2014 at

Appropriate list for question re KVM/Ubuntu Hosting Windows Server 2008 Ram access speed?

2014-06-03 Thread mchalkley
Hello, Before I spam this list with details for an inappropriate question, is it acceptable to ask a question about slow RAM access speeds on Windows Server 2008 R2 guests running on Ubuntu Server 14.04 LTS/KVM? Regards, Mark -- To unsubscribe from this list: send the line unsubscribe kvm in

Re: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop

2014-06-03 Thread Gabriel L. Somlo
On Tue, Jun 03, 2014 at 05:37:08PM +0200, Alexander Graf wrote: On 06/03/2014 04:21 PM, Gabriel L. Somlo wrote: On Tue, Jun 03, 2014 at 11:17:48AM +0200, Paolo Bonzini wrote: I think it's fine as it is now. :) On Mon, Jun 02, 2014 at 09:55:18PM -0400, Gabriel L. Somlo wrote: W.r.t.

[Bug 77271] New: CPUID Leaf 0x40000000 return 0 in eax

2014-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=77271 Bug ID: 77271 Summary: CPUID Leaf 0x4000 return 0 in eax Product: Virtualization Version: unspecified Kernel Version: 3.14 Hardware: All OS: Linux Tree:

Re: [PATCH v2 0/4] Emulate VMXON region correctly

2014-06-03 Thread Bandan Das
Paolo Bonzini pbonz...@redhat.com writes: Il 06/05/2014 08:19, Bandan Das ha scritto: Reference: https://bugzilla.kernel.org/show_bug.cgi?id=54521 The vmxon region is unused by nvmx, but adding these checks are probably harmless and may detect buggy L1 hypervisors in the future! Applied

[PATCH kvm-unit-tests 0/2] nvmx unit test cases changes

2014-06-03 Thread Bandan Das
Adds a simple test for interrupt acknowledgement and change invept behavior to check for supported invalidation contexts Bandan Das (2): VMX: check for supported contexts before calling invept VMX: Add test for interrupt acknowledgement lib/x86/isr.c | 32

[PATCH kvm-unit-tests 1/2] VMX: check for supported contexts before calling invept

2014-06-03 Thread Bandan Das
It's incorrect to assume the context in which invept is called. Check what is supported and fallback if single context invalidation isn't supported Signed-off-by: Bandan Das b...@redhat.com --- x86/vmx.c | 20 x86/vmx.h | 1 + x86/vmx_tests.c | 14 +++---

[PATCH kvm-unit-tests 2/2] VMX: Add test for interrupt acknowledgement

2014-06-03 Thread Bandan Das
If the hypervisor has the interrupt acknowledgement bit set, vector information is already present in intr_info during a vmexit. The hypervisor then uses it to call the appropriate handler. Signed-off-by: Bandan Das b...@redhat.com --- lib/x86/isr.c | 32

[Bug 77271] CPUID Leaf 0x40000000 return 0 in eax

2014-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=77271 Alex Williamson alex.william...@redhat.com changed: What|Removed |Added CC|

[PATCH v7 4/4] arm: dirty page logging 2nd stage page fault handling support

2014-06-03 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and disolves huge pages to page tables. In case migration is canceled huge pages will be used again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 36

[PATCH v7 0/4] arm: dirty page logging support for ARMv7

2014-06-03 Thread Mario Smarduch
This patch adds support for dirty page logging so far tested only on ARMv7. With dirty page logging, GICv2 vGIC and arch timer save/restore support, live migration is supported. Dirty page logging support - - initially write protects VM RAM memory regions - 2nd stage page tables - add support

[PATCH v7 1/4] arm: add ARMv7 HYP API to flush VM TLBs without address param

2014-06-03 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. Added ARM version of kvm_flush_remote_tlbs(), made the generic implementation a weak symbol. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 +

[PATCH v7 2/4] arm: dirty page logging inital mem region write protect (w/no huge PUD support)

2014-06-03 Thread Mario Smarduch
Patch adds memslot support for initial write protection and split up of huge pages. This patch series assumes that huge PUDs will not be used to map VM memory. This patch depends on the unmap_range() patch, it needs to be applied first. Signed-off-by: Mario Smarduch m.smard...@samsung.com ---

[PATCH v7 3/4] arm: dirty log write protect management support

2014-06-03 Thread Mario Smarduch
This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++

[Bug 77271] CPUID Leaf 0x40000000 return 0 in eax

2014-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=77271 --- Comment #2 from Jidong Xiao jidong.x...@gmail.com --- Oh, thanks Alex. I think you are right here, it's not a bug. But do you think that, does it make sense to submit a patch to qemu, so as to make them consistent between userspace qemu and

[Bug 77271] CPUID Leaf 0x40000000 return 0 in eax

2014-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=77271 --- Comment #3 from Alex Williamson alex.william...@redhat.com --- The best way to find out is to submit a patch. -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line

Re: RE: Some more basic questions..

2014-06-03 Thread Marcus White
Cant the pages be locked down by the host when it gets the call down for an operation with a buffer(like if a usual user mode process case), and once locked down in the host kernel, the physical address be used directly for DMA, whether send or recieve? Not sure if I fully understand why a copy

[Bug 77271] CPUID Leaf 0x40000000 return 0 in eax

2014-06-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=77271 Jidong Xiao jidong.x...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: virtio specification: OOO completion of the xmit buffers in the networking device

2014-06-03 Thread Rusty Russell
Vlad Zolotarov vl...@cloudius-systems.com writes: Rusty, hi! I'd like to ask for a small clarification about the virtio spec. The virtio specification is put the way that it allows the out-of-order completions in general. Although it states that it's mostly relevant to the virtio-blk it

Re: [PATCH] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation

2014-06-03 Thread Paul Mackerras
On Tue, Jun 03, 2014 at 05:46:11PM +0530, Aneesh Kumar K.V wrote: We use time base for PURR and SPURR emulation with PR KVM since we are emulating a single threaded core. When using time base we need to make sure that we don't accumulate time spent in the host in PURR and SPURR value. Mostly

Re: [RFC PATCH 1/3] CMA: generalize CMA reserved area management functionality

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Currently, there are two users on CMA functionality, one is the DMA subsystem and the other is the kvm on powerpc. They have their own code to manage CMA reserved area even if they looks really similar. From my guess, it is caused by some needs on bitmap

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

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal Nazarewicz min...@mina86.com diff --git

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

2014-06-03 Thread Michal Nazarewicz
On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal Nazarewicz min...@mina86.com -- Best regards,

Re: [PATCH 4/4] powerpc/eeh: Avoid event on passed PE

2014-06-03 Thread Alexander Graf
Am 03.06.2014 um 07:54 schrieb Paul Mackerras pau...@samba.org: On Tue, May 20, 2014 at 01:25:11PM +0200, Alexander Graf wrote: On 20.05.14 10:30, Gavin Shan wrote: If we detects frozen state on PE that has been passed to guest, we needn't handle it. Instead, we rely on the guest to

Re: [PATCH 4/4] powerpc/eeh: Avoid event on passed PE

2014-06-03 Thread Benjamin Herrenschmidt
On Tue, 2014-06-03 at 09:45 +0200, Alexander Graf wrote: For EEH it could as well be a dumb eventfd - really just a side channel that can tell user space that something happened asynchronously :). Which the host kernel may have no way to detect without actively poking at the device (fences in

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

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 09:02, Michal Nazarewicz ha scritto: On Tue, Jun 03 2014, Joonsoo Kim wrote: Now, we have general CMA reserved area management framework, so use it for future maintainabilty. There is no functional change. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com Acked-by: Michal

[PATCH] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation

2014-06-03 Thread Aneesh Kumar K.V
We use time base for PURR and SPURR emulation with PR KVM since we are emulating a single threaded core. When using time base we need to make sure that we don't accumulate time spent in the host in PURR and SPURR value. Also we don't need to emulate mtspr because both the registers are hypervisor

Re: [PATCH] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation

2014-06-03 Thread Paul Mackerras
On Tue, Jun 03, 2014 at 05:46:11PM +0530, Aneesh Kumar K.V wrote: We use time base for PURR and SPURR emulation with PR KVM since we are emulating a single threaded core. When using time base we need to make sure that we don't accumulate time spent in the host in PURR and SPURR value. Mostly