l external interrupt pending but the guest
has MSR[EE] = 0, we have to arrange to have an interrupt pending for
it so that we can get control back once it re-enables interrupts. We
do that by sending ourselves an IPI with smp_send_reschedule after
hard-disabling interrupts.
Signed-off-by: Paul
On Sat, Jun 18, 2011 at 04:34:14PM +0200, Alexander Graf wrote:
> I just applied them on top of kvm-ppc-next and started compiling for
> book3s_64_pr=M:
>
> arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
> arch/powerpc/kernel/exceptions-64s.S:314: Error: undefined symbol
> `PACA_KVM_
te in and out on vcpu load/unload, and
in future will mean that the book3s_hv code doesn't need a
shadow_vcpu struct in the PACA at all.
Signed-off-by: Paul Mackerras
---
Fixed compilation with CONFIG_POWER4_ONLY=n
arch/powerpc/include/asm/exception-64s.h | 10 ++--
arch/powerpc/i
This arranges for the top-level arch/powerpc/kvm/powerpc.c file to
pass down some of the calls it gets to the lower-level subarchitecture
specific code. The lower-level implementations (in booke.c and book3s.c)
are no-ops. The coming book3s_hv.c will need this.
Signed-off-by: Paul Mackerras
.
Because the first-level interrupt handlers are now larger, some things
had to be move out of line in exceptions-64s.S.
This all necessitated some minor changes to the interrupt entry code
in KVM. This also streamlines the book3s_32 KVM test.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include
hypervisor mode code.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_ppc.h |1 +
arch/powerpc/kvm/book3s_interrupts.S |2 +-
arch/powerpc/kvm/book3s_pr.c | 12 ++--
arch/powerpc/kvm/booke.c | 13 +
arch/powerpc/kvm/powerpc.c
ts to the
guest, but if we did, then we would need to make sure they got delivered
rather than the program interrupt. The current code would be wrong in
this situation anyway since it would deliver the program interrupt as
well as the reset/machine check interrupt.
Signed-off-by: Paul Mackerras
--
Register a virtual processor area (VPA)
The code that runs in real mode has to be in the base kernel, not in
the module, if KVM is compiled as a module. The real-mode code can
only access the kernel linear mapping, not vmalloc or ioremap space.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include
ese addresses
to physical addresses.
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 73fdab8..83500fb 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/
running bare-metal, i.e. in hypervisor mode.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/cputable.h| 14 --
arch/powerpc/include/asm/reg.h | 16
arch/powerpc/kernel/cpu_setup_power7.S |4 ++--
arch/powerpc/kernel/cpu_setup_ppc970.S | 26
201, and
when running on a POWER7, it must contain 206.
Signed-off-by: Paul Mackerras
---
Documentation/virtual/kvm/api.txt | 35 +++
arch/powerpc/include/asm/kvm.h | 15 +++
arch/powerpc/include/asm/kvm_host.h |1 +
arch/powerpc/kvm
) composed of 16MB large pages, and hypervisor
decrementer interrupts are disabled.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/reg.h |4
arch/powerpc/kernel/cpu_setup_power7.S | 18 +++---
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/arch
l external interrupt pending but the guest
has MSR[EE] = 0, we have to arrange to have an interrupt pending for
it so that we can get control back once it re-enables interrupts. We
do that by sending ourselves an IPI with smp_send_reschedule after
hard-disabling interrupts.
Signed-off-by: Paul
preempted.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/exception-64s.h | 10 ++--
arch/powerpc/include/asm/kvm_book3s_asm.h | 27 ++---
arch/powerpc/include/asm/paca.h |1 +
arch/powerpc/kernel/asm-offsets.c | 94 ++--
arch/powe
The first patch of the following series is a pure bug-fix for 32-bit
kernels.
The remainder of the following series of patches enable KVM to exploit
the hardware hypervisor mode on 64-bit Power ISA Book3S machines. At
present, POWER7 and PPC970 processors are supported. (Note that the
PPC970 pro
most of the time. Specifically, allowing this will avoid awkwardness
when we need to reset the table. More importantly, we will in the
future need to write the table in order to restore its state after a
checkpoint resume or migration.
Signed-off-by: David Gibson
Signed-off-by: Paul Mackerras
use the lower-numbered
hardware threads in preference to higher-numbered threads if not all
the vcpus in the vcore are runnable, regardless of which vcpus are
runnable.
Signed-off-by: Paul Mackerras
---
Documentation/virtual/kvm/api.txt | 13 ++
arch/powerpc/include/asm/kvm.h
state of the emulated CPU, and the kvmppc_vcpu_book3s
struct holds the auxiliary data structures used in the emulation.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h | 35 +---
arch/powerpc/include/asm/kvm_host.h | 34 +++-
arch/powerpc/kvm
struct and arranges for the MER (mediated external request)
bit, which is the only bit that varies between vcpus, to be set in
assembly code when going into the guest if there is a pending external
interrupt request.
Signed-off-by: Paul Mackerras
---
Documentation/virtual/kvm/api.txt |
On Wed, Jun 29, 2011 at 11:02:54AM +0200, Peter Zijlstra wrote:
> On Tue, 2011-06-28 at 18:10 +0200, Joerg Roedel wrote:
> > On Fri, Jun 17, 2011 at 03:37:29PM +0200, Joerg Roedel wrote:
> > > this is the second version of the patch-set to support the AMD
> > > guest-/host only bits in the performa
On Thu, Jun 30, 2011 at 05:04:23PM +0200, Alexander Graf wrote:
> On 06/29/2011 12:41 PM, Paul Mackerras wrote:
> >+struct kvm_ppc_set_platform {
> >+__u16 platform; /* defines the OS/hypervisor ABI */
> >+__u16 guest_arch; /* e.g. decimal 206 for v2.06 *
On Fri, Jul 01, 2011 at 11:37:42AM -0700, Dave Hansen wrote:
> On Wed, 2011-06-29 at 20:21 +1000, Paul Mackerras wrote:
> > +struct kvmppc_pginfo {
> > + unsigned long pfn;
> > + atomic_t refcnt;
> > +};
>
> I only see this refcnt inc'd in one spot a
On Tue, Aug 09, 2011 at 06:31:48PM +0200, Alexander Graf wrote:
> Now that Book3S PV mode can also run PAPR guests, we can add a PAPR cap and
> enable it for all Book3S targets. Enabling that CAP switches KVM into PAPR
> mode.
Don't we want to enable it only for 64-bit hosts? Trying to run a
PAP
On Wed, Aug 10, 2011 at 09:59:41AM +0200, Alexander Graf wrote:
>
> Am 10.08.2011 um 06:42 schrieb Paul Mackerras :
>
> > On Tue, Aug 09, 2011 at 06:31:48PM +0200, Alexander Graf wrote:
> >
> >> Now that Book3S PV mode can also run PAPR guests, we can add a PAPR
es
the problem by using a textual label, 'kvm_cede_prodded'. It also
changes the label for another longish branch from '2:' to
'kvm_cede_exit' to avoid a possible future problem if code modifications
add another numeric '2:' label in between.
Cc: sta...@vge
This message is printed once for every RMA or HPT region that gets
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
---
arch/powerpc/kvm/book3s_hv_builtin.c
On Wed, Jul 25, 2012 at 08:53:06AM -0600, Alex Williamson wrote:
> Hi Linus,
>
> This series includes the VFIO userspace driver interface for the
> 3.6 kernel merge window. This driver is intended to provide a
> secure interface for device access using IOMMU protection for
> applications like ass
>From 4df5da62cb49b71c9a70072341dcb0557768c520 Mon Sep 17 00:00:00 2001
From: Paul Mackerras
Date: Mon, 30 Jul 2012 16:40:54 +1000
Subject: [PATCH] KVM: PPC: Book3S HV: Handle memory slot deletion and
modification correctly
At present the HV style of KVM doesn't handle deletion or modi
VM, ppc'd
> better restrict the allocation to Book3S HV.
>
> Signed-off-by: Takuya Yoshikawa
> Cc: Paul Mackerras
Looks like a worthwhile change. I do have some patches in preparation
that will intersect with this, but I can manage that once these
patches go upstream.
Acked-by: Pau
On Thu, Aug 02, 2012 at 10:15:27AM -0300, Marcelo Tosatti wrote:
> Remind me what is the guarantee that -Exxx does not clash with
> a valid pfn number?
A pfn number is an address >> PAGE_SHIFT, so it will have the top 12
(at least) bits clear, whereas -Exxx will have the top bit set.
Paul.
--
To
es
the problem by using a textual label, 'kvm_cede_prodded'. It also
changes the label for another longish branch from '2:' to
'kvm_cede_exit' to avoid a possible future problem if code modifications
add another numeric '2:' label in between.
Signed-off-by: Pau
ENTER/H_REMOVE/H_BULK_REMOVE
are performance-critical hot paths.
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 17 +
arch/powerpc/kvm/book3s_hv.c| 27 +++
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a
This series of 5 patches starts off with two fixes that I have posted
previously but not got any response to, and then has 3 patches to
improve our handling of memory slots on PPC. The first of those 3
makes HV-style KVM able to handle deletion and modification of memory
slots properly. The secon
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
---
arch/powerpc/kvm/book3s_hv_builtin.c |4
therefore adds srcu_read_lock/unlock pairs
around code that accesses and uses memslots in the Book 3S PR code
and the Book E (44x and e500) code.
Signed-off-by: Paul Mackerras
---
Compile-tested only.
arch/powerpc/kvm/44x_tlb.c |6 ++
arch/powerpc/kvm/book3s_pr.c |6 ++
arch/powerpc
>From 44067a8ee15021583636bea4cc1d47e5370b8397 Mon Sep 17 00:00:00 2001
From: Paul Mackerras
Date: Mon, 30 Jul 2012 16:40:54 +1000
Subject:
At present the HV style of KVM doesn't handle deletion or modification
of memory slots correctly. Deletion occurs when userspace
On Tue, Aug 07, 2012 at 12:57:14PM +0200, Alexander Graf wrote:
> The e500 target has lived without mmu notifiers ever since it got
> introduced, but fails for the user space check on them with hugetlbfs.
Ironically that user space check isn't necessary any more since David
Gibson's fix for the hu
On Thu, Aug 09, 2012 at 03:27:17PM -0300, Marcelo Tosatti wrote:
> On Mon, Aug 06, 2012 at 08:08:16PM +1000, Paul Mackerras wrote:
> > The generic KVM code uses SRCU (sleeping RCU) to protect accesses
> > to the memslots data structures against updates due to userspace
> >
On Thu, Aug 09, 2012 at 03:22:38PM -0300, Marcelo Tosatti wrote:
> On Mon, Aug 06, 2012 at 08:06:55PM +1000, Paul Mackerras wrote:
> > The generic KVM code uses SRCU (sleeping RCU) to protect accesses
> > to the memslots data structures against updates due to userspace
> >
On Thu, Aug 09, 2012 at 03:16:12PM -0300, Marcelo Tosatti wrote:
> The !memslot->npages case is handled in __kvm_set_memory_region
> (please read that part, before kvm_arch_prepare_memory_region() call).
>
> kvm_arch_flush_shadow should be implemented.
Book3S HV doesn't have shadow page tables p
On Fri, Aug 10, 2012 at 03:35:53PM -0300, Marcelo Tosatti wrote:
> There's no plan. I just wanted to confirm this before converting
> to per-memslot flush.
>
> 1) __kvm_set_memory_region line 807:
>
> * - gfn_to_hva (kvm_read_guest, gfn_to_pfn)
> * - k
On Mon, Aug 13, 2012 at 01:34:11PM -0300, Marcelo Tosatti wrote:
> On Sat, Aug 11, 2012 at 10:37:54AM +1000, Paul Mackerras wrote:
> > In fact I need to remove any translations in the old range *before*
> > the new memslot gets committed, whereas this happens after that.
> &
,
leading to an oops when unregistering the VPA.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_ppc.h |2 ++
arch/powerpc/kvm/book3s_hv.c | 54 +++-
arch/powerpc/kvm/powerpc.c | 23 +++
include/linux/kvm.h
On Fri, Aug 17, 2012 at 06:38:29PM +1000, Benjamin Herrenschmidt wrote:
> 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
Acked-by: Paul Mackerras
--
To u
gt; threads VCPUs when they are running (due to them sleeping on our
> private waitqueue) causing unload to be called, potentially
> clobbering the value.
>
> Signed-off-by: Benjamin Herrenschmidt
Acked-by: Paul Mackerras
--
To unsubscribe from this list: send the line "unsubsc
On Thu, Aug 23, 2012 at 05:24:00PM +0900, Takuya Yoshikawa wrote:
> On Thu, 23 Aug 2012 15:42:49 +0800
> Gavin Shan wrote:
>
> > The build error was caused by that builtin functions are calling
> > the functions implemented in modules. That was introduced by the
> > following commit.
> >
> > com
patch fixes the build error by moving function __gfn_to_hva_memslot()
> from kvm_main.c to kvm_host.h and making that "inline" so that the
> builtin function (kvmppc_h_enter) can use that.
>
> Signed-off-by: Gavin Shan
Acked-by: Paul Mackerras
By the way, when you gi
On Thu, Aug 23, 2012 at 10:55:37AM -0300, Marcelo Tosatti wrote:
> There are a number of options to consider:
>
> 1) Merge the current patchset from Paul, which has two downsides:
> 1-1) It contains an unfixable race.
The race being that new HTPEs using the old base address could get
inser
On Fri, Aug 24, 2012 at 03:54:56PM -0300, Marcelo Tosatti wrote:
> Paul, does that work for you.
Yes, looks great, thanks.
Paul.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/m
obviously don't care about the dirty bits any more.
Signed-off-by: Paul Mackerras
---
This is on top of Alex's kvm-ppc-next branch with the KVM tree's next
branch merged in and then Marcelo's set of 3 patches on that. This
needs more testing, but I thought I would get the
in to
kvmppc_core_prepare_memory_region, since we need to initialize its
arch.slot_phys member on Book3S HV.
Signed-off-by: Paul Mackerras
---
This is on top of Alex's kvm-ppc-next branch with the KVM tree's next
branch merged in and then Marcelo's set of 3 patches on that.
arch/powerpc/include/a
From: Benjamin Herrenschmidt
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
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_hv.c |6 --
1 file changed, 6
vcpu pointer before
incrementing the nap count. It also removes unnecessary setting
of the vcpu and vcore pointers in the paca in kvmppc_core_vcpu_load.
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_hv.c| 41 ++-
arch/powerpc/kvm/book3s_hv_rmhandl
nning.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/smp.h |8
arch/powerpc/kernel/smp.c | 44
arch/powerpc/kvm/book3s_hv.c | 12 +--
3 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/in
state have been combined into a single
KVMPPC_VCPU_NOTREADY state, since we no longer need to distinguish
between them.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |5 +--
arch/powerpc/kvm/book3s_hv.c| 74 ++-
2 files changed
ENTER/H_REMOVE/H_BULK_REMOVE
are performance-critical hot paths.
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 17 +
arch/powerpc/kvm/book3s_hv.c| 27 +++
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a
This set of 12 patches contains various fixes collected during the
process of getting reboot of Book3S HV guests to work correctly, plus
some needed for Ben H's forthcoming series to implement in-kernel XICS
(interrupt controller) emulation, plus two patches around handling
memslots properly. This
the gpa right PAGE_SHIFT bits.
Reported-by: Alexey Kardashevskiy
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_64_mmu_hv.c |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c
b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index
st it, and therefore
never increment the nap_count, leading to messages about wait_for_nap
timeouts.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |7 ---
arch/powerpc/kvm/book3s_hv.c| 14 +++---
2 files changed, 15 insertions(+), 6 deletions(-)
could be genuinely stopped. Since
we have no way of dividing up the time between these cases, we don't
count any of it as stolen.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |5 ++
arch/powerpc/kvm/book3s_hv.c| 127 ++-
2
causing unload to be called, potentially
clobbering the value.
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/book3s_pr.c |3 ++-
arch/powerpc/kvm/booke.c |2 ++
arch/powerpc/kvm/powerpc.c |2 --
3 files changed, 4 insertions(+), 3 deletions(-
,
leading to an oops when unregistering the VPA.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_ppc.h |2 ++
arch/powerpc/kvm/book3s_hv.c | 54 +++-
arch/powerpc/kvm/powerpc.c | 23 +++
include/linux/kvm.h
in to
kvmppc_core_prepare_memory_region, since we need to initialize its
arch.slot_phys member on Book3S HV.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |9 +--
arch/powerpc/include/asm/kvm_ppc.h |5 ++
arch/powerpc/kvm/book3s_64_mmu_hv.c |6 +-
arch/powerpc/kvm/book3s
caller has already done that. The caller (kvmppc_run_vcpu) wasn't
actually checking for pending exceptions, so we add that.
The change of if to while in kvmppc_run_vcpu is to make sure that we
never call kvmppc_remove_runnable() when the vcore state is RUNNING or
EXITING.
Signed-off-by: Pa
nning.
Signed-off-by: Paul Mackerras
---
v2: export {,un}inhibit_secondary_onlining for the case where KVM is
a module.
arch/powerpc/include/asm/smp.h |8 +++
arch/powerpc/kernel/smp.c | 46
arch/powerpc/kvm/book3s_hv.c | 12 +
>From dfd5bcfac841f8a36593edf60d9fb15e0d633287 Mon Sep 17 00:00:00 2001
From: Paul Mackerras
Date: Mon, 14 Nov 2011 13:30:38 +1100
Subject:
Currently, kvmppc_h_enter takes a spinlock that is global to the guest,
kvm->mmu_lock, in order to check for pending PTE invalidations safely.
O
On Fri, Nov 18, 2011 at 02:57:11PM +0100, Alexander Graf wrote:
>
> This touches areas that I'm sure non-PPC people would want to see as
> well. Could you please CC kvm@vger too next time?
>
> Avi, Marcelo, mind to review some of the bits in this patch set? :)
I did cc the last patch (the one th
bal spinlock in order to improve the scalability of updates
to the guest MMU hashed page table, and so needs this.
Signed-off-by: Paul Mackerras
---
include/linux/kvm_host.h | 14 +-
virt/kvm/kvm_main.c |6 +++---
2 files changed, 12 insertions(+), 8 deletions(-)
diff --gi
This series of patches updates the Book3S-HV KVM code that manages the
guest hashed page table (HPT) to enable several things:
* MMIO emulation and MMIO pass-through
* Use of small pages (4kB or 64kB, depending on config) to back the
guest memory
* Pageable guest memory - i.e. backing pages ca
s[]
arrays from multiple vcpu threads, we now have a spinlock protecting
those updates to ensure that we don't lose track of any references
to pages.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|4 +
arch/powerpc/include/asm/kvm_book3s_64.h | 12 ++
arch
s of
HPT_ORDER etc. to a header file and defining HPT_NPTE for HPT_NPTEG << 3.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h |8 +++
arch/powerpc/include/asm/kvm_host.h | 10
arch/powerpc/kvm/book3s_64_mmu_hv.c | 44 +++
a
l RMO regions.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |8 ++-
arch/powerpc/kvm/book3s_64_mmu_hv.c | 18 +++---
arch/powerpc/kvm/book3s_hv.c| 114 +--
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 44 -
4 files changed
unpin them when they are no longer
required.
Although it is not strictly necessary to pin the pages at this point,
since all guest pages are already pinned, later commits in this series
will mean that guest pages aren't all pinned.
Signed-off-by: Paul Mackerras
---
arch/powerpc/includ
lock bit.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h | 18 ++
arch/powerpc/include/asm/kvm_host.h | 17 ++-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 84 +-
3 files changed, 117 insertions(+), 2 deletions(-)
diff
ntries. Then, in kvmppc_h_enter() we check that the
cache bits in the HPTE that the guest wants to insert match the cache
bits in the slot_phys array entry.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h | 26 +++
arch/powerpc/include/asm/kvm_host.h |2 +
, but since
heavily reworked.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|5 +
arch/powerpc/include/asm/kvm_book3s_64.h | 26 +++
arch/powerpc/include/asm/kvm_host.h |5 +
arch/powerpc/include/asm/mmu-hash64.h|2 +-
arch/powerpc/include/as
en we return H_PTEG_FULL.
This also moves lock_hpte to a header file (since later commits in this
series will need to use it from other source files) and renames it to
try_lock_hpte, which is a somewhat less misleading name.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s
memory, causing random crashes and file corruption.
On Book3s HV we only accept setting the HIOR to zero, since the guest
runs in supervisor mode and its vectors are never offset from zero.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_ppc.h |3 ++
arch/powerpc/kvm/book3s_hv.c
and use the low-order 5 bits of each
entry to store the order of the enclosing page with respect to
normal pages, i.e. log_2(enclosing_page_size / PAGE_SIZE).
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h |8 ++
arch/powerpc/include/asm/kvm_host.h |3 +-
a
flag,
kvm->arch.using_mmu_notifiers, that indicates whether we can page
guest pages out. If it is not set, the MMU notifier callbacks do
nothing and everything operates as before.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|4 +
arch/powerpc/include/asm/kv
be reflected to the guest (e.g. because the guest HPTE
didn't allow write access to usermode) or handled by switching to
kernel context and calling kvmppc_book3s_hv_page_fault, which will then
request write access to the page and update the actual HPTE.
Signed-off-by: Paul Mackerras
---
On Tue, Dec 06, 2011 at 09:28:27AM +0100, Ingo Molnar wrote:
>
> * Sasha Levin wrote:
>
> > Ingo actually got us to remove all the PRI* specifiers, but
> > that was back when we only did x86 :)
> >
> > Ingo, does it make sense to use them now when we support
> > different architectures?
>
>
re grouped together into virtual
CPU cores that share a single waitqueue, so it's important to use
vcpu->arch.wqp rather than &vcpu->wq.
Signed-off-by: Paul Mackerras
---
arch/powerpc/kvm/powerpc.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/pow
memory, causing random crashes and file corruption.
On Book3s HV we only accept setting the HIOR to zero, since the guest
runs in supervisor mode and its vectors are never offset from zero.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_ppc.h |3 ++
arch/powerpc/kvm/book3s_hv.c
and use the low-order 5 bits of each
entry to store the order of the enclosing page with respect to
normal pages, i.e. log_2(enclosing_page_size / PAGE_SIZE).
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h | 10 +++
arch/powerpc/include/asm/kvm_host.h |3 +-
a
l RMO regions.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_host.h |9 ++-
arch/powerpc/kvm/book3s_64_mmu_hv.c | 18 +++---
arch/powerpc/kvm/book3s_hv.c| 114 +--
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 41 +++-
4 files changed
be reflected to the guest (e.g. because the guest HPTE
didn't allow write access to usermode) or handled by switching to
kernel context and calling kvmppc_book3s_hv_page_fault, which will then
request write access to the page and update the actual HPTE.
Signed-off-by: Paul Mackerras
---
en we return H_PTEG_FULL.
This also moves lock_hpte to a header file (since later commits in this
series will need to use it from other source files) and renames it to
try_lock_hpte, which is a somewhat less misleading name.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s
, but since
heavily reworked.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|5 +
arch/powerpc/include/asm/kvm_book3s_64.h | 26 +++
arch/powerpc/include/asm/kvm_host.h |5 +
arch/powerpc/include/asm/mmu-hash64.h|2 +-
arch/powerpc/include/as
s[]
arrays from multiple vcpu threads, we now have a spinlock protecting
those updates to ensure that we don't lose track of any references
to pages.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|4 +
arch/powerpc/include/asm/kvm_book3s_64.h | 12 ++
arch
unpin them when they are no longer
required.
Although it is not strictly necessary to pin the pages at this point,
since all guest pages are already pinned, later commits in this series
will mean that guest pages aren't all pinned.
Signed-off-by: Paul Mackerras
---
arch/powerpc/includ
we can use normal system
memory as part of an emulated device later on. In that case the actual
HPTE we insert is a cacheable HPTE.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h | 26
arch/powerpc/include/asm/kvm_host.h |2 +
arch/power
bal spinlock in order to improve the scalability of updates
to the guest MMU hashed page table, and so needs this.
Signed-off-by: Paul Mackerras
---
include/linux/kvm_host.h | 14 +-
virt/kvm/kvm_main.c |6 +++---
2 files changed, 12 insertions(+), 8 deletions(-)
diff --gi
s of
HPT_ORDER etc. to a header file and defining HPT_NPTE for HPT_NPTEG << 3.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h |8 +++
arch/powerpc/include/asm/kvm_host.h | 10
arch/powerpc/kvm/book3s_64_mmu_hv.c | 44 +++
a
This series of patches updates the Book3S-HV KVM code that manages the
guest hashed page table (HPT) to enable several things:
* MMIO emulation and MMIO pass-through
* Use of small pages (4kB or 64kB, depending on config) to back the
guest memory
* Pageable guest memory - i.e. backing pages ca
lock bit.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s_64.h | 18 ++
arch/powerpc/include/asm/kvm_host.h | 17 ++-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 84 +-
3 files changed, 117 insertions(+), 2 deletions(-)
diff
flag,
kvm->arch.using_mmu_notifiers, that indicates whether we can page
guest pages out. If it is not set, the MMU notifier callbacks do
nothing and everything operates as before.
Signed-off-by: Paul Mackerras
---
arch/powerpc/include/asm/kvm_book3s.h|4 +
arch/powerpc/include/asm/kv
real mode which needs to call gfn_to_memslot()
and thus needs this. (Module code is allocated in the vmalloc region,
which can't be accessed in real mode.)
With this, we can remove builtin_gfn_to_memslot() from book3s_hv_rm_mmu.c
and thus eliminate a little bit of duplication.
Signed-off-by:
real mode magic again?
No, I just hadn't realized it existed. This looks fine to me.
Acked-by: Paul Mackerras
Paul.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 23, 2011 at 02:23:30PM +0100, Alexander Graf wrote:
> So if I read things correctly, this is the only case you're setting
> pages as dirty. What if you have the following:
>
> guest adds HTAB entry x
> guest writes to page mapped by x
> guest removes HTAB entry x
> host fetche
1 - 100 of 828 matches
Mail list logo