From patchwork Thu Sep 27 06:50:07 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: 10617313 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 EE6BE174A for ; Thu, 27 Sep 2018 06:51:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCB502AFD4 for ; Thu, 27 Sep 2018 06:51:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8C7F2B005; Thu, 27 Sep 2018 06:51:33 +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 6B7F02AF88 for ; Thu, 27 Sep 2018 06:51:33 +0000 (UTC) Received: from localhost ([::1]:33992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5Q96-0007Ds-5h for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Sep 2018 02:51:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5Q81-0006Pg-0T for qemu-devel@nongnu.org; Thu, 27 Sep 2018 02:50:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5Q7x-0007Ik-Md for qemu-devel@nongnu.org; Thu, 27 Sep 2018 02:50:24 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:32791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5Q7x-0007Hl-Ff; Thu, 27 Sep 2018 02:50:21 -0400 Received: by mail-pg1-x543.google.com with SMTP id y18-v6so1209861pge.0; Wed, 26 Sep 2018 23:50: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=MNb954j352JZLA/3dDR1jgLAZKUgWdcNWqs/oL0oJ0o=; b=Yy8ZU9I62kGBnQm5Xv/388ptZ9Kmi/blJaXtevmTn2m1o9WwoOkFFne7Fd32Y3l44z vsXFh+tFrwXcING/OtQ6bQK9T42ClWMXnEhfOM/2g7zt2MZ7Jjr7Z5oKbpYGrrqLCAUc ogDgKpFaCEf9RqiKnogmi0JSikGa41UwhlWiJ/WyMmJ3khwhrXlN2ZY/XNNBSazvlED0 NN8KvVumz1N2dBqJuHM6pOr/TphrMaXuPFOl1Fh8SZKN0q1zyxZjIShKnzjeFQK/B4Zr IG3CmVGQtNYppvC32bNL6PebXBxrocaJlJJU8JA/+sBB5k7a48aJ5Usfjd0Al0bz1oHt nC7w== 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=MNb954j352JZLA/3dDR1jgLAZKUgWdcNWqs/oL0oJ0o=; b=Ljj37ljFWYLGW5bX/jPZoDARM9l7DbpjAkcuhyrvHCjRtAMqDkPQnqyH++t7fxjpzz 3gVgDMAvHGWmPL7yC5I5PRWfmdkuKHN+2PzyiXfAGR9gcRc6xhhQB9WHH+AnD6hUxo07 QNdP6deG4DJDhraHLjQHq/t9PIZ44N3oIbFEFpUbs0SH3jeCT7cZLMjaOGJWXWXLMN8C oTvihYy32MpE8GbbmZ9FpqRlBxoxP+PQVOwpYO/qZRcnKazmUsQ/JOkD1CFMMwCzVgPT ozEPIrNdTVXoICN0PgSof+SySkLrrSv6tOVxTvVYDIXZtke3RV6NCakTFc6PnCiWCqNl 7WjA== X-Gm-Message-State: ABuFfoi9qRDtq+qwlyKWX8WCRN7xUys5jRaFwhVJ3IMnwyMdsohwCfVN /XDBrKfcwmAnDM9KBxSN6eA= X-Google-Smtp-Source: ACcGV60QgtU9cfVfHrcR5MMOULIjO+3RGPGD5/Dwng+zB0YloCkb4GJPHIdKTJxJBm3WlsJ9+jvFHw== X-Received: by 2002:a17:902:bd06:: with SMTP id p6-v6mr9312265pls.226.1538031020341; Wed, 26 Sep 2018 23:50:20 -0700 (PDT) Received: from surajjs2.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id d18-v6sm1412561pfk.163.2018.09.26.23.50.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 23:50:19 -0700 (PDT) From: Suraj Jitindar Singh To: david@gibson.dropbear.id.au Date: Thu, 27 Sep 2018 16:50:07 +1000 Message-Id: <20180927065009.32154-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::543 Subject: [Qemu-devel] [QEMU-PPC] [RFC 0/2] 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, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, sjitindarsingh@gmail.com 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: [RFC PATCH 00/32] 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 RFC because waiting for the CAP number to be in upstream linux Suraj Jitindar Singh (2): 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 | 29 +++++++++++++++++++++++++++++ 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, 66 insertions(+), 6 deletions(-)