From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C411E941708 for ; Tue, 30 Jan 2024 11:51:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RHaacNnYnmTlmktVtGCnV8UHuDxIedcnyzR1LILM2nE=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1706615496; v=1; b=F3Ac074ceMX+fr4aFPGaAnvQtVt3j0JdX9KWL9gBAINNvwpDBqJPzCUjM2HIYgP+5c27w+Bp Qz8f50FnrWpaOlw/0tVHU+wW9e0xTCC6y56QI1hsPtouJH+wS6BS09wqeDUXhbc3+8MQK3jbnj7 RaSBWcnWbkFCkUW5vXyuTAEo= X-Received: by 127.0.0.2 with SMTP id qQE2YY7687511xWIvjnEkZFD; Tue, 30 Jan 2024 03:51:36 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.16528.1706615495770331543 for ; Tue, 30 Jan 2024 03:51:35 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-kEYZFm32MbK_1MOEUXO-0Q-1; Tue, 30 Jan 2024 06:51:31 -0500 X-MC-Unique: kEYZFm32MbK_1MOEUXO-0Q-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 93FFE84AF80; Tue, 30 Jan 2024 11:51:30 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AFDDC1ED63; Tue, 30 Jan 2024 11:51:29 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 523D5180038B; Tue, 30 Jan 2024 12:51:28 +0100 (CET) Date: Tue, 30 Jan 2024 12:51:28 +0100 From: "Gerd Hoffmann" To: Tom Lendacky Cc: devel@edk2.groups.io, Ard Biesheuvel , Erdem Aktas , Jiewen Yao , Laszlo Ersek , Liming Gao , Michael D Kinney , Min Xu , Zhiguang Liu , Rahul Kumar , Ray Ni , Michael Roth Subject: Re: [edk2-devel] [PATCH 03/16] MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM Message-ID: <6rdteovxthwvxqvr2aey2yqci7zzkle3qty423jm7ysejxvapf@2dk3dp4ftsmn> References: <38bd6d829d25b89d416fa0f40eb5cc4487a0290f.1706307195.git.thomas.lendacky@amd.com> <34a1d889-a5b3-4cb0-8e8f-cabed9d14f2f@amd.com> MIME-Version: 1.0 In-Reply-To: <34a1d889-a5b3-4cb0-8e8f-cabed9d14f2f@amd.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ApeHpfCznKIXRDFmHbC6N6ZYx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=F3Ac074c; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Mon, Jan 29, 2024 at 09:51:47AM -0600, Tom Lendacky wrote: > On 1/29/24 07:22, Gerd Hoffmann wrote: > > > +global ASM_PFX(AsmVmgExitSvsm) > > > +ASM_PFX(AsmVmgExitSvsm): > > > +; > > > +; NASM doesn't support the vmmcall instruction in 32-bit mode and NASM versions > > > +; before 2.12 cannot translate the 64-bit "rep vmmcall" instruction into elf32 > > > +; format. Given that VMGEXIT does not make sense on IA32, provide a stub > > > +; implementation that is identical to CpuBreakpoint(). In practice, > > > +; AsmVmgExitSvsm() should never be called on IA32. > > > +; > > > + int 3 > > > + ret > > > > Why? I assume because the calling convention is only defined for X64? > > > > Why do we need this in the first place if this is never called on IA32? > > > > Wouldn't it be better to have an ASSERT(FALSE) for IA32 in the code > > calling this? > > An ASSERT() only works for DEBUG code. > > I was following in the steps of AsmVmgExit, where we did this. I suppose we > could just not have it at all for IA32 and cause a build failure if someone > was to try and call this from 32-bit code. Thoughts? See also patch #13 sub-thread. Maybe just move the 32-bit build to the Null versions of the Libraries. SEV-SNP + SVSM apparently is 64-bit only already (there is no 32-bit calling convention). Over the last year Intel landed full 64-bit PEI support in edk2, which means the pure 64-bit build (OvmfPkgX64.dsc) has feature parity with the 32-bit PEI / 64-bit DXE build (OvmfPkgIa32X64.dsc). So maybe we can simply leave 32-bit support behind and remove SEV support from OvmfPkgIa32X64.dsc and OvmfPkgIa32.dsc builds ... take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114773): https://edk2.groups.io/g/devel/message/114773 Mute This Topic: https://groups.io/mt/103986440/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-