-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
-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
-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
-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
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
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
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
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
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
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
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
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
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 |
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
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
---
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
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
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
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
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
---
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
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
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 ++
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
---
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
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
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(-)
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
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
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
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
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
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(+),
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
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
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
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 |
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
---
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
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
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:
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
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
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
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
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
-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,
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:
-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)
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
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
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
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
66 matches
Mail list logo