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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c |

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 vhost_scsi_map_to_sgl() with a known number of iovecs. Required by ANY_LAYOUT processing when struct iovec

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c | 9 +++-- 1 file changed, 7 inserti

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 the usage consistent. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 drop the pre virtio 1.0 logic in vhost_scsi_handle_vq() and associated helpers. Cc: Michael S. Tsir

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 tcm_vhost_cmd descriptor by walking both outgoing + incoming iovecs using iov_iter, assuming the layout of o

[PATCH-v3 2/9] vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON() getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has not been initialized by target_submit_cmd_map_sgls(). It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 existing code to save cmd->tvc_resp_iov instead of the first single iovec base pointer from &vq->iov[out]

[PATCH-v3 3/9] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio iovec ptr + len when determing pages_nr. This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow the same parameters as well. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nic

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

2015-02-02 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 determine the start of protection and data payloads iovecs past starting virtio-scsi request and response

[PATCHv2] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-02-02 Thread David Gibson
On POWER, storage caching is usually configured via the MMU - attributes such as cache-inhibited are stored in the TLB and the hashed page table. This makes correctly performing cache inhibited IO accesses awkward when the MMU is turned off (real mode). Some CPU models provide special registers t

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

2015-02-02 Thread Wincy Van
On Tue, Feb 3, 2015 at 9:21 AM, Zhang, Yang Z wrote: > Paolo Bonzini wrote on 2015-02-03: >> >> >> On 02/02/2015 16:33, Wincy Van wrote: >>> static void vmx_accomp_nested_posted_intr(struct kvm_vcpu *vcpu) { >>> struct vcpu_vmx *vmx = to_vmx(vcpu); >>> >>> if (is_guest_mode(vcpu) &

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

2015-02-02 Thread Yijing Wang
> 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: > It's more clear, thanks for your improvement very much! Thanks! Yijing. > > commit 6a878e5085fe97bd1e222b7883a1b815fcbbe4ed > Author: Yijing Wang > Date:

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

2015-02-02 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2015-02-03: > > > On 02/02/2015 16:33, Wincy Van wrote: >> static void vmx_accomp_nested_posted_intr(struct kvm_vcpu *vcpu) { >> struct vcpu_vmx *vmx = to_vmx(vcpu); >> >> if (is_guest_mode(vcpu) && >> vmx->nested.posted_intr_nv != -1 &&

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

2015-02-02 Thread Nicholas A. Bellinger
Hi Al, On Mon, 2015-02-02 at 07:59 +, Al Viro wrote: > From: Al Viro > > 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 > Cc: Nicholas A. Bellinge

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

2015-02-02 Thread Luis R. Rodriguez
On Thu, Jan 29, 2015 at 12:35 PM, Luis R. Rodriguez wrote: > 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, wrote: >> > >> > Even if David told you this would be acceptable, I have to question >> > an abstract m

Re: [target:for-next 16/21] drivers/vhost/scsi.c:1081:5: sparse: symbol 'vhost_skip_iovec_bytes' was not declared. Should it be static?

2015-02-02 Thread Nicholas A. Bellinger
On Mon, 2015-02-02 at 14:25 +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git > for-next > head: 2936f1d4f3e8247bd519feba7892371d5e4c6603 > commit: 105acf608f25d5e0d9fef669299a5438b7b114ee [16/21] vhost/scsi: Add > ANY_LAYOUT vhost_sk

Re: [PATCH 0/8] vhost/scsi: Add ANY_LAYOUT support

2015-02-02 Thread Nicholas A. Bellinger
On Mon, 2015-02-02 at 00:15 -0800, Christoph Hellwig wrote: > Hi Nic, > > Al has been rewriting the vhost code to use iov_iter primitives, > can you please rebase it on top of that istead of using the obsolete > infrastructure? > Yep, already done with the copy_[from,to]_iter() conversion in vho

revisiting speech recognition in a Windows guest on KVM

2015-02-02 Thread Eric S. Johansson
Apologies for taking so long to revisit this topic but well, new hardware, new software, new microphone and, you know, life… Summary: I have unable to forward my USB microphone connection to a Windows guest and I could use a little bit of assistance pointing me in the right direction. Long s

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

2015-02-02 Thread Luis R. Rodriguez
On Mon, Feb 2, 2015 at 1:13 PM, Michal Marek wrote: > Dne 30.1.2015 v 19:25 Luis R. Rodriguez napsal(a): >> On Fri, Jan 30, 2015 at 2:49 AM, Michal Marek wrote: >>> On 2015-01-29 21:47, Paul Bolle wrote: [Added Michal. Removed Yann.] On Thu, 2015-01-29 at 12:38 -0800, Luis R. Rodri

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

2015-02-02 Thread Michal Marek
Dne 30.1.2015 v 19:25 Luis R. Rodriguez napsal(a): > On Fri, Jan 30, 2015 at 2:49 AM, Michal Marek wrote: >> On 2015-01-29 21:47, Paul Bolle wrote: >>> [Added Michal. Removed Yann.] >>> >>> On Thu, 2015-01-29 at 12:38 -0800, Luis R. Rodriguez wrote: On Tue, Jan 27, 2015 at 12:00 PM, Luis R. R

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

2015-02-02 Thread Bjorn Helgaas
[+cc Jan] On Thu, Jan 29, 2015 at 11:54:43AM +0800, Yijing Wang wrote: > Sometimes, a pci bridge device BAR was not assigned > properly. After we call pci_bus_assign_resources(), the > resource of the BAR would be reseted. So if we try to > enable msix for this device, it will map a invalid > reso

Re: [patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 18:44, Marcelo Tosatti wrote: > > Nicer indeed. It would be good to know what bug made you do this, though. > > kvm-unit-test tscdeadline-latency shows negative delta. > > Do you want me to resend with the modified changelog? No, it's okay. Thanks, Paolo -- To unsubscribe from

Re: [patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v

2015-02-02 Thread Marcelo Tosatti
On Mon, Feb 02, 2015 at 06:37:08PM +0100, Paolo Bonzini wrote: > > > On 02/02/2015 18:26, Marcelo Tosatti wrote: > > See patches for details. > > Nicer indeed. It would be good to know what bug made you do this, though. > > Paolo kvm-unit-test tscdeadline-latency shows negative delta. Do you

Re: [patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 18:26, Marcelo Tosatti wrote: > See patches for details. Nicer indeed. It would be good to know what bug made you do this, though. Paolo -- 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

[patch 0/2] Fix busy-spin of lapic_timer_int_injected with APIC-v

2015-02-02 Thread Marcelo Tosatti
See patches for details. -- 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 http://vger.kernel.org/majordomo-info.html

[patch 1/2] KVM: x86: fix lapic_timer_int_injected with APIC-v

2015-02-02 Thread Marcelo Tosatti
With APICv, LAPIC timer interrupt is always delivered via IRR: apic_find_highest_irr syncs PIR to IRR. Signed-off-by: Marcelo Tosatti --- arch/x86/kvm/lapic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Index: kvm/arch/x86/kvm/lapic.c ==

[patch 2/2] KVM: x86: revert "add method to test PIR bitmap vector"

2015-02-02 Thread Marcelo Tosatti
Revert 7c6a98dfa1ba9dc64a62e73624ecea9995736bbd, given that testing PIR is not necessary anymore. Signed-off-by: Marcelo Tosatti --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/vmx.c | 14 -- 2 files changed, 15 deletions(-) Index: kvm/arch/x86/include/as

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

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 16:33, Wincy Van wrote: > static void vmx_accomp_nested_posted_intr(struct kvm_vcpu *vcpu) > { > struct vcpu_vmx *vmx = to_vmx(vcpu); > > if (is_guest_mode(vcpu) && > vmx->nested.posted_intr_nv != -1 && > pi_test_on(vmx->nested.pi_desc)) >

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

2015-02-02 Thread Wincy Van
On Mon, Feb 2, 2015 at 7:03 PM, Paolo Bonzini wrote: > > > On 28/01/2015 17:02, Wincy Van wrote: >> +static int vmx_deliver_nested_posted_interrupt(struct kvm_vcpu *vcpu, >> + int vector) >> +{ >> + if (is_guest_mode(vcpu) && >> + vecto

Re: [PATCH v3 17/18] arm/arm64: add smp_boot_secondary

2015-02-02 Thread Andrew Jones
On Mon, Feb 02, 2015 at 01:29:59PM +0100, Andrew Jones wrote: > Add a common entry point, present/online cpu masks, and > smp_boot_secondary() to support booting secondary cpus. > Adds a bit more PSCI API that we need too. We also > adjust THREAD_START_SP for arm to make some room for > exception s

[PATCH v4 17/18] arm/arm64: add smp_boot_secondary

2015-02-02 Thread Andrew Jones
Add a common entry point, present/online cpu masks, and smp_boot_secondary() to support booting secondary cpus. Adds a bit more PSCI API that we need too. We also adjust THREAD_START_SP for arm to make some room for exception stacks. Signed-off-by: Andrew Jones --- v4: - Fix yet another bug..

Re: [PATCH 2/8] KVM: x86: cleanup kvm_apic_match_*()

2015-02-02 Thread Radim Krčmář
2015-02-02 15:28+0100, Paolo Bonzini: > > > On 02/02/2015 15:26, Radim Krčmář wrote: > >>> > > + return ((logical_id >> 4) == (mda >> 4)) > >>> > > +&& (logical_id & mda & 0xf); > > was merged as > > > > + return ((logical_id >> 4) == (mda >> 4)) > > +

Re: [PATCH 2/8] KVM: x86: cleanup kvm_apic_match_*()

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 15:26, Radim Krčmář wrote: >>> > > + return ((logical_id >> 4) == (mda >> 4)) >>> > > + && (logical_id & mda & 0xf); > was merged as > > + return ((logical_id >> 4) == (mda >> 4)) > +&& (logical_id & mda & 0xf) != 0

Re: [PATCH 2/8] KVM: x86: cleanup kvm_apic_match_*()

2015-02-02 Thread Radim Krčmář
2015-02-02 15:26+0100, Radim Krčmář: > 2015-01-30 09:52+0100, Paolo Bonzini: > + return ((logical_id >> 4) == (mda >> 4)) > +&& (logical_id & mda & 0xf) != 0; > > but it has to be parenthesized ('&&' has lower precedence than '!='). No, my bad, I understood it now.

Re: [PATCH 2/8] KVM: x86: cleanup kvm_apic_match_*()

2015-02-02 Thread Radim Krčmář
2015-01-30 09:52+0100, Paolo Bonzini: > On 29/01/2015 22:48, Radim Krčmář wrote: > > The majority of this patch turns > > result = 0; if (CODE) result = 1; return result; > > into > > return CODE; > > because we return bool now. > > Added a bunch of "!= 0" to avoid automagic conversion to bool

[PATCH v3 17/18] arm/arm64: add smp_boot_secondary

2015-02-02 Thread Andrew Jones
Add a common entry point, present/online cpu masks, and smp_boot_secondary() to support booting secondary cpus. Adds a bit more PSCI API that we need too. We also adjust THREAD_START_SP for arm to make some room for exception stacks. Signed-off-by: Andrew Jones --- v3: - fix bug in cstart.S:s

Re: [PATCH v2 17/18] arm/arm64: add smp_boot_secondary

2015-02-02 Thread Andrew Jones
On Mon, Feb 02, 2015 at 11:23:28AM +0100, Andrew Jones wrote: > Add a common entry point, present/online cpu masks, and > smp_boot_secondary() to support booting secondary cpus. > Adds a bit more PSCI API that we need too. We also > adjust THREAD_START_SP for arm to make some room for > exception s

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

2015-02-02 Thread Paolo Bonzini
On 28/01/2015 17:02, Wincy Van wrote: > +static int vmx_deliver_nested_posted_interrupt(struct kvm_vcpu *vcpu, > + int vector) > +{ > + if (is_guest_mode(vcpu) && > + vector == to_vmx(vcpu)->nested.posted_intr_nv && > + vcpu-

[PATCH v2 17/18] arm/arm64: add smp_boot_secondary

2015-02-02 Thread Andrew Jones
Add a common entry point, present/online cpu masks, and smp_boot_secondary() to support booting secondary cpus. Adds a bit more PSCI API that we need too. We also adjust THREAD_START_SP for arm to make some room for exception stacks. Signed-off-by: Andrew Jones --- v2: - Remove secondary_data

Re: [PATCH 1/4] stubs for xsavec support

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 08:04, Jan Kiszka wrote: >> > +#if X86_FEATURE_XSAVEOPT < 10 * 32 >> > +#undef X86_FEATURE_XSAVEOPT >> > +#endif >> > +#define X86_FEATURE_XSAVEOPT (10*32+0) /* XSAVEOPT instruction */ > This causes redefinition warnings if the condition is not met. Was the > plan to put the de

Re: [PATCH] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-02-02 Thread David Gibson
On Mon, Feb 02, 2015 at 09:59:16AM +0100, Paolo Bonzini wrote: > > > On 02/02/2015 08:45, David Gibson wrote: > > + case H_LOGICAL_CI_LOAD: > > + ret = kvmppc_h_logical_ci_load(vcpu); > > + if (ret == H_TOO_HARD) { > > + printk("Punting H_LOGICAL_CI_LOAD\n"

Re: [PATCH] kvmppc: Implement H_LOGICAL_CI_{LOAD,STORE} in KVM

2015-02-02 Thread Paolo Bonzini
On 02/02/2015 08:45, David Gibson wrote: > + case H_LOGICAL_CI_LOAD: > + ret = kvmppc_h_logical_ci_load(vcpu); > + if (ret == H_TOO_HARD) { > + printk("Punting H_LOGICAL_CI_LOAD\n"); > + return RESUME_HOST; > + } > +

Re: [PATCH 0/8] vhost/scsi: Add ANY_LAYOUT support

2015-02-02 Thread Christoph Hellwig
Hi Nic, Al has been rewriting the vhost code to use iov_iter primitives, can you please rebase it on top of that istead of using the obsolete infrastructure? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info

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

2015-02-02 Thread Al Viro
From: Al Viro Cc: Michael S. Tsirkin Cc: kvm@vger.kernel.org Signed-off-by: Al Viro --- drivers/vhost/vhost.c | 6 -- include/linux/uio.h | 1 - lib/iovec.c | 25 - 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/drivers/vhost/vhost.c b

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

2015-02-02 Thread Al Viro
From: Al Viro 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 Cc: Nicholas A. Bellinger Cc: kvm@vger.kernel.org Signed-off-by: Al Viro --- drivers/vhost/scsi.c |

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

2015-02-02 Thread Al Viro
From: Al Viro Cc: Michael S. Tsirkin Cc: kvm@vger.kernel.org Signed-off-by: Al Viro --- drivers/vhost/net.c | 79 ++--- include/linux/uio.h | 3 -- lib/iovec.c | 26 -- 3 files changed, 20 insertions(+), 88 deletions(-)

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

2015-02-02 Thread Al Viro
From: Al Viro just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin Cc: kvm@vger.kernel.org Signed-off-by: Al Viro --- drivers/vhost/net.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 6906f76