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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 676D9C19F2B for ; Wed, 27 Jul 2022 14:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233152AbiG0OHY (ORCPT ); Wed, 27 Jul 2022 10:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231266AbiG0OHV (ORCPT ); Wed, 27 Jul 2022 10:07:21 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E01255B2 for ; Wed, 27 Jul 2022 07:07:19 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id t17so15024906lfk.0 for ; Wed, 27 Jul 2022 07:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pbXRFwb+6mnOqb4qko6w4MUz1iH8dRLuiEYG/yozVuU=; b=poGVkIjHOsIvKU5OvFt21FuMAjEooxE4gTH04sm0jJ7bDQ6SCGqgdCc2jOwDEAaU9W 08Mq7crS4yYQkJlGle+naSbCagOYjrJtZu7TtqnAxJgtkkV8eEoithy3pgZZ9rVLkJAf uAA3uk2OfGbt0OKGthKgFxuMl+om4hR0ZqeO9r+v64FAGVfQSRxZMWQz3EtOvM8nAT7u ZaRCLIzrTXbexhh9PTF1eGzlsLvx8ddl6TrySxOJbWcmW6KQ9aUwgs9uvesIx5KAxJKh 9okHSFD+OyFvIaI6iAnbUaDDhXJ0pcGcSyP+CiWaUMRFAAe+vk2V/6i4NOUWF5/AetyH vqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pbXRFwb+6mnOqb4qko6w4MUz1iH8dRLuiEYG/yozVuU=; b=lGgldiOroj8qr82/SqFUbctHf3nmnVjlLdTx6H7QHOSWidjVR+pQVRqVtQW/sp3vqp uwYxcOTNWUDE809Jb7KxiRtwChIV/V4bWg6SwXBbiKbH5nYnRZgvq7B3UeUIDc9eh3nB XqekMkKQF6qhnafj3yNH+Xh05WJ39O/t1YEPZJaDVrqtpE2YjdvsV108mrwmIsH4JAmf Dwr6jFyymPDhu0yx5Px9x6EURVnphoz2iR9816Ehvra04PKOOWXoXiW/Kvu1XUSYaH9i iuTWYbn00CjmzXnBnAuji4xVyY57dFPeE6+6oBTlFOzXgdDtVAb8FfnxvYr8KZWp5OCm kPhA== X-Gm-Message-State: AJIora/Ntcl6AgUpuDr8rfFqgCdDmxBGE4+xJKbL+h8cp4AKgpVRJ9kd uqr3BuxIej4f/NUCkIjdSE9XWCKIHTq1BUKCUoknOkeDABYA4w== X-Google-Smtp-Source: AGRyM1vX862+bxpk11BK++4y3iu+NiKqfuius4fds95B9RW+xG19y7YW29rzvG0sKDYPMzmjHJ9aFOE14Npknvr91c4= X-Received: by 2002:a05:6512:21a7:b0:48a:a06e:1d21 with SMTP id c7-20020a05651221a700b0048aa06e1d21mr3099565lft.494.1658930837575; Wed, 27 Jul 2022 07:07:17 -0700 (PDT) MIME-Version: 1.0 References: <20220715192956.1873315-1-pgonda@google.com> <20220715192956.1873315-10-pgonda@google.com> <20220719154330.wnwnu23gagcya3o7@kamzik> <20220727135603.ld5torjrn4gatjb4@kamzik> In-Reply-To: <20220727135603.ld5torjrn4gatjb4@kamzik> From: Peter Gonda Date: Wed, 27 Jul 2022 08:07:05 -0600 Message-ID: Subject: Re: [RFC V1 08/10] KVM: selftests: Make ucall work with encrypted guests To: Andrew Jones Cc: kvm list , LKML , Marc Orr , Sean Christopherson , Michael Roth , "Lendacky, Thomas" , Joerg Roedel , Mingwei Zhang , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 27, 2022 at 7:56 AM Andrew Jones wrote: > > On Wed, Jul 27, 2022 at 07:38:29AM -0600, Peter Gonda wrote: > > On Tue, Jul 19, 2022 at 9:43 AM Andrew Jones wrote: > > > I'm not a big fan of mixing the concept of encrypted guests into ucalls. I > > > think we should have two types of ucalls, those have a uc pool in memory > > > shared with the host and those that don't. Encrypted guests pick the pool > > > version. > > > > Sean suggested this version where encrypted guests and normal guests > > used the same ucall macros/functions. I am fine with adding a second > > interface for encrypted VM ucall, do you think macros like > > ENCRYPTED_GUEST_SYNC, ENCRYPTED_GUEST_ASSERT, and > > get_encrypted_ucall() ? > > > > It's fine to add new functionality to ucall in order to keep the > interfaces the same, except for initializing with some sort of indication > that the "uc pool" version is needed. I just don't like all the references > to encrypted guests inside ucall. ucall should implement uc pools without > the current motivation for uc pools creeping into its implementation. Ah that makes sense. So maybe instead of checking for 'if (vm->memcrypt.enabled)' I should just add a new field in kvm_vm to select for use of the uc pool? Something like kvm_vm.enable_uc_pool? Thanks Drew!