[PATCH] KVM:PPC Issue in exit timing clearance

2011-03-16 Thread Bharat Bhushan
then it held the vcpu-mutx. While the exiting timing process waits for guest to release the vcpu-mutex and a hang state is reached. Now using seprate lock for exit timing stats. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Acked-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH v2] Issue in exit timing clearance

2011-03-24 Thread Bharat Bhushan
then it held the vcpu-mutx. While the exiting timing process waits for guest to release the vcpu-mutex and a hang state is reached. Now using seprate lock for exit timing stats. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Acked-by: Alexander Graf ag...@suse.de --- rebased to head

[PATCH]powerpc: Corrected include header path in kvm_para.h

2012-12-18 Thread Bharat Bhushan
The include/uapi/asm/kvm_para.h includes include/uapi/asm/epapr_hcalls.h but the correct reference should be include/asm/epapr_hcalls.h as this is the place where make install_header installs the header files for userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch

[PATCH 1/4] Introduce a common kvm requests handler

2012-08-09 Thread Bharat Bhushan
Added a common requests handler which is called before returning to guest. This returns non zero value when some request demands exit to userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 45 + 1

[PATCH 3/4] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-08-09 Thread Bharat Bhushan
IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm.h | 12 arch/powerpc/include/asm/kvm_host.h | 24 - arch/powerpc

[PATCH 2/4] KVM: PPC: booke: Add watchdog emulation

2012-08-09 Thread Bharat Bhushan
reset/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com [bharat.bhus...@freescale.com: reworked patch] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v8: - clear REQ_WATCHDOG moved

[PATCH 4/4] KVM: PPC: booke: Allow multiple exception types

2012-08-09 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - incorporated review comments arch/powerpc/include/asm/kvm_ppc.h |2 - arch/powerpc/kvm/booke.c| 13

[PATCH 4/4 v2] KVM: PPC: booke: Allow multiple exception types

2012-08-09 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - checkpatch error removed arch/powerpc/include/asm/kvm_ppc.h |2 - arch/powerpc/kvm/booke.c| 13

[PATCH 2/4 v2] KVM: PPC: booke: Add watchdog emulation

2012-08-09 Thread Bharat Bhushan
reset/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com [bharat.bhus...@freescale.com: reworked patch] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - checkpatch error removed arch

[PATCH 1/4 v2] Introduce a common kvm requests handler

2012-08-09 Thread Bharat Bhushan
Added a common requests handler which is called before returning to guest. This returns non zero value when some request demands exit to userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - checkpatch error removed arch/powerpc/kvm/booke.c | 46

[PATCH 3/4 v2] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-08-09 Thread Bharat Bhushan
IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - checkpatch error removed arch/powerpc/include/asm/kvm.h | 12 arch/powerpc/include/asm/kvm_host.h | 24

[PATCH] Document IACx/DACx registers access using ONE_REG API

2012-08-15 Thread Bharat Bhushan
Patch to access the debug registers (IACx/DACx) using ONE_REG api was sent earlier. But that missed the respective documentation. Also corrected the index number referencing in section 4.69 Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- Documentation/virtual/kvm/api.txt |9

[PATCH 1/6] KVM: PPC: booke: use vcpu reference from thread_struct

2012-08-21 Thread Bharat Bhushan
Like other places, use thread_struct to get vcpu reference. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/asm-offsets.c |2 +- arch/powerpc/kvm/booke_interrupts.S |6 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/powerpc

[PATCH 5/6] booke: Added DBCR4 SPR number

2012-08-21 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/reg_booke.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index e07e6af..b417de3 100644 --- a/arch

[PATCH 4/6] KVM: PPC: debug stub interface parameter defined

2012-08-21 Thread Bharat Bhushan
This patch defines the interface parameter for KVM_SET_GUEST_DEBUG ioctl support. Follow up patches will use this for setting up hardware breakpoints, watchpoints and software breakpoints. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm.h | 33

[PATCH 6/6] KVM: booke/bookehv: Add debug stub support

2012-08-21 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm.h| 29 ++- arch/powerpc/include/asm

[PATCH 0/6] KVM: BOOKE/BOOKEHV : Added debug stub support

2012-08-21 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds the QEMU debug stub support for powerpc (booke/bookehv). [1/6] KVM: PPC: booke: use vcpu reference from thread_struct - This is a cleanup patch to use vcpu reference from thread struct [2/6] KVM: PPC: booke: Allow

[PATCH 3/6] KVM: PPC: booke: Added debug handler

2012-08-21 Thread Bharat Bhushan
Installed debug handler will be used for guest debug support and debug facility emulation features (patches for these features will follow this patch). Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH 2/6] KVM: PPC: booke: Allow multiple exception types

2012-08-21 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h |2 - arch/powerpc/kvm/booke.c| 14 arch/powerpc/kvm

[PATCH 1/2] booke/bookehv: Add host crit-watchdog exception support

2012-06-20 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/hw_irq.h |2 ++ arch/powerpc/kvm/booke.c | 21 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm

[PATCH 2/2] booke: Added crit/mc exception handler for e500v2

2012-06-20 Thread Bharat Bhushan
Watchdog is taken at critical exception level. So this patch is tested with host watchdog exception happening when guest is running. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke_interrupts.S | 55 +-- 1 files changed, 27

[PATCH 1/2] KVM: PPC: Critical interrupt emulation support

2012-06-27 Thread Bharat Bhushan
rfci instruction and CSRR0/1 registers are emulated. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke_emulate.c | 25 + 1 files

[PATCH 2/2] KVM: PPC: booke: Add watchdog emulation

2012-06-28 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h |2 + arch/powerpc/include/asm/kvm_ppc.h |3

[PATCH 2/2 v2] KVM: PPC: booke: Add watchdog emulation

2012-07-09 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- -v2: - Addressed the review comments arch/powerpc/include/asm/kvm_book3s.h |5 ++ arch

[PATCH 2/2 v3] KVM: PPC: booke: Add watchdog emulation

2012-07-18 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v3: - Using KVM_REQ_WATCHDOG for userspace exit. - TSR changes left for vcpu thread. - Other review comments on v2 arch/powerpc/include/asm/kvm_host.h |3 + arch/powerpc/include

[PATCH 2/2 v4] KVM: PPC: booke: Add watchdog emulation

2012-07-18 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v4: - in v3 i forgot to add Scott Wood and Liu Yu signoff v3: - Using KVM_REQ_WATCHDOG

[PATCH 2/2] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com [bharat.bhus...@freescale.com: reworked patch] --- v5: - Checking that TSR_ENW/TSR_WIS are still

[PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-19 Thread Bharat Bhushan
/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com [bharat.bhus...@freescale.com: reworked patch] --- v5: - Checking that TSR_ENW/TSR_WIS are still

[PATCH] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-07-23 Thread Bharat Bhushan
IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm.h | 12 ++ arch/powerpc/include/asm/kvm_host.h | 28 ++- arch/powerpc/kvm

[PATCH v2] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-07-23 Thread Bharat Bhushan
IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - Using copy_to/from_user() apis. arch/powerpc/include/asm/kvm.h | 12 ++ arch/powerpc/include/asm/kvm_host.h

[PATCH v3] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-07-24 Thread Bharat Bhushan
IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v3: - IAC3/4 defined on non-fsl booke - kvmppc_debug_reg renamed to kvmppc_booke_debug_reg v2: - Using copy_to/from_user

[PATCH 2/2 v6] KVM: PPC: booke: Add watchdog emulation

2012-07-24 Thread Bharat Bhushan
reset/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com [bharat.bhus...@freescale.com: reworked patch] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v6: - Added kvmppc_subarch_vcpu_unit

[PATCH 1/2] KVM: PPC: booke: Allow multiple exception types

2012-07-25 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_asm.h |2 ++ arch/powerpc/kvm/booke.c|9 + arch/powerpc/kvm/booke.h|1 + arch/powerpc/kvm

[PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-07-25 Thread Bharat Bhushan
This patch adds: 1) KVM debug handler added for e500v2. 2) Guest debug by qemu gdb stub. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Varun Sethi varun.se...@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com

[PATCH 1/2] KVM: PPC: booke: Allow multiple exception types

2012-07-30 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h |2 - arch/powerpc/kvm/booke.c|9 --- arch/powerpc/kvm/booke.h

[PATCH 2/2] KVM: PPC: booke: Added debug handler

2012-07-30 Thread Bharat Bhushan
Installed debug handler will be used for guest debug support and debug facility emulation features (patches for these features will follow this patch). Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH 1/2] KVM: PPC: booke: Add watchdog emulation

2012-08-02 Thread Bharat Bhushan
reset/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com [bharat.bhus...@freescale.com: reworked patch] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v7: - kvmppc_core_dequeue_watchdog

[PATCH 2/2] Unified the kvm requests in one function

2012-08-02 Thread Bharat Bhushan
I am sending this as a separate patch for easiness on review. Once reviewed I will merge this with watchdog patch. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 63 +++--- 1 files changed, 37 insertions(+), 26

[PATCH 2/3] KVM: PPC: booke: Allow multiple exception types

2012-08-03 Thread Bharat Bhushan
for different handlers. Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h |2 - arch/powerpc/kvm/booke.c|9 --- arch/powerpc/kvm/booke.h

[PATCH 1/3] booke: Added ONE_REG interface for IAC/DAC debug registers

2012-08-03 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com IAC/DAC are defined as 32 bit while they are 64 bit wide. So ONE_REG interface is added to set/get them. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm.h | 12 ++ arch/powerpc/include/asm

[PATCH 3/3] KVM: PPC: booke: Added debug handler

2012-08-03 Thread Bharat Bhushan
Installed debug handler will be used for guest debug support and debug facility emulation features (patches for these features will follow this patch). Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH] Restore guest CR after exit timing calculation

2012-03-05 Thread Bharat Bhushan
No instruction which can change Condition Register (CR) should be executed after Guest CR is loaded. So the guest CR is restored after the Exit Timing in lightweight_exit executes cmpw, which can clobber CR. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- This patch is against

[PATCH v5] KVM: Use minimum and maximum address mapped by TLB1

2012-03-22 Thread Bharat Bhushan
Keep track of minimum and maximum address mapped by tlb1. This helps in TLBMISS handling in KVM to quick check whether the address lies in mapped range. If address does not lies in this range then no need to look in each tlb1 entry of tlb1 array. Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH] Use clockevent multiplier and shifter for decrementer

2012-04-04 Thread Bharat Bhushan
-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/time.h |2 ++ arch/powerpc/kernel/time.c |6 ++ arch/powerpc/kvm/emulate.c |5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/time.h b/arch

[PATCH v2] KVM: PPC: Use clockevent multiplier and shifter for decrementer

2012-04-08 Thread Bharat Bhushan
-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - decrementer_clockevent is made non-static rather than a seprate API to get mult/shift arch/powerpc/include/asm/time.h |1 + arch/powerpc/kernel/time.c |2 +- arch/powerpc/kvm/emulate.c |5 +++-- 3 files changed, 5

[PATCH v3]KVM: PPC: Use clockevent multiplier and shifter for decrementer

2012-04-16 Thread Bharat Bhushan
-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v3: - decrementer_clockevent symbol exported. arch/powerpc/include/asm/time.h |1 + arch/powerpc/kernel/time.c |3 ++- arch/powerpc/kvm/emulate.c |5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v4] KVM: PPC Use clockevent multiplier and shifter for decrementer

2012-04-18 Thread Bharat Bhushan
-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v4: - Added comment in emulate.c arch/powerpc/include/asm/time.h |1 + arch/powerpc/kernel/time.c |3 ++- arch/powerpc/kvm/emulate.c |9 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch

Re: [ANNOUNCE] qemu-kvm-0.14.0

2011-04-29 Thread Bharat Bhushan
klondike franxisco1988 at gmail.com writes: /usr/src/redhat/BUILD/qemu-kvm-0.14.0/qemu-kvm.h:673:38: error: attempt to use poisoned env /usr/src/redhat/BUILD/qemu-kvm-0.14.0/qemu-kvm.h:690:37: error: attempt to use poisoned TARGET_PAGE_BITS

[PATCH 0/8] KVM: BOOKE/BOOKEHV : Added debug stub support

2013-01-16 Thread Bharat Bhushan
defined [6/8] booke: Added DBCR4 SPR number [7/8] KVM: booke/bookehv: Add debug stub support - Add the debug stub interface on booke/bookehv [8/8] KVM:PPC:booke: Allow debug interrupt injection to guest -- with this qemu can inject debug interrupt to guest Bharat Bhushan (8): KVM: PPC

[PATCH 1/8] KVM: PPC: booke: use vcpu reference from thread_struct

2013-01-16 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Like other places, use thread_struct to get vcpu reference. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/reg.h |2 -- arch/powerpc/kernel/asm-offsets.c |2 +- arch/powerpc/kvm

[PATCH 2/8] KVM: PPC: booke: Allow multiple exception types

2013-01-16 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Current kvmppc_booke_handlers uses the same macro (KVM_HANDLER) and all handlers are considered to be the same size. This will not be the case if we want to use different macros for different handlers. This patch improves the kvmppc_booke_handler

[PATCH 3/8] KVM: PPC: booke: Added debug handler

2013-01-16 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Installed debug handler will be used for guest debug support and debug facility emulation features (patches for these features will follow this patch). Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes

[PATCH 5/8] KVM: PPC: debug stub interface parameter defined

2013-01-16 Thread Bharat Bhushan
This patch defines the interface parameter for KVM_SET_GUEST_DEBUG ioctl support. Follow up patches will use this for setting up hardware breakpoints, watchpoints and software breakpoints. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/uapi/asm/kvm.h | 23

[PATCH 4/8] Added ONE_REG interface for debug instruction

2013-01-16 Thread Bharat Bhushan
This patch adds the one_reg interface to get the special instruction to be used for setting software breakpoint from userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- Documentation/virtual/kvm/api.txt |1 + arch/powerpc/include/asm/kvm_ppc.h |1 + arch/powerpc

[PATCH 6/8] booke: Added DBCR4 SPR number

2013-01-16 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/reg_booke.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm

[PATCH 7/8] KVM: PPC: booke/bookehv: Add debug stub support

2013-01-16 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h |5 + arch/powerpc/include/asm/kvm_ppc.h

[PATCH 8/8] KVM:PPC:booke: Allow debug interrupt injection to guest

2013-01-16 Thread Bharat Bhushan
Allow userspace to inject debug interrupt to guest. QEMU can inject the debug interrupt to guest if it is not able to handle the debug interrupt. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 32 +++- arch/powerpc/kvm

[PATCH] Added one_reg interface for timer registers

2013-02-08 Thread Bharat Bhushan
) setting the TCR register. There are cases where we want to only change TCR and not TSR. Although we can uses SREGS without KVM_SREGS_E_UPDATE_TSR flag but I think one reg is better. I am open if someone feels we should use SREGS only here. Signed-off-by: Bharat Bhushan

[PATCH 0/2] KVM:PPC Adding one_reg interface for TCR and TSR

2013-02-10 Thread Bharat Bhushan
This patchset adds the one_reg interface to get/set TSR and TCR registers. This patchet also adds the one_reg interface to or/clear specific bits in TSR register. Bharat Bhushan (2): move tsr update in a seprate function Added one_reg interface for timer registers arch/powerpc/include/uapi

[PATCH 1/2] move tsr update in a separate function

2013-02-10 Thread Bharat Bhushan
This is done so that same function can be called from SREGS and ONE_REG interface (follow up patch). Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 24 ++-- arch/powerpc/kvm/booke.h |1 + 2 files changed, 15 insertions(+), 10

[PATCH 2/2] Added one_reg interface for timer registers

2013-02-10 Thread Bharat Bhushan
register Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/uapi/asm/kvm.h |5 + arch/powerpc/kvm/booke.c| 30 ++ 2 files changed, 35 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/uapi/asm/kvm.h

[PATCH 0/2 v2] KVM:PPC Adding one_reg interface for TCR and TSR

2013-02-12 Thread Bharat Bhushan
This patchset adds the one_reg interface to get/set TSR and TCR registers. This patchet also adds the one_reg interface to or/clear specific bits in TSR register. v2: -- Added Documentation Bharat Bhushan (2): move tsr update in a seprate function Added one_reg interface for timer

[PATCH 1/2 v2] KVM: PPC: move tsr update in a separate function

2013-02-12 Thread Bharat Bhushan
This is done so that same function can be called from SREGS and ONE_REG interface (follow up patch). Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: No Change arch/powerpc/kvm/booke.c | 24 ++-- arch/powerpc/kvm/booke.h |1 + 2 files changed, 15

[PATCH 2/2 v2] Added one_reg interface for timer registers

2013-02-12 Thread Bharat Bhushan
register Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - Added documentation Documentation/virtual/kvm/api.txt |4 arch/powerpc/include/uapi/asm/kvm.h |5 + arch/powerpc/kvm/booke.c| 30 ++ 3 files changed, 39

[PATCH 0/2 v3] KVM:PPC Adding one_reg interface for TCR and TSR

2013-02-24 Thread Bharat Bhushan
This patchset adds the one_reg interface to get/set TSR and TCR registers.This patchet also adds the one_reg interface to or/clear specific bits in TSR register. v3: - kvmppc_set_tsr() marked static function as this is not called outside of booke.c v2: - Added Documentation Bharat Bhushan

[PATCH 1/2 v3] KVM: PPC: move tsr update in a separate function

2013-02-24 Thread Bharat Bhushan
This is done so that same function can be called from SREGS and ONE_REG interface (follow up patch). Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v3: - kvmppc_set_tsr() marked static function as this is not called outside of booke.c v2: No change arch/powerpc/kvm/booke.c

[PATCH 2/2 v3] KVM: PPC: Added one_reg interface for timer registers

2013-02-24 Thread Bharat Bhushan
register Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v3: No change v2: Added Documentation Documentation/virtual/kvm/api.txt |4 arch/powerpc/include/uapi/asm/kvm.h |5 + arch/powerpc/kvm/booke.c| 30 ++ 3 files

[PATCH 0/7] KVM :PPC: Userspace Debug support

2013-02-27 Thread Bharat Bhushan
This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. Bharat Bhushan (7): KVM: PPC: booke: Added debug handler Added ONE_REG interface for debug instruction KVM: PPC: debug stub interface parameter defined booke: Save

[PATCH 4/7] booke: Save and restore debug registers on guest entry and exit

2013-02-27 Thread Bharat Bhushan
with host_dbg_reg. No need to save guest debug register as shadow_dbg_reg is having required values. If guest is not using the debug resources then no need to restore h/w registers. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h |5 ++ arch

[PATCH 3/7] KVM: PPC: debug stub interface parameter defined

2013-02-27 Thread Bharat Bhushan
is required for book3s. So this ioctl behaviour will not change for book3s. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/uapi/asm/kvm.h | 23 +++ arch/powerpc/kvm/book3s.c |6 ++ arch/powerpc/kvm/booke.c|6

[PATCH 2/7] Added ONE_REG interface for debug instruction

2013-02-27 Thread Bharat Bhushan
This patch adds the one_reg interface to get the special instruction to be used for setting software breakpoint from userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- Documentation/virtual/kvm/api.txt |1 + arch/powerpc/include/asm/kvm_book3s.h |1 + arch

[PATCH 1/7] KVM: PPC: booke: Added debug handler

2013-02-27 Thread Bharat Bhushan
Installed debug handler will be used for guest debug support and debug facility emulation features (patches for these features will follow this patch). Signed-off-by: Liu Yu yu@freescale.com [bharat.bhus...@freescale.com: Substantial changes] Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH 7/7] KVM: PPC: Add userspace debug stub support

2013-02-27 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/uapi/asm/kvm.h | 22 +- arch/powerpc/kvm/booke.c

[PATCH 6/7] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER

2013-02-27 Thread Bharat Bhushan
Instruction emulation return EMULATE_DO_PAPR when it requires exit to userspace on book3s. Similar return is required for booke. EMULATE_DO_PAPR reads out to be confusing so it is renamed to EMULATE_EXIT_USER. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include

[PATCH 5/7] bookehv: Save and restore debug registers on guest entry and exit

2013-02-27 Thread Bharat Bhushan
with host_dbg_reg. No need to save guest debug register as shadow_dbg_reg is having required values. If guest is not using the debug resources then no need to restore h/w registers. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/bookehv_interrupts.S | 145

[PATCH] [RFC] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
either be handled by KVM. This is tested on e500mc in 32 bit mode Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/exceptions-64e.S | 54 ++ arch/powerpc/kernel/head_booke.h | 35 ++ 2 files changed, 89

[PATCH] bookehv: Handle debug exception on guest exit

2013-03-20 Thread Bharat Bhushan
either be handled by KVM. This is tested on e500mc in 32 bit mode Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v0: - Do not apply this change for debug_crit as we do not know those chips have issue or not. - corrected 64bit case branching arch/powerpc/kernel/exceptions-64e.S

[PATCH 0/4 v2] KVM :PPC: Userspace Debug support

2013-03-21 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. v1-v2 - Debug registers are save/restore in vcpu_put/vcpu_get. Earlier the debug registers are saved/restored in guest entry

[PATCH 1/4 v2] Added ONE_REG interface for debug instruction

2013-03-21 Thread Bharat Bhushan
This patch adds the one_reg interface to get the special instruction to be used for setting software breakpoint from userspace. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2: - Corrected trap tw always opcode. Documentation/virtual/kvm/api.txt |1 + arch/powerpc

[PATCH 2/4 v2] KVM: PPC: debug stub interface parameter defined

2013-03-21 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patch defines the interface parameter for KVM_SET_GUEST_DEBUG ioctl support. Follow up patches will use this for setting up hardware breakpoints, watchpoints and software breakpoints. Also kvm_arch_vcpu_ioctl_set_guest_debug() is brought one

[PATCH 3/4 v2] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER

2013-03-21 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Instruction emulation return EMULATE_DO_PAPR when it requires exit to userspace on book3s. Similar return is required for booke. EMULATE_DO_PAPR reads out to be confusing so it is renamed to EMULATE_EXIT_USER. Signed-off-by: Bharat Bhushan

[PATCH 4/4 v2] KVM: PPC: Add userspace debug stub support

2013-03-21 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Debug registers are saved/restored on vcpu_put()/vcpu_get(). Also the debug registers are saved

[PATCH 0/7 v3] KVM :PPC: Userspace Debug support

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be used by kernel for its own debugging. It will be used for only kernel user

[PATCH 1/7 v3] KVM: PPC: debug stub interface parameter defined

2013-04-08 Thread Bharat Bhushan
is required for book3s. So this ioctl behaviour will not change for book3s. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/uapi/asm/kvm.h | 23 +++ arch/powerpc/kvm/book3s.c |6 ++ arch/powerpc/kvm/booke.c|6

[PATCH 2/7 v3] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER

2013-04-08 Thread Bharat Bhushan
Instruction emulation return EMULATE_DO_PAPR when it requires exit to userspace on book3s. Similar return is required for booke. EMULATE_DO_PAPR reads out to be confusing so it is renamed to EMULATE_EXIT_USER. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include

[PATCH 3/7 v3] KVM: extend EMULATE_EXIT_USER to support different exit reasons

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Currently the instruction emulator code returns EMULATE_EXIT_USER and common code initializes the run-exit_reason = .. and vcpu-arch.hcall_needed = .. with one fixed reason. But there can be different reasons when emulator need to exit to user

[PATCH 4/7 v3] booke: exit to user space if emulator request

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This allows the exit to user space if emulator request by returning EMULATE_EXIT_USER. This will be used in subsequent patches in list Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c |3 +++ 1 files

[PATCH 5/7 v3] KVM: PPC: exit to user space on ehpriv instruction

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm

[PATCH 6/7 v3] powerpc: export debug register save function for KVM

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc

[PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Debug registers are saved/restored on vcpu_put()/vcpu_get(). Also the debug registers are saved

[PATCH] KVM : PPC : cache flush for kernel managed pages

2013-04-23 Thread Bharat Bhushan
Kernel should only try flushing pages which are managed by kernel. pfn_to_page will returns junk struct page for pages not managed by kernel, so if kernel will try to flush direct mapped memory or direct assigned device mapping then it will work on junk struct page. Signed-off-by: Bharat Bhushan

[PATCH v2] KVM: PPC: cache flush for kernel managed pages

2013-04-25 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Kernel can only access pages which maps as memory. So flush only the valid kernel pages. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 - move pfn_valid() check in kvmppc_mmu_flush_icache - Added comment to describe why

[PATCH] ppc: initialize GPRs as per epapr

2013-04-26 Thread Bharat Bhushan
ePAPR defines the initial values of cpu registers. This patch initialize the GPRs as per ePAPR specification. This resolves the issue of guest reboot/reset (guest hang on reboot). Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com

[PATCH v4] KVM :PPC: Userspace Debug support

2013-05-07 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be used by kernel for its own debugging. It will be used for only kernel user

[PATCH] KVM: PPC: Add userspace debug stub support

2013-05-07 Thread Bharat Bhushan
exception or not. If this is unexpected exception (breakpoint/watchpoint event not set by userspace) then let us leave the action on user space. This is similar to what it was before, only thing is that now we have proper exit state available to user space. Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH] powerpc: export debug register save function for KVM

2013-05-07 Thread Bharat Bhushan
KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc/kernel/process.c|3 ++- 2 files changed, 6

[PATCH] KVM: PPC: exit to user space on ehpriv instruction

2013-05-07 Thread Bharat Bhushan
ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. As this is the first point we are using run-debug, also defined the run-debug structure. Signed-off-by: Bharat Bhushan bharat.bhus

[PATCH] powerpc: remove unnecessary line continuations

2013-05-07 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 59dd545..8779234 100644 --- a/arch/powerpc/kernel/process.c

[PATCH] powerpc: move debug registers in a structure

2013-05-07 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +- arch/powerpc/kernel/asm

[PATCH] KVM: PPC: Using struct debug_reg

2013-05-07 Thread Bharat Bhushan
For KVM also use the struct debug_reg defined in asm/processor.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/kvm_host.h | 13 + arch/powerpc/kvm/booke.c| 34 -- 2 files changed, 25 insertions

  1   2   3   4   5   >