Re: [PATCHv4] KVM: optimize apic interrupt delivery

2012-09-14 Thread Michael S. Tsirkin
On Thu, Sep 13, 2012 at 05:19:24PM +0300, Gleb Natapov wrote: > Most interrupt are delivered to only one vcpu. Use pre-build tables to > find interrupt destination instead of looping through all vcpus. In case > of logical mode loop only through vcpus in a logical cluster irq is sent > to. > > Sig

[PATCH] KVM: Move some PPC ioctl definitions to the correct place

2012-09-14 Thread Paul Mackerras
This moves the definitions of KVM_CREATE_SPAPR_TCE and KVM_ALLOCATE_RMA in include/linux/kvm.h from the section listing the vcpu ioctls to the section listing VM ioctls, as these are both implemented and documented as VM ioctls. Fortunately there is no actual collision of ioctl numbers at this poi

Re: [PATCH 2/2] KVM: PPC: Book3S: Implement floating-point state get/set functions

2012-09-14 Thread Paul Mackerras
On Fri, Sep 14, 2012 at 03:50:06AM +0200, Alexander Graf wrote: > (plus your patch breaks abi compatibility with old user space) Well, only to the extent that the old ioctl code would now return an ENOTTY error rather than an EOPNOTSUPP error. Note that the ioctl code has the struct size embedde

Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory

2012-09-14 Thread Paul Mackerras
On Fri, Sep 14, 2012 at 01:32:23AM +0200, Alexander Graf wrote: > > On 12.09.2012, at 02:34, Paul Mackerras wrote: > > > This series of 3 patches makes it possible for guests to allocate > > whatever size of HPT they need from linear memory preallocated at > > boot, rather than being restricted t

Re: [PATCH 0/5] vhost-scsi: Add support for host virtualized target

2012-09-14 Thread Paolo Bonzini
Il 13/09/2012 22:12, Nicholas A. Bellinger ha scritto: >> > Are you still seeing the performance degradation discussed in the thread >> > >> > "vhost-scsi port to v1.1.0 + MSI-X performance regression" >> > > So the performance regression reported here with QEMU v1.2-rc + > virtio-scsi ended up

RE: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-14 Thread Hao, Xudong
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Avi Kivity > Sent: Friday, September 14, 2012 12:39 AM > To: Hao, Xudong > Cc: kvm@vger.kernel.org; Zhang, Xiantao > Subject: Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU >

RE: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-14 Thread Hao, Xudong
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Marcelo Tosatti > Sent: Friday, September 14, 2012 12:29 AM > To: Hao, Xudong; Avi Kivity > Cc: kvm@vger.kernel.org; Zhang, Xiantao > Subject: Re: [PATCH v3] kvm/fpu: Enable fully eager

Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-14 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 08:54:40AM +, Hao, Xudong wrote: > > -Original Message- > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > > Behalf Of Marcelo Tosatti > > Sent: Friday, September 14, 2012 12:29 AM > > To: Hao, Xudong; Avi Kivity > > Cc: kvm@vger.kernel.o

[PATCH v2 1/5] KVM: MMU: release noslot pfn on the fail path properly

2012-09-14 Thread Xiao Guangrong
We can not directly call kvm_release_pfn_clean to release the pfn since we can meet noslot pfn which is used to cache mmio info into spte Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |6 -- arch/x86/kvm/paging_tmpl.h |6 -- 2 files changed, 8 insertions(+), 4 dele

[PATCH v2 0/5] KVM: MMU: fix release pfn in mmu code

2012-09-14 Thread Xiao Guangrong
Release pfn in the mmu code is little special for we allow no-slot pfn go to spte walk on page fault path, that means, on page fault fail path, we can not directly call kvm_release_pfn_clean. This patchset fixes the bug which release no-slot pfn on fail path and clean up all the paths where kvm_re

[PATCH v2 2/5] KVM: MMU: do not release pfn in mmu_set_spte

2012-09-14 Thread Xiao Guangrong
It helps us to cleanup release pfn in the later patches Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 29 ++--- arch/x86/kvm/paging_tmpl.h | 18 +++--- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/a

[PATCH v2 3/5] KVM: MMU: cleanup FNAME(page_fault)

2012-09-14 Thread Xiao Guangrong
Let it return emulate state instead of spte like __direct_map Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h | 28 ++-- 1 files changed, 10 insertions(+), 18 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 92f466c..

[PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-14 Thread Xiao Guangrong
Wrap the common operations into these two functions Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 53 +++ arch/x86/kvm/paging_tmpl.h | 16 + 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/arch/x86/kvm/mmu.

[PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-09-14 Thread Xiao Guangrong
The only different thing between FNAME(update_pte) and FNAME(pte_prefetch) is that the former is allowed to prefetch gfn from dirty logged slot, so introduce a common function to prefetch spte Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h | 50 ---

Re: [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-09-14 Thread Xiao Guangrong
On 09/14/2012 05:59 PM, Xiao Guangrong wrote: > + return FNAME(prefetch_gpte)(vcpu, sp, spte, gptep[i], true); Sorry, this was wrong. Update this patch. [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte) The only different thing between FNAME(update_pte) and FNAME(pte_prefetch)

Re: [PATCHv4] KVM: optimize apic interrupt delivery

2012-09-14 Thread Marcelo Tosatti
On Thu, Sep 13, 2012 at 05:19:24PM +0300, Gleb Natapov wrote: > Most interrupt are delivered to only one vcpu. Use pre-build tables to > find interrupt destination instead of looping through all vcpus. In case > of logical mode loop only through vcpus in a logical cluster irq is sent > to. > > Si

Re: [PATCH v2 3/4] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-14 Thread Marcelo Tosatti
On Thu, Sep 13, 2012 at 02:43:55PM -0400, Don Slutz wrote: > On 09/12/12 13:55, Marcelo Tosatti wrote: > >The problem with integrating this is that it has little or > >no assurance from documentation. The Linux kernel source is a good > >source, then say "accordingly to VMWare guest support code in

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-14 Thread David Ahern
On 9/13/12 8:56 PM, Xiao Guangrong wrote: We'd better keep the record/report function, sometimes, we can only get perf.data from the customers whose machine can not be reached for us. Especially, other tracepoints are also interesting for us when the customers encounter the performance issue,

Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory

2012-09-14 Thread Alexander Graf
On 14.09.2012, at 10:11, Paul Mackerras wrote: > On Fri, Sep 14, 2012 at 01:32:23AM +0200, Alexander Graf wrote: >> >> On 12.09.2012, at 02:34, Paul Mackerras wrote: >> >>> This series of 3 patches makes it possible for guests to allocate >>> whatever size of HPT they need from linear memory pr

Re: [PATCH 4/5] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-09-14 Thread Michael S. Tsirkin
On Fri, Sep 14, 2012 at 08:45:11AM +0200, Paolo Bonzini wrote: > Il 14/09/2012 00:27, Nicholas A. Bellinger ha scritto: > > *) Keep vhost-scsi as a backend to virtio-scsi-pci > > > > - Reduces duplicated code amongst multiple virtio-scsi backends. > > > > - Follows the split for what existi

Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory

2012-09-14 Thread Paul Mackerras
On Fri, Sep 14, 2012 at 02:13:37PM +0200, Alexander Graf wrote: > So do you think it makes more sense to reimplement a large page allocator in > KVM, as this patch set does, or improve CMA to get us really big chunks of > linear memory? > > Let's ask the Linux mm guys too :). Maybe they have an

Re: [PATCH 4/5] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-09-14 Thread Michael S. Tsirkin
On Tue, Sep 11, 2012 at 08:46:34AM -0500, Anthony Liguori wrote: > On 09/10/2012 01:24 AM, Michael S. Tsirkin wrote: > >On Mon, Sep 10, 2012 at 08:16:54AM +0200, Paolo Bonzini wrote: > >>Il 09/09/2012 00:40, Michael S. Tsirkin ha scritto: > >>>On Fri, Sep 07, 2012 at 06:00:50PM +0200, Paolo Bonzini

Re: [PATCH 0/3] KVM: PPC: Book3S HV: More flexible allocator for linear memory

2012-09-14 Thread Alexander Graf
On 14.09.2012, at 14:45, Paul Mackerras wrote: > On Fri, Sep 14, 2012 at 02:13:37PM +0200, Alexander Graf wrote: > >> So do you think it makes more sense to reimplement a large page allocator in >> KVM, as this patch set does, or improve CMA to get us really big chunks of >> linear memory? >>

RE: [PATCH 1/5]KVM: x86, apicv: add APICv register virtualization support

2012-09-14 Thread Li, Jiongxi
Sorry for the late response > -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Friday, September 07, 2012 12:02 AM > To: Li, Jiongxi > Cc: kvm@vger.kernel.org > Subject: Re: [PATCH 1/5]KVM: x86, apicv: add APICv register virtualization > support > > On 09/05/2012 08:

RE: [PATCH 0/5]KVM:Enable APIC-Register Virtualization and Virtual-interrupt delivery

2012-09-14 Thread Li, Jiongxi
Sorry for the late response. > -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Thursday, September 06, 2012 11:45 PM > To: Li, Jiongxi > Cc: kvm@vger.kernel.org > Subject: Re: [PATCH 0/5]KVM:Enable APIC-Register Virtualization and > Virtual-interrupt delivery > > On

RE: [PATCH 2/5]KVM:x86, apicv: adjust for virtual interrupt delivery

2012-09-14 Thread Li, Jiongxi
Sorry for the late response > -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Friday, September 07, 2012 12:22 AM > To: Li, Jiongxi > Cc: kvm@vger.kernel.org > Subject: Re: [PATCH 2/5]KVM:x86, apicv: adjust for virtual interrupt delivery > > On 09/05/2012 08:41 AM,

RE: [PATCH 3/5]KVM:x86, apicv: enable virtual interrupt delivery for VMX

2012-09-14 Thread Li, Jiongxi
Sorry for the late response > -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Friday, September 07, 2012 12:30 AM > To: Li, Jiongxi > Cc: kvm@vger.kernel.org > Subject: Re: [PATCH 3/5]KVM:x86, apicv: enable virtual interrupt delivery for > VMX > > On 09/05/2012 08:4

Re: [PATCH] KVM: Move some PPC ioctl definitions to the correct place

2012-09-14 Thread Alexander Graf
On 14.09.2012, at 09:44, Paul Mackerras wrote: > This moves the definitions of KVM_CREATE_SPAPR_TCE and > KVM_ALLOCATE_RMA in include/linux/kvm.h from the section listing the > vcpu ioctls to the section listing VM ioctls, as these are both > implemented and documented as VM ioctls. > > Fortunat

RE: [PATCH 4/5]KVM:x86, apicv: add interface for poking EOI exit bitmap

2012-09-14 Thread Li, Jiongxi
Sorry for the late response > -Original Message- > From: Avi Kivity [mailto:a...@redhat.com] > Sent: Friday, September 07, 2012 12:38 AM > To: Li, Jiongxi > Cc: kvm@vger.kernel.org > Subject: Re: [PATCH 4/5]KVM:x86, apicv: add interface for poking EOI exit > bitmap > > On 09/05/2012 08:41

[Bug 47451] need to re-load driver in guest to make a hot-plug VF work

2012-09-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=47451 Alex Williamson changed: What|Removed |Added CC||alex.william...@redhat.com --- Comm

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-14 Thread Andrew Jones
On Thu, Sep 13, 2012 at 04:30:58PM -0500, Andrew Theurer wrote: > On Thu, 2012-09-13 at 17:18 +0530, Raghavendra K T wrote: > > * Andrew Theurer [2012-09-11 13:27:41]: > > > > > On Tue, 2012-09-11 at 11:38 +0530, Raghavendra K T wrote: > > > > On 09/11/2012 01:42 AM, Andrew Theurer wrote: > > > >

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-14 Thread Konrad Rzeszutek Wilk
> The concern I have is that even though we have gone through changes to > help reduce the candidate vcpus we yield to, we still have a very poor > idea of which vcpu really needs to run. The result is high cpu usage in > the get_pid_task and still some contention in the double runqueue lock. > To

Re: [PATCHSET] kthread_worker: reimplement flush_kthread_work() to allow freeing during execution

2012-09-14 Thread Colin Cross
On Thu, Jul 19, 2012 at 2:15 PM, Tejun Heo wrote: > Hello, > > kthread_worker was introduced together with concurrency managed > workqueue to serve workqueue users which need a special dedicated > worker - e.g. RT scheduling. This is minimal queue / flush / flush > all iterface on top of kthread

[PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-14 Thread Alex Williamson
Same goodness as v4, plus: - Addressed comments by Blue Swirl (thanks for the review) (hopefully w/o breaking anything wrt slow bar endianness) - Fixed a couple checkpatch warnings that snuck in BTW, this works fine with Jason's Q35 patches though we will need to add INTx routing support for

[PATCH v5 2/4] Update Linux kernel headers

2012-09-14 Thread Alex Williamson
Based on Linux as of 1a95620. Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h | 368 1 file changed, 368 insertions(+) create mode 100644 linux-headers/linux/vfio.h diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h

[PATCH v5 4/4] vfio: Enable vfio-pci and mark supported

2012-09-14 Thread Alex Williamson
Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson --- MAINT

Re: [PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-14 Thread Alex Williamson
On Fri, 2012-09-14 at 17:01 -0600, Alex Williamson wrote: > Same goodness as v4, plus: > > - Addressed comments by Blue Swirl (thanks for the review) >(hopefully w/o breaking anything wrt slow bar endianness) > - Fixed a couple checkpatch warnings that snuck in > > BTW, this works fine with

[PATCH v5 1/4] Update kernel header script to include vfio

2012-09-14 Thread Alex Williamson
Signed-off-by: Alex Williamson --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index a639c5b..605102f 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-lin

Re: [PATCH RFC 1/1] kvm: Use vcpu_id as pivot instead of last boosted vcpu in PLE handler

2012-09-14 Thread Raghavendra K T
On 09/02/2012 09:59 PM, Rik van Riel wrote: On 09/02/2012 06:12 AM, Gleb Natapov wrote: On Thu, Aug 30, 2012 at 12:51:01AM +0530, Raghavendra K T wrote: The idea of starting from next vcpu (source of yield_to + 1) seem to work well for overcomitted guest rather than using last boosted vcpu. We