From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by mx.groups.io with SMTP id smtpd.web11.69761.1629383618060750645 for ; Thu, 19 Aug 2021 07:33:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@citrix.com header.s=securemail header.b=Mq64Lqox; spf=pass (domain: citrix.com, ip: 216.71.155.175, mailfrom: anthony.perard@citrix.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1629383618; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=UYJxA8H82mF0DKCykabY+pnGDpdCp4nA7wgFSdoiaB0=; b=Mq64LqoxA2ncktDMJWpmHd64Y0okKglI6xZXIp60DZ2o2xk1f/M54f/4 A2q2iPIWCgCfc8V3IYN/toNafMKhI63FAPYJzWIRL9AEjsG4N+9zDEAf6 hQKnvUQeOqludbUgFgs4Tym17IF/ibHuPxxr4Im3uaRveOiyTPUDQ+Ao3 g=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: v5tBH/jRYzVyE6hNzlsvcH4Z26jjrLq0JOVGqbFAPyVsrk97/y1KCayFi7qR804QFSkwc5XAd8 DkCpf4bfiSfYRLYAsPGVmwDq/uqytvkgWSDCWrAUS1uV8Z+zy29SHgUkqJtqtiJbuToJdkPu8c idr3PJOlel3LUbVjWmIgpkEvDkB3bm9xNRPZ+KmHf9U5CP1W3A4eLvkZ8+YpSDD7VPCDXqVmv2 jUm3hoO49p4Fiwx8AsD2UlX3zwlgxm3JfFCBTygKA4KAKk/9lShqDhmbqt+PcwMp+UBPTZSXK4 yiDb3uYt/MDceMz6DPjZ3bhT X-SBRS: 5.1 X-MesageID: 50862320 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:lAm03qyjGPW9gUxOOeCtKrPwLr1zdoMgy1knxilNoRw8SK2lfu SV7ZMmPH7P+VIssR4b9exoVJPufZqYz+8S3WBzB8bGYOCFghrKEGgK1+KLqFeMJ8S9zJ8+6U 4JSdkGNDSaNzhHZKjBjjWFLw== X-IronPort-AV: E=Sophos;i="5.84,334,1620705600"; d="scan'208";a="50862320" Date: Thu, 19 Aug 2021 15:33:33 +0100 From: "Anthony PERARD" To: Gary Lin CC: , Ard Biesheuvel , "Jiewen Yao" , Jordan Justen , "Julien Grall" , Jim Fehlig , Joey Li Subject: Re: [PATCH v2 1/5] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization Message-ID: References: <20210813061305.17519-1-gary.lin@hpe.com> <20210813061305.17519-2-gary.lin@hpe.com> MIME-Version: 1.0 In-Reply-To: <20210813061305.17519-2-gary.lin@hpe.com> Return-Path: anthony.perard@citrix.com Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Fri, Aug 13, 2021 at 02:13:01PM +0800, Gary Lin wrote: > There are several functions in OvmfPkg/Library using > QemuFwCfgS3Enabled() to detect the S3 support status. However, in > MdeModulePkg, PcdAcpiS3Enable is used to check S3 support. Since > InitializeXenPlatform() didn't set PcdAcpiS3Enable as > InitializePlatform() did, this made the inconsistency between > drivers/functions. > > For example, S3SaveStateDxe checked PcdAcpiS3Enable and skipped > S3BootScript because the default value is FALSE. On the other hand, > PlatformBootManagerBeforeConsole() from OvmfPkg/Library called > QemuFwCfgS3Enabled() and found it returned TRUE, so it invoked > SaveS3BootScript(). However, S3SaveStateDxe skipped S3BootScript, so > SaveS3BootScript() asserted due to EFI_NOT_FOUND. > > This issue mainly affects "HVM Direct Kernel Boot". If "acpi_s3" is > set as "True" in xl.cfg, then the S3 Support bit is set and passed > with fw_cfg. The part about acpi_s3 isn't true, it doesn't affect fw_cfg. Maybe this paragraph would be better: This issue mainly affects "HVM Direct Kernel Boot". When used, "fw_cfg" is enabled in QEMU and QemuFwCfgS3Enabled() returns true in that case. The rest of the patch looks good, thanks. -- Anthony PERARD