[v5][PATCH] KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state

2013-10-22 Thread Tiejun Chen
We enter with interrupts disabled in hardware, but we need to call RECONCILE_IRQ_STATE anyway to ensure that the software state is kept in sync instead of calling hard_irq_disable() directly. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- v5: Fix one typo in the comment. v4: Fix one

[v3] KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state

2013-10-21 Thread Tiejun Chen
We enter with interrupts disabled in hardware, but we need to call SOFT_DISABLE_INTS anyway to ensure that the software state is kept in sync instead of calling hard_irq_disable() directly. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- v3: Base on the latest tree, now we can use

[v4][PATCH] KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state

2013-10-21 Thread Tiejun Chen
We enter with interrupts disabled in hardware, but we need to call RECONCILE_IRQ_STATE anyway to ensure that the software state is kept in sync instead of calling hard_irq_disable() directly. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- v4: Fix one typo in the patch description. v3

[PATCH 2/2] KVM: PPC: Book3E HV: call SOFT_DISABLE_INTS to sync the software state

2013-08-06 Thread Tiejun Chen
We enter with interrupts disabled in hardware, but we need to call SOFT_DISABLE_INTS anyway to ensure that the software state is kept in sync. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/bookehv_interrupts.S | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH 0/2] KVM: PPC: Book3E HV: Rework to sync the software state

2013-08-06 Thread Tiejun Chen
For more detail please have a look at this :) http://patchwork.ozlabs.org/patch/257974/ http://ns1.yosemitephotos.net/lists/kvm-ppc/msg07430.html Tiejun Chen (2): Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() KVM: PPC: Book3E HV: call SOFT_DISABLE_INTS to sync

[PATCH 1/2] Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-08-06 Thread Tiejun Chen
We should revert this commit to rework. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 17722d8..7653c9c 100644 --- a/arch/powerpc/kvm

[v1][PATCH 1/1] powerpc: to access local paca after hard irq disabled

2013-07-14 Thread Tiejun Chen
We can access paca directly after hard interrupt disabled, and this can avoid accessing wrong paca when using get_paca() in preempt case. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/include/asm/hw_irq.h |7 --- 1 file changed, 4 insertions(+), 3 deletions

[v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable()

2013-07-10 Thread Tiejun Chen
We should ensure the preemption cannot occur while calling get_paca() insdide hard_irq_disable(), otherwise the paca_struct may be the wrong one just after. And btw, we may update timing stats in this case. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c |2

[v3][KVM][PATCH 1/1] kvm:ppc: control doorbell exception with CONFIG_PPC_DOORBELL

2013-05-12 Thread Tiejun Chen
We can only use CONFIG_PPC_DOORBELL to control whether the doorbell exception should be enabled. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- v3: Just imporve the patch head. v2: Use CONFIG_PPC_DOORBELL to replace CONFIG_KVM_E500MC as that control condition. arch/powerpc/kvm

[v2][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with CONFIG_PPC_DOORBELL

2013-05-07 Thread Tiejun Chen
CONFIG_PPC_DOORBELL is enough to cover all variants. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..62d4ece 100644

[v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-07 Thread Tiejun Chen
We also can direct ISI exception to Guest like DSI. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke_emulate.c |3 +++ arch/powerpc/kvm/e500mc.c|3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke_emulate.c b

[v1][KVM][PATCH 1/1] kvm:ppc: enable doorbell exception with E500MC

2013-05-05 Thread Tiejun Chen
Actually E500MC also support doorbell exception, and CONFIG_PPC_E500MC can cover BOOK3E/BOOK3E_64 as well. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch

[RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-05 Thread Tiejun Chen
-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/bookehv_interrupts.S |9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index e8ed7d6..2fd62bf 100644 --- a/arch/powerpc/kvm

[PATCH 1/1] kvm:book3e: Fix a build error

2013-04-25 Thread Tiejun Chen
to `kvmppc_handler_42_0x01B' arch/powerpc/kernel/built-in.o: In function `exc_altivec_assist_book3e': arch/powerpc/kernel/exceptions-64e.S:424: undefined reference to `kvmppc_handler_43_0x01B' make: *** [vmlinux] Error 1 Looks we should add these altivec kvm handlers. Signed-off-by: Tiejun Chen

[PATCH] KVM/PPC: emulate ehpriv

2013-04-18 Thread Tiejun Chen
We can provide this emulation to simplify more extension later. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/include/asm/disassemble.h |4 arch/powerpc/kvm/e500_emulate.c| 17 + 2 files changed, 21 insertions(+) diff --git a/arch