From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.12542.1660632450526373102 for ; Mon, 15 Aug 2022 23:47:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dX7RkqLI; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660632449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h4KFhCXKDm0wxXZrOt06x9F4YRnYlFx2gE7QYy6N9RU=; b=dX7RkqLIACADPiYJfwoA5PKh6S+zb2erCVxow7674N7lR50kFcFEwfHY6e770P5w6mZ7Rr t3KFMAQfdnYiJf9vKsRBRbLIpAiUpRCw17y+zV1yILCATqpN+ResYIQ1ZYmD8215dTZ3pi XTdvqEhhsAF7+mgXfEB4mIh0vYkVkHA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-510-X0LOMs3PMCuefXSGo1rRLg-1; Tue, 16 Aug 2022 02:47:26 -0400 X-MC-Unique: X0LOMs3PMCuefXSGo1rRLg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2613610A5CED; Tue, 16 Aug 2022 06:47:23 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 486B5112131E; Tue, 16 Aug 2022 06:47:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 31A1C18003A8; Tue, 16 Aug 2022 08:47:20 +0200 (CEST) Date: Tue, 16 Aug 2022 08:47:20 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , "Kinney, Michael D" , "Gao, Liming" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky , "Gao, Jiaqi" , Dionna Amalie Glaze , "Li, Xiaoyao" , "Yamahata, Isaku" Subject: Re: [PATCH 00/14] Introduce Lazy-accept for Tdx guest Message-ID: <20220816064720.exlc72y4fbzlhh2n@sirius.home.kraxel.org> References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > 3. fw_cfg > - Add new fw_cfg item (opt/ovmf/AcceptAllMemory) to indicate how to handle the unaccepted memory. > > True - accept all the memory > > False - don't accept the memory > > Default - It allows the firmware to choose depending on various factors. > - Glaze has submit the patch https://lore.kernel.org/all/20220620223300.1555849-1-dionnaglaze@google.com/ > Proposal 3) only works for QEMU because of fw_cfg. Well, while that is true for the patch at hand it doesn't have to be that way. We can also simply store the config option in a EFI variable. Wire up a HII configuration so it can be changed via firmware setup. Allow setting the EFI variable from fw_cfg, so qemu users can set that on the qemu command line too (and possibly have similar mechanisms for other hypervisors, hello cloudhv). > I wonder if lazy-accept feature can be split into 2 stages. > 1. In first stage there is a config option to indicate if lazy-accept is enabled or not. > 2. In the second stage the automatic negotiation is introduced so that lazy-accept is enabled or not by the negotiation result. Absolutely. That is one of the reasons why I suggested to have a true/false/default config option instead of just true/false. When the first stage is implemented "default" behavior would be fixed (either hard-coded or a compile-time option). When the second stage is implemented "default" behavior would be dynamic, depending on the negotiation result. take care, Gerd