From patchwork Thu Jun 7 08:08:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 926187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="JVouCeUp"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 411dTW4DZrz9s7V for ; Thu, 7 Jun 2018 18:08:31 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932102AbeFGIIX (ORCPT ); Thu, 7 Jun 2018 04:08:23 -0400 Received: from ozlabs.org ([203.11.71.1]:54137 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753372AbeFGIIN (ORCPT ); Thu, 7 Jun 2018 04:08:13 -0400 Received: by ozlabs.org (Postfix, from userid 1003) id 411dT71WnSz9s4w; Thu, 7 Jun 2018 18:08:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1528358891; bh=47DMawyeDROyJrlsGKMC2jWy1xmU0UMLkImgiqKjJhE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=JVouCeUp8LSiIkHmdzuEWoKuYsikuOgpUh6WtqWKmwBb4txPGPhLm2lDwzM8DtOQM HwkZrvlayU8rdglKDlT2U3uoKBsMfJkSxU/uvCdS0fClJS85RmrsMaEZSkE9BYf/FZ awgoSFxlDyKlbMSKxr70iwqbVSOL9RfXHKMIMo/7c2RO+cP//JvulhnQcZhr41W4Lg ewbcp3brFYH2g4lQehTOBtPovJaJOiMtSa538ym/4ulgpw/gph4YCJJF+n2sy0wSSR 7+JFvEKQNChzrx3rF9L59Hsau2zrLxPs1ky/D0wx02A4kPWoFN/t/x+oKP7aftfkys y395xMSs63ZTA== Date: Thu, 7 Jun 2018 18:08:02 +1000 From: Paul Mackerras To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: [PATCH 4/4] KVM: PPC: Book3S PR: Enable use on POWER9 bare-metal hosts in HPT mode Message-ID: <20180607080802.GD13401@fergus.ozlabs.ibm.com> References: <20180607080437.GA13401@fergus.ozlabs.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180607080437.GA13401@fergus.ozlabs.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org It turns out that PR KVM has no dependency on the format of HPTEs, because it uses functions pointed to by mmu_hash_ops which do all the formatting and interpretation of HPTEs. Thus we can allow PR KVM to load on POWER9 bare-metal hosts as long as they are running in HPT mode. Signed-off-by: Paul Mackerras --- This patch is against my kvm-ppc-next branch. arch/powerpc/kvm/book3s_pr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index c36c8ef3dfb0..4f467997f88e 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -2038,13 +2038,9 @@ static int kvmppc_core_check_processor_compat_pr(void) * PR KVM can work on POWER9 inside a guest partition * running in HPT mode. It can't work if we are using * radix translation (because radix provides no way for - * a process to have unique translations in quadrant 3) - * or in a bare-metal HPT-mode host (because POWER9 - * uses a modified HPTE format which the PR KVM code - * has not been adapted to use). + * a process to have unique translations in quadrant 3). */ - if (cpu_has_feature(CPU_FTR_ARCH_300) && - (radix_enabled() || cpu_has_feature(CPU_FTR_HVMODE))) + if (cpu_has_feature(CPU_FTR_ARCH_300) && radix_enabled()) return -EIO; return 0; }