Re: [PATCH 2/2] armv7 initial device passthrough support

2013-06-25 Thread Mario Smarduch
On 6/24/2013 10:01 PM, Christoffer Dall wrote: There are many other latency/perf. reqs for NFV related to RT, essentially Guest must run near native. In the end it may turn out this may need to be outside of main tree we'll see. It doesn't sound like this will be the end result. Everything

Re: [PATCH 2/2] armv7 initial device passthrough support

2013-06-25 Thread Mario Smarduch
On 6/25/2013 12:27 AM, Stuart Yoder wrote: We should avoid creating an environment with important functionality outside of the main tree, if at all possible. Also, as we architect that generic infrastructure we need to keep in mind that there are important use cases for doing I/O in user

[PATCH 1/3] emulator: fix confused param list

2013-06-25 Thread Arthur Chunqi Li
Fix param list of test_mmx_movq_mf and test_movabs. The previous version uses insn_page and insn_ram which are not used afterwards. There are also two variants named insn_page and insn_ram, which has no relation with these two functions. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com ---

[PATCH 2/3] emulator: Add multibyte nopl test case

2013-06-25 Thread Arthur Chunqi Li
Test multiple byte nopl (from 1-byte nopl to 9-byte nopl) in 64-bit mode. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- x86/emulator.c | 25 + 1 file changed, 25 insertions(+) diff --git a/x86/emulator.c b/x86/emulator.c index 6972334..bd02d5c 100755 ---

[PATCH 3/3] emulator: Add spl/bpl/sil/dil access via modrm

2013-06-25 Thread Arthur Chunqi Li
Add test case of accessing spl/bpl/sil/dil via modrm in emulator. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- x86/emulator.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/x86/emulator.c b/x86/emulator.c index bd02d5c..bea9513 100755 ---

Re: [PATCH 1/3] emulator: fix confused param list

2013-06-25 Thread Arthur Chunqi Li
These patches are some unfinished work and bug fixes related to Paolo's exercise. I think I'd better finish these simple jobs. Arthur On Tue, Jun 25, 2013 at 4:51 PM, Arthur Chunqi Li yzt...@gmail.com wrote: Fix param list of test_mmx_movq_mf and test_movabs. The previous version uses

Re: [PATCH 3/4] kvm, emulator: Rename VendorSpecific flag

2013-06-25 Thread Gleb Natapov
On Thu, Jun 20, 2013 at 11:30:45AM +0200, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de Call it EmulateOnUD which is exactly what we're trying to do with vendor-specific instructions. Signed-off-by: Borislav Petkov b...@suse.de --- arch/x86/kvm/emulate.c | 14 +++---

Re: [PATCH 3/3] emulator: Add spl/bpl/sil/dil access via modrm

2013-06-25 Thread Gleb Natapov
On Tue, Jun 25, 2013 at 04:51:31PM +0800, Arthur Chunqi Li wrote: Add test case of accessing spl/bpl/sil/dil via modrm in emulator. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com --- x86/emulator.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

Re: [PATCH] kvmclock: clock should count only if vm is running (v2)

2013-06-25 Thread Gleb Natapov
On Tue, Jun 18, 2013 at 08:38:25PM -0300, Marcelo Tosatti wrote: v2: remove unnecessary runstate_is_running() usage (Paolo) -- kvmclock should not count while vm is paused, because: 1) if the vm is paused for long periods, timekeeping math can overflow while converting the (large)

Re: [Qemu-devel] KVM call agenda for 2013-06-25

2013-06-25 Thread Igor Mammedov
On Tue, 11 Jun 2013 17:52:53 +0200 Juan Quintela quint...@redhat.com wrote: Hi Now we have moved to one call each other week. Please, send any topic that you are interested in covering. Thanks, Juan. PD. If you want to attend and you don't have the call details, contact me.

[PATCHv2] vhost-net: fix use-after-free in vhost_net_flush

2013-06-25 Thread Michael S. Tsirkin
vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 vhost-net: flush outstanding DMAs on memory change vhost_net_flush tries to use the argument after passing it to vhost_net_ubuf_put_and_wait,

Re: [PATCH RFC V9 0/19] Paravirtualized ticket spinlocks

2013-06-25 Thread Andrew Theurer
On Sun, 2013-06-02 at 00:51 +0530, Raghavendra K T wrote: This series replaces the existing paravirtualized spinlock mechanism with a paravirtualized ticketlock mechanism. The series provides implementation for both Xen and KVM. Changes in V9: - Changed spin_threshold to 32k to avoid excess

[PULL v2 07/21] kvm: skip system call when msi route is unchanged

2013-06-25 Thread Michael S. Tsirkin
Some guests do a large number of mask/unmask calls which currently trigger expensive route update system calls. Detect that route in unchanged and skip the system call. Reported-by: Zhanghaoyu (A) haoyu.zh...@huawei.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- kvm-all.c | 4 1

[PULL v2 06/21] kvm: zero-initialize KVM_SET_GSI_ROUTING input

2013-06-25 Thread Michael S. Tsirkin
kvm_add_routing_entry makes an attempt to zero-initialize any new routing entry. However, it fails to initialize padding within the u field of the structure kvm_irq_routing_entry. Other functions like kvm_irqchip_update_msi_route also fail to initialize the padding field in kvm_irq_routing_entry.

Re: [PATCH] kvm tools: fix boot of guests with more than 4gb of ram

2013-06-25 Thread Sasha Levin
On 06/24/2013 08:58 PM, Michael Ellerman wrote: On Sun, 2013-06-23 at 21:23 -0400, Sasha Levin wrote: Commit kvm tools: virtio: remove hardcoded assumptions about guest page size has introduced a bug that prevented guests with more than 4gb of ram from booting. The issue is that 'pfn' is a

Hot plugging PCIe device in Qemu Q35 chipset

2013-06-25 Thread Sudhir Rustogi
Hi all, Was wondering if anyone can help me with a sample qemu command line on how to pass virtual root port device, upstream port device and downstream port device and their virtual topology into qemu when using Q35 chipset (-M q35) and then how to hotplug another pcie endpoint device that

[PATCH v2 28/45] KVM: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-25 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Gleb Natapov

[PATCH v2 29/45] kvm/vmx: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-25 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Gleb Natapov

[PATCH v2 41/45] powerpc: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-25 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Benjamin Herrenschmidt

[PATCH-next] kvm: don't try to take mmu_lock while holding the main raw kvm_lock

2013-06-25 Thread Paul Gortmaker
In commit e935b8372cf8 (KVM: Convert kvm_lock to raw_spinlock), the kvm_lock was made a raw lock. However, the kvm mmu_shrink() function tries to grab the (non-raw) mmu_lock within the scope of the raw locked kvm_lock being held. This leads to the following: BUG: sleeping function called from

Re: [PATCHv2] vhost-net: fix use-after-free in vhost_net_flush

2013-06-25 Thread David Miller
From: Michael S. Tsirkin m...@redhat.com Date: Tue, 25 Jun 2013 17:29:46 +0300 vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 vhost-net: flush outstanding DMAs on memory change

Re: [PATCH RFC] pci: ACS quirk for AMD southbridge

2013-06-25 Thread Bjorn Helgaas
On Wed, Jul 11, 2012 at 11:18 PM, Alex Williamson alex.william...@redhat.com wrote: We've confirmed that peer-to-peer between these devices is not possible. We can therefore claim that they support a subset of ACS. Signed-off-by: Alex Williamson alex.william...@redhat.com Cc: Joerg Roedel

Re: [PATCH RFC] pci: ACS quirk for AMD southbridge

2013-06-25 Thread Bjorn Helgaas
[fix Joerg's email address] On Tue, Jun 25, 2013 at 10:15 PM, Bjorn Helgaas bhelg...@google.com wrote: On Wed, Jul 11, 2012 at 11:18 PM, Alex Williamson alex.william...@redhat.com wrote: We've confirmed that peer-to-peer between these devices is not possible. We can therefore claim that they

[PATCH 0/6 v5] KVM :PPC: Userspace Debug support

2013-06-25 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Note: These patches are based on http://github.com/agraf/linux-2.6.git queue This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be

[PATCH 2/6 v5] powerpc: move debug registers in a structure

2013-06-25 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +-

[PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-25 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. This is how we save/restore debug register context when switching between guest, userspace and kernel user-process: When QEMU is running -

[PATCH 3/6 v5] powerpc: export debug registers save function for KVM

2013-06-25 Thread Bharat Bhushan
KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc/kernel/process.c|3 ++- 2 files changed, 6

[PATCH 5/6 v5] KVM: PPC: Using struct debug_reg

2013-06-25 Thread Bharat Bhushan
For KVM also use the struct debug_reg defined in asm/processor.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 13 + arch/powerpc/kvm/booke.c| 34 -- 2 files changed, 25

[PATCH 4/6 v5] KVM: PPC: exit to user space on ehpriv instruction

2013-06-25 Thread Bharat Bhushan
ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. As this is the first point we are using run-debug, also defined the run-debug structure. Signed-off-by: Bharat Bhushan

[PATCH 1/6 v5] powerpc: remove unnecessary line continuations

2013-06-25 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ceb4e7b..639a8de 100644 --- a/arch/powerpc/kernel/process.c

Re: [PATCH] KVM: Fix RTC interrupt coalescing tracking

2013-06-25 Thread Jan Kiszka
On 2013-06-24 14:19, Gleb Natapov wrote: This reverts most of the f1ed0450a5fac7067590317cbf027f566b6ccbca. After the commit kvm_apic_set_irq() no longer returns accurate information about interrupt injection status if injection is done into disabled APIC. RTC interrupt coalescing tracking

[PATCH v2 41/45] powerpc: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-25 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Benjamin Herrenschmidt

[PATCH 0/6 v5] KVM :PPC: Userspace Debug support

2013-06-25 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Note: These patches are based on http://github.com/agraf/linux-2.6.git queue This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be

[PATCH 5/6 v5] KVM: PPC: Using struct debug_reg

2013-06-25 Thread Bharat Bhushan
For KVM also use the struct debug_reg defined in asm/processor.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 13 + arch/powerpc/kvm/booke.c| 34 -- 2 files changed, 25

[PATCH 4/6 v5] KVM: PPC: exit to user space on ehpriv instruction

2013-06-25 Thread Bharat Bhushan
ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. As this is the first point we are using run-debug, also defined the run-debug structure. Signed-off-by: Bharat Bhushan

[PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-25 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. This is how we save/restore debug register context when switching between guest, userspace and kernel user-process: When QEMU is running -

[PATCH 3/6 v5] powerpc: export debug registers save function for KVM

2013-06-25 Thread Bharat Bhushan
KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc/kernel/process.c|3 ++- 2 files changed, 6

[PATCH 2/6 v5] powerpc: move debug registers in a structure

2013-06-25 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +-

[PATCH 1/6 v5] powerpc: remove unnecessary line continuations

2013-06-25 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ceb4e7b..639a8de 100644 --- a/arch/powerpc/kernel/process.c