From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.11788.1676027596201791963 for ; Fri, 10 Feb 2023 03:13:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=InlTJPtq; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 68646B824BF for ; Fri, 10 Feb 2023 11:13:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14A67C433EF for ; Fri, 10 Feb 2023 11:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676027593; bh=LdUIH6SDBP32seZ/Saa/IaWy6bi6CIyeE2m+UcRMeoY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=InlTJPtquI5c6YsaIXaEmUCPgDjDUTdmqBr+cCvt3oe2FbgS4bXSXE+znxk+0o98P 0MGCq5oXasNp4ROF3p52jGPw0IQsry0Qc9yvdg4ltZ7QPnbOBQ8YMa87r67TrOuygE Rg9ttUNwqoyNd9naGy5vCASMriklFFbz9LECC81lgJXCfmlf5qx43csrZ4Ad8c7y+u m7RjpueWZ2sGHXiKNELhZVHMzjSl2Z2VTXCvs0IrWf7QSUXrWeX8VNlKZ4xqkatDTh GtiZq6Tp5pIxpFWyBxGZEXb8gmOa1CTsocOU6JU9MUKxd4+865nSgKhMKioVVLPb3d Di9L6e48U15pg== Received: by mail-lf1-f48.google.com with SMTP id d34so3559782lfv.0 for ; Fri, 10 Feb 2023 03:13:12 -0800 (PST) X-Gm-Message-State: AO0yUKXD63nidnvOobojNaqx8yGv1fch4fepeOYzx4/8nCL3HF9YuAwU CuF58XoK8zkJ186blIhjTYPiY9Mx90xykQ0mfbQ= X-Google-Smtp-Source: AK7set9EfMG0nnYmJqdIXfbkZgRsIsxDIsaAbI0zWD6F78GzKllvOntZp0aHCT72j3v4P87bQRNra55ZMnSMADMFTr8= X-Received: by 2002:ac2:5102:0:b0:4da:ee90:4529 with SMTP id q2-20020ac25102000000b004daee904529mr2615256lfb.63.1676027591117; Fri, 10 Feb 2023 03:13:11 -0800 (PST) MIME-Version: 1.0 References: <20230126005647.3019225-1-dionnaglaze@google.com> <20230126005647.3019225-2-dionnaglaze@google.com> <0d8f2b0b-1d62-3db6-34c9-e9ce39838bce@amd.com> In-Reply-To: From: "Ard Biesheuvel" Date: Fri, 10 Feb 2023 12:12:59 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe To: "Gupta, Pankaj" Cc: Dionna Amalie Glaze , devel@edk2.groups.io, Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky , "Min M. Xu" , Andrew Fish , "Michael D. Kinney" Content-Type: text/plain; charset="UTF-8" On Fri, 10 Feb 2023 at 09:00, Gupta, Pankaj wrote: > > > >>> With this patch I observe an issue where my Linux (6.2.0-rc7) guest > >>> recur to Bootloader menu again. I am testing this with SEV SNP (w/o > >>> UPM). Also, guest don't have lazy memory acceptance support. > >>> > >> > >> Thanks for the report. I'll try to reproduce it on our UEFI and if I'm > >> unable, then we'll discuss next steps. > >> > > > > I don't see this in our test Ubuntu 22.04 image from Canonical. Do you > > have a boot log you could send me? I'm not sure I understand what you > > mean by recurring to the Bootloader menu. On ExitBootServices, the > > Thank you for looking into it. > > Its going again to bootloader menu after I slecet the booting OS. > > > memory key will end up changing and the caller will need to call > > GetMemoryMap and try EBS again, but I don't know why that would send > > you to a bootmenu. > > Sorry, could not understand this. As I am not very familiar with the efi > code flow. Could you please elaborate a bit. > > I see these[1] errors: Also attached the complete log. > > Thanks, > Pankaj > > [1] > ConvertPages: range 1000000 - 41AEFFF covers multiple entries^M > Accepting all memory^M > Accepting all memory^M This looks to me like it is entering the 'accept' path twice, and so ExitBootServices() is failing twice, resulting in a failed boot. > EFI stub: ERROR: exit_boot() failed!^M > EFI stub: ERROR: efi_main() failed!^M > Image Return Status = Invalid Parameter^M > BdsDxe: failed to start Boot0006 "ubuntu" from > HD(1,GPT,0482E38B-B35F-4359-A017-F7B0E924FECD,0x800,0x100000)/\EFI\ubuntu-hdd2\shimx64.efi: > Invalid Parameter^M