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

2012-10-04 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, September 24, 2012 9:58 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 1/6] KVM: PPC: booke: use vcpu reference from

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

2012-10-04 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, September 24, 2012 9:09 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 4/6] KVM: PPC: debug stub interface parameter defined

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

2012-10-04 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, September 24, 2012 9:09 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 4/6] KVM: PPC: debug stub interface parameter defined

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

2012-10-04 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, September 24, 2012 9:50 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 6/6] KVM: booke/bookehv: Add debug stub support On

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

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 13:06, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, September 24, 2012 9:50 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH

[PULL 00/56] ppc patch queue 2012-10-04

2012-10-04 Thread Alexander Graf
Hi Avi / Marcelo, This is my current patch queue for ppc. Please pull. Changes include: * add support for idle hcall on booke * icache clear on map * mmu notifier support for e500 and book3s_pr * revive the 440 support slightly (still not 100% happy) * unify booke and book3s_pr

[PATCH 01/56] PPC: epapr: create define for return code value of success

2012-10-04 Thread Alexander Graf
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/epapr_hcalls.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[PATCH 03/56] KVM: PPC: add pvinfo for hcall opcodes on e500mc/e5500

2012-10-04 Thread Alexander Graf
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Liu Yu yu@freescale.com [stuart: factored this out from idle hcall support in host patch] Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c | 10

[PATCH 02/56] KVM: PPC: use definitions in epapr header for hcalls

2012-10-04 Thread Alexander Graf
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_para.h | 21 +++-- arch/powerpc/kernel/kvm.c |2 +- arch/powerpc/kvm/powerpc.c

[PATCH 06/56] PPC: select EPAPR_PARAVIRT for all users of epapr hcalls

2012-10-04 Thread Alexander Graf
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/platforms/Kconfig |1 + drivers/tty/Kconfig|1 + drivers/virt/Kconfig |1 + 3 files changed, 3

[PATCH 04/56] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-10-04 Thread Alexander Graf
From: Liu Yu-B13201 yu@freescale.com And add a new flag definition in kvm_ppc_pvinfo to indicate whether the host supports the EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: cleanup,fixes for conditions allowing idle] Signed-off-by: Stuart Yoder

[PATCH 07/56] powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls

2012-10-04 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/sysdev/fsl_msi.c |9 +++-- arch/powerpc/sysdev/fsl_soc.c |2 ++ 2 files

[PATCH 08/56] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

2012-10-04 Thread Alexander Graf
From: Liu Yu-B13201 yu@freescale.com Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/epapr_hcalls.h | 22 +- arch/powerpc/include/asm/fsl_hcalls.h |

[PATCH 10/56] KVM: PPC: Expose SYNC cap based on mmu notifiers

2012-10-04 Thread Alexander Graf
Semantically, the SYNC cap means that we have mmu notifiers available. Express this in our #ifdef'ery around the feature, so that we can be sure we don't miss out on ppc targets when they get their implementation. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |8

[PATCH 05/56] KVM: PPC: ev_idle hcall support for e500 guests

2012-10-04 Thread Alexander Graf
From: Liu Yu-B13201 yu@freescale.com Signed-off-by: Liu Yu yu@freescale.com [varun: 64-bit changes] Signed-off-by: Varun Sethi varun.se...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 11/56] KVM: PPC: BookE: Expose remote TLB flushes in debugfs

2012-10-04 Thread Alexander Graf
We're already counting remote TLB flushes in a variable, but don't export it to user space yet. Do so, so we know what's going on. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[PATCH 13/56] KVM: PPC: Quieten message about allocating linear regions

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This is printed once for every RMA or HPT region that get preallocated. If one preallocates hundreds of such regions (in order to run hundreds of KVM guests), that gets rather painful, so make it a bit quieter. Signed-off-by: Paul Mackerras pau...@samba.org

[PATCH 12/56] KVM: PPC: E500: Fix clear_tlb_refs

2012-10-04 Thread Alexander Graf
Our mapping code assumes that TLB0 entries are always mapped. However, after calling clear_tlb_refs() this is no longer the case. Map them dynamically if we find an entry unmapped in TLB0. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |8 ++-- 1 files

[PATCH 14/56] powerpc/epapr: export epapr_hypercall_start

2012-10-04 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This fixes breakage introduced by the following commit: commit 6d2d82627f4f1e96a33664ace494fa363e0495cb Author: Liu Yu-B13201 yu@freescale.com Date: Tue Jul 3 05:48:56 2012 + PPC: Don't use hardcoded opcode for ePAPR hcall invocation

[PATCH 16/56] KVM: PPC: BookE: Add support for vcpu-mode

2012-10-04 Thread Alexander Graf
Generic KVM code might want to know whether we are inside guest context or outside. It also wants to be able to push us out of guest context. Add support to the BookE code for the generic vcpu-mode field that describes the above states. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 15/56] KVM: PPC: BookE: Add check_requests helper function

2012-10-04 Thread Alexander Graf
We need a central place to check for pending requests in. Add one that only does the timer check we already do in a different place. Later, this central function can be extended by more checks. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 24

[PATCH 19/56] KVM: PPC: BookE: No duplicate request != 0 check

2012-10-04 Thread Alexander Graf
We only call kvmppc_check_requests() when vcpu-requests != 0, so drop the redundant check in the function itself Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kvm/booke.c

[PATCH 18/56] KVM: PPC: BookE: Add some more trace points

2012-10-04 Thread Alexander Graf
Without trace points, debugging what exactly is going on inside guest code can be very tricky. Add a few more trace points at places that hopefully tell us more when things go wrong. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c|3 ++

[PATCH 22/56] KVM: PPC: BookE: Drop redundant vcpu-mode set

2012-10-04 Thread Alexander Graf
We only need to set vcpu-mode to outside once. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 4652e0b..492c343 100644 ---

[PATCH 25/56] KVM: PPC: Book3S: PR: Indicate we're out of guest mode

2012-10-04 Thread Alexander Graf
When going out of guest mode, indicate that we are in vcpu-mode. That way requests from other CPUs don't needlessly need to kick us to process them, because it'll just happen next time we enter the guest. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |1 + 1

[PATCH 20/56] KVM: PPC: Use same kvmppc_prepare_to_enter code for booke and book3s_pr

2012-10-04 Thread Alexander Graf
We need to do the same things when preparing to enter a guest for booke and book3s_pr cores. Fold the generic code into a generic function that both call. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_ppc.h |3 ++ arch/powerpc/kvm/book3s_pr.c | 22

[PATCH 23/56] KVM: PPC: Book3S: PR: Only do resched check once per exit

2012-10-04 Thread Alexander Graf
Now that we use our generic exit helper, we can safely drop our previous kvm_resched that we used to trigger at the beginning of the exit handler function. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH 21/56] KVM: PPC: Book3s: PR: Add (dumb) MMU Notifier support

2012-10-04 Thread Alexander Graf
Now that we have very simple MMU Notifier support for e500 in place, also add the same simple support to book3s. It gets us one step closer to actual fast support. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |3 +- arch/powerpc/kvm/Kconfig

[PATCH 24/56] KVM: PPC: Exit guest context while handling exit

2012-10-04 Thread Alexander Graf
The x86 implementation of KVM accounts for host time while processing guest exits. Do the same for us. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |2 ++ arch/powerpc/kvm/booke.c |3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git

[PATCH 26/56] KVM: PPC: Consistentify vcpu exit path

2012-10-04 Thread Alexander Graf
When getting out of __vcpu_run, let's be consistent about the state we return in. We want to always * have IRQs enabled * have called kvm_guest_exit before Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |8 ++-- arch/powerpc/kvm/booke.c | 13

[PATCH 27/56] KVM: PPC: Book3S: PR: Rework irq disabling

2012-10-04 Thread Alexander Graf
Today, we disable preemption while inside guest context, because we need to expose to the world that we are not in a preemptible context. However, during that time we already have interrupts disabled, which would indicate that we are in a non-preemptible context. The reason the checks for

[PATCH 28/56] KVM: PPC: Move kvm_guest_enter call into generic code

2012-10-04 Thread Alexander Graf
We need to call kvm_guest_enter in booke and book3s, so move its call to generic code. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |2 -- arch/powerpc/kvm/booke.c |2 -- arch/powerpc/kvm/powerpc.c |3 +++ 3 files changed, 3 insertions(+), 4

[PATCH 29/56] KVM: PPC: Ignore EXITING_GUEST_MODE mode

2012-10-04 Thread Alexander Graf
We don't need to do anything when mode is EXITING_GUEST_MODE, because we essentially are outside of guest mode and did everything it asked us to do by the time we check it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |5 - 1 files changed, 0 insertions(+),

[PATCH 31/56] KVM: PPC: Add return value to core_check_requests

2012-10-04 Thread Alexander Graf
Requests may want to tell us that we need to go back into host state, so add a return value for the checks. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_ppc.h |2 +- arch/powerpc/kvm/book3s_pr.c |6 +- arch/powerpc/kvm/booke.c |6

[PATCH 30/56] KVM: PPC: Add return value in prepare_to_enter

2012-10-04 Thread Alexander Graf
Our prepare_to_enter helper wants to be able to return in more circumstances to the host than only when an interrupt is pending. Broaden the interface a bit and move even more generic code to the generic helper. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c | 12

[PATCH 32/56] KVM: PPC: booke: Add watchdog emulation

2012-10-04 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_BOOKE_WATCHDOG) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it

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

2012-10-04 Thread Alexander Graf
From: Bharat Bhushan r65...@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 Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm.h |

[PATCH 35/56] KVM: PPC: BookE: Add MCSR SPR support

2012-10-04 Thread Alexander Graf
Add support for the MCSR SPR. This only implements the SPR storage bits, not actual machine checks. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke_emulate.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke_emulate.c

[PATCH 36/56] KVM: PPC: Use symbols for exit trace

2012-10-04 Thread Alexander Graf
Exit traces are a lot easier to read when you don't have to remember cryptic numbers for guest exit reasons. Symbolify them in our trace output. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/trace.h | 58 - 1 files changed, 56

[PATCH 37/56] KVM: PPC: E500: Remove E500_TLB_DIRTY flag

2012-10-04 Thread Alexander Graf
Since we always mark pages as dirty immediately when mapping them read/write now, there's no need for the dirty flag in our cache. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.h |3 +-- arch/powerpc/kvm/e500_tlb.c |4 +--- 2 files changed, 2 insertions(+), 5

[PATCH 41/56] KVM: PPC: BookE: Support FPU on non-hv systems

2012-10-04 Thread Alexander Graf
When running on HV aware hosts, we can not trap when the guest sets the FP bit, so we just let it do so when it wants to, because it has full access to MSR. For non-HV aware hosts with an FPU (like 440), we need to also adjust the shadow MSR though. Otherwise the guest gets an FP unavailable trap

[PATCH 40/56] KVM: PPC: 440: Implement mfdcrx

2012-10-04 Thread Alexander Graf
We need mfdcrx to execute properly on 460 cores. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x_emulate.c | 74 +++- 1 files changed, 43 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/kvm/44x_emulate.c

[PATCH 39/56] KVM: PPC: 440: Implement mtdcrx

2012-10-04 Thread Alexander Graf
We need mtdcrx to execute properly on 460 cores. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x_emulate.c | 36 +++- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kvm/44x_emulate.c

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

2012-10-04 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com 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

[PATCH 42/56] KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro

2012-10-04 Thread Alexander Graf
From: Mihai Caraman mihai.cara...@freescale.com The current form of DO_KVM macro restricts its use to one call per input parameter set. This is caused by kvmppc_resume_\intno\()_\srr1 symbol definition. Duplicate calls of DO_KVM are required by distinct implementations of exeption handlers which

[PATCH 43/56] KVM: PPC: Book3S HV: Take the SRCU read lock before looking up memslots

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org The generic KVM code uses SRCU (sleeping RCU) to protect accesses to the memslots data structures against updates due to userspace adding, modifying or removing memory slots. We need to do that too, both to avoid accessing stale copies of the memslots and to

[PATCH 46/56] KVM: Move some PPC ioctl definitions to the correct place

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This moves the definitions of KVM_CREATE_SPAPR_TCE and KVM_ALLOCATE_RMA in include/linux/kvm.h from the section listing the vcpu ioctls to the section listing VM ioctls, as these are both implemented and documented as VM ioctls. Fortunately there is no

[PATCH 44/56] KVM: PPC: Move kvm-arch.slot_phys into memslot.arch

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Now that we have an architecture-specific field in the kvm_memory_slot structure, we can use it to store the array of page physical addresses that we need for Book3S HV KVM on PPC970 processors. This reduces the size of struct kvm_arch for Book3S HV, and

[PATCH 45/56] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds an implementation of kvm_arch_flush_shadow_memslot for Book3S HV, and arranges for kvmppc_core_commit_memory_region to flush the dirty log when modifying an existing slot. With this, we can handle deletion and modification of memory slots.

[PATCH 49/56] KVM: PPC: Book3S HV: Fix calculation of guest phys address for MMIO emulation

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org In the case where the host kernel is using a 64kB base page size and the guest uses a 4k HPTE (hashed page table entry) to map an emulated MMIO device, we were calculating the guest physical address wrongly. We were calculating a gfn as the guest physical

[PATCH 50/56] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map

2012-10-04 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com We were only allocating half the bytes we need, which was made more obvious by a recent fix to the memset in clear_tlb1_bitmap(). Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de Cc: sta...@vger.kernel.org ---

[PATCH 51/56] KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages

2012-10-04 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This was found by kmemleak. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH 52/56] KVM: PPC: set IN_GUEST_MODE before checking requests

2012-10-04 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Avoid a race as described in the code comment. Also remove a related smp_wmb() from booke's kvmppc_prepare_to_enter(). I can't see any reason for it, and the book3s_pr version doesn't have it. Signed-off-by: Scott Wood scottw...@freescale.com

[PATCH 48/56] KVM: PPC: Book3S HV: Remove bogus update of physical thread IDs

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org When making a vcpu non-runnable we incorrectly changed the thread IDs of all other threads on the core, just remove that code. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by:

[PATCH 53/56] KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This enables userspace to get and set various SPRs (special-purpose registers) using the KVM_[GS]ET_ONE_REG ioctls. With this, userspace can get and set all the SPRs that are part of the guest state, either through the KVM_[GS]ET_REGS ioctls, the

[PATCH 54/56] KVM: PPC: Book3S: Get/set guest FP regs using the GET/SET_ONE_REG interface

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This enables userspace to get and set all the guest floating-point state using the KVM_[GS]ET_ONE_REG ioctls. The floating-point state includes all of the traditional floating-point registers and the FPSCR (floating point status/control register), all the

[PATCH 55/56] KVM: PPC: Book3S HV: Provide a way for userspace to get/set per-vCPU areas

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org The PAPR paravirtualization interface lets guests register three different types of per-vCPU buffer areas in its memory for communication with the hypervisor. These are called virtual processor areas (VPAs). Currently the hypercalls to register and

[PATCH 56/56] arch/powerpc/kvm/e500_tlb.c: fix error return code

2012-10-04 Thread Alexander Graf
From: Julia Lawall ju...@diku.dk Convert a 0 error return code to a negative one, as returned elsewhere in the function. A new label is also added to avoid freeing things that are known to not yet be allocated. A simplified version of the semantic match that finds the first problem is as

[PATCH 47/56] KVM: PPC: Book3S HV: Fix updates of vcpu-cpu

2012-10-04 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This removes the powerpc generic updates of vcpu-cpu in load and put, and moves them to the various backends. The reason is that HV KVM does its own sauce with that field and the generic updates might corrupt it. The field contains the CPU# of the -first- HW

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

2012-10-04 Thread Bhushan Bharat-R65777
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, October 04, 2012 4:56 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: Re: [PATCH 6/6] KVM: booke/bookehv: Add debug stub support On 04.10.2012, at 13:06,

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

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 16:22, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, October 04, 2012 4:56 PM To: Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: Re: [PATCH 6/6] KVM: booke/bookehv:

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

2012-10-04 Thread Bhushan Bharat-R65777
-static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu) +static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, + int exit_nr) { enum emulation_result er; + if (unlikely(vcpu-guest_debug KVM_GUESTDBG_USE_SW_BP)

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

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 17:19, Bhushan Bharat-R65777 wrote: -static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu) +static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, + int exit_nr) { enum emulation_result er; + if

[PATCH 1/3] kvm tools: Fix powerpc build errors caused by recent changes

2012-10-04 Thread Michael Ellerman
Several caused by commit 8074303 remove global kvm object, ioport__setup_arch(), term_getc_iov() term_getc() in the spapr_hvcons.c code, and kvm_cpu__reboot() in rtas_power_off(). Commit 221b584 move active_console into struct kvm_config added checks in h_put_term_char() h_get_term_char() of

[PATCH 2/3] kvm tools: Fix segfault on powerpc in xics_register()

2012-10-04 Thread Michael Ellerman
In commit 06e6648 move kvm_cpus into struct kvm, kvm_cpu__init() became kvm_cpu__arch_init() called from a new kvm_cpu__init(), and the call was moved from the end of the init sequence to much earlier, and in particular prior to irq__init(). This leads to a segfault on powerpc, because

[PATCH 3/3] kvm tools: Do setup_fdt() later, get powerpc to boot again

2012-10-04 Thread Michael Ellerman
In commit e3d3ced kernel load/firmware cleanup, the call to kvm__arch_setup_firmware() was moved. Previously more or less at the end of the init sequence, but that commit moved it into kvm__init() which is a core_init() call and so runs quite early. This broke booting powerpc guests, as