Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp789952rwe; Fri, 26 Aug 2022 14:48:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tcxJz0YNb9E8W4MoNGyPt7Je8OCKg/WERxoRfyirLlHq+PXx0a5UOZhvL5FfUKvg7wTA/ X-Received: by 2002:a05:6402:440c:b0:43a:1124:e56a with SMTP id y12-20020a056402440c00b0043a1124e56amr8357935eda.134.1661550491113; Fri, 26 Aug 2022 14:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661550491; cv=none; d=google.com; s=arc-20160816; b=zbFgPauj33AJuZ2ABxZ1bL87oCGlsZME3fsv4RKZ8Z2dpZDKyG7NNvbmT6gIauFFEp c4gpC9+EBsbYj+uI+6KCJVhDNSFySoc/bWyDqoNGcSWjx2iHGQwm4yhY12b+/Mh2lUA4 AsQGHMHnk8JRhOjCpVQ/tuHgriEdre8iAx/dA6jVB4sVQywIhriDlS5kQf78iO120ZIa dhZH2r3pNdrX1i1YrAafsmTjil7W8BBoG6cATbp8pR+deBLQ/PKTZK3lKTjgRoYrF/Jc cf31SfL2dhVZF4aX9OzInWs1Xplg8DPbWInm0nCrVgKpsGgL2h85efmu5lPAjkwqpHeD JxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fGX1OPYHOyAdnf6z71dmW2DwOr7H4Y5wRyKl79aJ7R0=; b=JAJoA3abfcjdhb+0cNNW4O8GGlKhrTsoWbWietZ979sV1WenBWc5+cOVFTWSazl7RY fL9YHWoquQXiT9YKXFjhGKY2sYhgRTv/wBDqtCCFrIO0WpRJTEQaMzRCySVSy7zuRf39 4XcuH8/2aKSk/iEiIM4c/RY9OUplI91/XcGURIzLryIVcUbxjcqYVwTWUNCK7cbH7rzt ts4Q9L7KszHpuhLCEmh1chtUPeNPH+UrjAXooTdqwbuhZBIOyiHZBe5IhUSR4ZVPMKw+ 9c9GvQdUS1FHOSKbqNw8q7YtTnrJ9i/1zwMmFaFxZ7FBDGDZ/I/wFQ3CTTh6rlqSzkWj RPNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZC1efQqp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a170906328700b007384c1db86fsi1680462ejw.60.2022.08.26.14.47.42; Fri, 26 Aug 2022 14:48:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZC1efQqp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344485AbiHZVct (ORCPT + 99 others); Fri, 26 Aug 2022 17:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244814AbiHZVcr (ORCPT ); Fri, 26 Aug 2022 17:32:47 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F7649080A for ; Fri, 26 Aug 2022 14:32:44 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id z25so3588443lfr.2 for ; Fri, 26 Aug 2022 14:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=fGX1OPYHOyAdnf6z71dmW2DwOr7H4Y5wRyKl79aJ7R0=; b=ZC1efQqpG/Yl12c9Sf0lbSneIvuydmkz6lD+4KwRibO24kQUatXopq6xrBTE+YeeyR q7A0vfCIleUquEfbTOnSyFHAwePTyBPeqv2/ma8GgFea/Ixx3aLVwoY9Fes1qIrjLDr1 Nd6jCOOn88THmF7GLR+a8EWPAuq3Zz3zn1PzhUigNoDANZ/JbADf29mivcvkYSmlIyPY Mljmir8oMpLOPvbS8ez1m+7uKdlmCp6LGxmF12PPwjzauVS8cA/Z9xWvqjCO8f0T0wuz kyy+4B1CYpyEZxjTV7uWkKZFEeBcp8NRBYb+60p59rhCoYViV4f4TSJ6kjl/TbfqRvpL g1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=fGX1OPYHOyAdnf6z71dmW2DwOr7H4Y5wRyKl79aJ7R0=; b=TirJZ81zRk22oFiPLvO7XAT8FYzAqq5YJ7o3ZmXb2rhbX7EhG2k7bV92cKmmtR3Txx ce3y7hDSHho4X982qzGSzAlUSMle3NuQlZBezp210xXeoHNQts8XU5HARV0xNLM2Xvob LxiwqF1YEVSd2Jk+BPJj/1iE7JSsBZbpylqe41pzTaAi1kF1GejBE2exG7oi3qr0Tsnh 1ybSUMmTahHxCEBn981TfJm2uFVjDVx2LnBvxbyZP1JNU7WL/7teq/d6pLr6p8WsozEC DP3UxNfjoC6X7rHvfp1CSoebw2Uz3EYGXpKRbT4C/VsFaGxIsHRE8lokMX/T68itrpxF at/A== X-Gm-Message-State: ACgBeo1Lc1pP8A+LSKNbWezXp7195c9vPb6AOpjlx8QlLyPu8ZyHRlMu qBeNPQipO4oixGj3OxlUHYUyZEI6IqZlInALHk9owQ== X-Received: by 2002:ac2:4e15:0:b0:48b:3ad2:42c8 with SMTP id e21-20020ac24e15000000b0048b3ad242c8mr3415436lfr.391.1661549562159; Fri, 26 Aug 2022 14:32:42 -0700 (PDT) MIME-Version: 1.0 References: <20220825232522.3997340-1-seanjc@google.com> In-Reply-To: <20220825232522.3997340-1-seanjc@google.com> From: Peter Gonda Date: Fri, 26 Aug 2022 15:32:30 -0600 Message-ID: Subject: Re: [PATCH v5 0/7] KVM: selftests: Implement ucall "pool" (for SEV) To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Nathan Chancellor , Nick Desaulniers , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , Tom Rix , kvm list , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, LKML , Colton Lewis , Andrew Jones Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 25, 2022 at 5:25 PM Sean Christopherson wrote: > > Non-KVM folks, y'all got pulled in because of the atomic_test_and_set_bit() > patch. > > Rework the ucall infrastructure to use a pool of ucall structs to pass > memory instead of using the guest's stack. For confidential VMs with > encrypted memory, e.g. SEV, the guest's stack "needs" to be private memory > and so can't be used to communicate with the host. > > Convert all implementations to the pool as all of the complexity is hidden > in common code, and supporting multiple interfaces adds its own kind of > complexity. > > Tested on x86 and ARM, compile tested on s390 and RISC-V. > Thanks for the help on the ucall-pool Sean! I rebased the SEV selftests on these and everything works as before TESTED-BY: Peter Gonda