All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Various Book3s HV fixes that haven't been picked up yet
@ 2012-10-16  3:03 Paul Mackerras
  2012-10-16  3:03 ` [PATCH 1/8] KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online Paul Mackerras
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Paul Mackerras @ 2012-10-16  3:03 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm

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.
The patches are against the next branch of the kvm tree.

The overall diffstat is:

 arch/powerpc/include/asm/kvm_asm.h       |    1 +
 arch/powerpc/include/asm/kvm_book3s_64.h |    2 +-
 arch/powerpc/include/asm/kvm_host.h      |   17 +-
 arch/powerpc/include/asm/smp.h           |    8 +
 arch/powerpc/kernel/smp.c                |   46 +++++
 arch/powerpc/kvm/book3s_hv.c             |  316 +++++++++++++++++++++---------
 arch/powerpc/kvm/book3s_hv_rmhandlers.S  |   11 +-
 7 files changed, 293 insertions(+), 108 deletions(-)

Please apply.

Thanks,
Paul.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 7/8] KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0
@ 2012-10-15 11:18 Paul Mackerras
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Mackerras @ 2012-10-15 11:18 UTC (permalink / raw)
  To: kvm-ppc

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 existing buffer to be unregistered by
specifying a zero address.  In this case the length check is not
appropriate.  This makes the check conditional on the address being
non-zero.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/kvm/book3s_hv.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 8b3c470..812764c 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -811,9 +811,8 @@ int kvmppc_set_one_reg(struct kvm_vcpu *vcpu, u64 id, union kvmppc_one_reg *val)
 		addr = val->vpaval.addr;
 		len = val->vpaval.length;
 		r = -EINVAL;
-		if (len < sizeof(struct dtl_entry))
-			break;
-		if (addr && !vcpu->arch.vpa.next_gpa)
+		if (addr && (len < sizeof(struct dtl_entry) ||
+			     !vcpu->arch.vpa.next_gpa))
 			break;
 		len -= len % sizeof(struct dtl_entry);
 		r = set_vpa(vcpu, &vcpu->arch.dtl, addr, len);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-16  3:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16  3:03 [PATCH 0/8] Various Book3s HV fixes that haven't been picked up yet Paul Mackerras
2012-10-16  3:03 ` [PATCH 1/8] KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online Paul Mackerras
2012-10-16  3:04 ` [PATCH 2/8] KVM: PPC: Book3S HV: Fix some races in starting secondary threads Paul Mackerras
2012-10-16  3:04 ` [PATCH 3/8] KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock Paul Mackerras
2012-10-16  3:05 ` [PATCH 4/8] KVM: PPC: Book3S HV: Fixes for late-joining threads Paul Mackerras
2012-10-16  3:05 ` [PATCH 5/8] KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run Paul Mackerras
2012-10-16  3:06 ` [PATCH 6/8] KVM: PPC: Book3S HV: Fix accounting of stolen time Paul Mackerras
2012-10-16  3:06 ` [PATCH 7/8] KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0 Paul Mackerras
2012-10-16  3:07 ` [PATCH 8/8] KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte() Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2012-10-15 11:18 [PATCH 7/8] KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0 Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.