[PATCH 3/6] kvm tools: Rework stdio/stdout handling to support redirection

2013-02-06 Thread Michael Ellerman
Currently if you redirect the output from "lkvm run" to a file then term_init() will fail, because it can't call the terminal ioctls. So check if stdin and stdout are ttys, if either is not then skip the rest of the terminal setup. Redirecting one but not the other is a little odd, but does work.

[PATCH 2/6] kvm tools: More error handling in the ipc code

2013-02-06 Thread Michael Ellerman
Add perror() calls to a couple of exit paths, to ease debugging. There are also two places where we print "Failed starting IPC thread", but one is really an epoll failure, so make that obvious. Signed-off-by: Michael Ellerman --- tools/kvm/kvm-ipc.c | 17 + 1 file changed, 13

[PATCH 4/6] kvm tools: powerpc: Fix buglet in xics_init() handling of nrcpus

2013-02-06 Thread Michael Ellerman
In xics_init() we set the maximum server to kvm->nrcpus, and then set the nr_servers using maximum server + 1. That is off by one, in the harmless direction. Simplify it to just set nr_servers = kvm->nrcpus. Signed-off-by: Michael Ellerman --- tools/kvm/powerpc/xics.c |5 + 1 file chan

[PATCH 1/6] kvm tools: Return error status in lkvm list

2013-02-06 Thread Michael Ellerman
Currently list always returns 0, even if there was an error. Instead have it accumulate any errors and return that. Signed-off-by: Michael Ellerman --- tools/kvm/builtin-list.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-list.c b/tools/kvm/b

[PATCH 6/6] kvm tools: powerpc: Only emit TB freq if it's non-zero

2013-02-06 Thread Michael Ellerman
The kernel can handle a missing timebase-frequency property much better than one that claims zero. Signed-off-by: Michael Ellerman --- tools/kvm/powerpc/kvm.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/kvm/powerpc/kvm.c b/tools/kvm/powerpc/kvm.c index dc9f89d

[PATCH 5/6] kvm tools: powerpc: Add cpu info entry for POWER8

2013-02-06 Thread Michael Ellerman
We should hard-code less of this stuff, but for now this works. Signed-off-by: Michael Ellerman --- tools/kvm/powerpc/cpu_info.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/kvm/powerpc/cpu_info.c b/tools/kvm/powerpc/cpu_info.c index 11ca14e..a9dfe39 100644 --- a/

Re: [PATCH] tcm_vhost: Multi-queue support

2013-02-06 Thread Nicholas A. Bellinger
On Wed, 2013-02-06 at 15:09 +0800, Asias He wrote: > On 02/06/2013 02:45 PM, Nicholas A. Bellinger wrote: > > On Wed, 2013-02-06 at 13:20 +0800, Asias He wrote: > >> This adds virtio-scsi multi-queue support to tcm_vhost. > >> > >> Guest side virtio-scsi multi-queue support can be found here: > >>

Re: [PATCH] tcm_vhost: Multi-queue support

2013-02-06 Thread Asias He
On 02/06/2013 04:39 PM, Nicholas A. Bellinger wrote: > On Wed, 2013-02-06 at 15:09 +0800, Asias He wrote: >> On 02/06/2013 02:45 PM, Nicholas A. Bellinger wrote: >>> On Wed, 2013-02-06 at 13:20 +0800, Asias He wrote: This adds virtio-scsi multi-queue support to tcm_vhost. Guest side

Re: [PATCH 1/6] kvm tools: Return error status in lkvm list

2013-02-06 Thread Pekka Enberg
Applied all patches, thanks a lot Michael! -- 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

Re: [PATCH] tcm_vhost: Multi-queue support

2013-02-06 Thread Paolo Bonzini
- Messaggio originale - > Da: "Asias He" > A: "Nicholas A. Bellinger" > Cc: "Paolo Bonzini" , "Stefan Hajnoczi" > , "Michael S. Tsirkin" > , "Rusty Russell" , > kvm@vger.kernel.org, > virtualizat...@lists.linux-foundation.org, target-de...@vger.kernel.org > Inviato: Mercoledì, 6 febbr

Re: [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest.

2013-02-06 Thread Gleb Natapov
On Wed, Nov 21, 2012 at 06:34:05PM -0800, Sanjay Lal wrote: > - Note that this file is statically linked with the rest of the host kernel > (KSEG0). This is because kernel modules are > loaded into mapped space on MIPS and we want to make sure that we don't get > any host kernel TLB faults while

[PATCH] kvm tools: arm: fix GIC #defines to match latest kvm code

2013-02-06 Thread Will Deacon
During the review process for the KVM ARM patches, the GIC device registration was subjected to some minor renaming, so update kvm tool appropriately. Signed-off-by: Will Deacon --- tools/kvm/arm/gic.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/kvm/a

Re: [PATCH] kvm tools: arm: fix GIC #defines to match latest kvm code

2013-02-06 Thread Pekka Enberg
On Wed, Feb 6, 2013 at 2:12 PM, Will Deacon wrote: > During the review process for the KVM ARM patches, the GIC device > registration was subjected to some minor renaming, so update kvm tool > appropriately. > > Signed-off-by: Will Deacon Applied, thanks Will! -- To unsubscribe from this list: s

Re: [PATCH v2 02/18] KVM/MIPS32: Arch specific KVM data structures.

2013-02-06 Thread Gleb Natapov
On Wed, Nov 21, 2012 at 06:34:00PM -0800, Sanjay Lal wrote: > +struct kvm_mips_callbacks { > + int (*handle_cop_unusable) (struct kvm_vcpu *vcpu); > + int (*handle_tlb_mod) (struct kvm_vcpu *vcpu); > + int (*handle_tlb_ld_miss) (struct kvm_vcpu *vcpu); > + int (*handle_tlb_st_miss)

Re: [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling.

2013-02-06 Thread Gleb Natapov
On Wed, Nov 21, 2012 at 06:34:07PM -0800, Sanjay Lal wrote: > > Signed-off-by: Sanjay Lal > --- > arch/mips/kvm/kvm_mips_stats.c | 81 > ++ > 1 file changed, 81 insertions(+) > create mode 100644 arch/mips/kvm/kvm_mips_stats.c > > diff --git a/arch/mips

Re: [PATCH v2 11/18] KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest.

2013-02-06 Thread Gleb Natapov
On Wed, Nov 21, 2012 at 06:34:09PM -0800, Sanjay Lal wrote: > +static gpa_t kvm_trap_emul_gva_to_gpa_cb(gva_t gva) > +{ > + gpa_t gpa; > + uint32_t kseg = KSEGX(gva); > + > + if ((kseg == CKSEG0) || (kseg == CKSEG1)) You seems to be using KVM_GUEST_KSEGX variants on gva in all other pla

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-06 Thread Glauber Costa
On 02/06/2013 01:49 AM, Michael Wolf wrote: > Add a helper routine to scheduler/core.c to allow the kvm module > to retrieve the cpu hardlimit settings. The values will be used > to set up a timer that is used to separate the consigned from the > steal time. Sorry: What is the business of a timer

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-02-06 Thread Paolo Bonzini
Il 16/01/2013 04:55, Wanlong Gao ha scritto: >>> >> Add hot cpu notifier to reset the request virtqueue affinity >>> >> when doing cpu hotplug. >> > >> > You need to be careful to get_online_cpus() and put_online_cpus() here, >> > so CPUs can't go up and down in the middle of operations. >> > >>

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-06 Thread Michael Wolf
On 02/06/2013 08:36 AM, Glauber Costa wrote: On 02/06/2013 01:49 AM, Michael Wolf wrote: Add a helper routine to scheduler/core.c to allow the kvm module to retrieve the cpu hardlimit settings. The values will be used to set up a timer that is used to separate the consigned from the steal time.

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Richard Weinberger
Hi, Am Tue, 05 Feb 2013 13:36:53 -0700 schrieb Alex Williamson : > > Ugh, the infamous and useless error 10. It could be anything. > > I've got a system with onboard usb3, let me see what windows does > > with it here first. Thanks, > > Well, I've got an Etron USB3 HBA and (un)fortunately it wo

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 19:09 +0100, Richard Weinberger wrote: > Hi, > > Am Tue, 05 Feb 2013 13:36:53 -0700 > schrieb Alex Williamson : > > > Ugh, the infamous and useless error 10. It could be anything. > > > I've got a system with onboard usb3, let me see what windows does > > > with it here firs

[PATCH 66/77] vfio: convert to idr_alloc()

2013-02-06 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. v2: Restore accidentally dropped "index 0" comment as suggested by Alex. Signed-off-by: Tejun Heo Acked-by: Alex Williamson Cc: kvm@vger.kernel.org --- drivers/vfio/vfio.c | 17 + 1 file changed, 1 insertion

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Richard Weinberger
Hi, Am Wed, 06 Feb 2013 11:47:20 -0700 schrieb Alex Williamson : > Does the card work with pci-assign or are both broken? It works with pci-assign. :-\ > Possible there's a bug in how we're managing the vector table and pba > here. Can you get to the monitor and run 'into mtree' and provide

Re: [PATCH 2/4] Expand the steal time msr to also contain the consigned time.

2013-02-06 Thread Rik van Riel
On 02/05/2013 04:49 PM, Michael Wolf wrote: Expand the steal time msr to also contain the consigned time. Signed-off-by: Michael Wolf --- arch/x86/include/asm/paravirt.h |4 ++-- arch/x86/include/asm/paravirt_types.h |2 +- arch/x86/kernel/kvm.c |7 ++-

Re: [PATCH 3/4] Add the code to send the consigned time from the host to the guest

2013-02-06 Thread Rik van Riel
On 02/05/2013 04:49 PM, Michael Wolf wrote: Change the paravirt calls that retrieve the steal-time information from the host. Add to it getting the consigned value as well as the steal time. Signed-off-by: Michael Wolf diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/ua

RE: [PATCH V5] target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

2013-02-06 Thread Auld, Will
Marcelo, Hi, I have been watching for this patch in the upstream but have not seen it yet. What version of QEMU should it be in? Thanks, Will > -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Friday, November 30, 2012 12:40 PM > To: Auld, Will > Cc: qemu

Re: DMAR faults from unrelated device when vfio is used

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 21:25 +0100, Richard Weinberger wrote: > Hi, > > Am Wed, 06 Feb 2013 11:47:20 -0700 > schrieb Alex Williamson : > > Does the card work with pci-assign or are both broken? > > It works with pci-assign. :-\ When you tested this, did you detach the group from vfio or use it a

Re: [PATCH 2/2] x86, apicv: Add Posted Interrupt supporting

2013-02-06 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 09:32:50AM +0200, Gleb Natapov wrote: > On Mon, Feb 04, 2013 at 06:47:30PM -0200, Marcelo Tosatti wrote: > > On Mon, Feb 04, 2013 at 05:59:52PM -0200, Marcelo Tosatti wrote: > > > On Mon, Feb 04, 2013 at 07:13:01PM +0200, Gleb Natapov wrote: > > > > On Mon, Feb 04, 2013 at 1

Re: [PATCH V5] target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

2013-02-06 Thread Marcelo Tosatti
On Wed, Feb 06, 2013 at 10:22:32PM +, Auld, Will wrote: > Marcelo, Hi, > > I have been watching for this patch in the upstream but have not seen it yet. > What version of QEMU should it be in? > > Thanks, > > Will Will, its in the GIT tree: https://github.com/qemu/qemu/commit/f28558d3d37ad

Re: [PATCH 2/2] x86, apicv: Add Posted Interrupt supporting

2013-02-06 Thread Marcelo Tosatti
On Wed, Feb 06, 2013 at 08:49:23PM -0200, Marcelo Tosatti wrote: > On Tue, Feb 05, 2013 at 09:32:50AM +0200, Gleb Natapov wrote: > > On Mon, Feb 04, 2013 at 06:47:30PM -0200, Marcelo Tosatti wrote: > > > On Mon, Feb 04, 2013 at 05:59:52PM -0200, Marcelo Tosatti wrote: > > > > On Mon, Feb 04, 2013 a

Re: [PATCH] tcm_vhost: Multi-queue support

2013-02-06 Thread Asias He
On 02/06/2013 07:59 PM, Paolo Bonzini wrote: > > > - Messaggio originale - >> Da: "Asias He" >> A: "Nicholas A. Bellinger" >> Cc: "Paolo Bonzini" , "Stefan Hajnoczi" >> , "Michael S. Tsirkin" >> , "Rusty Russell" , >> kvm@vger.kernel.org, >> virtualizat...@lists.linux-foundation.org,

Re: [PATCH v3] KVM: MMU: lazily drop large spte

2013-02-06 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:11:09PM +0800, Xiao Guangrong wrote: > Currently, kvm zaps the large spte if write-protected is needed, the later > read can fault on that spte. Actually, we can make the large spte readonly > instead of making them un-present, the page fault caused by read access can > b

Re: [PATCH 2/2] x86, apicv: Add Posted Interrupt supporting

2013-02-06 Thread Marcelo Tosatti
> According the SDM, software should not touch the IRR when target > > vcpu > >>> is > >>> running. Instead, use locked way to access PIR. So your solution may > >>> wrong. Then your apicv patches are broken, because they do exactly > >>> that. > >> Which code is broken? >