From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 239AAC4361B for ; Wed, 9 Dec 2020 04:38:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7300C238E9 for ; Wed, 9 Dec 2020 04:38:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7300C238E9 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CrPSN1sYkzDqnf for ; Wed, 9 Dec 2020 15:38:28 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CrPQZ0MNLzDqcj for ; Wed, 9 Dec 2020 15:36:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=saNnipqa; dkim-atps=neutral Received: by ozlabs.org (Postfix, from userid 1003) id 4CrPQY6Dvbz9sWL; Wed, 9 Dec 2020 15:36:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1607488613; bh=4qK0Qeph9aujlXGIFVNGaEAyJsEJ75znCDH6aXQBnaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=saNnipqailTWZYEW7o1ETFKqbdiCFVgtlrhAlbhLtiElZxzzwFEmnfrXPdhBgys+a d0gWxSbTajAn5DXmA7bQthrlka5qpKKBNb0qzC5wHWZfEKW9R5UbkP/aeUOBiWnzOp mvs92dvWGLufV0p3b/bsxctGKwxuID2zW33fh1P0aOnWWlSCPtJfzelfqljdkxhv5u scToA9zMk+qWYvWTpaZH0dZi6DIN4IX7CmFf+0qa945U/7r7vAlCj75hxjI8ngjxPb 4UU3yHvWOQitK25dHPKpKMuTBleyugeZWWYLEbhnxOX1u40KESNUmiwjJsCS6u+f7/ 6cz08KAshW+3Q== Date: Wed, 9 Dec 2020 15:36:48 +1100 From: Paul Mackerras To: Ravi Bangoria Subject: Re: [PATCH v2 4/4] KVM: PPC: Introduce new capability for 2nd DAWR Message-ID: <20201209043648.GB29825@thinks.paulus.ozlabs.org> References: <20201124105953.39325-1-ravi.bangoria@linux.ibm.com> <20201124105953.39325-5-ravi.bangoria@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201124105953.39325-5-ravi.bangoria@linux.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: christophe.leroy@c-s.fr, leobras.c@gmail.com, mikey@neuling.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, npiggin@gmail.com, kvm-ppc@vger.kernel.org, jniethe5@gmail.com, pbonzini@redhat.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Nov 24, 2020 at 04:29:53PM +0530, Ravi Bangoria wrote: > Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether > kvm supports 2nd DAWR or not. This should be described in Documentation/virt/kvm/api.rst. Strictly speaking, it should be a capability which is disabled by default, so the guest can only do the H_SET_MODE to set DAWR[X]1 if it has been explicitly permitted to do so by userspace (QEMU). This is because we want as little as possible of the VM configuration to come from the host capabilities rather than from what userspace configures. So what we really need here is for this to be a capability which can be queried by userspace to find out if it is possible, and then enabled by userspace if it wants. See how KVM_CAP_PPC_NESTED_HV is handled for example. Paul.