From patchwork Thu Oct 11 06:16:06 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: 10636125 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 EDB73679F for ; Thu, 11 Oct 2018 06:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4F012B066 for ; Thu, 11 Oct 2018 06:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8E5A2B068; Thu, 11 Oct 2018 06:18:09 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D53D2B066 for ; Thu, 11 Oct 2018 06:18:09 +0000 (UTC) Received: from localhost ([::1]:60736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAUIS-0003xR-Ie for patchwork-qemu-devel@patchwork.kernel.org; Thu, 11 Oct 2018 02:18:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAUGy-0002vb-Oy for qemu-devel@nongnu.org; Thu, 11 Oct 2018 02:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAUGu-00066A-NT for qemu-devel@nongnu.org; Thu, 11 Oct 2018 02:16:36 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:46174) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAUGo-00063C-Qh; Thu, 11 Oct 2018 02:16:28 -0400 Received: by mail-pf1-x444.google.com with SMTP id r64-v6so3836810pfb.13; Wed, 10 Oct 2018 23:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rX2dh06sGNp13vBUOuAJ2wgjj6HCs5MRFCbqQu3jVrU=; b=uEmg939OaD/7sg7z8zwZ4KxNVydKjbYfd1JtUtNAoUnuSM5tm93cDE8hjdLrK5VuDc yNaqVQKIIeG4SeFmR9wjNr8rooyr8qrpOGAaZcSFhI7mYoAxGsWHvFKzh9s4Olu1k3h4 MVWJRM4/USvhATUW1il1r5NUZyXbB/G22gnkff8MHwZvx6Jgvjfe9M3aljKk+zhX3fk6 ApfDP4/nTmwoac8GTdV8dCU+yIM3/LPo5YaB5CSF6Mip50t2evJJ/zIeZMVmhi7sa0JA MHdlgc9keTAU6pKBXtDryZsDeMxla66JvqcDqB3d13Thtl08B+Rgt44voD5GuJnqVht2 7vBA== 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=rX2dh06sGNp13vBUOuAJ2wgjj6HCs5MRFCbqQu3jVrU=; b=M6B8vXnnZCsZne9MLd8phNyydbelrTSsw5XG19cEU77YdbO9uxlr3DbJu2Cq/uPrrD Rc84G/nujxr0rMHeMVH9LuZSlEWm9Db82RGgPBxTXA5FSN2RyoulwcVneG9e3el1IHYB I/x5QZ741IzN6X32KC2Ju/CPEE2/0tdsOiYHcGco5N1ZWYSZSj/cnRsHA9I1vexm8230 9HtlQHFx+yIgrHM4U+yqL5HCWY87WR7eVu+5B/bjmZBdfsLkMrHAivtDzZf+tnu1pp2X PrhCm3bxxMk5pH7gCuPsOO9RjLo8G8uKeb+rbMu4nqC7U2I3XiNq4vgOhE4kBGWdk8C7 BBxg== X-Gm-Message-State: ABuFfoj/QdtKq4GA7h3kJCAfsrZlCqEmLrGaQItIelDGO2j8Amtiq38i VsFblhF+ciQvh5GpdRFCTbDRD5Ng X-Google-Smtp-Source: ACcGV62+G0GW1dLTD4f3PKgf6+6evTuC0lak6a0Q6bgCcivzShP8F8i3kMMqcN2x9kCus6SJBwOzYg== X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr264662pfd.106.1539238580412; Wed, 10 Oct 2018 23:16:20 -0700 (PDT) Received: from localhost.home.majoof.com ([221.121.149.195]) by smtp.gmail.com with ESMTPSA id q24-v6sm35836189pfi.165.2018.10.10.23.16.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 23:16:19 -0700 (PDT) From: Suraj Jitindar Singh To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Thu, 11 Oct 2018 17:16:06 +1100 Message-Id: <20181011061609.11423-1-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.13.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [QEMU-PPC] [PATCH V3 0/3] ppc/spapr: Add support for nested kvm-hv X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: paulus@ozlabs.org, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch series adds the qemu support for running nested kvm-hv on a POWER9 platform with appropriate hypervisor support and migration of these guests. That is, the ability to run kvm-hv guests as guests of an operating system which is itself a kvm-hv guest. The host (L0 hypervisor) and level 1 guest (L1 guest hypervisor) require the following patch series: KVM: PPC: Book3S HV: Nested HV virtualization And this patch series in the qemu instance running on the L0 hypervisor. Patch series based on: ppc-for-3.1 The cap number is now in Paolo's tree so hopefully we can rely on it not changing. V2 -> V3: - The enable cap ioctl no longer takes an enable field to indicate disable/enable, but just enables the cap. So update to match this kernel change. (The cap starts out disable by default) Suraj Jitindar Singh (3): target/ppc: Update linux-headers for v4.19-rc7 target/ppc: Add one reg id for ptcr ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV hw/ppc/spapr.c | 2 ++ hw/ppc/spapr_caps.c | 32 ++++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 5 ++++- linux-headers/asm-powerpc/kvm.h | 1 + linux-headers/linux/kvm.h | 1 + target/ppc/kvm.c | 12 ++++++++++++ target/ppc/kvm_ppc.h | 12 ++++++++++++ target/ppc/translate_init.inc.c | 10 +++++----- 8 files changed, 69 insertions(+), 6 deletions(-)