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: 10451357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF19B60467 for ; Thu, 7 Jun 2018 08:08:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF9AF2996E for ; Thu, 7 Jun 2018 08:08:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2CF429B3E; Thu, 7 Jun 2018 08:08:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6961E2996E for ; Thu, 7 Jun 2018 08:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932138AbeFGIIY (ORCPT ); Thu, 7 Jun 2018 04:08:24 -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-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }