[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161215055404.29351-12-david@gibson.dropbear.id.au>
Date: Thu, 15 Dec 2016 16:54:04 +1100
From: David Gibson <david@...son.dropbear.id.au>
To: paulus@...ba.org
Cc: michael@...erman.id.au, benh@...nel.crashing.org,
sjitindarsingh@...il.com, thuth@...hat.com, lvivier@...hat.com,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, David Gibson <david@...son.dropbear.id.au>
Subject: [PATCH 11/11] powerpc/kvm: Advertise availablity of HPT resizing on KVM HV
This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the
presence of in-kernel HPT resizing on KVM HV. In fact the HPT resizing
isn't fully implemented, but this allows us to experiment with what's
there.
Signed-off-by: David Gibson <david@...son.dropbear.id.au>
---
arch/powerpc/kvm/powerpc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index bb23923..965d26b 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -606,7 +606,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
r = 1;
break;
case KVM_CAP_SPAPR_RESIZE_HPT:
- r = 1; /* resize allowed only if HPT is outside kernel */
+ if (hv_enabled)
+ r = 2; /* In-kernel resize implementation */
+ else
+ r = 1; /* outside kernel resize allowed */
break;
#endif
case KVM_CAP_PPC_HTM:
--
2.9.3
Powered by blists - more mailing lists