Re: [PATCH resend v5 0/6] KVM: nVMX: Enable nested apicv support

2015-02-03 Thread Wincy Van
On Wed, Feb 4, 2015 at 12:15 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 03/02/2015 16:46, Wincy Van wrote: v1 --- v2: Use spin lock to ensure vmcs12 is safe when doing nested posted interrupt delivery. v2 --- v3: 1. Add a new field in nested_vmx to avoid the spin lock in v2.

[PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk it has just verified that it asks no more than the length of the first segment of iovec. And with that the last user of stuff in lib/iovec.c is gone. RIP. Cc: Michael S. Tsirkin m...@redhat.com Cc: Nicholas A. Bellinger n...@linux-iscsi.org Cc:

[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 82 +++--

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Thomas Huth
On Tue, 03 Feb 2015 16:22:32 +0100 Paolo Bonzini pbonz...@redhat.com wrote: On 03/02/2015 16:16, Thomas Huth wrote: Actually, I'd prefer to keep the virtual in the defines for the type of operation below: When it comes to s390 storage keys, we likely might need some calls for reading

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 11:56:16PM +, Al Viro wrote: On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote: +* Copy over the virtio-scsi request header, which when +* ANY_LAYOUT is enabled may span multiple iovecs, or a +* single iovec

Re: cpu frequency

2015-02-03 Thread Andrey Korolyov
On Wed, Feb 4, 2015 at 3:06 AM, Nerijus Baliunas neri...@users.sourceforge.net wrote: On Tue, 3 Feb 2015 18:07:57 +0400 Andrey Korolyov and...@xdel.ru wrote: Have you tried to disable turbo mode (assuming you have new enough CPU model) and fix frequency via frequency governor` settings? If it

[PATCH v3 16/18] vhost: don't bother with copying iovec in handle_tx()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 9 + 1 file

[PATCH v3 15/18] vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()

2015-02-03 Thread Al Viro
From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/vhost.c | 6 -- include/linux/uio.h | 1 - lib/iovec.c | 25

Re: [PATCH v5 1/6] KVM: nVMX: Use hardware MSR bitmap

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 10:11, Wincy Van wrote: @@ -8468,6 +8484,38 @@ static void vmx_start_preemption_timer(struct kvm_vcpu *vcpu) ns_to_ktime(preemption_timeout), HRTIMER_MODE_REL); } Hi Wincy, the patch is corrupted here. Also it has spaces instead of tabs earlier. Please

Re: KVM call for agenda for 2015-02-03

2015-02-03 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: As there are no agenda, call got cancelled. Could I do anything to improve the chances to have a call? Time change, call for agenda timing, etc? Just

Re: [PATCH v5 1/6] KVM: nVMX: Use hardware MSR bitmap

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 15:07, Wincy Van wrote: Ouch, my bad, gmail cut the lines which is over 78 chars. Since gmail is GFWed(VPN does not work, and I have a web proxy), I was sending the patches to my gmail via git-send-email with other mail and forwarding them to the community. Yeah, forwarding is

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Thomas Huth
On Tue, 03 Feb 2015 14:04:43 +0100 Paolo Bonzini pbonz...@redhat.com wrote: On 03/02/2015 13:11, Thomas Huth wrote: On s390, we've got to make sure to hold the IPTE lock while accessing virtual memory. So let's add an ioctl for reading and writing virtual memory to provide this feature for

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
Hmm having second thoughts here. Will this modify the iov in vq-iov? If yes, how will recvmsg fill it? OK that was just me misunderstanding what the function does. As it doesn't modify the iovec itself, I think there's no issue, my ack stands. -- To unsubscribe from this list: send the line

Looking for Outreachy sponsors for QEMU, libvirt, and KVM internships (was Outreach Program for Women)

2015-02-03 Thread Stefan Hajnoczi
Outreach Program for Women is renaming to Outreachy. The new website is: http://outreachy.org/ What is Outreachy? Outreachy helps people from underrepresented groups join the open source community through a 12-week full-time paid internship. The format is similar to Google Summer of Code.

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 16:16, Thomas Huth wrote: Actually, I'd prefer to keep the virtual in the defines for the type of operation below: When it comes to s390 storage keys, we likely might need some calls for reading and writing to physical memory, too. Then we could simply extend this ioctl instead

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

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 16:18, Radim Krčmář wrote: (I see the same code in handle_ept_violation(), but wasn't that needed just because of a hardware error?) That was how I read it initially, but actually that means: this statement could be broken if the processor has that erratum. +static void

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

2015-02-03 Thread Radim Krčmář
2015-01-28 10:54+0800, Kai Huang: This patch adds PML support in VMX. A new module parameter 'enable_pml' is added (+module_param_named(pml, enable_pml, bool, S_IRUGO);) to allow user to enable/disable it manually. Signed-off-by: Kai Huang kai.hu...@linux.intel.com --- diff --git

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
+ * copy_from_iter() is modifying the iovecs as copies over + * req_size bytes into req, so the returned out_iter.iov[0] + * will contain the correct start + offset of the outgoing + * WRITE payload, if DMA_TO_DEVICE is set. +

Re: [PATCH v2 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:37AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk it has just verified that it asks no more than the length of the first segment of iovec. And with that the last user of stuff in lib/iovec.c is gone. RIP. Cc: Michael S. Tsirkin

Re: [PATCH v2 15/18] vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:34AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Acked-by: Michael S. Tsirkin m...@redhat.com But, can you pls copy

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

2015-02-03 Thread Wincy Van
On Tue, Feb 3, 2015 at 10:02 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 03/02/2015 10:17, Wincy Van wrote: +static int vmx_accomp_nested_posted_interrupt(struct kvm_vcpu *vcpu) Replace accomp with complete. Will do. +{ + struct vcpu_vmx *vmx = to_vmx(vcpu); + int

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Al Viro
On Tue, Feb 03, 2015 at 04:21:54PM +0100, Michael S. Tsirkin wrote: Hmm having second thoughts here. Will this modify the iov in vq-iov? If yes, how will recvmsg fill it? OK that was just me misunderstanding what the function does. As it doesn't modify the iovec itself, I think there's

[PATCH resend v5 3/6] KVM: nVMX: Make nested control MSRs per-cpu

2015-02-03 Thread Wincy Van
To enable nested apicv support, we need per-cpu vmx control MSRs: 1. If in-kernel irqchip is enabled, we can enable nested posted interrupt, we should set posted intr bit in the nested_vmx_pinbased_ctls_high. 2. If in-kernel irqchip is disabled, we can not enable nested posted

[PATCH resend v5 5/6] KVM: nVMX: Enable nested virtual interrupt delivery

2015-02-03 Thread Wincy Van
With virtual interrupt delivery, the hardware prevent KVM from the low efficiency interrupt inject way. In nested vmx, it is a important feature, we can reduce much more nested-vmexit, especially in high throughput scenes. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c |

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

2015-02-03 Thread Radim Krčmář
2015-01-28 10:54+0800, 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

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

2015-02-03 Thread Radim Krčmář
2015-02-03 16:39+0100, Paolo Bonzini: On 03/02/2015 16:18, Radim Krčmář wrote: (I see the same code in handle_ept_violation(), but wasn't that needed just because of a hardware error?) That was how I read it initially, but actually that means: this statement could be broken if the

[PATCH resend v5 1/6] KVM: nVMX: Use hardware MSR bitmap

2015-02-03 Thread Wincy Van
Currently, if L1 enables MSR_BITMAP, we will emulate this feature, all of L2's msr access is intercepted by L0. Since many features like virtualize x2apic mode has a complicated logic and it is difficult for us to emulate, we should use hardware and merge the bitmap. This patch introduces

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

2015-02-03 Thread Radim Krčmář
2015-01-28 10:54+0800, 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

[PATCH resend v5 4/6] KVM: nVMX: Enable nested apic register virtualization

2015-02-03 Thread Wincy Van
We can reduce apic register virtualization cost with this feature, it is also a requirement for virtual interrupt delivery and posted interrupt processing. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c | 39 +++ 1 files changed, 35

[PATCH resend v5 0/6] KVM: nVMX: Enable nested apicv support

2015-02-03 Thread Wincy Van
v1 --- v2: Use spin lock to ensure vmcs12 is safe when doing nested posted interrupt delivery. 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

[PATCH resend v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-02-03 Thread Wincy Van
If vcpu has a interrupt in vmx non-root mode, we will kick that vcpu to inject interrupt timely. With posted interrupt processing, the kick intr is not needed, and interrupts are fully taken care of by hardware. In nested vmx, this feature avoids much more vmexits than non-nested vmx. This patch

Re: [PATCH resend v5 0/6] KVM: nVMX: Enable nested apicv support

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 16:46, Wincy Van wrote: v1 --- v2: Use spin lock to ensure vmcs12 is safe when doing nested posted interrupt delivery. 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

[PATCH resend v5 2/6] KVM: nVMX: Enable nested virtualize x2apic mode

2015-02-03 Thread Wincy Van
When L2 is using x2apic, we can use virtualize x2apic mode to gain higher performance, especially in apicv case. This patch also introduces nested_vmx_check_apicv_controls for the nested apicv patches. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c | 114

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

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 10:17, Wincy Van wrote: +static int vmx_accomp_nested_posted_interrupt(struct kvm_vcpu *vcpu) Replace accomp with complete. +{ + struct vcpu_vmx *vmx = to_vmx(vcpu); + int max_irr; + void *vapic_page; + u16 status; + + if

Re: cpu frequency

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 14:25, Nerijus Baliunas wrote: It did not help. Today that commecrial application detects 2400, although Control Panel - System shows 2.20 GHz. So my question again - is it possible to patch qemu-kvm that it shows some constant frequency to the guest? But the answer is probably

Re: [PATCH v5 1/6] KVM: nVMX: Use hardware MSR bitmap

2015-02-03 Thread Wincy Van
On Tue, Feb 3, 2015 at 9:57 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 03/02/2015 10:11, Wincy Van wrote: @@ -8468,6 +8484,38 @@ static void vmx_start_preemption_timer(struct kvm_vcpu *vcpu) ns_to_ktime(preemption_timeout), HRTIMER_MODE_REL); } Hi Wincy, the

Re: cpu frequency

2015-02-03 Thread Andrey Korolyov
It did not help. Today that commecrial application detects 2400, although Control Panel - System shows 2.20 GHz. So my question again - is it possible to patch qemu-kvm that it shows some constant frequency to the guest? But the answer is probably not, because I don't know how the application

[PATCH RFC 0/1] KVM: ioctl for reading/writing guest memory

2015-02-03 Thread Thomas Huth
tl;dr: This patch adds a new ioctl to KVM on s390x for reading and writing from/to virtual guest memory, to take account of the so-called IPTE-lock on s390x (a locking mechanism for the host to walk MMU tables of the guest). Long story: Certain instruction interception handlers in QEMU have to

[PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Thomas Huth
On s390, we've got to make sure to hold the IPTE lock while accessing virtual memory. So let's add an ioctl for reading and writing virtual memory to provide this feature for userspace, too. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: Dominik Dingel din...@linux.vnet.ibm.com

Re: [PATCH RFC 0/1] KVM: ioctl for reading/writing guest memory

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 13:11, Thomas Huth wrote: The userspace (QEMU) then can simply call this ioctl when it wants to read or write from/to virtual guest memory. Then kernel then takes the IPTE-lock, walks the MMU table of the guest to find out the physical address that corresponds to the virtual

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 13:11, Thomas Huth wrote: On s390, we've got to make sure to hold the IPTE lock while accessing virtual memory. So let's add an ioctl for reading and writing virtual memory to provide this feature for userspace, too. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com

Re: [PATCH RFC 0/1] KVM: ioctl for reading/writing guest memory

2015-02-03 Thread Christian Borntraeger
Am 03.02.2015 um 13:59 schrieb Paolo Bonzini: On 03/02/2015 13:11, Thomas Huth wrote: The userspace (QEMU) then can simply call this ioctl when it wants to read or write from/to virtual guest memory. Then kernel then takes the IPTE-lock, walks the MMU table of the guest to find out the

Re: cpu frequency

2015-02-03 Thread Nerijus Baliunas
On Tue, 23 Dec 2014 15:40:22 +0100 Paolo Bonzini pbonz...@redhat.com wrote: A commercial application running on Windows (kvm guest) detects CPU as: CPU_0: CPU0, Intel64 Family 6 Model 42 Stepping 1, 64, 64, 2200, 078BFBFD000206A1, 10753, CPU 0 After some time, without reboot, it detects

Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()

2015-02-03 Thread Luis R. Rodriguez
On Tue, Feb 03, 2015 at 11:05:15AM +, David Vrabel wrote: On 27/01/15 01:51, Luis R. Rodriguez wrote: +#ifndef CONFIG_PREEMPT +extern struct { char _entry[32]; } preemptible_hypercall_page[]; + +static inline bool xen_is_preemptible_hypercall(struct pt_regs *regs) +{ + return

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

2015-02-03 Thread Radim Krčmář
2015-01-28 10:54+0800, 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

Re: [PATCH-v3 1/9] vhost/scsi: Convert completion path to use copy_to_iser

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:29:55AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Required for ANY_LAYOUT support when the incoming virtio-scsi response header + fixed size sense buffer payload may span more than a single iovec entry. This changes

Re: [PATCH v3] PCI: Add guard to avoid mapping a invalid msix base address

2015-02-03 Thread Jan Beulich
On 02.02.15 at 22:06, bhelg...@google.com wrote: I applied this to pci/msi for v3.20, thanks! I reworked the changelog as follows; let me know if it still doesn't make things clear: Thanks, looks good to me now. Jan -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [PATCH-v3 7/9] vhost/scsi: Drop legacy pre virtio v1.0 !ANY_LAYOUT logic

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:30:01AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(), there is no longer a reason to keep around the legacy code with !ANY_LAYOUT assumptions. Go ahead and

Re: [PATCH-v3 8/9] vhost/scsi: Drop left-over scsi_tcq.h include

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:30:02AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org With the recent removal of MSG_*_TAG defines in commit 68d81f40, vhost-scsi is now using TCM_*_TAG and doesn't depend upon host side scsi_tcq.h definitions anymore. Cc:

Re: [PATCH-v3 9/9] vhost/scsi: Global tcm_vhost - vhost_scsi rename

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:30:03AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org There is a large amount of code that still references the original 'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'. Go ahead and do a global rename to make

Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()

2015-02-03 Thread David Vrabel
On 27/01/15 01:51, Luis R. Rodriguez wrote: +#ifndef CONFIG_PREEMPT +extern struct { char _entry[32]; } preemptible_hypercall_page[]; + +static inline bool xen_is_preemptible_hypercall(struct pt_regs *regs) +{ + return !user_mode_vm(regs) + regs-ip = (unsigned

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick() callback in vhost_scsi_handle_vqal(). It calculates data_direction + exp_data_len for the new

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Al Viro
On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote: + * Copy over the virtio-scsi request header, which when + * ANY_LAYOUT is enabled may span multiple iovecs, or a + * single iovec may contain both the header + outgoing +

Re: cpu frequency

2015-02-03 Thread Nerijus Baliunas
On Tue, 3 Feb 2015 18:07:57 +0400 Andrey Korolyov and...@xdel.ru wrote: Have you tried to disable turbo mode (assuming you have new enough CPU model) and fix frequency via frequency governor` settings? If it helps, it can be an ugly hack with pre-up/post-up libvirt actions, though you`d

[PATCH v5 0/6] KVM: nVMX: Enable nested apicv support

2015-02-03 Thread Wincy Van
v1 --- v2: Use spin lock to ensure vmcs12 is safe when doing nested posted interrupt delivery. 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

[PATCH v5 1/6] KVM: nVMX: Use hardware MSR bitmap

2015-02-03 Thread Wincy Van
Currently, if L1 enables MSR_BITMAP, we will emulate this feature, all of L2's msr access is intercepted by L0. Since many features like virtualize x2apic mode has a complicated logic and it is difficult for us to emulate, we should use hardware and merge the bitmap. This patch introduces

[PATCH v5 4/6] KVM: nVMX: Enable nested apic register virtualization

2015-02-03 Thread Wincy Van
We can reduce apic register virtualization cost with this feature, it is also a requirement for virtual interrupt delivery and posted interrupt processing. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c | 39 +++ 1 files changed, 35

[PATCH v5 5/6] KVM: nVMX: Enable nested virtual interrupt delivery

2015-02-03 Thread Wincy Van
With virtual interrupt delivery, the hardware prevent KVM from the low efficiency interrupt inject way. In nested vmx, it is a important feature, we can reduce much more nested-vmexit, especially in high throughput scenes. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c |

Re: [PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:29:54AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi MST, Paolo, Al Co, Here is -v3 for adding vhost/scsi ANY_LAYOUT + VERSION_1 host feature bit support. It adds a new vhost_virtqueue -handle_kick() callback to

[PATCH for-3.19] vhost/net: fix up num_buffers endian-ness

2015-02-03 Thread Michael S. Tsirkin
In virtio 1.0 mode, when mergeable buffers are enabled on a big-endian host, num_buffers wasn't byte-swapped correctly, so large incoming packets got corrupted. To fix, fill it in within hdr - this also makes sure it gets the correct type. Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:36AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- So this made me notice a bug in vhost introduced in 3.19. I sent a patch for

[PATCH v5 2/6] KVM: nVMX: Enable nested virtualize x2apic mode

2015-02-03 Thread Wincy Van
When L2 is using x2apic, we can use virtualize x2apic mode to gain higher performance, especially in apicv case. This patch also introduces nested_vmx_check_apicv_controls for the nested apicv patches. Signed-off-by: Wincy Van fanwenyi0...@gmail.com --- arch/x86/kvm/vmx.c | 114

[PATCH v5 3/6] KVM: nVMX: Make nested control MSRs per-cpu

2015-02-03 Thread Wincy Van
To enable nested apicv support, we need per-cpu vmx control MSRs: 1. If in-kernel irqchip is enabled, we can enable nested posted interrupt, we should set posted intr bit in the nested_vmx_pinbased_ctls_high. 2. If in-kernel irqchip is disabled, we can not enable nested posted

Re: [PATCH v2 16/18] vhost: don't bother with copying iovec in handle_tx()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:35AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Nice. Acked-by: Michael S.

[PATCH v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-02-03 Thread Wincy Van
If vcpu has a interrupt in vmx non-root mode, we will kick that vcpu to inject interrupt timely. With posted interrupt processing, the kick intr is not needed, and interrupts are fully taken care of by hardware. In nested vmx, this feature avoids much more vmexits than non-nested vmx. This patch

Re: [PATCH-v3 4/9] vhost/scsi: Add ANY_LAYOUT iov - sgl mapping prerequisites

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:29:58AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds ANY_LAYOUT prerequisites logic for accepting a set of protection + data payloads via iov_iter. Also includes helpers for calcuating SGLs + invoking

Re: [PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:30:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits required for virtio-scsi 1.0 spec layout requirements. Cc: Michael S. Tsirkin m...@redhat.com Cc:

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

2015-02-03 Thread David Vrabel
On 03/02/15 00:24, Luis R. Rodriguez wrote: As I waited I decided to finally install a 32-bit OS but I found now that as of Xen commit 5d1181a5 which went upstream as of xen 4.3 Xen no longer supports 32-bit for x86. You don't need a 32-bit hypervisor to run 32-bit dom0 or domUs. David --

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:36AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 79 ++---