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 AC63D941B40 for ; Mon, 11 Sep 2023 15:06:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8qrIImqotiYqsD2yGjIAtmmQYG4n5x7HvL6r1c8Jv0k=; 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=1694444772; v=1; b=H7xGb3uz2+ZS4NCwPELQweZ7dpYzmxPI9m60ct/vZsmno1wylgU2qgTlk7cIkVA6hFPKie3v v2kEhfyozlbwG5G++bN+R6MuDmAYdyejzSiLrlLAhfIm4MozHkT2jQ9kiRLZBeiRHJ5nvaOJhPP 8afYXUT6cuNoxi3i06FD+dtM= X-Received: by 127.0.0.2 with SMTP id FcO4YY7687511xMywdJYjLvY; Mon, 11 Sep 2023 08:06:12 -0700 X-Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web11.61782.1694444771411473780 for ; Mon, 11 Sep 2023 08:06:11 -0700 X-Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-31ae6bf91a9so4570243f8f.2 for ; Mon, 11 Sep 2023 08:06:11 -0700 (PDT) X-Gm-Message-State: 778GrB5irBU92YfnrdebXQ2rx7686176AA= X-Google-Smtp-Source: AGHT+IEmgAXs2aL7elMYfw6W9wTLP6J07I0er+xVJTkxxHHVUCnEuFlA97JWfQV7runl7zQa8dBs6A== X-Received: by 2002:a5d:63c3:0:b0:31a:d266:3d62 with SMTP id c3-20020a5d63c3000000b0031ad2663d62mr7614224wrw.54.1694444769716; Mon, 11 Sep 2023 08:06:09 -0700 (PDT) X-Received: from perard.uk.xensource.com (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id s1-20020a5d69c1000000b0031aef72a021sm10260907wrw.86.2023.09.11.08.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 08:06:09 -0700 (PDT) Date: Mon, 11 Sep 2023 16:06:08 +0100 From: "Anthony PERARD via groups.io" To: Xenia Ragiadakou Cc: devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Julien Grall , xen-devel@lists.xenproject.org Subject: Re: [edk2-devel] [PATCH] OvmfPkg/OvmfXen: Fix S3 Message-ID: <2811343a-555b-491a-8bcf-15b4bb218749@perard> References: MIME-Version: 1.0 In-Reply-To: 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,anthony.perard@citrix.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: 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=H7xGb3uz; dmarc=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 Hi Xenia, On Thu, Jul 13, 2023 at 01:47:12PM +0300, Xenia Ragiadakou wrote: > Currently, resuming an S3 suspended guest results in the following > assertion failure: > ASSERT MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c(41): MemoryLength > 0 > This happens because some parts of the S3 suspend and resume paths > are missing in order for S3 to work. For instance, the variables > mS3AcpiReservedMemoryBase and mS3AcpiReservedMemoryBase are not > initialized, regions that are used on S3 resume are either missing > or not marked as ACPI NVS memory and can be corrupted by the OS. > This patch adds the missing parts based heavily on the existing S3 > implementation of other virtual platforms. > > For S3 support, the provision of fw_cfg is required in order for > suspend states to be retrieved. Is it possible to have S3 work without fw_cfg? We normally disable fw_cfg in QEMU when using it to start a Xen guest. We only enable fw_cfg if we want to boot a kernel directly in HVM (like PV guest, called Direct Kernel Boot in xl.cfg(5)). But even trying the direct kernel boot method, I've got issue trying to resume a suspended guest. I ran into: ASSERT /root/build/ovmf/UefiCpuPkg/Library/MpInitLib/MpLib.c(2093): (LibPcdGet64(9U) & (0x00000001 | 0x00000002)) == (0x00000001 | 0x00000002) By the way, I'm using `xl` to boot a guest to test this patch. So, I've got some question, which version of QEMU do you use, which work with this patch? What toolstack do you use to boot a guest? Thanks, -- Anthony PERARD -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108489): https://edk2.groups.io/g/devel/message/108489 Mute This Topic: https://groups.io/mt/100121295/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-