Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 07:35, Nicholas A. Bellinger wrote: Hi MST Paolo, So I'm currently working on vhost-scsi support for ANY_LAYOUT, and wanted to verify some assumptions based upon your earlier emails.. *) When ANY_LAYOUT is negotiated by vhost-scsi, it's expected that virtio-scsi request +

Re: [PATCH v3 1/3] arm/arm64: KVM: Use set/way op trapping to track the state of the caches

2015-01-27 Thread Marc Zyngier
On 27/01/15 13:17, Christoffer Dall wrote: On Tue, Jan 27, 2015 at 11:21:38AM +, Marc Zyngier wrote: On 26/01/15 22:58, Christoffer Dall wrote: On Wed, Jan 21, 2015 at 06:39:46PM +, Marc Zyngier wrote: Trying to emulate the behaviour of set/way cache ops is fairly pointless, as there

Windows 2008 Guest BSODS with CLOCK_WATCHDOG_TIMEOUT on VM migration

2015-01-27 Thread Mikhail Sennikovskii
Hi all, I've posted the bolow mail to the qemu-dev mailing list, but I've got no response there. That's why I decided to re-post it here as well, and besides that I think this could be a kvm-specific issue as well. Some additional thing to note: I can reproduce the issue on my Debian 7 with

Re: [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit

2015-01-27 Thread Luis R. Rodriguez
On Tue, Jan 27, 2015 at 10:06:44AM +, David Vrabel wrote: On 27/01/15 08:35, Jan Beulich wrote: On 27.01.15 at 02:51, mcg...@do-not-panic.com wrote: Even if David told you this would be acceptable, I have to question an abstract model of fixing issues on only 64-bit kernels - this

Re: [PATCH v3 0/2] x86/arm64: add xenconfig

2015-01-27 Thread Luis R. Rodriguez
On Fri, Jan 23, 2015 at 03:19:25PM +, Stefano Stabellini wrote: On Fri, 23 Jan 2015, Luis R. Rodriguez wrote: On Wed, Jan 14, 2015 at 11:33:45AM -0800, Luis R. Rodriguez wrote: From: Luis R. Rodriguez mcg...@suse.com This v3 addresses Stefano's feedback from the v2 series, namely

Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Michael S. Tsirkin
On Tue, Jan 27, 2015 at 09:42:22AM +0100, Paolo Bonzini wrote: On 27/01/2015 07:35, Nicholas A. Bellinger wrote: Hi MST Paolo, So I'm currently working on vhost-scsi support for ANY_LAYOUT, and wanted to verify some assumptions based upon your earlier emails.. *) When

Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 09:42, Paolo Bonzini wrote: *) When ANY_LAYOUT is negotiated by vhost-scsi, it's expected that virtio-scsi request + response headers may be (but not always..?) combined with data-out + data-in payloads into a single iovec. Note that request and data-out can be combined, and

Re: [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit

2015-01-27 Thread David Vrabel
On 27/01/15 08:35, Jan Beulich wrote: On 27.01.15 at 02:51, mcg...@do-not-panic.com wrote: Even if David told you this would be acceptable, I have to question an abstract model of fixing issues on only 64-bit kernels - this may be acceptable for distro purposes, but seems hardly the right

Re: [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit

2015-01-27 Thread Jan Beulich
On 27.01.15 at 02:51, mcg...@do-not-panic.com wrote: Even if David told you this would be acceptable, I have to question an abstract model of fixing issues on only 64-bit kernels - this may be acceptable for distro purposes, but seems hardly the right approach for upstream. If 32-bit ones are to

Re: [Xen-devel] [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit

2015-01-27 Thread Andrew Cooper
On 27/01/15 08:35, Jan Beulich wrote: On 27.01.15 at 02:51, mcg...@do-not-panic.com wrote: Even if David told you this would be acceptable, I have to question an abstract model of fixing issues on only 64-bit kernels - this may be acceptable for distro purposes, but seems hardly the right

Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Michael S. Tsirkin
On Mon, Jan 26, 2015 at 10:35:17PM -0800, Nicholas A. Bellinger wrote: Hi MST Paolo, So I'm currently working on vhost-scsi support for ANY_LAYOUT, and wanted to verify some assumptions based upon your earlier emails.. *) When ANY_LAYOUT is negotiated by vhost-scsi, it's expected that

Re: [PATCH v2 2/5] KVM: ARM: on IO mem abort - route the call to KVM MMIO bus

2015-01-27 Thread Christoffer Dall
On Sat, Jan 24, 2015 at 03:02:33AM +0200, Nikolay Nikolaev wrote: On Mon, Jan 12, 2015 at 7:09 PM, Eric Auger eric.au...@linaro.org wrote: Hi Nikolay, On 12/07/2014 10:37 AM, Nikolay Nikolaev wrote: On IO memory abort, try to handle the MMIO access thorugh the KVM registered read/write

Re: [PATCH v3 2/6] KVM: nVMX: Enable nested virtualize x2apic mode.

2015-01-27 Thread Paolo Bonzini
On 24/01/2015 11:21, Wincy Van wrote: + memset(vmx_msr_bitmap_nested, 0xff, PAGE_SIZE); Most bytes are always 0xff. It's better to initialize it to 0xff once, and set the bit here if !nested_cpu_has_virt_x2apic_mode(vmcs12). + if (nested_cpu_has_virt_x2apic_mode(vmcs12)) Please

Re: [PATCH v3 0/6] KVM: nVMX: Enable nested apicv support.

2015-01-27 Thread Paolo Bonzini
On 24/01/2015 11:18, Wincy Van wrote: v2 --- v3: 1. Add a new field in nested_vmx to avoid the spin lock in v2. 2. Drop send eoi to L1 when doing nested interrupt delivery. 3. Use hardware MSR bitmap to enable nested virtualize x2apic mode. I think the patches are mostly okay.

Re: [PATCH v2] kvm: iommu: Add cond_resched to legacy device assignment code

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 11:57, Joerg Roedel wrote: From: Joerg Roedel jroe...@suse.de When assigning devices to large memory guests (=128GB guest memory in the failure case) the functions to create the IOMMU page-tables for the whole guest might run for a very long time. On non-preemptible kernels

Re: [PATCH v3 2/6] KVM: nVMX: Enable nested virtualize x2apic mode.

2015-01-27 Thread Paolo Bonzini
On 24/01/2015 11:21, Wincy Van wrote: +static void nested_vmx_disable_intercept_for_msr(unsigned long *msr_bitmap_l1, + unsigned long *msr_bitmap_nested, + u32 msr, int type) +{ + int f =

[kvm-unit-tests][PATCH] x86: hypercall: fix compile error on i386

2015-01-27 Thread Chris J Arges
There is a failure to build on 32-bit hosts: x86/hypercall.c: In function ‘test_edge’: x86/hypercall.c:42:2: error: ‘test_rip’ undeclared (first use in this function) test_rip = 0; ^ This patch fixes this issue. Signed-off-by: Chris J Arges chris.j.ar...@canonical.com --- x86/hypercall.c |

Re: [kvm-unit-tests][PATCH] x86: hypercall: fix compile error on i386

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 21:23, Chris J Arges wrote: There is a failure to build on 32-bit hosts: x86/hypercall.c: In function ‘test_edge’: x86/hypercall.c:42:2: error: ‘test_rip’ undeclared (first use in this function) test_rip = 0; ^ This patch fixes this issue. Signed-off-by: Chris J

[kvm-unit-tests][PATCH] x86: hypercall: a better fix for the compiler error

2015-01-27 Thread Chris J Arges
The last patch moves the ifdef in a way that causes a compiler warning. Here fix the ifdefs to isloate x86_64 functions and variables for the test. Signed-off-by: Chris J Arges chris.j.ar...@canonical.com --- x86/hypercall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v3 6/6] KVM: nVMX: Enable nested posted interrupt processing.

2015-01-27 Thread Paolo Bonzini
On 24/01/2015 11:24, Wincy Van wrote: if (!nested_cpu_has_virt_x2apic_mode(vmcs12) !nested_cpu_has_apic_reg_virt(vmcs12) - !nested_cpu_has_vid(vmcs12)) + !nested_cpu_has_vid(vmcs12) + !nested_cpu_has_posted_intr(vmcs12))

Re: [PATCH] kvm: update_memslots: clean flags for invalid memslots

2015-01-27 Thread Paolo Bonzini
On 09/01/2015 09:29, Tiejun Chen wrote: Indeed, any invalid memslots should be new-npages = 0, new-base_gfn = 0 and new-flags = 0 at the same time. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- Paolo, This is just a small cleanup to follow-up commit, efbeec7098ee, fix sorting

Re: Windows 2008 Guest BSODS with CLOCK_WATCHDOG_TIMEOUT on VM migration

2015-01-27 Thread Jidong Xiao
On Tue, Jan 27, 2015 at 5:55 AM, Mikhail Sennikovskii mikhail.sennikovs...@profitbricks.com wrote: Hi all, I've posted the bolow mail to the qemu-dev mailing list, but I've got no response there. That's why I decided to re-post it here as well, and besides that I think this could be a

Re: [PATCH v3 1/3] arm/arm64: KVM: Use set/way op trapping to track the state of the caches

2015-01-27 Thread Marc Zyngier
On 26/01/15 22:58, Christoffer Dall wrote: On Wed, Jan 21, 2015 at 06:39:46PM +, Marc Zyngier wrote: Trying to emulate the behaviour of set/way cache ops is fairly pointless, as there are too many ways we can end-up missing stuff. Also, there is some system caches out there that simply

[PATCH v2] kvm: iommu: Add cond_resched to legacy device assignment code

2015-01-27 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de When assigning devices to large memory guests (=128GB guest memory in the failure case) the functions to create the IOMMU page-tables for the whole guest might run for a very long time. On non-preemptible kernels this might cause Soft-Lockup warnings. Fix these

[PATCH 3/6] KVM: MMU: Explicitly set D-bit for writable spte.

2015-01-27 Thread Kai Huang
This patch avoids unnecessary dirty GPA logging to PML buffer in EPT violation path by setting D-bit manually prior to the occurrence of the write from guest. We only set D-bit manually in set_spte, and leave fast_page_fault path unchanged, as fast_page_fault is very unlikely to happen in case of

[PATCH 1/6] KVM: Rename kvm_arch_mmu_write_protect_pt_masked to be more generic for log dirty

2015-01-27 Thread Kai Huang
We don't have to write protect guest memory for dirty logging if architecture supports hardware dirty logging, such as PML on VMX, so rename it to be more generic. Signed-off-by: Kai Huang kai.hu...@linux.intel.com --- arch/arm/kvm/mmu.c | 18 -- arch/x86/kvm/mmu.c |

[PATCH 5/6] KVM: x86: Add new dirty logging kvm_x86_ops for PML

2015-01-27 Thread Kai Huang
This patch adds new kvm_x86_ops dirty logging hooks to enable/disable dirty logging for particular memory slot, and to flush potentially logged dirty GPAs before reporting slot-dirty_bitmap to userspace. kvm x86 common code calls these hooks when they are available so PML logic can be hidden to

[PATCH 2/6] KVM: MMU: Add mmu help functions to support PML

2015-01-27 Thread Kai Huang
This patch adds new mmu layer functions to clear/set D-bit for memory slot, and to write protect superpages for memory slot. In case of PML, CPU logs the dirty GPA automatically to PML buffer when CPU updates D-bit from 0 to 1, therefore we don't have to write protect 4K pages, instead, we only

[PATCH 4/6] KVM: x86: Change parameter of kvm_mmu_slot_remove_write_access

2015-01-27 Thread Kai Huang
This patch changes the second parameter of kvm_mmu_slot_remove_write_access from 'slot id' to 'struct kvm_memory_slot *' to align with kvm_x86_ops dirty logging hooks, which will be introduced in further patch. Better way is to change second parameter of kvm_arch_commit_memory_region from 'struct

[PATCH 6/6] KVM: VMX: Add PML support in VMX

2015-01-27 Thread Kai Huang
This patch adds PML support in VMX. A new module parameter 'enable_pml' is added to allow user to enable/disable it manually. Signed-off-by: Kai Huang kai.hu...@linux.intel.com --- arch/x86/include/asm/vmx.h | 4 + arch/x86/include/uapi/asm/vmx.h | 1 + arch/x86/kvm/trace.h|

RE: [v3 00/26] Add VT-d Posted-Interrupts support

2015-01-27 Thread Wu, Feng
-Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, January 28, 2015 11:44 AM To: Wu, Feng Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org;

Re: Windows 2008 Guest BSODS with CLOCK_WATCHDOG_TIMEOUT on VM migration

2015-01-27 Thread Zhang Haoyu
On 2015-01-28 03:10:23, Jidong Xiao wrote: On Tue, Jan 27, 2015 at 5:55 AM, Mikhail Sennikovskii mikhail.sennikovs...@profitbricks.com wrote: Hi all, I've posted the bolow mail to the qemu-dev mailing list, but I've got no response there. That's why I decided to re-post it here as

Re: [PATCH v3 2/6] KVM: nVMX: Enable nested virtualize x2apic mode.

2015-01-27 Thread Wincy Van
On Wed, Jan 28, 2015 at 5:37 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 24/01/2015 11:21, Wincy Van wrote: + memset(vmx_msr_bitmap_nested, 0xff, PAGE_SIZE); Most bytes are always 0xff. It's better to initialize it to 0xff once, and set the bit here if

Re: [PATCH v3 0/6] KVM: nVMX: Enable nested apicv support.

2015-01-27 Thread Wincy Van
On Wed, Jan 28, 2015 at 6:06 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 24/01/2015 11:18, Wincy Van wrote: v2 --- v3: 1. Add a new field in nested_vmx to avoid the spin lock in v2. 2. Drop send eoi to L1 when doing nested interrupt delivery. 3. Use hardware MSR bitmap to enable

Re: [PATCH v3 2/6] KVM: nVMX: Enable nested virtualize x2apic mode.

2015-01-27 Thread Wincy Van
On Wed, Jan 28, 2015 at 5:39 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 24/01/2015 11:21, Wincy Van wrote: +static void nested_vmx_disable_intercept_for_msr(unsigned long *msr_bitmap_l1, + unsigned long *msr_bitmap_nested, +

Re: [PATCH v3 6/6] KVM: nVMX: Enable nested posted interrupt processing.

2015-01-27 Thread Wincy Van
On Wed, Jan 28, 2015 at 5:55 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 24/01/2015 11:24, Wincy Van wrote: if (!nested_cpu_has_virt_x2apic_mode(vmcs12) !nested_cpu_has_apic_reg_virt(vmcs12) - !nested_cpu_has_vid(vmcs12)) +

Re: [PATCH v3 3/5] KVM: ARM VGIC add kvm_io_bus_ frontend

2015-01-27 Thread Nikolay Nikolaev
Hi Andre, On Tue, Jan 27, 2015 at 3:31 PM, Andre Przywara andre.przyw...@arm.com wrote: Hi Nikolay, On 24/01/15 11:59, Nikolay Nikolaev wrote: In io_mem_abort remove the call to vgic_handle_mmio. The target is to have a single MMIO handling path - that is through the kvm_io_bus_ API.

Re: [PATCH v3 1/3] arm/arm64: KVM: Use set/way op trapping to track the state of the caches

2015-01-27 Thread Christoffer Dall
On Tue, Jan 27, 2015 at 11:21:38AM +, Marc Zyngier wrote: On 26/01/15 22:58, Christoffer Dall wrote: On Wed, Jan 21, 2015 at 06:39:46PM +, Marc Zyngier wrote: Trying to emulate the behaviour of set/way cache ops is fairly pointless, as there are too many ways we can end-up missing

Re: [PATCH v3 3/5] KVM: ARM VGIC add kvm_io_bus_ frontend

2015-01-27 Thread Andre Przywara
Hi Nikolay, On 24/01/15 11:59, Nikolay Nikolaev wrote: In io_mem_abort remove the call to vgic_handle_mmio. The target is to have a single MMIO handling path - that is through the kvm_io_bus_ API. Register a kvm_io_device in kvm_vgic_init on the whole vGIC MMIO region. Both read and write

KVM call for agenda for 2015-02-03

2015-01-27 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: By popular demand, a google calendar public entry with it https://www.google.com/calendar/embed?src=dG9iMXRqcXAzN3Y4ZXZwNzRoMHE4a3BqcXNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ (Let me know if you

Re: [PATCH v3 3/5] KVM: ARM VGIC add kvm_io_bus_ frontend

2015-01-27 Thread Andre Przywara
Hi, On 27/01/15 17:26, Eric Auger wrote: On 01/27/2015 05:51 PM, Nikolay Nikolaev wrote: Hi Andre, On Tue, Jan 27, 2015 at 3:31 PM, Andre Przywara andre.przyw...@arm.com wrote: Hi Nikolay, On 24/01/15 11:59, Nikolay Nikolaev wrote: In io_mem_abort remove the call to vgic_handle_mmio.

RE: [v3 00/26] Add VT-d Posted-Interrupts support

2015-01-27 Thread Wu, Feng
-Original Message- From: Wu, Feng Sent: Wednesday, January 21, 2015 10:26 AM To: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; j...@8bytes.org; alex.william...@redhat.com; jiang@linux.intel.com

[PATCH 0/6] KVM: VMX: Page Modification Logging (PML) support

2015-01-27 Thread Kai Huang
This patch series adds Page Modification Logging (PML) support in VMX. 1) Introduction PML is a new feature on Intel's Boardwell server platfrom targeted to reduce overhead of dirty logging mechanism. The specification can be found at:

Re: [v3 00/26] Add VT-d Posted-Interrupts support

2015-01-27 Thread Alex Williamson
On Wed, 2015-01-28 at 03:01 +, Wu, Feng wrote: -Original Message- From: Wu, Feng Sent: Wednesday, January 21, 2015 10:26 AM To: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org;