This fixes an error in the inline asm in try_lock_hpte() where we
were erroneously using a register number as an immediate operand.
The bug only affects an error path, and in fact the code will still
work as long as the compiler chooses some register other than r0
for the bits variable.
This is a set of 8 patches of which the first 7 have been posted
previously and have had no comments. The 8th is new, but is quite
trivial. They fix a series of issues with HV-style KVM on ppc.
They only touch code that is specific to Book3S HV KVM.
Please apply.
Thanks,
Paul.
--
To
Currently the Book3S HV code implements a policy on multi-threaded
processors (i.e. POWER7) that requires all of the active vcpus in a
virtual core to be ready to run before we run the virtual core.
However, that causes problems on reset, because reset stops all vcpus
except vcpu 0, and can also
Currently the code that accounts stolen time tends to overestimate the
stolen time, and will sometimes report more stolen time in a DTL
(dispatch trace log) entry than has elapsed since the last DTL entry.
This can cause guests to underflow the user or system time measured
for some tasks, leading
Subsequent patches implementing in-kernel XICS emulation will make it
possible for IPIs to arrive at secondary threads at arbitrary times.
This fixes some races in how we start the secondary threads, which
if not fixed could lead to occasional crashes of the host kernel.
This makes sure that (a)
Commit 55b665b026 (KVM: PPC: Book3S HV: Provide a way for userspace
to get/set per-vCPU areas) includes a check on the length of the
dispatch trace log (DTL) to make sure the buffer is at least one entry
long. This is appropriate when registering a buffer, but the
interface also allows for any
If a thread in a virtual core becomes runnable while other threads
in the same virtual core are already running in the guest, it is
possible for the latecomer to join the others on the core without
first pulling them all out of the guest. Currently this only happens
rarely, when a vcpu is first
When a Book3S HV KVM guest is running, we need the host to be in
single-thread mode, that is, all of the cores (or at least all of
the cores where the KVM guest could run) to be running only one
active hardware thread. This is because of the hardware restriction
in POWER processors that all of
There were a few places where we were traversing the list of runnable
threads in a virtual core, i.e. vc-runnable_threads, without holding
the vcore spinlock. This extends the places where we hold the vcore
spinlock to cover everywhere that we traverse that list.
Since we possibly need to sleep
On 15.10.2012, at 13:14, Paul Mackerras wrote:
This is a set of 8 patches of which the first 7 have been posted
previously and have had no comments. The 8th is new, but is quite
trivial. They fix a series of issues with HV-style KVM on ppc.
They only touch code that is specific to Book3S
In order to support vhost, we need to be able to support ioeventfd.
This patch set adds support for ioeventfd to PPC and makes it possible to
do so without implementing irqfd along the way, as it requires an in-kernel
irqchip which we don't have yet.
Alex
Alexander Graf (2):
KVM: Distangle
In order to support the generic eventfd infrastructure on PPC, we need
to call into the generic KVM in-kernel device mmio code.
Signed-off-by: Alexander Graf ag...@suse.de
---
arch/powerpc/kvm/Kconfig |1 +
arch/powerpc/kvm/Makefile |4 +++-
arch/powerpc/kvm/powerpc.c | 17
The current eventfd code assumes that when we have eventfd, we also have
irqfd for in-kernel interrupt delivery. This is not necessarily true. On
PPC we don't have an in-kernel irqchip yet, but we can still support easily
support eventfd.
Signed-off-by: Alexander Graf ag...@suse.de
---
In the Book3s HV code, kvmppc_run_core() has logic to grab the secondary
threads of the physical core.
If for some reason a thread is stuck, kvmppc_grab_hwthread() can fail,
but currently we ignore the failure and continue into the guest. If the
stuck thread is in the kernel badness ensues.
On Mon, Oct 15, 2012 at 02:00:54PM +0200, Alexander Graf wrote:
Sorry, I can't accept patches that haven't shown up on kvm@vger. Please send
this patch set again with CC to kvm@vger.
Done; I didn't cc kvm-ppc this time since the patches haven't changed.
By the way, what is the purpose of
Michael,
On Tue, Oct 16, 2012 at 11:15:50AM +1100, Michael Ellerman wrote:
In the Book3s HV code, kvmppc_run_core() has logic to grab the secondary
threads of the physical core.
If for some reason a thread is stuck, kvmppc_grab_hwthread() can fail,
but currently we ignore the failure and
The mmu_notifier_retry() function, used to test whether any page
invalidations are in progress, currently takes a vcpu pointer, though
the code only needs the VM's struct kvm pointer. Forthcoming patches
to the powerpc Book3S HV code will need to test for retry within a VM
ioctl, where a struct
This uses a bit in our record of the guest view of the HPTE to record
when the HPTE gets modified. We use a reserved bit for this, and ensure
that this bit is always cleared in HPTE values returned to the guest.
The recording of modified HPTEs is only done if other code indicates
its interest by
This restructures the code that creates HPT (hashed page table)
entries so that it can be called in situations where we don't have a
struct vcpu pointer, only a struct kvm pointer. It also fixes a bug
where kvmppc_map_vrma() would corrupt the guest R4 value.
Now, most of the work of
This series of patches provides an interface by which userspace can
read and write the hashed page table (HPT) of a Book3S HV guest.
The interface is an ioctl which provides a file descriptor which can
be accessed with the read() and write() system calls. The data read
and written is the guest
A new ioctl, KVM_PPC_GET_HTAB_FD, returns a file descriptor. Reads on
this fd return the contents of the HPT (hashed page table), writes
create and/or remove entries in the HPT. There is a new capability,
KVM_CAP_PPC_HTAB_FD, to indicate the presence of the ioctl. The ioctl
takes an argument
This makes a HPTE removal function, kvmppc_do_h_remove(), available
outside book3s_hv_rm_mmu.c. This will be used by the HPT writing
code.
Signed-off-by: Paul Mackerras pau...@samba.org
---
arch/powerpc/include/asm/kvm_book3s.h |3 +++
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 19
Signed-off-by: Michael Ellerman mich...@ellerman.id.au
---
MAINTAINERS |1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e73060f..32dc107 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4244,6 +4244,7 @@ KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
M:
23 matches
Mail list logo