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.194004.1673955198341523642 for ; Tue, 17 Jan 2023 03:33:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QZvyoRbU; 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=1673955197; 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=FJ+ojBYh8govTN5E7u+XqWJgI5I8w3q0HgdrARW7VaU=; b=QZvyoRbUFpoEx4XpT9jfMT/mXRSUI0+yXD4wcX+fWW4ul4DOapG8jfacOh3dG4rw5Is+nC A+jHru3dEMMCmejEqhX8D169Wiyq/rVyM2kEfUk6da/qjJDBN+daLTsys3Pbcj3CbERamc KeZpBZ8GghJWot6WW4CfpDg+KCJViIY= 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-16-vTY25Nv1N4-ejR6NvsM7BQ-1; Tue, 17 Jan 2023 06:33:14 -0500 X-MC-Unique: vTY25Nv1N4-ejR6NvsM7BQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C472080234E; Tue, 17 Jan 2023 11:33:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8959D2026D4B; Tue, 17 Jan 2023 11:33:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 276411800097; Tue, 17 Jan 2023 12:33:12 +0100 (CET) Date: Tue, 17 Jan 2023 12:33:12 +0100 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Ryan Afranji Subject: Re: [PATCH V3 0/2] [PATCH V1 0/2] Refactor TDX MmioExit Message-ID: <20230117113312.2kw727uhdt323lal@sirius.home.kraxel.org> References: <20230117074330.1058-1-min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <20230117074330.1058-1-min.m.xu@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 17, 2023 at 03:43:28PM +0800, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4169 > > The previous TDX MmioExit doesn't handle the Mmio instructions correctly > in some scenarios. This patch-set refactors the implementation to fix the > issues. > > Before the refactoring, common X86 instruction codes in CcExitVcHandler.c > are moved to separate files (CcInstruction.h / CcInstruction.c) so that > these codes can be re-used in TDX. > > Code: https://github.com/mxu9/edk2/tree/TdxMmioExit.v3 > > v3 changes: > - Handle the error if an error is returned from TdxMmioReadWrite. > - Add more check in ParseMmioExitInstructions. > > v2 changes: > - Add CpuDeadLoop () after each TDVMCALL(HALT) in VE handler. Because > TDVMCALL(HALT) is not trusted. > - Other minor changes such as deleting ASSERT in VE handler. Because > any error in VE handler will trigger CpuDeadLoop (). So ASSERT is not > needed any more. Series: Acked-by: Gerd Hoffmann