[PATCH v2 1/8] KVM: Parse ioapic entry to get destination vcpu

2013-03-18 Thread Yang Zhang
From: Yang Zhang Get destination vcpu map from one ioapic entry. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 40 arch/x86/kvm/lapic.h |3 +++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86

[PATCH v2 0/8] Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the interrupt. And decrease i

[PATCH v2 4/8] KVM: Introduce struct rtc_status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- virt/kvm/ioapic.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 2001b61..4904ca3 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -34,6 +34,12 @@ struct kvm_vcp

[PATCH v2 7/8] KVM: Add rtc irq to eoi exit bitmap

2013-03-18 Thread Yang Zhang
From: Yang Zhang Add rtc irq to eoi exit bitmap to force vmexit when virtual interrupt delivery is enabled. Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 6266d1f..7e47da8 100

[PATCH v2 5/8] KVM: Recalculate destination vcpu map

2013-03-18 Thread Yang Zhang
From: Yang Zhang Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is changed Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c | 38 -- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c i

[PATCH v2 3/8] KVM: Add vcpu info to ioapic_update_eoi()

2013-03-18 Thread Yang Zhang
From: Yang Zhang Need to know which vcpu writes EOI. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic

[PATCH v2 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the interrupt. And decrease it

[PATCH v2 6/8] KVM: Add reset/restore rtc_status support

2013-03-18 Thread Yang Zhang
From: Yang Zhang reset/restore rtc_status when ioapic reset/restore. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/lapic.h |1 + virt/kvm/ioapic.c| 33 + 3 files changed, 42 insertions(+), 0 deletions(-) diff --git a

[PATCH v2 2/8] KVM: Rename kvm_ioapic_make_eoibitmap_request to kvm_scan_ioapic_entry

2013-03-18 Thread Yang Zhang
From: Yang Zhang RTC interrupt coalesced need to parse ioapic entry to get destionation vcpu too. Rename it to more common name. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c|6 +++--- virt/kvm/ioapic.h|2 +- virt/kvm/irq_comm.c |4 ++-- 4

Re: [PATCH 1/5] Revert "KVM: x86: Optimize mmio spte zapping when, creating/moving memslot"

2013-03-18 Thread Xiao Guangrong
On 03/16/2013 10:07 AM, Takuya Yoshikawa wrote: > On Fri, 15 Mar 2013 23:26:59 +0800 > Xiao Guangrong wrote: > >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index d3c4787..61a5bb6 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -6991,7 +6991,7 @@ void kvm_arch_co

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/16/2013 10:13 AM, Takuya Yoshikawa wrote: > On Fri, 15 Mar 2013 23:29:53 +0800 > Xiao Guangrong wrote: > >> +/* >> + * The caller should protect concurrent access on >> + * kvm->arch.mmio_invalid_gen. Currently, it is used by >> + * kvm_arch_commit_memory_region and protected by kvm->slots_

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/17/2013 11:02 PM, Gleb Natapov wrote: > On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: >> This patch tries to introduce a very simple and scale way to invalid all >> mmio sptes - it need not walk any shadow pages and hold mmu-lock >> >> KVM maintains a global mmio invalid gen

Re: [PATCH V3 3/3] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-18 Thread Michael S. Tsirkin
On Fri, Mar 15, 2013 at 09:14:07AM +0800, Asias He wrote: > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > not. It is set or cleared in vhost_scsi_set_endpoint() or > vhost_scsi_clear_endpoint() under the vs->dev.mutex lock. However, when > we check it in vhost_scsi_handl

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > On 03/17/2013 11:02 PM, Gleb Natapov wrote: > > On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: > >> This patch tries to introduce a very simple and scale way to invalid all > >> mmio sptes - it need not walk any shad

Re: [PATCH V3 3/3] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-18 Thread Asias He
On Mon, Mar 18, 2013 at 10:19:00AM +0200, Michael S. Tsirkin wrote: > On Fri, Mar 15, 2013 at 09:14:07AM +0800, Asias He wrote: > > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > > not. It is set or cleared in vhost_scsi_set_endpoint() or > > vhost_scsi_clear_endpoint() u

Re: [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 02:49:25AM +, Zhang, Yang Z wrote: > Zhang, Yang Z wrote on 2013-03-15: > > From: Yang Zhang > > > > The follwoing patches are adding the Posted Interrupt supporting to KVM: > > The first patch enables the feature 'acknowledge interrupt on vmexit'.Since > > it is requi

Re: [PATCH V3 3/3] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-18 Thread Michael S. Tsirkin
On Mon, Mar 18, 2013 at 05:14:33PM +0800, Asias He wrote: > On Mon, Mar 18, 2013 at 10:19:00AM +0200, Michael S. Tsirkin wrote: > > On Fri, Mar 15, 2013 at 09:14:07AM +0800, Asias He wrote: > > > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > > > not. It is set or cleared

Re: [PATCH v2 4/8] KVM: Introduce struct rtc_status

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 03:24:35PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Signed-off-by: Yang Zhang > --- > virt/kvm/ioapic.h |9 + > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h > index 2001b61..4904ca3 100644 > -

Re: [PATCH v2 5/8] KVM: Recalculate destination vcpu map

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 03:24:36PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is changed > > Signed-off-by: Yang Zhang > --- > virt/kvm/ioapic.c | 38 -- > 1 files changed, 36 inserti

Re: [PATCH v2 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 03:24:39PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Current interrupt coalescing logci which only used by RTC has conflict > with Posted Interrupt. > This patch introduces a new mechinism to use eoi to track interrupt: > When delivering an interrupt to vcpu, the nee

RE: [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 02:49:25AM +, Zhang, Yang Z wrote: >> Zhang, Yang Z wrote on 2013-03-15: >>> From: Yang Zhang >>> >>> The follwoing patches are adding the Posted Interrupt supporting to KVM: >>> The first patch enables the feature 'acknowledge inter

RE: [PATCH v2 4/8] KVM: Introduce struct rtc_status

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 03:24:35PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Signed-off-by: Yang Zhang >> --- >> virt/kvm/ioapic.h |9 + >> 1 files changed, 9 insertions(+), 0 deletions(-) >> diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioap

RE: [PATCH v2 5/8] KVM: Recalculate destination vcpu map

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 03:24:36PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is >> changed >> >> Signed-off-by: Yang Zhang >> --- >> virt/kvm/ioapic.c | 38 ++

RE: [PATCH v2 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 03:24:39PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Current interrupt coalescing logci which only used by RTC has conflict >> with Posted Interrupt. >> This patch introduces a new mechinism to use eoi to track interrupt: >> Whe

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Paolo Bonzini
Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > +/* > + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > + * generation, the bits of bits 52 ~ bit 61 are used as > + * high 12 bits of generation. > + */ High 10 bits. How often does the generation number change? Especially with Takuya'

[PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread Michael S. Tsirkin
The following changes since commit 8c6216d7f118a128678270824b6a1286a63863ca: Revert "ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally" (2013-03-16 23:00:41 -0400) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.g

KVM call agenda for 2013-03-19

2013-03-18 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, Juan. -- 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 v6 0/5] KVM: VMX: Add Posted Interrupt supporting

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 10:43:16AM +, Zhang, Yang Z wrote: > >> For TMR issue, since it has nothing to do with APICv, if we really need to > >> handle > > it later, then we may need a separate patch to fix it. But currently, we may > > focused on APICv only. > >> > > What do you mean by "TMR

RE: [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 10:43:16AM +, Zhang, Yang Z wrote: For TMR issue, since it has nothing to do with APICv, if we really need to > handle >>> it later, then we may need a separate patch to fix it. But currently, we may >>> focused on APICv only. >>>

[PATCH] KVM: Set TMR when programming ioapic entry

2013-03-18 Thread Yang Zhang
From: Yang Zhang We already know the trigger mode of a given interrupt when programming the ioapice entry. So it's not necessary to set it in each interrupt delivery. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 26 ++ arch/x86/kvm/lapic.h |5 ++---

Re: [PATCH] KVM: Set TMR when programming ioapic entry

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 07:42:22PM +0800, Yang Zhang wrote: > From: Yang Zhang > > We already know the trigger mode of a given interrupt when programming > the ioapice entry. So it's not necessary to set it in each interrupt > delivery. > What this patch suppose to go on top of? > Signed-off-by

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 05:13 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: >> On 03/17/2013 11:02 PM, Gleb Natapov wrote: >>> On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: This patch tries to introduce a very simple and scale way to invalid

RE: [PATCH] KVM: Set TMR when programming ioapic entry

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 07:42:22PM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> We already know the trigger mode of a given interrupt when programming >> the ioapice entry. So it's not necessary to set it in each interrupt >> delivery. >> > What this pat

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: >> +/* >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of >> + * generation, the bits of bits 52 ~ bit 61 are used as >> + * high 12 bits of generation. >> + */ > > High 10 bits. Yes, i forgot

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > On 03/18/2013 05:13 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > >> On 03/17/2013 11:02 PM, Gleb Natapov wrote: > >>> On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: > On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > >> +/* > >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > >> + * generation, the bits of bits 52 ~ bit 61 are used as >

Re: Can I bridge the loopback?

2013-03-18 Thread Stefan Hajnoczi
On Sat, Mar 16, 2013 at 12:06:30AM -0500, Steve wrote: > Here's the issue. I want to communicate between virtual machines, second > Ethernet virtual port. But I would like to use the host loopback for that so > as to not be limited to Ethernet port speeds, for large copies, etc. Right > now, the

Re: [PATCH] KVM: Set TMR when programming ioapic entry

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 12:32:51PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-03-18: > > On Mon, Mar 18, 2013 at 07:42:22PM +0800, Yang Zhang wrote: > >> From: Yang Zhang > >> > >> We already know the trigger mode of a given interrupt when programming > >> the ioapice entry. So it's

[PATCH v3 0/8] Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the interrupt. And decrease i

[PATCH v3 2/8] KVM: Rename kvm_ioapic_make_eoibitmap_request to kvm_scan_ioapic_entry

2013-03-18 Thread Yang Zhang
From: Yang Zhang RTC interrupt coalesced need to parse ioapic entry to get destionation vcpu too. Rename it to more common name. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c|6 +++--- virt/kvm/ioapic.h|2 +- virt/kvm/irq_comm.c |4 ++-- 4

[PATCH v3 3/8] KVM: Add vcpu info to ioapic_update_eoi()

2013-03-18 Thread Yang Zhang
From: Yang Zhang Need to know which vcpu writes EOI. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic

[PATCH v3 4/8] KVM: Introduce struct rtc_status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Signed-off-by: Yang Zhang --- virt/kvm/ioapic.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 2001b61..20715d0 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h @@ -34,6 +34,12 @@ struct kvm_vcp

[PATCH v3 5/8] KVM: Recalculate destination vcpu map

2013-03-18 Thread Yang Zhang
From: Yang Zhang Update destination vcpu map when ioapic entry or apic(id, ldr, dfr) is changed Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c | 40 ++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c

[PATCH v3 7/8] KVM: Add rtc irq to eoi exit bitmap

2013-03-18 Thread Yang Zhang
From: Yang Zhang Add rtc irq to eoi exit bitmap to force vmexit when virtual interrupt delivery is enabled. Signed-off-by: Yang Zhang --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index b74c73f..4ddaa07 100

[PATCH v3 6/8] KVM: Add reset/restore rtc_status support

2013-03-18 Thread Yang Zhang
From: Yang Zhang reset/restore rtc_status when ioapic reset/restore. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/lapic.h |1 + virt/kvm/ioapic.c| 33 + 3 files changed, 42 insertions(+), 0 deletions(-) diff --git a

[PATCH v3 8/8] KVM: Use eoi to track RTC interrupt delivery status

2013-03-18 Thread Yang Zhang
From: Yang Zhang Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the need_eoi set to number of vcpu that received the interrupt. And decrease it

[PATCH v3 1/8] KVM: Parse ioapic entry to get destination vcpu

2013-03-18 Thread Yang Zhang
From: Yang Zhang Get destination vcpu map from one ioapic entry. Signed-off-by: Yang Zhang --- arch/x86/kvm/lapic.c | 40 arch/x86/kvm/lapic.h |3 +++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86

RE: [PATCH] KVM: Set TMR when programming ioapic entry

2013-03-18 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-03-18: > On Mon, Mar 18, 2013 at 12:32:51PM +, Zhang, Yang Z wrote: >> Gleb Natapov wrote on 2013-03-18: >>> On Mon, Mar 18, 2013 at 07:42:22PM +0800, Yang Zhang wrote: From: Yang Zhang We already know the trigger mode of a given interrupt when progra

[Bug 55201] host panic when "creating guest, doing scp and killing QEMU process" continuously

2013-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55201 --- Comment #7 from Jay Ren 2013-03-18 13:02:06 --- (In reply to comment #5) > Jay Ren, would you please confirm whether the attached patch fixes the > problem. Hi Marcelo, you patch can fix this bug. With your patch, I tested the loop for

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 08:46 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 05:13 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: On 03/17/2013 11:02 PM, Gleb Natapov wrote: > On Fri, Mar 15, 201

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > On 03/18/2013 08:46 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 05:13 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 09:19 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 08:46 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: On 03/18/2013 05:13 PM, Gleb Natapov wrote: > On Mon, Mar 18, 201

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:25:10PM +0800, Xiao Guangrong wrote: > On 03/18/2013 09:19 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 08:46 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 09:27 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 09:25:10PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 09:19 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: On 03/18/2013 08:46 PM, Gleb Natapov wrote: > On Mon, Mar 18, 201

[Bug 55421] New: igb VF can't work in KVM guest

2013-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55421 Summary: igb VF can't work in KVM guest Product: Virtualization Version: unspecified Kernel Version: 3.9.0-rc1 Platform: All OS/Version: Linux Tree: Mainline Status: N

[Bug 55421] igb VF can't work in KVM guest

2013-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55421 --- Comment #1 from Jay Ren 2013-03-18 15:11:16 --- Created an attachment (id=95741) --> (https://bugzilla.kernel.org/attachment.cgi?id=95741) host dmesg -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email --- You

[Bug 55421] igb VF can't work in KVM guest

2013-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55421 --- Comment #2 from Jay Ren 2013-03-18 15:12:02 --- Created an attachment (id=95751) --> (https://bugzilla.kernel.org/attachment.cgi?id=95751) guest dmesg in the dmesg in guest: igbvf :00:03.0: irq 26 for MSI/MSI-X igbvf :00:03.0: I

[Bug 55421] igb VF can't work in KVM guest

2013-03-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=55421 --- Comment #3 from Jay Ren 2013-03-18 15:12:33 --- Created an attachment (id=95761) --> (https://bugzilla.kernel.org/attachment.cgi?id=95761) lspci info of the igbvf in guest -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi

Re: KVM guest 100% cpu lock up

2013-03-18 Thread Andrew Jones
- Original Message - > Hello, > > I am having an intermittent issue where one of my KVM guests is > locking up and when checking the process its running @ 100% cpu. > The host is CentOS 6.4 running the kernel > kernel-2.6.32-358.0.1.el6.x86_64. > > Would it be worth attempting to compi

Re: [PATCH] KVM/MIPS32: Sync up with latest KVM API changes

2013-03-18 Thread Sanjay Lal
On Mar 18, 2013, at 12:04 PM, Jonas Gorski wrote: > On 15 March 2013 03:09, Sanjay Lal wrote: >> - Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS >> - Fix kvm_arch_{prepare,commit}_memory_region() >> - Also remove kvm_arch_set_memory_region which was unused. > > I just stumbled upon the build is

Re: KVM guest 100% cpu lock up

2013-03-18 Thread Phil Daws
- Original Message - From: "Andrew Jones" To: "Phil Daws" Cc: kvm@vger.kernel.org Sent: Monday, 18 March, 2013 4:08:48 PM Subject: Re: KVM guest 100% cpu lock up - Original Message - > Hello, > > I am having an intermittent issue where one of my KVM guests is > locking up and

Re: [PATCH] KVM/MIPS32: Sync up with latest KVM API changes

2013-03-18 Thread Jonas Gorski
On 15 March 2013 03:09, Sanjay Lal wrote: > - Rename KVM_MEMORY_SLOTS -> KVM_USER_MEM_SLOTS > - Fix kvm_arch_{prepare,commit}_memory_region() > - Also remove kvm_arch_set_memory_region which was unused. I just stumbled upon the build issue caused by the first item and can confirm that this patch

Re: [PATCH] KVM: VMX: Require KVM_SET_TSS_ADDR being called prior to running a VCPU

2013-03-18 Thread Marcelo Tosatti
On Fri, Mar 15, 2013 at 08:38:56AM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Very old user space (namely qemu-kvm before kvm-49) didn't set the TSS > base before running the VCPU. We always warned about this bug, but no > reports about users actually seeing this are known. Time to finally >

KVM: x86: fix deadlock in clock-in-progress request handling

2013-03-18 Thread Marcelo Tosatti
There is a deadlock in pvclock handling: cpu0: cpu1: kvm_gen_update_masterclock() kvm_guest_time_update() spin_lock(pvclock_gtod_sync_lock) local_irq_save(fl

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 18 Mar 2013 13:20:03 +0200 > The following changes since commit 8c6216d7f118a128678270824b6a1286a63863ca: > > Revert "ip_gre: make ipgre_tunnel_xmit() not parse network header as IP > unconditionally" (2013-03-16 23:00:41 -0400) > > are available in the

Re: [PATCH 22/29] arm64: KVM: define 32bit specific registers

2013-03-18 Thread Christopher Covington
Hi Marc, On 03/04/2013 10:47 PM, Marc Zyngier wrote: > Define the 32bit specific registers (SPSRs, cp15...). > > Most CPU registers are directly mapped to a 64bit register > (r0->x0...). Only the SPSRs have separate registers. > > cp15 registers are also mapped into their 64bit counterpart in mo

Re: [PATCH 24/29] arm64: KVM: 32bit conditional execution emulation

2013-03-18 Thread Christopher Covington
Hi Marc, On 03/04/2013 10:47 PM, Marc Zyngier wrote: > As conditionnal instructions can trap on AArch32, add the thinest conditional > possible emulation layer to keep 32bit guests happy. [...] > diff --git a/arch/arm64/kvm/emulate.c b/arch/arm64/kvm/emulate.c > new file mode 100644 > index 00

Re: KVM: x86: fix deadlock in clock-in-progress request handling

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 01:54:32PM -0300, Marcelo Tosatti wrote: > > There is a deadlock in pvclock handling: > > cpu0: cpu1: > kvm_gen_update_masterclock() > kvm_guest_time_update() > spin_lock(pvclock_g

Re: [PATCH 28/29] arm64: KVM: 32bit guest fault injection

2013-03-18 Thread Christopher Covington
Hi Marc, Here are a few more preprocessor definition suggestions. On 03/04/2013 10:47 PM, Marc Zyngier wrote: > Add fault injection capability for 32bit guests. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/inject_fault.c | 79 > ++- > 1 file c

Re: [PATCH 29/29] arm64: KVM: enable initialization of a 32bit vcpu

2013-03-18 Thread Christopher Covington
On 03/04/2013 10:47 PM, Marc Zyngier wrote: > Wire the init of a 32bit vcpu by allowing 32bit modes in pstate, > and providing sensible defaults out of reset state. > > This feature is of course conditionned by the presence of 32bit conditioned > capability on the physical CPU. [...] -- Emplo

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread Michael S. Tsirkin
On Mon, Mar 18, 2013 at 01:01:36PM -0400, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Mon, 18 Mar 2013 13:20:03 +0200 > > > The following changes since commit 8c6216d7f118a128678270824b6a1286a63863ca: > > > > Revert "ip_gre: make ipgre_tunnel_xmit() not parse network header as IP

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread David Miller
From: "Michael S. Tsirkin" Date: Mon, 18 Mar 2013 21:54:43 +0200 > On Mon, Mar 18, 2013 at 01:01:36PM -0400, David Miller wrote: >> From: "Michael S. Tsirkin" >> Date: Mon, 18 Mar 2013 13:20:03 +0200 >> >> > The following changes since commit >> > 8c6216d7f118a128678270824b6a1286a63863ca: >> >

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-18 Thread Marcelo Tosatti
On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > walk and zap all shadow pages one by one, also it need to zap all guest > page's rmap and all shadow page's parent spte list. Particularly, things > become wors

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > > >Could you explain further how this will be used? How the device is > > >exposed to a guest is entirely a userspace construct, so why does vfio > > >need to know or care abou

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread Michael S. Tsirkin
On Mon, Mar 18, 2013 at 02:10:03PM -0700, Nicholas A. Bellinger wrote: > On Mon, 2013-03-18 at 21:54 +0200, Michael S. Tsirkin wrote: > > On Mon, Mar 18, 2013 at 01:01:36PM -0400, David Miller wrote: > > > From: "Michael S. Tsirkin" > > > Date: Mon, 18 Mar 2013 13:20:03 +0200 > > > > > > > The fo

Re: [PATCH 3/3] VFIO: Direct access config reg without capability

2013-03-18 Thread Alex Williamson
On Sat, 2013-03-16 at 06:30 +0100, Benjamin Herrenschmidt wrote: > On Fri, 2013-03-15 at 13:41 -0600, Alex Williamson wrote: > > > > This basically gives userspace free access to any regions that aren't > > covered by known capabilities. > > And ? > > I mean seriously :-) We already had that di

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread Nicholas A. Bellinger
On Mon, 2013-03-18 at 21:54 +0200, Michael S. Tsirkin wrote: > On Mon, Mar 18, 2013 at 01:01:36PM -0400, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Mon, 18 Mar 2013 13:20:03 +0200 > > > > > The following changes since commit > > > 8c6216d7f118a128678270824b6a1286a63863ca: > > >

Re: [PATCH 0/2] Fix booting tcm_vhost + seabios

2013-03-18 Thread Nicholas A. Bellinger
On Fri, 2013-03-15 at 09:45 +0800, Asias He wrote: > Asias He (2): > virtio-scsi: Set _DRIVER_OK flag before scsi target scanning > virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} > > src/virtio-scsi.c | 5 +++-- > src/virtio-scsi.h | 4 ++-- > 2 files changed, 5 insertions(+), 4 dele

Re: [PULL] vhost: tcm_vhost fixes for 3.9

2013-03-18 Thread Nicholas A. Bellinger
On Mon, 2013-03-18 at 23:14 +0200, Michael S. Tsirkin wrote: > On Mon, Mar 18, 2013 at 02:10:03PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2013-03-18 at 21:54 +0200, Michael S. Tsirkin wrote: > > > On Mon, Mar 18, 2013 at 01:01:36PM -0400, David Miller wrote: > > > > From: "Michael S. Tsirki

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-18 Thread Nicholas A. Bellinger
On Tue, 2013-03-12 at 10:45 +0800, Asias He wrote: > Changes in v3: > - Separate the bug fix to another thread > > Changes in v2: > - Remove code duplication in tcm_vhost_{hotplug,hotunplug} > - Fix racing of vs_events_nr > - Add flush fix patch to this series > > > Asias He (2): > tcm_vhost:

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-18 Thread Michael S. Tsirkin
On Mon, Mar 18, 2013 at 02:46:12PM -0700, Nicholas A. Bellinger wrote: > On Tue, 2013-03-12 at 10:45 +0800, Asias He wrote: > > Changes in v3: > > - Separate the bug fix to another thread > > > > Changes in v2: > > - Remove code duplication in tcm_vhost_{hotplug,hotunplug} > > - Fix racing of vs_e

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Eric Northup
On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong wrote: > This patch tries to introduce a very simple and scale way to invalid all > mmio sptes - it need not walk any shadow pages and hold mmu-lock > > KVM maintains a global mmio invalid generation-number which is stored in > kvm->arch.mmio_invalid

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-18 Thread Nicholas A. Bellinger
On Mon, 2013-03-18 at 23:53 +0200, Michael S. Tsirkin wrote: > On Mon, Mar 18, 2013 at 02:46:12PM -0700, Nicholas A. Bellinger wrote: > > On Tue, 2013-03-12 at 10:45 +0800, Asias He wrote: > > > Changes in v3: > > > - Separate the bug fix to another thread > > > > > > Changes in v2: > > > - Remove

Re: [PATCH v6 0/5] KVM: VMX: Add Posted Interrupt supporting

2013-03-18 Thread Marcelo Tosatti
On Fri, Mar 15, 2013 at 09:31:06PM +0800, Yang Zhang wrote: > From: Yang Zhang > > The follwoing patches are adding the Posted Interrupt supporting to KVM: > The first patch enables the feature 'acknowledge interrupt on vmexit'.Since > it is required by Posted interrupt, we need to enable it firs

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-18 Thread Marcelo Tosatti
On Thu, Mar 14, 2013 at 05:13:46PM -0700, Kevin Hilman wrote: > The new context tracking subsystem unconditionally includes kvm_host.h > headers for the guest enter/exit macros. This causes a compile > failure when KVM is not enabled. > > Fix by adding an IS_ENABLED(CONFIG_KVM) check to kvm_host

Re: [PATCH V3 0/2] tcm_vhost hotplug/hotunplug support

2013-03-18 Thread Asias He
On Mon, Mar 18, 2013 at 03:19:30PM -0700, Nicholas A. Bellinger wrote: > On Mon, 2013-03-18 at 23:53 +0200, Michael S. Tsirkin wrote: > > On Mon, Mar 18, 2013 at 02:46:12PM -0700, Nicholas A. Bellinger wrote: > > > On Tue, 2013-03-12 at 10:45 +0800, Asias He wrote: > > > > Changes in v3: > > > > -

[PATCH V3 WIP 0/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-03-18 Thread Asias He
This is on top of Paolo and Nick's work. Current status: Basically, tcm_vhost + seabios works now. We still have one more issue, vhost_verify_ring_mappings fails. The hotplug also works with the latest tcm_vhost.ko hotplug patch. Asias He (1): disable vhost_verify_ring_mappings check Paolo Bon

[PATCH V3 WIP 1/3] virtio-scsi: create VirtIOSCSICommon

2013-03-18 Thread Asias He
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 199 +-- hw/virtio-scsi.h | 127 include/qemu/osdep.h | 4 ++ 3 files changed, 180 insertions(+), 150 deletions(-) diff --git a/hw/

[PATCH V3 WIP 2/3] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-03-18 Thread Asias He
From: Paolo Bonzini The WWPN specified in configfs is passed to "-device vhost-scsi-pci". The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not available from the QEMU command-line. Instead, I hardcode it to zero. Changes in V3: - Drop ioeventfd vhost_scsi_properties (asias,

[PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-03-18 Thread Asias He
--- hw/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vhost.c b/hw/vhost.c index 4d6aee3..0c52ec4 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -421,10 +421,12 @@ static void vhost_set_memory(MemoryListener *listener, return; } +#if 0 if (dev->started) {

Re: [PATCH 0/2] Fix booting tcm_vhost + seabios

2013-03-18 Thread Asias He
On Mon, Mar 18, 2013 at 02:26:14PM -0700, Nicholas A. Bellinger wrote: > On Fri, 2013-03-15 at 09:45 +0800, Asias He wrote: > > Asias He (2): > > virtio-scsi: Set _DRIVER_OK flag before scsi target scanning > > virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} > > > > src/virtio-scsi.c

Re: [PATCH 1/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

2013-03-18 Thread Asias He
On Wed, Mar 13, 2013 at 01:16:59PM +0800, Asias He wrote: > On Tue, Mar 12, 2013 at 09:21:51AM +0100, Paolo Bonzini wrote: > > Il 12/03/2013 02:31, Asias He ha scritto: > > > On Mon, Mar 11, 2013 at 12:36:37PM +0100, Paolo Bonzini wrote: > > >> Il 11/03/2013 06:09, Asias He ha scritto: > > >>> This

Re: [PATCH V3 3/3] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-18 Thread Asias He
On Mon, Mar 18, 2013 at 11:30:57AM +0200, Michael S. Tsirkin wrote: > On Mon, Mar 18, 2013 at 05:14:33PM +0800, Asias He wrote: > > On Mon, Mar 18, 2013 at 10:19:00AM +0200, Michael S. Tsirkin wrote: > > > On Fri, Mar 15, 2013 at 09:14:07AM +0800, Asias He wrote: > > > > Currently, vs->vs_endpoint

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-18 Thread Xiao Guangrong
On 03/19/2013 04:46 AM, Marcelo Tosatti wrote: > On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: >> The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to >> walk and zap all shadow pages one by one, also it need to zap all guest >> page's rmap and all shadow page's

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/19/2013 06:16 AM, Eric Northup wrote: > On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong > wrote: >> This patch tries to introduce a very simple and scale way to invalid all >> mmio sptes - it need not walk any shadow pages and hold mmu-lock >> >> KVM maintains a global mmio invalid generatio

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Tue, 2013-03-19 at 11:24 +0800, Gavin Shan wrote: > On Mon, Mar 18, 2013 at 03:01:14PM -0600, Alex Williamson wrote: > >On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > >> On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > >> > >Could you explain further how this will be us

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Benjamin Herrenschmidt
On Mon, 2013-03-18 at 22:18 -0600, Alex Williamson wrote: > > Yes, EEH firmware call needn't going through VFIO. However, EEH has > > very close relationship with PCI and so VFIO-PCI does. Eventually, EEH > > has close relationship with VFIO-PCI :-) > > Is there some plan to do more with EEH throu

Re: [PATCH V4 1/5] virtio-scsi: redo allocation of target data

2013-03-18 Thread Asias He
On Mon, Mar 11, 2013 at 10:43:58AM +0800, Wanlong Gao wrote: > From: Paolo Bonzini > > virtio_scsi_target_state is now empty, but we will find new uses > for it in the next few patches. However, dropping the sglist lets > us turn the array-of-pointers into a simple array, which simplifies > the

Re: [PATCH V4 0/5] virtio-scsi multiqueue

2013-03-18 Thread Asias He
On Mon, Mar 11, 2013 at 10:43:57AM +0800, Wanlong Gao wrote: > This series implements virtio-scsi queue steering, which gives > performance improvements of up to 50% (measured both with QEMU and > tcm_vhost backends). > > This version rebased on Rusty's virtio ring rework patches. > We hope this c