[PATCH v2] Add PCID/INVPCID test

2012-05-17 Thread Mao, Junjie
Add unit test for basic functionality of PCID/INVPCID feature exposing in kvm. Changes from v1: Hard code 'invpcid' instruction Signed-off-by: Junjie Mao --- config-x86-common.mak |2 + config-x86_64.mak |3 +- x86/README|1 + x86/pcid.c| 185 +++

[PATCH v3] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-17 Thread Mao, Junjie
This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached information when software switches to a different linear address space. Refer

Re: [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-17 Thread Alexey Kardashevskiy
Alexander, Is that any better? :) @@ -1779,11 +1779,29 @@ static void pci_del_option_rom(PCIDevice *pdev) * in pci config space */ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t offset, uint8_t size) { -uint8_t *config; +uint8_t *config, exist

Re: [PATCH] kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNC

2012-05-17 Thread Marcelo Tosatti
On Wed, May 16, 2012 at 02:31:37PM +0300, Avi Kivity wrote: > Signed-off-by: Avi Kivity > --- > scripts/kvm/vmxcap | 13 + > 1 file changed, 13 insertions(+) Applied to uq/master, thanks. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to

Re: [PATCH 4/4] Enabling Access bit when doing memory swapping

2012-05-17 Thread Marcelo Tosatti
On Wed, May 16, 2012 at 09:12:30AM +0800, Xudong Hao wrote: > Enabling Access bit when doing memory swapping. > > Signed-off-by: Haitao Shan > Signed-off-by: Xudong Hao > --- > arch/x86/kvm/mmu.c | 13 +++-- > arch/x86/kvm/vmx.c |6 -- > 2 files changed, 11 insertions(+), 8 de

Re: [PATCH 0/4] qemu-kvm: Removal of unneeded deviations from upstream

2012-05-17 Thread Marcelo Tosatti
On Tue, May 15, 2012 at 09:57:20AM -0300, Jan Kiszka wrote: > Removes two unused KVM core functions and some unneeded diffs in > msi/msix.c. > > Jan Kiszka (4): > qemu-kvm: Drop unused kvm_clear_gsi_routes > qemu-kvm: Drop unused kvm_del_irq_route > qemu-kvm: msi: Drop redundant support test

Re: FW: Descriptions about KVM performance counters

2012-05-17 Thread Marcelo Tosatti
There is some brief documentation on top of each trace entry definition in the arch/x86/kvm/trace.h file, in the kernel source code. http://git.kernel.org/?p=virt/kvm/kvm.git;a=blob;f=arch/x86/kvm/trace.h;h=911d2641f14c5cba355abc25e00f38f07ced1df9;hb=refs/heads/next-candidate There is an exact m

Re: [PATCH 0/4] kvm-s390: feature patches

2012-05-17 Thread Marcelo Tosatti
On Tue, May 15, 2012 at 02:15:24PM +0200, Christian Borntraeger wrote: > Avi, Marcelo, > > here are 4 feature patches for kvm-s390. One patch deals with > the memory management of kvm and allows MAP_PRIVATE. The other > patches implement user space access for some missing registers > via the ONE_

Re: [PATCH kvm-unit-tests] Add PCID/INVPCID test

2012-05-17 Thread Marcelo Tosatti
On Mon, May 14, 2012 at 06:25:42AM +, Mao, Junjie wrote: > Add unit test for basic functionality of PCID/INVPCID feature exposing in kvm. > > Signed-off-by: Junjie Mao > --- > config-x86-common.mak |2 + > config-x86_64.mak |3 +- > x86/README|1 + > x86/pcid.c

Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-17 Thread Scott Wood
On 05/17/2012 04:03 PM, Alexander Graf wrote: > > On 17.05.2012, at 22:58, Scott Wood wrote: > >> On 05/17/2012 03:56 PM, Alexander Graf wrote: >>> >>> On 17.05.2012, at 18:37, Scott Wood wrote: >>> On 05/16/2012 08:25 AM, Alexander Graf wrote: > When reinjecting host interrupt requests

Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-17 Thread Alexander Graf
On 17.05.2012, at 22:58, Scott Wood wrote: > On 05/17/2012 03:56 PM, Alexander Graf wrote: >> >> On 17.05.2012, at 18:37, Scott Wood wrote: >> >>> On 05/16/2012 08:25 AM, Alexander Graf wrote: When reinjecting host interrupt requests in the exit handler code, let's also tell the inter

Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-17 Thread Scott Wood
On 05/17/2012 03:56 PM, Alexander Graf wrote: > > On 17.05.2012, at 18:37, Scott Wood wrote: > >> On 05/16/2012 08:25 AM, Alexander Graf wrote: >>> When reinjecting host interrupt requests in the exit handler code, >>> let's also tell the interrupt handler which interrupt number we're >>> coming

[Bug 42980] BUG in gfn_to_pfn_prot

2012-05-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42980 --- Comment #9 from Luke-Jr 2012-05-17 20:58:50 --- The while/ping thing doesn't reproduce it even before the patch. :( -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because:

Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-17 Thread Alexander Graf
On 17.05.2012, at 18:37, Scott Wood wrote: > On 05/16/2012 08:25 AM, Alexander Graf wrote: >> When reinjecting host interrupt requests in the exit handler code, >> let's also tell the interrupt handler which interrupt number we're >> coming from. >> >> Signed-off-by: Alexander Graf >> --- >> ar

Re: Guest hangs after some stress tests

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 10:14:35PM +0200, Sasha Levin wrote: > On Thu, May 17, 2012 at 10:05 PM, Gleb Natapov wrote: > > On Thu, May 17, 2012 at 09:49:08PM +0200, Sasha Levin wrote: > >> Hi all, > >> > >> I've observed a guest hang after putting a little stress testing on > >> it. It basically han

Re: Guest hangs after some stress tests

2012-05-17 Thread Sasha Levin
On Thu, May 17, 2012 at 10:05 PM, Gleb Natapov wrote: > On Thu, May 17, 2012 at 09:49:08PM +0200, Sasha Levin wrote: >> Hi all, >> >> I've observed a guest hang after putting a little stress testing on >> it. It basically hangs in ~10 secs after running several trinity >> instances inside a KVM to

Re: Guest hangs after some stress tests

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 09:49:08PM +0200, Sasha Levin wrote: > Hi all, > > I've observed a guest hang after putting a little stress testing on > it. It basically hangs in ~10 secs after running several trinity > instances inside a KVM tools guest. > And do you set hypervisor bit in KVM tool? > T

Guest hangs after some stress tests

2012-05-17 Thread Sasha Levin
Hi all, I've observed a guest hang after putting a little stress testing on it. It basically hangs in ~10 secs after running several trinity instances inside a KVM tools guest. The hang is easy to describe and reproduce: 1. No userspace exits observed 2. kvm_stat looks as follows (with all other

Re: [Qemu-devel] Memory Tracking API

2012-05-17 Thread Richard W.M. Jones
On Thu, May 17, 2012 at 11:36:24PM +0530, Jaspal wrote: > Hi , > > Is it possible to keep a count of reads / writes taking place in a > vm using qemu ( using kvm as hypervisor ) ? Is there a api ( or any > patch ) for it ? Memory reads and writes is surely going to generate a huge amount of outpu

Memory Tracking API

2012-05-17 Thread Jaspal
Hi , Is it possible to keep a count of reads / writes taking place in a vm using qemu ( using kvm as hypervisor ) ? Is there a api ( or any patch ) for it ? Thanks , Jaspal -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org

Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Thu, May 17, 2012 at 10:56:36AM -0600, Eric Blake wrote: > On 05/17/2012 10:26 AM, Eduardo Habkost wrote: > > > The problem is that this makes the resulting CPU feature flags > > unpredictable and dependent on the host CPU and kernel version. This > > breaks live-migration badly if migrating fr

Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eric Blake
On 05/17/2012 10:26 AM, Eduardo Habkost wrote: > The problem is that this makes the resulting CPU feature flags > unpredictable and dependent on the host CPU and kernel version. This > breaks live-migration badly if migrating from a host CPU that supports > some features on that CPUID leaf (runnin

Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs

2012-05-17 Thread Scott Wood
On 05/16/2012 08:25 AM, Alexander Graf wrote: > When reinjecting host interrupt requests in the exit handler code, > let's also tell the interrupt handler which interrupt number we're > coming from. > > Signed-off-by: Alexander Graf > --- > arch/powerpc/kvm/booke.c | 12 +++- > 1 files

[QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
Changes v1 -> v2: - Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on cpu_x86_fill_host(). We should use GET_SUPPORTED_CPUID for all bits on "-cpu host" eventually, but I am not changing all the other CPUID leaves because we may not be able to test such an intrusive change

Re: [PATCH 04/13] pci: New pci_dma_quirk()

2012-05-17 Thread Alex Williamson
On Thu, 2012-05-17 at 15:19 +0800, Anonymous wrote: > Alex, > > On Sat, May 12, 2012 at 6:55 AM, Alex Williamson > wrote: > > Integrating IOMMU groups more closely into the driver core allows > > us to more easily work around DMA quirks. The Ricoh multifunction > > controller is a favorite examp

Re: [PATCH v2] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-17 Thread Marcelo Tosatti
On Thu, May 17, 2012 at 02:37:21AM +, Mao, Junjie wrote: > > > You can disable INVPCID exec control (which #UDs), if its in Level-2 > > > guest mode (see if_guest_mode()), and restore the Level-1 value when > > > leaving nested mode. > > > > This "!cpu_has_hypervisor " is brought by my ignoran

[RFC][PATCH v2 04/11] kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka We will add kvm_irqchip_add_msi_route, so let's make the difference clearer. Signed-off-by: Jan Kiszka --- hw/pc_piix.c |8 kvm-all.c|2 +- kvm.h|2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c i

[RFC][PATCH v2 06/11] kvm: Publicize kvm_irqchip_release_virq

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka This allows to drop routes created by kvm_irqchip_add_irq/msi_route again. Signed-off-by: Jan Kiszka --- kvm-all.c |2 +- kvm-stub.c |4 kvm.h |1 + 3 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 7f906ca..ca6ce

[RFC][PATCH v2 11/11] virtio/vhost: Add support for KVM in-kernel MSI injection

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Make use of the new vector notifier to track changes of the MSI-X configuration of virtio PCI devices. On enabling events, we establish the required virtual IRQ to MSI-X message route and link the signaling eventfd file descriptor to this vIRQ line. That way, vhost-generated inte

[RFC][PATCH v2 10/11] msix: Add msix_nr_vectors_allocated

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Analogously to msi_nr_vectors_allocated, add a service for MSI-X. Will be used by the virtio-pci layer. Signed-off-by: Jan Kiszka --- hw/msix.c |5 + hw/msix.h |2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 1622e16

[RFC][PATCH v2 09/11] kvm: Enable use of kvm_irqchip_in_kernel in hwlib code

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Provide a dummy kvm_kernel_irqchip so that kvm_irqchip_in_kernel can be used by code that is not under CONFIG_KVM protection. Signed-off-by: Jan Kiszka --- kvm-stub.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index b4cf03f

[RFC][PATCH v2 08/11] kvm: Introduce kvm_irqchip_add/remove_irqfd

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Add services to associate an eventfd file descriptor as input with an IRQ line as output. Such a line can be an input pin of an in-kernel irqchip or a virtual line returned by kvm_irqchip_add_route. Signed-off-by: Jan Kiszka --- kvm-all.c | 30 ++

[RFC][PATCH v2 07/11] kvm: Make kvm_irqchip_commit_routes an internal service

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Automatically commit route changes after kvm_add_routing_entry and kvm_irqchip_release_virq. There is no performance relevant use case for which collecting multiple route changes is beneficial. This makes kvm_irqchip_commit_routes an internal service which assert()s that the corr

[RFC][PATCH v2 05/11] kvm: Introduce kvm_irqchip_add_msi_route

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Add a service that establishes a static route from a virtual IRQ line to an MSI message. Will be used for IRQFD and device assignment. As we will use this service outside of CONFIG_KVM protected code, stub it properly. Signed-off-by: Jan Kiszka --- kvm-all.c | 31 ++

[RFC][PATCH v2 03/11] msix: Introduce vector notifiers

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Vector notifiers shall be triggered by the MSI/MSI-X core whenever a relevant configuration change is programmed by the guest. In case of MSI-X, changes are reported when the effective mask (global && per-vector) alters its state. On unmask, the current vector configuration is in

[RFC][PATCH v2 02/11] msix: Invoke msix_handle_mask_update on msix_mask_all

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka In preparation of firing vector notifiers on mask changes, call msix_handle_mask_update also from msix_mask_all. So far, this will have no real effect. Signed-off-by: Jan Kiszka --- hw/msix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msix.c

[RFC][PATCH v2 01/11] msix: Factor out msix_get_message

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka This helper will also be used by the upcoming config notifier. Signed-off-by: Jan Kiszka --- hw/msix.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 3835eaa..3197465 100644 --- a/hw/msix.c +++ b/hw/msix.

[RFC][PATCH v2 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost

2012-05-17 Thread Jan Kiszka
[ changes in v2: rebase over uq/master ] This series is another major milestone of merging qemu-kvm into upstream. It implements the required interfaces and logic to directly inject MSI-X interrupts generated by the vhost-net kernel module into the KVM in-kernel irqchip. This involves - establish

Re: [QEMU 1.1 PATCH] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Wed, May 16, 2012 at 05:58:05PM -0300, Eduardo Habkost wrote: [...] > @@ -521,6 +523,13 @@ static int cpu_x86_fill_host(x86_def_t *x86_cpu_def) > x86_cpu_def->ext_features = ecx; > x86_cpu_def->features = edx; > > +if (x86_cpu_def->level >= 7) { > +host_cpuid(0x7, 0, &eax

[PATCH 3/3] KVM: Move mmu reload out of line

2012-05-17 Thread Avi Kivity
Currently we check that the mmu root exits before every entry. Use the existing KVM_REQ_MMU_RELOAD mechanism instead, by making it really reload the mmu, and by adding the request to mmu initialization code. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c |2 ++ arch/x86/kvm/x86.c | 14 +

[PATCH 2/3] KVM: Optimize vcpu->requests slow path slightly

2012-05-17 Thread Avi Kivity
Instead of using a atomic operation per active request, use just one to get all requests at once, then check them with local ops. This probably isn't any faster, since simultaneous requests are rare, but it does reduce code size. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 33 +

[PATCH 1/3] KVM: Simplify KVM_REQ_EVENT/req_int_win handling

2012-05-17 Thread Avi Kivity
Put the KVM_REQ_EVENT block in the regular vcpu->requests if (), instead of its own little check. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[PATCH 0/3] Minor vcpu->requests improvements

2012-05-17 Thread Avi Kivity
Nothing spectacular, just regularization of the code. Avi Kivity (3): KVM: Simplify KVM_REQ_EVENT/req_int_win handling KVM: Optimize vcpu->requests slow path slightly KVM: Move mmu reload out of line arch/x86/kvm/mmu.c |2 ++ arch/x86/kvm/x86.c | 73 --

Re: [QEMU 1.1 PATCH] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Wed, May 16, 2012 at 09:32:44PM -0500, Anthony Liguori wrote: > On 05/16/2012 03:58 PM, Eduardo Habkost wrote: > >Description of the bug: > > > >Since QEMU 0.15, the CPUID information on CPUID[EAX=7,ECX=0] is being > >returned unfiltered to the guest, directly from the GET_SUPPORTED_CPUID > >ret

Re: [PATCH v2 1/5] KVM: Add APIs for unlocked TLB flush

2012-05-17 Thread Avi Kivity
On 05/17/2012 01:24 PM, Avi Kivity wrote: > Currently we flush the TLB while holding mmu_lock. This > increases the lock hold time by the IPI round-trip time, increasing > contention, and makes dropping the lock (for latency reasons) harder. > > This patch changes TLB management to be usable lockl

[PATCH v2 1/5] KVM: Add APIs for unlocked TLB flush

2012-05-17 Thread Avi Kivity
Currently we flush the TLB while holding mmu_lock. This increases the lock hold time by the IPI round-trip time, increasing contention, and makes dropping the lock (for latency reasons) harder. This patch changes TLB management to be usable locklessly, introducing the following APIs: kvm_mark_

[PATCH v2 5/5] KVM: Flush TLB in change_pte mmu notifier without holding mmu_lock

2012-05-17 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c |8 +--- virt/kvm/kvm_main.c |2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 0e1faec..85ed48a 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1138,7 +1138

[PATCH v2 4/5] KVM: Flush TLB in FNAME(invlpg) without holding mmu_lock

2012-05-17 Thread Avi Kivity
mmu_page_zap_pte() is modified to mark the TLB as dirty; but currently only FNAME(invlpg) takes advantage of this. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c |7 +++ arch/x86/kvm/paging_tmpl.h |7 +++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ar

[PATCH v2 3/5] KVM: Flush TLB in mmu notifier without holding mmu_lock

2012-05-17 Thread Avi Kivity
Signed-off-by: Avi Kivity --- virt/kvm/kvm_main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 585ab45..9f6d15d 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -302,11 +302,11 @@ static void kv

[PATCH v2 2/5] KVM: MMU: Convert remote flushes to kvm_mark_tlb_dirty() and a conditional flush

2012-05-17 Thread Avi Kivity
This allows us to later move the actual flush out of protection of the mmu spinlock, provided there are no additional dependencies. Constructs of the form if (pred) kvm_flush_remote_tlbs(kvm) are converted to if (pred) kvm_mark_tlb_dirty(kvm) kvm_cond_flush_remote_t

[PATCH] KVM: ia64: Mark ia64 KVM as BROKEN

2012-05-17 Thread Avi Kivity
Practically all patches to ia64 KVM are build fixes; numerous warnings remain; the last patch from the maintainer was committed more than three years ago. It is clear that no one is using this thing. Mark as BROKEN to ensure people don't get hit by pointless build problems. Signed-off-by: Avi Ki

[PULL] virtio: last minute fixes for 3.4

2012-05-17 Thread Michael S. Tsirkin
The following changes since commit 0e93b4b304ae052ba1bc73f6d34a68556fe93429: Merge git://git.kernel.org/pub/scm/virt/kvm/kvm (2012-05-16 14:30:51 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git for_linus for you to fetch changes up

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 12:24:30PM +0300, Avi Kivity wrote: > On 05/17/2012 11:07 AM, Gleb Natapov wrote: > > > > > > No, let's refactor this so it makes sense. The {has|get}_interrupt > > > split is the cause of the problem, I think. We need a single function, > > > with callbacks that are call

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Avi Kivity
On 05/16/2012 02:46 PM, Michael S. Tsirkin wrote: > Implementation of PV EOI using shared memory. > This reduces the number of exits an interrupt > causes as much as by half. > > The idea is simple: there's a bit, per APIC, in guest memory, > that tells the guest that it does not need EOI. > We set

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Avi Kivity
On 05/17/2012 12:12 PM, Gleb Natapov wrote: > > > > OK will look into this next week. > > > What about looking into my suggestion with setting vcpu->request bit? I > think totally refactoring irq handling path should not be done as part > of this series. > Certainly not as part of it, but maybe

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Avi Kivity
On 05/17/2012 11:07 AM, Gleb Natapov wrote: > > > > No, let's refactor this so it makes sense. The {has|get}_interrupt > > split is the cause of the problem, I think. We need a single function, > > with callbacks that are called when an event happens. The callbacks can > > request an irq window

[PATCH 2/2] [kvm/vhost-net]: make vhost net own NUMA attribute

2012-05-17 Thread Liu Ping Fan
From: Liu Ping Fan Make vhost net support to spread on host node according the command. And consider the whole vhost_net componsed of lots of logic net units. for each node, there is a unit, which includes a vhost_worker thread, rx/tx vhost_virtqueue. Signed-off-by: Liu Ping Fan --- drivers/vh

[PATCH 2/2] [net/virtio_net]: make virtio_net support NUMA info

2012-05-17 Thread Liu Ping Fan
From: Liu Ping Fan Vhost net uses separate transfer logic unit in different node. Virtio net must determine which logic unit it will talk with, so we can improve the performance. Signed-off-by: Liu Ping Fan --- drivers/net/virtio_net.c | 425 ++ 1 f

[PATCH 1/2] [kvm/virtio]: make virtio support NUMA attr

2012-05-17 Thread Liu Ping Fan
From: Liu Ping Fan For each numa node reported by vhost, we alloc a pair of i/o vq, and assign them msix IRQ, and set irq affinity to a set of vcpu in the same node. Also we alloc vqs on PAGE_SIZE align, so they will be allocated by host when pg fault happen on different node. Signed-off-by: Liu

[PATCH 1/2] [kvm/vhost]: make vhost support NUMA model.

2012-05-17 Thread Liu Ping Fan
From: Liu Ping Fan Make vhost allocate vhost_virtqueue on different host nodes as required. Signed-off-by: Liu Ping Fan --- drivers/vhost/vhost.c | 380 +++-- drivers/vhost/vhost.h | 41 -- include/linux/vhost.h |2 +- 3 files changed, 304

[RFC:kvm] export host NUMA info to guest & make emulated device NUMA attr

2012-05-17 Thread Liu Ping Fan
Currently, the guest can not know the NUMA info of the vcpu, which will result in performance drawback. This is the discovered and experiment by Shirley Ma Krishna Kumar Tom Lendacky Refer to - http://www.mail-archive.com/kvm@vger.kernel.org/msg69868.html we can see the

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 12:10:55PM +0300, Michael S. Tsirkin wrote: > On Thu, May 17, 2012 at 10:57:33AM +0300, Avi Kivity wrote: > > On 05/17/2012 10:49 AM, Michael S. Tsirkin wrote: > > > On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > > > > On Wed, May 16, 2012 at 10:07:58PM +030

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Michael S. Tsirkin
On Thu, May 17, 2012 at 10:57:33AM +0300, Avi Kivity wrote: > On 05/17/2012 10:49 AM, Michael S. Tsirkin wrote: > > On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > > > On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > > > This code is reached from kvm_cpu_get

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 10:57:33AM +0300, Avi Kivity wrote: > On 05/17/2012 10:49 AM, Michael S. Tsirkin wrote: > > On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > > > On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > > > This code is reached from kvm_cpu_get

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Avi Kivity
On 05/17/2012 10:49 AM, Michael S. Tsirkin wrote: > On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > > On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > > This code is reached from kvm_cpu_get_interrupt(), but this function > > > > will > > > > not be called

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Gleb Natapov
On Thu, May 17, 2012 at 10:49:47AM +0300, Michael S. Tsirkin wrote: > On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > > On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > > This code is reached from kvm_cpu_get_interrupt(), but this function > > > > will > >

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Michael S. Tsirkin
On Thu, May 17, 2012 at 10:28:41AM +0300, Gleb Natapov wrote: > On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > This code is reached from kvm_cpu_get_interrupt(), but this function will > > > not be called in above scenario. > > > > I think I see. So this shall fix it als

Re: [PATCHv4 3/5] kvm: host side for eoi optimization

2012-05-17 Thread Gleb Natapov
On Wed, May 16, 2012 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > This code is reached from kvm_cpu_get_interrupt(), but this function will > > not be called in above scenario. > > I think I see. So this shall fix it also makes code cleaner > (no -2 hack). Right? kvm_apic_has_interrupt is ca

Re: PMU support on KVM

2012-05-17 Thread Gleb Natapov
On Wed, May 16, 2012 at 06:25:48PM -0700, Sriram Murthy wrote: > Hi, >Can I run Intel vTune program that uses hardware events from the PMU, for > profiling, on my linux VM on KVM? Also, what is the current state of PMU > support for guest VMs on KVM?. No, unfortunately you can't. vTune does

Re: [PATCH 04/13] pci: New pci_dma_quirk()

2012-05-17 Thread Anonymous
Alex, On Sat, May 12, 2012 at 6:55 AM, Alex Williamson wrote: > Integrating IOMMU groups more closely into the driver core allows > us to more easily work around DMA quirks.  The Ricoh multifunction > controller is a favorite example of devices that are currently > incompatible with IOMMU isolati