From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3FF021A0342 for ; Thu, 3 Mar 2016 12:59:55 +1100 (AEDT) From: David Gibson To: paulus@samba.org, aik@ozlabs.ru, benh@kernel.crashing.org Cc: bharata@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, David Gibson Subject: [RFC 17/18] powerpc/kvm: Advertise availablity of HPT resizing on KVM HV Date: Thu, 3 Mar 2016 12:59:48 +1100 Message-Id: <1456970389-28802-18-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1456970389-28802-1-git-send-email-david@gibson.dropbear.id.au> References: <1456970389-28802-1-git-send-email-david@gibson.dropbear.id.au> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- 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 eeda4a8..2314059 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -573,7 +573,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 default: -- 2.5.0