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 A9C34C00140 for ; Tue, 2 Aug 2022 09:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235988AbiHBJuB (ORCPT ); Tue, 2 Aug 2022 05:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236220AbiHBJt6 (ORCPT ); Tue, 2 Aug 2022 05:49:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 077E14AD7A for ; Tue, 2 Aug 2022 02:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659433794; h=from:from:reply-to: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=qILDvFq0JE1nYEx2OKXCR/KNctto2Ey2a6Aj4h5FseE=; b=dUg+Vv4WhkAeFq6tCwx/fCuZ9pw0c4hpQNlFtGVgu3z7WCXbzj52MaylYuUPfpRL0C9xl4 ayWiJPlUorMHKd9raxZjcrpdPEhhNMilr96rukPKrUKXztKlpBhXHiT/bL53VnevltSqMQ dEby+upaXUDGnt22Qh6hcdgnbynC7Rc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-673-R-6ShOiFM_qnD7YkuQfObw-1; Tue, 02 Aug 2022 05:49:51 -0400 X-MC-Unique: R-6ShOiFM_qnD7YkuQfObw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A728381078D; Tue, 2 Aug 2022 09:49:50 +0000 (UTC) Received: from redhat.com (unknown [10.33.36.227]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC53E2166B26; Tue, 2 Aug 2022 09:49:47 +0000 (UTC) Date: Tue, 2 Aug 2022 10:49:45 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Xiaoyao Li Cc: Paolo Bonzini , Isaku Yamahata , Gerd Hoffmann , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Richard Henderson , "Michael S . Tsirkin" , Marcel Apfelbaum , Cornelia Huck , Marcelo Tosatti , Laszlo Ersek , Eric Blake , Connor Kuehl , erdemaktas@google.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, seanjc@google.com Subject: Re: [PATCH v1 00/40] TDX QEMU support Message-ID: Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20220802074750.2581308-1-xiaoyao.li@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220802074750.2581308-1-xiaoyao.li@intel.com> User-Agent: Mutt/2.2.6 (2022-06-05) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Aug 02, 2022 at 03:47:10PM +0800, Xiaoyao Li wrote: > This is the first version that removes RFC tag since last RFC gots > several acked-by. Hope more people and reviewers can help review it. > > > This patch series aims to enable TDX support to allow creating and booting a > TD (TDX VM) with QEMU. It needs to work with corresponding KVM patch [1]. > TDX related documents can be found in [2]. > > this series is also available in github: > > https://github.com/intel/qemu-tdx/tree/tdx-qemu-upstream-v1 > > To boot a TDX VM, it requires several changes/additional steps in the flow: > > 1. specify the vm type KVM_X86_TDX_VM when creating VM with > IOCTL(KVM_CREATE_VM); > 2. initialize VM scope configuration before creating any VCPU; > 3. initialize VCPU scope configuration; > 4. initialize virtual firmware (TDVF) in guest private memory before > vcpu running; > > Besides, TDX VM needs to boot with TDVF (TDX virtual firmware) and currently > upstream OVMF can serve as TDVF. This series adds the support of parsing TDVF, > loading TDVF into guest's private memory and preparing TD HOB info for TDVF. > > [1] KVM TDX basic feature support v7 > https://lore.kernel.org/all/cover.1656366337.git.isaku.yamahata@intel.com/ > > [2] https://www.intel.com/content/www/us/en/developer/articles/technical/intel-trust-domain-extensions.html > > == Limitation and future work == > - CPU model > > We cannot create a TD with arbitrary CPU model like what for non-TDX VMs, > because only a subset of features can be configured for TD. > > - It's recommended to use '-cpu host' to create TD; > - '+feature/-feature' might not work as expected; > > future work: To introduce specific CPU model for TDs and enhance +/-features > for TDs. Which features are incompatible with TDX ? Presumably you have such a list, so that KVM can block them when using '-cpu host' ? If so, we should be able to sanity check the use of these features in QEMU for the named CPU models / feature selection too. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|