[PATCH 2/7] KVM: VMX: Add PAT support for EPT

2008-10-07 Thread Sheng Yang
GUEST_PAT support is a new feature introduced by Intel Core i7 architecture. With this, cpu would save/load guest and host PAT propably without intercept PAT MSR access. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 22 +++--- arch/x86/kvm/vmx.h

[PATCH 7/7] Enable MTRR for EPT

2008-10-07 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 11 ++- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/vmx.c | 12 +--- arch/x86/kvm/x86.c |2 +- include/asm-x86/kvm_host.h |3 ++- 5 files changed, 28 inse

[PATCH 6/7] Add local get_mtrr_type() to support MTRR

2008-10-07 Thread Sheng Yang
For EPT memory type support. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 104 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9ff8d90..1124723

[PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu

2008-10-07 Thread Sheng Yang
Separate msr_bitmap for each vcpu, prepared for guest PAT support. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 53 +-- 1 files changed, 30 insertions(+), 23 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x

[PATCH] KVM: Unregister IRQ ACK notifier with in-kernel irqchip

2008-10-07 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 675fcc1..c5763d7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -176,7 +176,9 @@ stati

Re: [RFC][PATCH 0/2] Fix guest shared interrupt with in-kernel irqchip

2008-10-08 Thread Sheng Yang
On Friday 03 October 2008 15:36:53 Amit Shah wrote: > * On Thursday 02 Oct 2008 22:15:59 Sheng Yang wrote: > > /* This should be called with the kvm->lock mutex held */ > > -void kvm_set_irq(struct kvm *kvm, int irq, int level) > > +void kvm_set_irq(struct kvm *kvm,

[PATCH 2/4] KVM: x86: Replace irq_requested with guest_intr_type

2008-10-08 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |8 include/linux/kvm_host.h |3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 57825a1..19688b3 100644 --- a/arch/x86/kvm/x86.c

[PATCH 0/4] Clean up and enable MSI support for assigned device(v2)

2008-10-08 Thread Sheng Yang
Hi, Avi Here is the update of MSI support. The main change is to move kvm_register_irq_ack_notifier() to common code rather than keep it in update_irq(), for it's the basic request of assigned device. Thanks! -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm"

[PATCH 3/4] x86: Add MSI delivery mode mask

2008-10-08 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/asm-x86/msidef.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h index 296f29c..fdeebbb 100644 --- a/include/asm-x86/msidef.h +++ b/include/asm-x86/ms

[PATCH 4/4] KVM: Enable MSI for device assignment

2008-10-08 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 115 -- include/linux/kvm.h |4 ++ include/linux/kvm_host.h |3 + virt/kvm/ioapic.c|2 +- virt/kvm/ioapic.h|2 + 5 files change

[PATCH 1/4] Separate update irq to a single function

2008-10-08 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 82 +-- 1 files changed, 47 insertions(+), 35 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 932d03e..57825a1 100644 --- a/arch/x86/kvm/x86.c

Re: [PATCH 3/4] x86: Add MSI delivery mode mask

2008-10-08 Thread Sheng Yang
put on include/asm-x86/... So for now, probably it's more reasonable to keep it here. Thanks! -- regards Yang, Sheng > > Sheng Yang wrote: > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> > > --- > > include/asm-x86/msidef.h |3 +++ > > 1 files changed,

Re: [PATCH 1/4] Separate update irq to a single function

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 16:38:10 Sheng Yang wrote: > + assigned_dev->guest_irq = assigned_dev->guest_irq; > + assigned_dev->ack_notifier.gsi = assigned_dev->guest_irq; Found a typo here... Anyway, I will rebase it later, after Xiantao's

[PATCH] KVM: IRQ ACK notifier should be used with in-kernel irqchip

2008-10-08 Thread Sheng Yang
Also remove unnecessary parameter of unregister irq ack notifier. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c |8 ++-- arch/x86/kvm/irq.h |3 +-- arch/x86/kvm/x86.c |2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/i

Re: [PATCH] KVM: Unregister IRQ ACK notifier with in-kernel irqchip

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 15:08:52 Amit Shah wrote: > * On Wednesday 08 Oct 2008 12:09:20 Sheng Yang wrote: > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> > > --- > > arch/x86/kvm/x86.c |4 +++- > > 1 files changed, 3 insertions(+), 1 deletions(-) > &

Re: [PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 19:10:46 Avi Kivity wrote: > Sheng Yang wrote: > > On Wednesday 08 October 2008 18:14:22 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> Separate msr_bitmap for each vcpu, prepared for guest PAT support. > >> > >> Why is t

[PATCH 1/1] KVM: IRQ ACK notifier should be used with in-kernel irqchip

2008-10-08 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c |4 arch/x86/kvm/x86.c |4 +++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c index 8c1b9c5..24e2667 100644 --- a/arch/x86/kvm/irq.c +++ b/arch/x86/kvm

Re: [PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 18:14:22 Avi Kivity wrote: > Sheng Yang wrote: > > Separate msr_bitmap for each vcpu, prepared for guest PAT support. > > Why is this necessary? True, it reduces the overhead of the guest > reading and writing the PAT MSRs, but is such access fre

Re: [PATCH] KVM: Unregister IRQ ACK notifier with in-kernel irqchip

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 16:54:18 Sheng Yang wrote: > On Wednesday 08 October 2008 15:08:52 Amit Shah wrote: > > * On Wednesday 08 Oct 2008 12:09:20 Sheng Yang wrote: > > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> > > > --- > > > arch/x86/kvm/x

Re: [PATCH] KVM: Unregister IRQ ACK notifier with in-kernel irqchip

2008-10-08 Thread Sheng Yang
On Wednesday 08 October 2008 17:20:20 Amit Shah wrote: > * On Wednesday 08 Oct 2008 14:34:05 Sheng Yang wrote: > > On Wednesday 08 October 2008 16:54:18 Sheng Yang wrote: > > > On Wednesday 08 October 2008 15:08:52 Amit Shah wrote: > > > > * On Wednesday 08 Oct

[PATCH 5/6] Add local get_mtrr_type() to support MTRR

2008-10-09 Thread Sheng Yang
For EPT memory type support. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 104 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 99c239c..f590142

[PATCH 2/6] x86: Export some definition of MTRR

2008-10-09 Thread Sheng Yang
For KVM can reuse the type define, and need them to support shadow MTRR. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kernel/cpu/mtrr/generic.c | 12 +++- arch/x86/kernel/cpu/mtrr/mtrr.h| 17 - include/asm-x86/mtrr.h

[PATCH 0/6] MTRR/PAT support for EPT (v3)

2008-10-09 Thread Sheng Yang
Hi, Avi Here is the latest update of MTRR/PAT support. Change from v2: Discard the using of MSR bitmap, add MSR_IA32_CR_PAT to save/restore, as well as rebase on latest upstream. Thanks! -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a mes

[PATCH 6/6] Enable MTRR for EPT

2008-10-09 Thread Sheng Yang
The effective memory type of EPT is the mixture of MSR_IA32_CR_PAT and memory type field of EPT entry. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 11 ++- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/vmx.c | 12 +---

[PATCH 4/6] KVM: VMX: Add PAT support for EPT

2008-10-09 Thread Sheng Yang
GUEST_PAT support is a new feature introduced by Intel Core i7 architecture. With this, cpu would save/load guest and host PAT automatically, for EPT memory type in guest depends on MSR_IA32_CR_PAT. Also add save/restore for MSR_IA32_CR_PAT. Signed-off-by: Sheng Yang <[EMAIL PROTEC

[PATCH 1/6] x86: Rename mtrr_state struct and macro names

2008-10-09 Thread Sheng Yang
Prepare for exporting them. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kernel/cpu/mtrr/generic.c |8 arch/x86/kernel/cpu/mtrr/main.c|4 ++-- arch/x86/kernel/cpu/mtrr/mtrr.h|7 --- 3 files changed, 10 insertions(+), 9 deletions(-) diff -

[PATCH 3/6] KVM: Improve MTRR structure

2008-10-09 Thread Sheng Yang
As well as reset mmu context when set MTRR. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 61 ++- include/asm-x86/kvm_host.h |5 +++- 2 files changed, 63 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm

[PATCH 1/1] KVM: IRQ ACK notifier should be used with in-kernel irqchip

2008-10-09 Thread Sheng Yang
Also remove unnecessary parameter of unregister irq ack notifier. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |3 +-- virt/kvm/irq_comm.c |8 ++-- virt/kvm/kvm_main.c |2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff -

Re: [PATCH 1/1] KVM: IRQ ACK notifier should be used with in-kernel irqchip

2008-10-09 Thread Sheng Yang
On Thursday 09 October 2008 16:34:47 Avi Kivity wrote: > Sheng Yang wrote: > > Also remove unnecessary parameter of unregister irq ack notifier. > > > > diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c > > index d0169f5..54b251d 100644 > > --- a/virt/

Broken userspace module Makefile

2008-10-09 Thread Sheng Yang
m debian testing. I also tried one for fc9, same result. How do you think... -- regards Yang,Sheng -- From: Sheng Yang <[EMAIL PROTECTED]> Date: Thu, 9 Oct 2008 20:45:02 +0800 Subject: [PATCH 1/1] kvm: Fix broken Makefile of kernel module Signed-off-by: Sheng Yang <[EMAIL PROTECTED]>

Re: [PATCH 6/6] Enable MTRR for EPT

2008-10-09 Thread Sheng Yang
On Thursday 09 October 2008 16:44:19 Avi Kivity wrote: > Sheng Yang wrote: > > The effective memory type of EPT is the mixture of MSR_IA32_CR_PAT and > > memory type field of EPT entry. > > > > > > > > @@ -168,6 +168,7 @@ static u64 __read_mostly shadow_x_mas

Re: Compile faillure with 2.6.27-rc9-git1

2008-10-09 Thread Sheng Yang
On Wed, Oct 08, 2008 at 05:55:47PM +0200, Xavier Gnata wrote: > Hi, > > I'm trying to compile kvm-76 on a box running 2.6.27-rc9-git1 (yeah > ok...rc+git...). > I get this error: > In file included from /usr/local/src/kvm-76/kernel/x86/svm.c:16: > /usr/local/src/kvm-76/kernel/include/linux/kvm_ho

Re: [PATCH 0/6] MTRR/PAT support for EPT (v3)

2008-10-09 Thread Sheng Yang
On Thursday 09 October 2008 17:03:24 Avi Kivity wrote: > Sheng Yang wrote: > > Hi, Avi > > > > Here is the latest update of MTRR/PAT support. > > > > Change from v2: > > Discard the using of MSR bitmap, add MSR_IA32_CR_PAT to save/restore, as > > well

Re: [ Re: unhandled vm exit: 0x80000021 vcpu_id 0]

2008-10-09 Thread Sheng Yang
o. -- regards Yang, Sheng > > Reagrds, > Pier Luigi > > > Original Message > Subject: Re: unhandled vm exit: 0x8021 vcpu_id 0 > Date: Fri, 3 Oct 2008 08:57:31 +0800 > From: Sheng Yang <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] <

Re: Broken userspace module Makefile

2008-10-09 Thread Sheng Yang
e cover by qemu/config-host.mak... regards Yang, Sheng > Thanks > Xiantao > > Sheng Yang wrote: > > Hi, Avi > > > > After Xiantao's irq_common patches were checked in, we found that it's > > impossible to compile with VT-d userspace now. Essentially th

Re: [PATCH 0/6] MTRR/PAT support for EPT (v3)

2008-10-09 Thread Sheng Yang
On Thursday 09 October 2008 18:12:06 Avi Kivity wrote: > Sheng Yang wrote: > > On Thursday 09 October 2008 17:03:24 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> Hi, Avi > >>> > >>> Here is the latest update of MTRR/PAT support. > >&g

Re: [PATCH 0/6] MTRR/PAT support for EPT (v3)

2008-10-10 Thread Sheng Yang
On Friday 10 October 2008 14:49:13 Avi Kivity wrote: > Sheng Yang wrote: > > Yeah, I think the condition I mentioned is a example of yours. But in > > fact it's difficult to get a optimize value... I think it's possible that > > qemu may access all memory it ow

Re: [PATCH 1/2] KVM: Handle multiple interrupt sources

2008-10-12 Thread Sheng Yang
On Saturday 11 October 2008 16:10:51 Amit Shah wrote: > From: Sheng Yang <[EMAIL PROTECTED]> > > Keep a record of current interrupt state before injecting. Don't > assert/deassert repeatedly, so that every caller of kvm_set_irq() > can be identified as a separate inter

Re: [ Re: unhandled vm exit: 0x80000021 vcpu_id 0]

2008-10-12 Thread Sheng Yang
Hi Pier The only thing I can tell that is, seems guest completely messed up... It ran into some non-code segment. > unhandled vm exit: 0x8021 vcpu_id 0 > rax 0007 rbx 1490 rcx rdx > 19a0 rsi rdi rsp > 0

Re: [PATCH 1/2] KVM: Handle multiple interrupt sources

2008-10-12 Thread Sheng Yang
On Monday 13 October 2008 13:06:18 Amit Shah wrote: > - "Sheng Yang" <[EMAIL PROTECTED]> wrote: > > On Saturday 11 October 2008 16:10:51 Amit Shah wrote: > > > From: Sheng Yang <[EMAIL PROTECTED]> > > > > > > Keep a record of cu

Re: [v2] Shared guest irq support

2008-10-13 Thread Sheng Yang
On Monday 13 October 2008 15:31:12 Amit Shah wrote: > Sheng, can you check if this is fine? I'll need some time to test this. > I think it's fine. Thanks! -- regards Yang, Sheng -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More ma

Re: PCI passthrough = NMIs

2008-10-13 Thread Sheng Yang
On Monday 13 October 2008 23:04:34 Zwane Mwaikambo wrote: > On Mon, 13 Oct 2008, Muli Ben-Yehuda wrote: > > On Sun, Oct 12, 2008 at 11:09:14PM -0700, Zwane Mwaikambo wrote: > > > Hi, > > > I've been trying to get a Linux guest working with PCI passthrough > > > of an ethernet card using the vtd b

Re: PCI passthrough = NMIs

2008-10-14 Thread Sheng Yang
On Tuesday 14 October 2008 12:39:52 Zwane Mwaikambo wrote: > On Tue, 14 Oct 2008, Sheng Yang wrote: > > On Monday 13 October 2008 23:04:34 Zwane Mwaikambo wrote: > > > On Mon, 13 Oct 2008, Muli Ben-Yehuda wrote: > > > > On Sun, Oct 12, 2008 at 11:09:14PM -0700, Zwane

[PATCH 1/1] kvm: add cscope for whole userspace

2008-10-14 Thread Sheng Yang
Notice that the patch exclude kernel directory in cscope.files of userspace. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- Makefile |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 402c3e9..6581679 100644 --- a/Makefile +++ b/Ma

[PATCH 1/1] KVM: Clean up kvm_x86_emulate.h

2008-10-14 Thread Sheng Yang
Remove one left improper comment of removed CR2. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/asm-x86/kvm_x86_emulate.h | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h

Re: [v2] Shared guest irq support

2008-10-14 Thread Sheng Yang
On Tuesday 14 October 2008 16:45:19 Zhang, Xiantao wrote: > Hi, Amit/Sheng > See the comments below. Hi Amit Can you help to update the patch? Thanks! And minor comments below. > Xiantao > > > Amit Shah wrote: > >> Sheng, can you check if this is fine? I'll need some time to test > >> th

Re: [v2] Shared guest irq support

2008-10-15 Thread Sheng Yang
On Wednesday 15 October 2008 15:03:39 Amit Shah wrote: > * On Wednesday 15 Oct 2008 08:06:30 Sheng Yang wrote: > > > > @@ -4115,6 +4116,9 @@ struct kvm *kvm_arch_create_vm(void) > > > > INIT_LIST_HEAD(&kvm->arch.active_mmu_pages); &

Re: [v2] Shared guest irq support

2008-10-16 Thread Sheng Yang
On Thursday 16 October 2008 16:21:38 Avi Kivity wrote: > Zhang, Xiantao wrote: > > Forget to modify the from item generated automatically by git. Modified > > to Sheng Yang <[EMAIL PROTECTED]> :) > > Xiantao > > > > From c0d1ad6327c01ba0584922022bef48c971b

Re: [PATCH] KVM: VMX: Move private memory slot position

2008-10-16 Thread Sheng Yang
On Thursday 16 October 2008 16:26:07 Avi Kivity wrote: > Yang, Sheng wrote: > > I've found the reason... It's because that kvm_mmu_page->slot_bitmap is > > unsigned long, and if use KVM_MEMORY_SLOTS + xxx, it would beyond 32 in > > pae, then memory corrupted. > > > > But reduce supported memory slo

[PATCH 2/2] KVM: VMX: Move private memory slot position

2008-10-16 Thread Sheng Yang
PCI device assignment would map guest MMIO spaces as separate slot, so it is possible that the device has more than 2 MMIO spaces and overwrite current private memslot. The patch move private memory slot to the top of userspace visible memory slots. Signed-off-by: Sheng Yang <[EMAIL PROTEC

[PATCH 1/2] KVM: MMU: Extend kvm_mmu_page->slot_bitmap size

2008-10-16 Thread Sheng Yang
Otherwise set_bit() for private memory slot(above KVM_MEMORY_SLOTS) would corrupted memory in 32bit host. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c |6 +++--- include/asm-x86/kvm_host.h |8 +--- 2 files changed, 8 insertions(+), 6 deletions(-)

[PATCH 1/1] kvm: fix wrong position of clean cscope

2008-10-16 Thread Sheng Yang
My fault... Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 6581679..64e296d 100644 --- a/Makefile +++ b/Makefile @@ -110,8 +110,8 @@ srpm: clean: for i in $(if $(WANT_

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-16 Thread Sheng Yang
On Wednesday 15 October 2008 22:27:49 Jan Kiszka wrote: > Aligning in-kernel kvm_apic_accept_pic_intr with its user space mate, > this patch relaxes the conditions under which PIC IRQs are accepted > by LVT0. This reflects reality and allows to reuse the service for the > NMI watchdog use case. > >

[PATCH 1/1] kvm: bios: Update e820 table for EPT real mode pagetable

2008-10-17 Thread Sheng Yang
I remembered I had sent this long long ago, but happened to find it missing in upstream... Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- bios/rombios.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bios/rombios.c b/bios/rombios.c index 818ce63..9a1cdd6

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 10:10:54AM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Wednesday 15 October 2008 22:27:49 Jan Kiszka wrote: > >> Aligning in-kernel kvm_apic_accept_pic_intr with its user space mate, > >> this patch relaxes the conditions under which PI

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > As suggested by Avi, this patch introduces a counter of VCPUs that have > LVT0 set to NMI mode. Only if the counter > 0, we push the PIT ticks via > all LAPIC LVT0 lines to enable NMI watchdog support. > I feel a little strange about:

Re: APIC problems with kvm-77 (was Re: [ANNOUNCE] kvm-77 release)

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 10:08:48AM -0500, Carlo Marcelo Arenas Belon wrote: > On Sun, Oct 12, 2008 at 06:18:29PM +, Don Parsons wrote: > > > > Trying to boot with kvm-77 gave a debugging hint, so here is > > what I get. Does not look informative to me though. This was > > typed from screen (

Re: Build failure w/o mmu notifiers

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: > Hi, > > I'm currently experiencing build failures when CONFIG_MMU_NOTIFIERS is > not set. Is this intended? If so, it might be nice to put a configure- > check or #error somewhere to tell the user that enabling mmu notifiers > b

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > >> As suggested by Avi, this patch introduces a counter of VCPUs that have > >> LVT0 set to NMI mode. Only if the counter >

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:35:01PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Fri, Oct 17, 2008 at 10:10:54AM +0200, Jan Kiszka wrote: > >> Sheng Yang wrote: > >>> On Wednesday 15 October 2008 22:27:49 Jan Kiszka wrote: > >>>> Aligning in-

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:56:13PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Fri, Oct 17, 2008 at 07:35:01PM +0200, Jan Kiszka wrote: > >> Sheng Yang wrote: > >>> On Fri, Oct 17, 2008 at 10:10:54AM +0200, Jan Kiszka wrote: > >>>> Sheng Yang w

Re: Build failure w/o mmu notifiers

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:47:39PM +0200, Alexander Graf wrote: > > On 17.10.2008, at 19:25, Sheng Yang wrote: > >> On Fri, Oct 17, 2008 at 06:34:35PM +0200, Alexander Graf wrote: >>> Hi, >>> >>> I'm currently experiencing build failures when CON

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:40:00PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: > >> Sheng Yang wrote: > >>> On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > >>>> As suggest

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 08:12:00PM +0200, Jan Kiszka wrote: > Jan Kiszka wrote: > > Sheng Yang wrote: > >> On Fri, Oct 17, 2008 at 07:35:01PM +0200, Jan Kiszka wrote: > >>> Sheng Yang wrote: > >>>> On Fri, Oct 17, 2008 at 10:10:54AM +0200, Jan Kiszka

Re: [PATCH 1/3] KVM: x86: Relax accept conditions of kvm_apic_accept_pic_intr

2008-10-17 Thread Sheng Yang
On Sat, Oct 18, 2008 at 10:44 AM, Sheng Yang <[EMAIL PROTECTED]> wrote: > On Fri, Oct 17, 2008 at 08:12:00PM +0200, Jan Kiszka wrote: >> Jan Kiszka wrote: >> > Sheng Yang wrote: >> >> On Fri, Oct 17, 2008 at 07:35:01PM +0200, Jan Kiszka wrote: >> >>

Re: [PATCH 0/3] KVM: x86: Fix and optimize in-kernel NMI watchdog support

2008-10-19 Thread Sheng Yang
On Sun, Oct 19, 2008 at 01:13:57PM +0200, Avi Kivity wrote: > Jan Kiszka wrote: >> Bug tracker reports 2149609 and 2168057 pointed out boot issues of >> Windows 64-bit versions. This series fixes the underlying problem. >> >> It furthermore stacks the earlier posted optimization on top which >> sho

Re: Broken userspace module Makefile

2008-10-20 Thread Sheng Yang
On Sunday 19 October 2008 17:25:43 Avi Kivity wrote: > Sheng Yang wrote: > > Hi, Avi > > > > After Xiantao's irq_common patches were checked in, we found that it's > > impossible to compile with VT-d userspace now. Essentially the problem is > > Makefil

[PATCH 1/1] KVM: IRQ ACK notifier should be used with in-kernel irqchip

2008-10-20 Thread Sheng Yang
Also remove unnecessary parameter of unregister irq ack notifier. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |3 +-- virt/kvm/irq_comm.c |8 ++-- virt/kvm/kvm_main.c |2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff -

Re: LAPIC soft-disable vs. LVT masking

2008-10-20 Thread Sheng Yang
On Mon, Oct 20, 2008 at 05:46:35PM +0800, Yang, Sheng wrote: > On Monday 20 October 2008 16:49:11 Jan Kiszka wrote: > > Hi Sheng, > > > > obviously, I meditated too long over the APIC specs and VAPIC code of > > KVM: When the guest resets the soft-enable bit in SVR, the in-kernel > > APIC implement

Re: [PATCH 2/2] KVM: x86: Optimize NMI watchdog delivery

2008-10-20 Thread Sheng Yang
off-by: Jan Kiszka <[EMAIL PROTECTED]> Acked-by: Sheng Yang <[EMAIL PROTECTED]> -- regards Yang, Sheng > --- > arch/x86/kvm/i8254.c | 11 ++- > arch/x86/kvm/lapic.c | 23 --- > include/asm-x86/kvm_host.h |1 + > 3 files changed

Re: [PATCH 1/2] KVM: x86: Fix and refactor NMI watchdog emulation

2008-10-20 Thread Sheng Yang
y hardware enable is OK) Others seems OK to me. > > Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> Acked-by: Sheng Yang <[EMAIL PROTECTED]> -- regards Yang, Sheng > --- > arch/x86/kvm/i8254.c | 15 +-- > arch/x86/kvm/irq.h |2 +- > arch/x86/kvm/l

Re: LAPIC soft-disable vs. LVT masking

2008-10-20 Thread Sheng Yang
On Mon, Oct 20, 2008 at 01:58:03PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Mon, Oct 20, 2008 at 05:46:35PM +0800, Yang, Sheng wrote: > >> On Monday 20 October 2008 16:49:11 Jan Kiszka wrote: > >>> Hi Sheng, > >>> > >>> obviously, I

Re: [PATCH] KVM: x86: Don't deliver PIC interrupts to disabled APICs - v2

2008-10-20 Thread Sheng Yang
abled. This does not comply with the Virtual > Wire mode according to the Intel MP spec. > > Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> Acked-by: Sheng Yang <[EMAIL PROTECTED]> -- regards Yang, Sheng > --- > arch/x86/kvm/lapic.c | 21 +++-- &g

Re: [PATCH] KVM: x86: Don't deliver PIC interrupts to disabled APICs

2008-10-20 Thread Sheng Yang
On Mon, Oct 20, 2008 at 10:50:57AM +0200, Jan Kiszka wrote: > The locic of kvm_apic_accept_pic_intr has a minor, practically hardly Typo... > relevant incorrectness: PIC interrupts are still delivered even if the > APIC of VPU0 (BSP) is disabled. This does not comply with the Virtual > Wire mode

[PATCH] kvm: fix unifdef problem

2008-10-21 Thread Sheng Yang
e file. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- kernel/Makefile | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index ef18fa6..fed3bd4 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -3,6 +3,8 @@ include conf

Re: [PATCH] kvm: fix unifdef problem

2008-10-21 Thread Sheng Yang
On Tuesday 21 October 2008 15:31:04 Sheng Yang wrote: > Reminder by Avi, unifdef need a -U parameter to deal undefined macro, other > wise it can't deal with #if defined() || defined(). > > Also fix a historic bug on never execute unifdef... > > Also discard "set

[PATCH 1/1] KVM: Use set_bit for userspace irq source init

2008-10-22 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/ia64/kvm/kvm-ia64.c |2 +- arch/x86/kvm/x86.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index a40223f..c25c75b 100644 --- a/arch/ia64/kvm/kv

[PATCH 1/1] KVM: Fix incorrect KVM_USERSPACE_IRQ_SOURCE_ID

2008-10-23 Thread Sheng Yang
(When I am curious how this have been fixed without any patch, I just saw the add-on fix is from Xiantao, and was reverted along with the other part of that patch...) Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> --- include/linu

Re: [PATCH 1/1] kvm: bios: Update e820 table for EPT real mode pagetable

2008-10-23 Thread Sheng Yang
On Friday 17 October 2008 15:17:52 Sheng Yang wrote: > I remembered I had sent this long long ago, but happened to find it missing > in upstream... > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Avi? -- regards Yang, Sheng > --- > bios/rombios.c |5 +++-- > 1

[PATCH 1/1] KVM: Enable Function Level Reset for assigned device

2008-10-29 Thread Sheng Yang
evice assignment. (But sadly, the feature is new, and most device on the market now don't support it. We are considering using D0/D3hot transmit to emulate it later, but not that elegant and reliable as FLR itself.) Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |

[RFC][PATCH 0/10][v3] Enable MSI for KVM assigned device

2008-10-30 Thread Sheng Yang
Hi, Avi Here is v3 for MSI on assigned devices. Still not conclude userspace patch, but the patchset changes a lot since v2. After discuss with Xiantao, we decide to reuse MSI dispatch function for x86 and IA64. I am working on that now. After get it done, I will send out v4. Another significan

[PATCH 03/10] KVM: Replace irq_requested with more generic irq_requested_type

2008-10-30 Thread Sheng Yang
Separate guest irq type and host irq type, for we can support guest using INTx with host using MSI (but not opposite combination). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |4 +++- virt/kvm/kvm_main.c |9 + 2 files changed, 8 inse

[PATCH 04/10] KVM: Clean up assigned_device_update_irq

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 6ca04ce..ddfd7ac 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -180,11 +

[PATCH 05/10] KVM: Add fields for MSI device assignment

2008-10-30 Thread Sheng Yang
Prepared for kvm_arch_assigned_device_msi_dispatch(). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm.h |6 +- include/linux/kvm_host.h |4 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h

[PATCH 01/10] KVM: Move ack notifier register and IRQ sourcd ID request

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 30 +++--- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 43fea09..3ecc5a8 100644 --- a/virt/kvm/kvm_main.c +++ b/vi

[PATCH 10/10] KVM: MSI to INTx translate

2008-10-30 Thread Sheng Yang
Now we use MSI as default one Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 50 +++--- 1 files changed, 27 insertions(+), 23 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 0f851ef..34b5d2f

[PATCH 08/10] KVM: Add assigned_device_msi_dispatch()

2008-10-30 Thread Sheng Yang
The function is used to dispatch MSI to lapic according to MSI message address and message data. (Any way to replace macro GET_VAL_FROM_SHIFT()?) Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 45 + 1 files chang

[PATCH 07/10] x86: Add MSI delivery mode mask

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/asm-x86/msidef.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h index 296f29c..579b09d 100644 --- a/include/asm-x86/msidef.h +++ b/include/asm-x86/ms

[PATCH 02/10] KVM: Separate update irq to a single function

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 68 -- 1 files changed, 38 insertions(+), 30 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3ecc5a8..ac1d652 100644 --- a/virt/kvm/kvm_

[PATCH 06/10] KVM: Export ioapic_get_delivery_bitmask

2008-10-30 Thread Sheng Yang
It would be used for MSI in device assignment, for MSI dispatch. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/ioapic.c |4 ++-- virt/kvm/ioapic.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index c

[PATCH 09/10] KVM: Enable MSI for device assignment

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 74 ++ 1 files changed, 68 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index be0f943..0f851ef 100644 --- a/virt/kvm/kvm_main.c

Re: [PATCH 08/10] KVM: Add assigned_device_msi_dispatch()

2008-10-30 Thread Sheng Yang
On Thursday 30 October 2008 16:20:16 Sheng Yang wrote: > The function is used to dispatch MSI to lapic according to MSI message > address and message data. > > (Any way to replace macro GET_VAL_FROM_SHIFT()?) > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> > --- &g

[PATCH 1/1] KVM: Enable Function Level Reset for assigned device

2008-10-30 Thread Sheng Yang
ssigned to the guest.] Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |2 +- virt/kvm/kvm_main.c |5 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 38f79b6..9a4a39c 100644 --- a/arch/x86/kvm/

[PATCH 0/10][v4] Enable MSI for KVM assigned device kernel part

2008-10-30 Thread Sheng Yang
Hi, Avi Here is v4 for MSI on assigned devices. v3->v4 1. After discuss with Xiantao, we decide to delay MSI enabling for IA64, so I've temporary wrapped MSI critical part with #ifdef CONFIG_X86. These are expected to be removed soon before 2.6.28 release. 2. Fix two wrong usage of macro. The

[PATCH 05/10] KVM: Add fields for MSI device assignment

2008-10-30 Thread Sheng Yang
Prepared for kvm_arch_assigned_device_msi_dispatch(). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm.h |6 +- include/linux/kvm_host.h |4 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h

[PATCH 01/10] KVM: Move ack notifier register and IRQ sourcd ID request

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 30 +++--- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4f43abe..4647a7b 100644 --- a/virt/kvm/kvm_main.c +++ b/vi

[PATCH 10/10] KVM: MSI to INTx translate

2008-10-30 Thread Sheng Yang
Now we use MSI as default one, and translate MSI to INTx when guest need INTx rather than MSI. For legacy device, we provide support for non-sharing host IRQ. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 52 -- 1

[PATCH 03/10] KVM: Replace irq_requested with more generic irq_requested_type

2008-10-30 Thread Sheng Yang
Separate guest irq type and host irq type, for we can support guest using INTx with host using MSI (but not opposite combination). Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |4 +++- virt/kvm/kvm_main.c |9 + 2 files changed, 8 inse

[PATCH 04/10] KVM: Clean up assigned_device_update_irq

2008-10-30 Thread Sheng Yang
Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ed1b243..c69c108 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -178,11 +

[PATCH 08/10] KVM: Add assigned_device_msi_dispatch()

2008-10-30 Thread Sheng Yang
The function is used to dispatch MSI to lapic according to MSI message address and message data. (Any way to replace macro GET_VAL_FROM_SHIFT()?) Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 55 +++ 1 files chang

<    1   2   3   4   5   6   7   8   9   10   >