From patchwork Fri Dec 7 01:17:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 10717339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C41B71731 for ; Fri, 7 Dec 2018 01:17:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B39662D7D8 for ; Fri, 7 Dec 2018 01:17:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A61BB2E228; Fri, 7 Dec 2018 01:17:17 +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,FREEMAIL_FROM,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 4BF3F2D7D8 for ; Fri, 7 Dec 2018 01:17:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726021AbeLGBRP (ORCPT ); Thu, 6 Dec 2018 20:17:15 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33818 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbeLGBRP (ORCPT ); Thu, 6 Dec 2018 20:17:15 -0500 Received: by mail-pf1-f193.google.com with SMTP id h3so1069514pfg.1; Thu, 06 Dec 2018 17:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WR6xWqNImrfbGP3JXoxK2OHxDdNcXtai1sAf1pCiEFc=; b=pLvrAfmqk1PZCEXfKuiq6jRElMOXwDYrzJ3SqBp3xvzyGx2OSk7YarBuLWc5kWiiIf BZUwbjTOPaK2GY/AWL8GqxQcf/VtMSaP1FOVlwKID7tp93YZn+CUGSBVWgzLQ90uWNv+ 3yFjFTK8zny4YLvBm+/fYEQkvrlP6+b10OJPyv+VBwBMLarFiUkHhRCUDN6x0PYVi/De dtIj15Dky5waMmtZKi2cgs7poMRiisOqRFMIahdbDTupPe1C4UZV2Cv3HaJvOSSEtnYj iLzv/oLa+0TdSQ3LlJlK4iw1Ki8nRgfC6RuvB8+R5EC/fL7TibF5bcqSYrdsLnvdPvtX oIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WR6xWqNImrfbGP3JXoxK2OHxDdNcXtai1sAf1pCiEFc=; b=cZEHlfnt6oVfOfmFJer2H5UvMU9ivWCBpf93E+VIX3q8vw9/qJD0fRdS2iHnbuXxGX 76lRWoe3pwKAl6DKOuNXk8xll4Y9y5He0munpfJ3YLURPksI4X9cKz3VfgHUBxxzdKIs rwkXS32raw+rsgSLnczZZdZLFSSxNJjGbik1h5aoQHJANwis2ZsXng/h7WHSW6ggmKS3 a1nLy65HVgTS8wiF/j9A3PmiGkRtJYvZfQ4Ien2Xgbn8ybrEMzMY65DZWPWQm0xmHLp0 Es355n+WaFhj2tS4KrN25UUVZMwEFIQpDpklyMI5y3JIZyiSB44E/+BbniVyk12jto4I 1T6w== X-Gm-Message-State: AA+aEWYhdoQCx0FjJ+I04mqhXn6ky//AUub2k7yOZDYfXmkQfQzYpEql fPD7EDa54iugu1e6RDQ0r6kHR7FA X-Google-Smtp-Source: AFSGD/XuYx/A8N4zFqbS/8P7p917A8jVaDizKPnFOPUAGSPNmHIcBbfYLwtVdba5hVyeGowkvU3Ecg== X-Received: by 2002:a63:c0f:: with SMTP id b15mr210471pgl.314.1544145434535; Thu, 06 Dec 2018 17:17:14 -0800 (PST) Received: from surajjs2.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id i1sm1864278pgb.46.2018.12.06.17.17.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 17:17:13 -0800 (PST) From: Suraj Jitindar Singh To: kvm-ppc@vger.kernel.org Cc: paulus@ozlabs.org, kvm@vger.kernel.org, sjitindarsingh@gmail.com Subject: [PATCH] KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments Date: Fri, 7 Dec 2018 12:17:03 +1100 Message-Id: <20181207011703.28826-1-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.13.6 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When booting a kvm-pr guest on a POWER9 machine the following message is observed: "qemu-system-ppc64: KVM does not support 1TiB segments which guest expects" This is because the guest is expecting to be able to use 1T segments however we don't indicate support for it. This is because we don't set the BOOK3S_HFLAG_MULTI_PGSIZE flag in the hflags in kvmppc_set_pvr_pr() on POWER9. POWER9 does indeed have support for 1T segments, so add a case for POWER9 to the switch statement to ensure it is set. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_pr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 4efd65d9e828..82840160c606 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -587,6 +587,7 @@ void kvmppc_set_pvr_pr(struct kvm_vcpu *vcpu, u32 pvr) case PVR_POWER8: case PVR_POWER8E: case PVR_POWER8NVL: + case PVR_POWER9: vcpu->arch.hflags |= BOOK3S_HFLAG_MULTI_PGSIZE | BOOK3S_HFLAG_NEW_TLBIE; break;