Re: [PATCHv2 0/8 RFC] boot order specification

2010-11-01 Thread Gleb Natapov
On Sun, Oct 31, 2010 at 06:25:53PM -0400, Kevin O'Connor wrote: On Sun, Oct 31, 2010 at 01:40:01PM +0200, Gleb Natapov wrote: This is current sate of the patch series for people to comment on. I tried to use open firmware naming scheme to specify device path names. The patch series

Re: [RFC PATCH] macvlan: Introduce a PASSTHRU mode to takeover the underlying device

2010-11-01 Thread Michael S. Tsirkin
On Tue, Oct 26, 2010 at 03:19:38PM -0700, Sridhar Samudrala wrote: With the current default macvtap mode, a KVM guest using virtio with macvtap backend has the following limitations. - cannot change/add a mac address on the guest virtio-net - cannot create a vlan device on the guest

[PATCH v2 1/7] KVM: fix tracing kvm_try_async_get_page

2010-11-01 Thread Xiao Guangrong
Tracing 'async' and *pfn is useless, since 'async' is always true, and '*pfn' is always fault_pfn' We can trace 'gva' and 'gfn' instead, it can help us to see the life-cycle of an async_pf Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |2 +-

[PATCH v2 2/7] KVM: cleanup aysnc_pf tracepoints

2010-11-01 Thread Xiao Guangrong
Use 'DECLARE_EVENT_CLASS' to cleanup async_pf tracepoints Acked-by: Gleb Natapov g...@redhat.com Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- include/trace/events/kvm.h | 76 --- 1 files changed, 35 insertions(+), 41 deletions(-) diff

[PATCH v2 3/7] KVM: fix searching async gfn in kvm_async_pf_gfn_slot

2010-11-01 Thread Xiao Guangrong
Don't search later slots if the slot is empty Acked-by: Gleb Natapov g...@redhat.com Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[PATCH v2 4/7] KVM: avoid unnecessary wait for a async pf

2010-11-01 Thread Xiao Guangrong
In current code, it checks async pf completion out of the wait context, like this: if (vcpu-arch.mp_state == KVM_MP_STATE_RUNNABLE !vcpu-arch.apf.halted) r = vcpu_enter_guest(vcpu); else { ..

[PATCH v2 5/7] KVM: handle more completed apfs if possible

2010-11-01 Thread Xiao Guangrong
If it's no need to inject async #PF to PV guest we can handle more completed apfs at one time, so we can retry guest #PF as early as possible Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |3 ++- arch/x86/kvm/x86.c |8 ++--

[RFC PATCH v2 6/7] KVM: fix the race while wakeup all pv guest

2010-11-01 Thread Xiao Guangrong
In kvm_async_pf_wakeup_all(), we add a dummy apf to vcpu-async_pf.done without holding vcpu-async_pf.lock, it will break if we are handling apfs at this time. Also use 'list_empty_careful()' instead of 'list_empty()' Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

[RFC PATCH v2 7/7] KVM: KVM: don't break vcpu 'halt' state due to apfs

2010-11-01 Thread Xiao Guangrong
Don't make a KVM_REQ_UNHALT request after async pf is completed since it can break guest's 'HLT' instruction. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c | 13 ++--- include/linux/kvm_host.h |6 ++ virt/kvm/kvm_main.c |9

Re: [PATCH v2 5/7] KVM: handle more completed apfs if possible

2010-11-01 Thread Gleb Natapov
On Mon, Nov 01, 2010 at 05:02:35PM +0800, Xiao Guangrong wrote: If it's no need to inject async #PF to PV guest we can handle more completed apfs at one time, so we can retry guest #PF as early as possible Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

Re: [PATCH v2 4/7] KVM: avoid unnecessary wait for a async pf

2010-11-01 Thread Gleb Natapov
On Mon, Nov 01, 2010 at 05:01:28PM +0800, Xiao Guangrong wrote: In current code, it checks async pf completion out of the wait context, like this: if (vcpu-arch.mp_state == KVM_MP_STATE_RUNNABLE !vcpu-arch.apf.halted) r = vcpu_enter_guest(vcpu);

Re: [PATCH v2 5/7] KVM: handle more completed apfs if possible

2010-11-01 Thread Xiao Guangrong
On 11/01/2010 05:24 PM, Gleb Natapov wrote: -put_page(work-page); -kmem_cache_free(async_pf_cache, work); +list_del(work-queue); +vcpu-async_pf.queued--; +if (work-page) +put_page(work-page); +

Re: TODO item: guest programmable mac/vlan filtering with macvtap

2010-11-01 Thread Dragos Tatulea
1. add a secondary mac (or third, etc) address to the guest virtio-net interface. Maybe I misunderstood this. Is it just setting another mac on the guest virtio-net interface? 4. the above stuff must be controllable by host admin  - Well, for this there are a few options:     admin switch

Re: Device assignment, shared IRQs, uio_pci_generic

2010-11-01 Thread Jan Kiszka
Am 31.10.2010 16:05, Jan Kiszka wrote: Still not working here are ehci, ath9k and e1000e when passed through. They receive IRQs, but somehow the Linux guest drivers are unhappy about the device states (the e1000e detects Hardware Unit Hang e.g.). This is independent of my patches. Anyone any

Re: TODO item: guest programmable mac/vlan filtering with macvtap

2010-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2010 at 11:48:23AM +0100, Dragos Tatulea wrote: 1. add a secondary mac (or third, etc) address to the guest virtio-net interface. Maybe I misunderstood this. Is it just setting another mac on the guest virtio-net interface? Well, yes, that's also not possible at the moment.

Crash in intel_iommu_assign_device

2010-11-01 Thread Jan Kiszka
Hi Sheng, I'm not claiming to understand the details, but this looks like use (dereference of pte via dma_pte_addr) after release (free_pgtable_page of dmar_domain-pgd aka pte) to me: static int intel_iommu_attach_device(struct iommu_domain *domain, struct

Cannot boot 2.6.35 SMP guest in 2.6.35 host

2010-11-01 Thread Richard Chan
I am having a problem with a Fedora 14 x86_64 host booting SMP 2.6.35.x guests. The boot proceeds halfway but does not reach a shell or desktop. Oddly the console echoes characters. I am using a AMD SVM system and found this: https://patchwork.kernel.org/patch/226981/ Has this been resolved?

Re: Cannot boot 2.6.35 SMP guest in 2.6.35 host

2010-11-01 Thread Michael Tokarev
Richard Chan wrote: I am having a problem with a Fedora 14 x86_64 host booting SMP 2.6.35.x guests. The boot proceeds halfway but does not reach a shell or desktop. Oddly the console echoes characters. I am using a AMD SVM system and found this: https://patchwork.kernel.org/patch/226981/

Re: Cannot boot 2.6.35 SMP guest in 2.6.35 host

2010-11-01 Thread Michael Tokarev
Michael Tokarev wrote: Richard Chan wrote: I am having a problem with a Fedora 14 x86_64 host booting SMP 2.6.35.x guests. The boot proceeds halfway but does not reach a shell or desktop. Oddly the console echoes characters. I am using a AMD SVM system and found this:

Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
Hi again, OK, I swapped those two lines in intel_iommu_attach_device [1], fixed another warning in the wbinvd emulation, but now I'm about to give up. This is freaky MMU stuff: general protection fault: [#1] PREEMPT SMP DEBUG_PAGEALLOC last sysfs file:

Re: [RFC PATCH v2 7/7] KVM: KVM: don't break vcpu 'halt' state due to apfs

2010-11-01 Thread Gleb Natapov
On Mon, Nov 01, 2010 at 05:05:00PM +0800, Xiao Guangrong wrote: Don't make a KVM_REQ_UNHALT request after async pf is completed since it can break guest's 'HLT' instruction. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c | 13 ++---

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
[ Forgot to CC LKML - maybe it's not KVM-specific. BTW, is anyone actually using current KVM device assigment on Intel? I'm starting to believe that can only very few lucky people... ] Am 01.11.2010 13:51, Jan Kiszka wrote: Hi again, OK, I swapped those two lines in

Re: [RFC PATCH v2 6/7] KVM: fix the race while wakeup all pv guest

2010-11-01 Thread Gleb Natapov
On Mon, Nov 01, 2010 at 05:03:44PM +0800, Xiao Guangrong wrote: In kvm_async_pf_wakeup_all(), we add a dummy apf to vcpu-async_pf.done without holding vcpu-async_pf.lock, it will break if we are handling apfs at this time. This should never happen to well behaved guest, but malicious guest

[PATCH 1/2] KVM: x86: Issue smp_call_function_many with preemption disabled

2010-11-01 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com smp_call_function_many is specified to be called only with preemption disabled. Fulfill this requirement. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH 2/2] KVM: x86: Avoid issuing wbinvd twice

2010-11-01 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com Micro optimization to avoid calling wbinvd twice on the CPU that has to emulate it. As we might be preempted between smp_call_function_many and the local wbinvd, the cache might be filled again so that real work could be done uselessly. Signed-off-by: Jan

Re: [PATCH v2 1/7] KVM: fix tracing kvm_try_async_get_page

2010-11-01 Thread Gleb Natapov
On Mon, Nov 01, 2010 at 04:58:43PM +0800, Xiao Guangrong wrote: Tracing 'async' and *pfn is useless, since 'async' is always true, and '*pfn' is always fault_pfn' We can trace 'gva' and 'gfn' instead, it can help us to see the life-cycle of an async_pf Signed-off-by: Xiao Guangrong

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Roedel, Joerg
The registers rax and rbx contain non-canonical addresses (if interpreted as pointers). The instruction where this happens is a mov so I guess that the #GP is because of an non-canonical address. Can you find out the code-line where this happens and the exact assembler instruction? (haven't

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 14:21, Roedel, Joerg wrote: The registers rax and rbx contain non-canonical addresses (if interpreted as pointers). The instruction where this happens is a mov so I guess that the #GP is because of an non-canonical address. Can you find out the code-line where this happens and

[PATCHv2] KVM: handle exit due to INVD in VMX

2010-11-01 Thread Gleb Natapov
Currently the exit is unhandled, so guest halts with error if it tries to execute INVD instruction. Call into emulator when INVD instruction is executed by a guest instead. This instruction is not needed by ordinary guests, but firmware (like OpenBIOS) use it and fail. Signed-off-by: Gleb Natapov

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Roedel, Joerg
On Mon, Nov 01, 2010 at 09:25:00AM -0400, Jan Kiszka wrote: Am 01.11.2010 14:21, Roedel, Joerg wrote: The registers rax and rbx contain non-canonical addresses (if interpreted as pointers). The instruction where this happens is a mov so I guess that the #GP is because of an non-canonical

[PATCH 2/3] KVM: Clear assigned guest IRQ on release

2010-11-01 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com When we deassign a guest IRQ, clear the potentially asserted guest line. There might be no chance for the guest to do this, specifically if we switch from INTx to MSI mode. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- virt/kvm/assigned-dev.c |

[PATCH 0/3] KVM: Improve IRQ assignment for device passthrough

2010-11-01 Thread Jan Kiszka
Three patches to improve classic device assigment /wrt IRQs. Highlight is the last one that resolves the host IRQ sharing issue for all PCI 2.3 devices. Quite essential when passing non-MSI-ready devices like many USB host controllers. Jan Kiszka (3): KVM: Fold assigned interrupt work into IRQ

[PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices between on the host side when passing them to a guest. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/linux/kvm_host.h |1 +

[PATCH 1/3] KVM: Fold assigned interrupt work into IRQ handler

2010-11-01 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com The complete work handler runs with assigned_dev_lock acquired and interrupts disabled, so there is nothing to gain pushing this work out of the actually IRQ handler. Fold them together. Signed-off-by: Jan Kiszka jan.kis...@siemens.com ---

Re: [PATCH 0/4] VFIO V5: Non-privileged user level PCI drivers

2010-11-01 Thread Etienne Martineau
Is this the complete patch set? Or maybe it assumes a pre-patch kernel tree. If so where can I get it? thanks, -Etienne -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 14:53, Roedel, Joerg wrote: On Mon, Nov 01, 2010 at 09:25:00AM -0400, Jan Kiszka wrote: Am 01.11.2010 14:21, Roedel, Joerg wrote: The registers rax and rbx contain non-canonical addresses (if interpreted as pointers). The instruction where this happens is a mov so I guess that

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Joerg Roedel
On Mon, Nov 01, 2010 at 03:22:15PM +0100, Jan Kiszka wrote: Am 01.11.2010 14:53, Roedel, Joerg wrote: On Mon, Nov 01, 2010 at 09:25:00AM -0400, Jan Kiszka wrote: Am 01.11.2010 14:21, Roedel, Joerg wrote: The registers rax and rbx contain non-canonical addresses (if interpreted as

[PATCH v2 0/2] Minimal RAM API support

2010-11-01 Thread Alex Williamson
v2: - Move to Makefile.objs - Move structures to memory.c and create a callback function - Fix memory leak I haven't moved to the state parameter because there should only be a single instance of this per VM. The state parameter seems like it would add complications in setup and function

[PATCH v2 1/2] Minimal RAM API support

2010-11-01 Thread Alex Williamson
This adds a minimum chunk of Anthony's RAM API support so that we can identify actual VM RAM versus all the other things that make use of qemu_ram_alloc. Signed-off-by: Alex Williamson alex.william...@redhat.com --- Makefile.objs |1 + cpu-common.h |2 + memory.c | 109

[PATCH v2 2/2] RAM API: Make use of it for x86 PC

2010-11-01 Thread Alex Williamson
Register the actual VM RAM using the new API Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/pc.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 69b13bf..0ea6d10 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -912,14 +912,14

Re: [PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2010 at 03:08:37PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices between on the host side when passing them to a guest. Signed-off-by: Jan

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 15:35, Joerg Roedel wrote: On Mon, Nov 01, 2010 at 03:22:15PM +0100, Jan Kiszka wrote: Am 01.11.2010 14:53, Roedel, Joerg wrote: On Mon, Nov 01, 2010 at 09:25:00AM -0400, Jan Kiszka wrote: Am 01.11.2010 14:21, Roedel, Joerg wrote: The registers rax and rbx contain non-canonical

Re: [PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 16:24, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 03:08:37PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share IRQs of such devices between on the host side when

Re: [PATCH 0/3] Launch other test during migration

2010-11-01 Thread Michael Goldish
On 09/25/2010 11:36 AM, Jason Wang wrote: We could give a further test of migration by launch test during migartion. So the following series implements: - A simple class to run a specified test in the background which could be used to launch other test during migartion. Its design is rather

Re: [PATCHv3] Add support for async page fault to qemu

2010-11-01 Thread Marcelo Tosatti
On Sun, Oct 24, 2010 at 02:27:55PM +0200, Gleb Natapov wrote: Add save/restore of MSR for migration and cpuid bit. Signed-off-by: Gleb Natapov g...@redhat.com -- v1-v2 - use vmstate subsection to migrate new msr. v2-v3 - rebase onto uq/master - protect use of MSR_KVM_ASYNC_PF_EN

Re: [PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2010 at 04:41:08PM +0100, Jan Kiszka wrote: Am 01.11.2010 16:24, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 03:08:37PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com PCI 2.3 allows to generically disable IRQ sources at device level. This enables

Re: [PATCH 1/2] msix: Allow msix_init on a device with existing MSI-X capability

2010-11-01 Thread Alex Williamson
On Thu, 2010-10-28 at 17:00 +0200, Avi Kivity wrote: On 10/23/2010 06:55 PM, Alex Williamson wrote: On Sat, 2010-10-23 at 18:18 +0200, Michael S. Tsirkin wrote: On Fri, Oct 22, 2010 at 02:40:31PM -0600, Alex Williamson wrote: To enable common msix support to be used with pass through

Re: [PATCH 3/3] KVM test: Test the file transfer during migartion

2010-11-01 Thread Michael Goldish
On 09/25/2010 11:36 AM, Jason Wang wrote: This test just do the file transfer from host to guest during migartion in order to check whether the nic/block state could be saved and loaded correctly. Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 16:52, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 04:41:08PM +0100, Jan Kiszka wrote: Am 01.11.2010 16:24, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 03:08:37PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com PCI 2.3 allows to generically disable

Re: [PATCH 1/3] KVM: Fold assigned interrupt work into IRQ handler

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 15:08, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com The complete work handler runs with assigned_dev_lock acquired and interrupts disabled, so there is nothing to gain pushing this work out of the actually IRQ handler. Fold them together. Err, forget it.

Re: Crash on kvm_iommu_map_pages

2010-11-01 Thread Jan Kiszka
Am 01.11.2010 16:29, Jan Kiszka wrote: Nope. But I just noticed a fatal thinko in my fix to intel_iommu_attach_device - probably that was the key. Need to boot the test kernel... That was indeed the reason for this GPF: I blindly swapped the problematic lines, releasing the wrong page. Sorry,

Re: [PATCH 3/3] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices

2010-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2010 at 05:30:20PM +0100, Jan Kiszka wrote: Am 01.11.2010 16:52, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 04:41:08PM +0100, Jan Kiszka wrote: Am 01.11.2010 16:24, Michael S. Tsirkin wrote: On Mon, Nov 01, 2010 at 03:08:37PM +0100, Jan Kiszka wrote: From: Jan

Re: TODO item: guest programmable mac/vlan filtering with macvtap

2010-11-01 Thread Dragos Tatulea
I have created a wiki page for this [1], also added to the networking todo list [2]. No meaty information yet. But it's enough to start working on it. [1] - http://www.linux-kvm.org/page/GuestProgrammableMacVlanFiltering [2] - http://www.linux-kvm.org/page/NetworkingTodo -- Dragos -- To

Re: [PATCH 0/3] KVM: dirty logging optimization - double buffering

2010-11-01 Thread Marcelo Tosatti
On Wed, Oct 27, 2010 at 06:21:02PM +0900, Takuya Yoshikawa wrote: This patch series just change the way we allocate dirty bitmaps but don't change timing related issues. - Changelog I have not changed anything about patch 1 and 2 since I got looks good comment from Marcelo. Just

Re: [PATCH 2/2] KVM: Mask KVM_GET_SUPPORTED_CPUID data with Linux cpuid info

2010-11-01 Thread Marcelo Tosatti
On Sun, Oct 24, 2010 at 03:38:46PM +0200, Avi Kivity wrote: This allows Linux to mask cpuid bits if, for example, nx is enabled on only some cpus. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff

Re: [PATCHv2] trace exit to userspace event

2010-11-01 Thread Marcelo Tosatti
On Sun, Oct 24, 2010 at 04:49:08PM +0200, Gleb Natapov wrote: Add tracepoint for userspace exit. Signed-off-by: Gleb Natapov g...@redhat.com --- ChangeLog: v1-v2 log error case too. Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH] kvm: add cast within kvm_clear_guest_page to fix warning

2010-11-01 Thread Marcelo Tosatti
On Wed, Oct 27, 2010 at 05:21:21PM +0200, Heiko Carstens wrote: From: Heiko Carstens heiko.carst...@de.ibm.com Fixes this: CC arch/s390/kvm/../../../virt/kvm/kvm_main.o arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_clear_guest_page':

Re: [PATCH] powerpc: kvm: fix information leak to userland

2010-11-01 Thread Marcelo Tosatti
On Sat, Oct 30, 2010 at 01:04:24PM +0400, Vasiliy Kulikov wrote: Structure kvm_ppc_pvinfo is copied to userland with flags and pad fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov sego...@gmail.com --- I cannot compile this

Re: [patch v2] x86: kvm: x86: fix information leak to userland

2010-11-01 Thread Marcelo Tosatti
On Sat, Oct 30, 2010 at 10:54:47PM +0400, Vasiliy Kulikov wrote: Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to

Re: [PATCH] KVM x86: remove memset, use vzalloc and don't assign the same value to a variable twice

2010-11-01 Thread Jesper Juhl
On Mon, 1 Nov 2010, Takuya Yoshikawa wrote: (2010/10/31 3:28), Jesper Juhl wrote: Hi, We can improve kvm_vm_ioctl_get_dirty_log() slightly by using vzalloc() rather than first allocating and then manually zero the memory with memset(). Also, while I was looking at this I noticed that

[PATCH 2/3] kernel,cred,kvm,security - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Jiri Olsa
hi, the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held() condition. wbr, jirka Signed-off-by: Jiri Olsa jo...@redhat.com ---

[PATCH 3/3] net - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Jiri Olsa
hi, the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held() condition. wbr, jirka Signed-off-by: Jiri Olsa jo...@redhat.com ---

[PATCH 1/3] cgroup - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Jiri Olsa
hi, the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held() condition. wbr, jirka Signed-off-by: Jiri Olsa jo...@redhat.com ---

[PATCH 0/3] rcu - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Jiri Olsa
hi, the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held() condition. Several places in kernel are spcifying rcu_read_lock_held as

Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address

2010-11-01 Thread Huang Ying
On Mon, 2010-11-01 at 11:49 -0700, Anthony Liguori wrote: On 11/01/2010 11:09 AM, Marcelo Tosatti wrote: On Tue, Oct 26, 2010 at 10:39:48AM +0800, Huang Ying wrote: Author: Max Asbockmasb...@linux.vnet.ibm.com Add command pfa2hva to translate guest physical address to host virtual

Re: [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address

2010-11-01 Thread Anthony Liguori
On 11/01/2010 02:20 PM, Huang Ying wrote: Yes. As general interface, it may not work so well, but as test interface, it works quite well and useful. Do we have any mechanism to add a test only interface? I'd like to see what Luiz/Markus think but definitely only a human monitor interface

Re: [PATCHv2] trace exit to userspace event

2010-11-01 Thread Avi Kivity
On 11/01/2010 12:06 PM, Marcelo Tosatti wrote: On Sun, Oct 24, 2010 at 04:49:08PM +0200, Gleb Natapov wrote: Add tracepoint for userspace exit. Signed-off-by: Gleb Natapovg...@redhat.com --- ChangeLog: v1-v2 log error case too. Applied, thanks. errno sign is still

unhandled wrmsr

2010-11-01 Thread Ross Boylan
I built from qemu-kvm-0.13.0.tar.gz on a Debian system with kernel linux-image-2.6.32-5-amd642.6.32-26 (but otherwise basically the stable/lenny version) and now see Oct 26 16:57:38 markov kernel: [ 5757.672426] kvm: 23063: cpu0 unhandled wrmsr: 0x198 data 0 Oct 26 16:57:38 markov

Re: [PATCHv2] trace exit to userspace event

2010-11-01 Thread Marcelo Tosatti
On Mon, Nov 01, 2010 at 03:33:20PM -0400, Avi Kivity wrote: On 11/01/2010 12:06 PM, Marcelo Tosatti wrote: On Sun, Oct 24, 2010 at 04:49:08PM +0200, Gleb Natapov wrote: Add tracepoint for userspace exit. Signed-off-by: Gleb Natapovg...@redhat.com --- ChangeLog: v1-v2

Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-11-01 Thread Shirley Ma
On Sat, 2010-10-30 at 22:06 +0200, Michael S. Tsirkin wrote: On Fri, Oct 29, 2010 at 08:43:08AM -0700, Shirley Ma wrote: On Fri, 2010-10-29 at 10:10 +0200, Michael S. Tsirkin wrote: Hmm. I don't yet understand. We are still doing copies into the per-vq buffer, and the data copied is

Re: [PATCH 3/3] net - removing superfluous rcu_read_lock_held check

2010-11-01 Thread David Miller
From: Jiri Olsa jo...@redhat.com Date: Mon, 1 Nov 2010 20:15:09 +0100 the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held()

[PATCH kvm-unit-tests 0/2] Test nmi-after-sti

2010-11-01 Thread Avi Kivity
Add a unit test for NMI immediately after an IF-enabling STI. Avi Kivity (2): apic: use boot idt instead of a locally allocated idt apic: test nmi-after-sti x86/apic.c | 83 +--- 1 files changed, 68 insertions(+), 15 deletions(-) --

[PATCH kvm-unit-tests 2/2] apic: test nmi-after-sti

2010-11-01 Thread Avi Kivity
While not required by the spec, some guests (Linux) rely on nmi being blocked by an IF-enabling sti. Add a unit test for this condition. Signed-off-by: Avi Kivity a...@redhat.com --- x86/apic.c | 67 1 files changed, 67

[PATCH kvm-unit-tests 1/2] apic: use boot idt instead of a locally allocated idt

2010-11-01 Thread Avi Kivity
This allows the smp support, which uses the boot idt, to work. Signed-off-by: Avi Kivity a...@redhat.com --- x86/apic.c | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/x86/apic.c b/x86/apic.c index 48fa0f7..165f820 100644 --- a/x86/apic.c +++ b/x86/apic.c

Re: [PATCHv2] trace exit to userspace event

2010-11-01 Thread Avi Kivity
On 11/01/2010 03:43 PM, Marcelo Tosatti wrote: On Mon, Nov 01, 2010 at 03:33:20PM -0400, Avi Kivity wrote: On 11/01/2010 12:06 PM, Marcelo Tosatti wrote: On Sun, Oct 24, 2010 at 04:49:08PM +0200, Gleb Natapov wrote: Add tracepoint for userspace exit. Signed-off-by: Gleb

[PATCH] KVM: VMX: Disallow NMI while blocked by STI

2010-11-01 Thread Avi Kivity
While not mandated by the spec, Linux relies on NMI being blocked by an IF-enabling STI. VMX also refuses to enter a guest in this state, at least on some implementations. Disallow NMI while blocked by STI by checking for the condition, and requesting an interrupt window exit if it occurs.

Re: [PATCH 0/5] Fixes, non-PCI-2.3 support, EOI enhancements

2010-11-01 Thread Tom Lyon
I've applied all your patches. Thanks! On Saturday, October 30, 2010 09:58:55 am Alex Williamson wrote: Hi Tom, I've updated some patches I've been working on to v5 and wanted to see what you think. I also found a couple minor bugs, fixed in this series. The main idea is that since the

Re: [PATCH] ceph/rbd block driver for qemu-kvm (v7)

2010-11-01 Thread Sage Weil
Hi, Are there any lingering issues or concerns with the latest rbd patch, or other roadblocks that would prevent this from being merged? Thanks- sage On Fri, 15 Oct 2010, Christian Brunner wrote: Hi, once again, Yehuda committed fixes for all the suggestions made on the list (and more).

Re: [PATCH 3/3] net - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Paul Moore
On Mon, 2010-11-01 at 20:15 +0100, Jiri Olsa wrote: hi, the rcu_dereference_check is defined as #define rcu_dereference_check(p, c) \ __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu) so the caller does not need to specify rcu_read_lock_held() condition.

Re: [PATCH 2/3] kernel,cred,kvm,security - removing superfluous rcu_read_lock_held check

2010-11-01 Thread Paolo Bonzini
On 11/01/2010 08:15 PM, Jiri Olsa wrote: diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a055742..a90a7e3 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -256,7 +256,6 @@ void kvm_put_kvm(struct kvm *kvm); static inline struct kvm_memslots

Re: [PATCH] KVM x86: remove memset, use vzalloc and don't assign the same value to a variable twice

2010-11-01 Thread Takuya Yoshikawa
Hi Jesper, (dropped some addresses from Cc) Jesper Juhl wrote: There's definately a positive size impact for the generated object code and we save having to do the call to memset() and the cost of a vzalloc() call looks more or less the same as a call to vmalloc() to me. This patch is

buildbot failure in qemu-kvm on default_i386_debian_5_0

2010-11-01 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_debian_5_0/builds/628 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

buildbot failure in qemu-kvm on default_i386_out_of_tree

2010-11-01 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_out_of_tree/builds/565 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

Re: [RFC PATCH v2 7/7] KVM: KVM: don't break vcpu 'halt' state due to apfs

2010-11-01 Thread Xiao Guangrong
On 11/01/2010 08:55 PM, Gleb Natapov wrote: diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2cfdf2d..f7aed95 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5295,8 +5295,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) {

Re: [PATCH] KVM x86: remove memset, use vzalloc and don't assign the same value to a variable twice

2010-11-01 Thread Jesper Juhl
On Tue, 2 Nov 2010, Takuya Yoshikawa wrote: Hi Jesper, (dropped some addresses from Cc) Jesper Juhl wrote: There's definately a positive size impact for the generated object code and we save having to do the call to memset() and the cost of a vzalloc() call looks more or less the

[PATCH] vfio: Extended capability fixes

2010-11-01 Thread Alex Williamson
- Virtual channel position gets truncated as a u8 - Print the ecap that's unknown, not the last cap we saw - Print actual config offset, which provides enough info to make some sense of the error. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/vfio/vfio_pci_config.c

Re: [PATCH 3/3] KVM test: Test the file transfer during migartion

2010-11-01 Thread Jason Wang
Michael Goldish writes: On 09/25/2010 11:36 AM, Jason Wang wrote: This test just do the file transfer from host to guest during migartion in order to check whether the nic/block state could be saved and loaded correctly. Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [PATCH 0/3] Launch other test during migration

2010-11-01 Thread Jason Wang
Michael Goldish writes: On 09/25/2010 11:36 AM, Jason Wang wrote: We could give a further test of migration by launch test during migartion. So the following series implements: - A simple class to run a specified test in the background which could be used to launch other

Re: [PATCH] powerpc: kvm: fix information leak to userland

2010-11-01 Thread Marcelo Tosatti
On Sat, Oct 30, 2010 at 01:04:24PM +0400, Vasiliy Kulikov wrote: Structure kvm_ppc_pvinfo is copied to userland with flags and pad fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov sego...@gmail.com --- I cannot compile this