In current code, the setup of hpte is under the risk of race with
mmu_notifier_invalidate, i.e we may setup a hpte with a invalid pfn.
Resolve this issue by sync the two actions by KVMPPC_RMAP_LOCK_BIT.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
On Mon, 2014-07-28 at 14:09 +0800, Liu Ping Fan wrote:
In current code, the setup of hpte is under the risk of race with
mmu_notifier_invalidate, i.e we may setup a hpte with a invalid pfn.
Resolve this issue by sync the two actions by KVMPPC_RMAP_LOCK_BIT.
Please describe the race you think
Hope I am right. Take the following seq as an example
if (hptep[0] HPTE_V_VALID) {
/* HPTE was previously valid, so we need to invalidate it */
unlock_rmap(rmap);
hptep[0] |= HPTE_V_ABSENT;
kvmppc_invalidate_hpte(kvm, hptep, index);
/* don't lose previous R and C bits */
r |= hptep[1]
-Original Message-
From: Wood Scott-B07421
Sent: Saturday, July 26, 2014 3:11 AM
To: Caraman Mihai Claudiu-B02008
Cc: Alexander Graf; kvm-ppc@vger.kernel.org; k...@vger.kernel.org;
linuxppc-...@lists.ozlabs.org
Subject: Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for
On 19.07.14 12:14, Paul Mackerras wrote:
This series aims to increase the range of instructions that KVM on PPC
can emulate and reduce code duplication by using the existing
instruction emulation code from arch/powerpc/lib/sstep.c for KVM.
The ultimate goal is to make PR KVM run faster on the
On 19.07.14 12:14, Paul Mackerras wrote:
This splits out the instruction analysis part of emulate_step() into
a separate analyse_instr() function, which decodes the instruction,
but doesn't execute any load or store instructions. It does execute
integer instructions and branches which can be
On 19.07.14 12:14, Paul Mackerras wrote:
This changes kvmppc_emulate_instruction() to use the common instruction
decoding code from arch/powerpc/lib/sstep.c. This expands the set of
instructions that we recognize to include all of the integer load and
store instructions except for the string
On 19.07.14 12:14, Paul Mackerras wrote:
At present, kvmppc_handle_load and kvmppc_handle_store only handle
emulated MMIO loads and stores. This extends them to be able to handle
loads and stores to guest memory as well. This is so that
kvmppc_emulate_instruction can be used to emulate loads
On 19.07.14 09:59, Paul Mackerras wrote:
At present, kvmppc_ld calls kvmppc_xlate, and if kvmppc_xlate returns
any error indication, it returns -ENOENT, which is taken to mean an
HPTE not found error. However, the error could have been a segment
found (no SLB entry) or a permission error.
On 19.07.14 09:59, Paul Mackerras wrote:
Here are three small fixes for the PPC Book 3S code. The first should
go into 3.16 if possible, I think, or if not, certainly 3.17. The
remaining two are less urgent and should go into 3.17.
The patch series is against Alex Graf's kvm-ppc-queue
On 18.07.14 06:10, Stewart Smith wrote:
Alexander Graf ag...@suse.de writes:
diff --git a/arch/powerpc/include/asm/kvm_host.h
b/arch/powerpc/include/asm/kvm_host.h
index 1eaea2d..5769497 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -305,6
On 18.07.14 06:18, Stewart Smith wrote:
changes since v3:
- use kvmppc namespace
- MPP_BUFFER_ORDER of 3 not 4, as we only need 32k and it's already 32k aligned
- split out kvmppc_vcore_create in separate patch
- give a variable a better name: s/tmp/mpp_addr/
- logmpp becomes static inline
On 11.07.14 10:38, Bharat Bhushan wrote:
When userspace (QEMU) is using the debug resource to debug guest
then we want MSR_DE to be always set. This patch adds missing
MSR_DE setting in rfci instruction.
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com
Shouldn't this be in
On 11.07.14 10:39, Bharat Bhushan wrote:
This patch emulates debug registers and debug exception
to support guest using debug resource. This enables running
gdb/kgdb etc in guest.
On BOOKE architecture we cannot share debug resources between QEMU and
guest because:
When QEMU is using
On 27.06.14 15:35, Aneesh Kumar K.V wrote:
When calculating the lower bits of AVA field, use the shift
count based on the base page size. Also add the missing segment
size and remove stale comment.
Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com
Thanks, applied to
On 25.06.14 02:21, Scott Wood wrote:
On Wed, 2014-06-25 at 01:40 +0200, Alexander Graf wrote:
On 25.06.14 01:15, Scott Wood wrote:
On Wed, 2014-06-25 at 00:41 +0200, Alexander Graf wrote:
On 24.06.14 20:53, Scott Wood wrote:
The timer interrupt works, but I'm not fully convinced that it's a
Paul recently posted a nice patch set that started to make kvm code use the
already existing in-kernel instruction emulator. Some bits from my previous
attempt to implement yet another instruction emulator can and should be reused
for that approach as well.
So this patch set gathers all the bits
We have a proper define for invalid HVA numbers. Use those instead of the
ppc specific kvmppc_bad_hva().
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/powerpc.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c
We're going to implement guest code interpretation in KVM for some rare
corner cases. This code needs to be able to inject data and instruction
faults into the guest when it encounters them.
Expose generic APIs to do this in a reasonably subarch agnostic fashion.
Signed-off-by: Alexander Graf
We use kvmppc_ld and kvmppc_st to emulate load/store instructions that may as
well access the magic page. Special case it out so that we can properly access
it.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_book3s.h | 7 +++
Today the instruction emulator can get called via 2 separate code paths. It
can either be called by MMIO emulation detection code or by privileged
instruction traps.
This is bad, as both code paths prepare the environment differently. For MMIO
emulation we already know the virtual address we
We have a nice API to find the translated GPAs of a GVA including protection
flags. So far we only use it on Book3S, but there's no reason the same shouldn't
be used on BookE as well.
Implement a kvmppc_xlate() version for BookE and clean it up to make it more
readable in general.
Signed-off-by:
We have enough common infrastructure now to resolve GVA-GPA mappings at
runtime. With this we can move our book3s specific helpers to load / store
in guest virtual address space to common code as well.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/include/asm/kvm_book3s.h | 2 +-
The 440 target hasn't been properly functioning for a few releases and
before I was the only one who fixes a very serious bug that indicates to
me that nobody used it before either.
Furthermore KVM on 440 is slow to the extent of unusable.
We don't have to carry along completely unused code.
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote:
This is not used and even I do not remember why this was added
in first place.
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com
---
arch/powerpc/kvm/booke.c | 2 --
1 file changed, 2 deletions(-)
diff --git
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote:
When userspace (QEMU) is using the debug resource to debug guest
then we want MSR_DE to be always set. This patch adds missing
MSR_DE setting in rfci instruction.
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com
---
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote:
When userspace is debugging guest then MSR_DE is always set and
MSRP_DEP is set so that guest cannot change MSR_DE.
Guest debug resources are not yet emulated, So there seems no reason
we should stop guest controlling MSR_DE.
Also a
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote:
This patch emulates debug registers and debug exception
to support guest using debug resource. This enables running
gdb/kgdb etc in guest.
On BOOKE architecture we cannot share debug resources between QEMU and
guest because:
When
On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote:
On 11.07.14 10:39, Bharat Bhushan wrote:
This patch emulates debug registers and debug exception
to support guest using debug resource. This enables running
gdb/kgdb etc in guest.
On BOOKE architecture we cannot share debug
On Mon, 2014-07-28 at 03:54 -0500, Caraman Mihai Claudiu-B02008 wrote:
-Original Message-
From: Wood Scott-B07421
Sent: Saturday, July 26, 2014 3:11 AM
To: Caraman Mihai Claudiu-B02008
Cc: Alexander Graf; kvm-ppc@vger.kernel.org; k...@vger.kernel.org;
Alexander Graf ag...@suse.de writes:
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -25,7 +25,6 @@
#ifdef CONFIG_8xx
#include asm/reg_8xx.h
#endif /* CONFIG_8xx */
-#include asm/bug.h
#define MSR_SF_LG 63 /* Enable 64 bit mode */
31 matches
Mail list logo