Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-04-01 Thread Xiaoyao Li
On 4/1/2022 6:36 PM, Philippe Mathieu-Daudé wrote: On 1/4/22 07:28, Xiaoyao Li wrote: On 4/1/2022 1:08 PM, Gerd Hoffmann wrote:    if (sev_enabled()) { ^^^ Can we remove the SEV check ... +    pc_system_parse_ovmf_flash(ptr, size); + +    if (sev_enabled

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-04-01 Thread Philippe Mathieu-Daudé
On 1/4/22 07:28, Xiaoyao Li wrote: On 4/1/2022 1:08 PM, Gerd Hoffmann wrote:    if (sev_enabled()) { ^^^ Can we remove the SEV check ... +    pc_system_parse_ovmf_flash(ptr, size); + +    if (sev_enabled()) { ... because we are still checking SEV here.

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Xiaoyao Li
On 4/1/2022 1:08 PM, Gerd Hoffmann wrote: if (sev_enabled()) { ^^^ Can we remove the SEV check ... +pc_system_parse_ovmf_flash(ptr, size); + +if (sev_enabled()) { ... because we are still checking SEV here. Well, the two checks have slightly

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Gerd Hoffmann
> > if (sev_enabled()) { > > ^^^ > Can we remove the SEV check ... > > +pc_system_parse_ovmf_flash(ptr, size); > > + > > +if (sev_enabled()) { > > ... because we are still checking SEV here. Well, the two checks have slightly different purposes. The f

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Philippe Mathieu-Daudé
On 31/3/22 10:35, Gerd Hoffmann wrote: move sev firmware setup to separate function so it can be used from other code paths. No functional change. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li --- include/hw/i386/x86.h | 3 +++ hw/i386/pc_sysfw.c| 36 ++---

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Daniel P . Berrangé
On Thu, Mar 31, 2022 at 10:35:48AM +0200, Gerd Hoffmann wrote: > move sev firmware setup to separate function so it can be used from > other code paths. No functional change. > > Signed-off-by: Gerd Hoffmann > Tested-by: Xiaoyao Li > --- > include/hw/i386/x86.h | 3 +++ > hw/i386/pc_sysfw.c

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Gerd Hoffmann
Hi, > > +void x86_firmware_configure(void *ptr, int size) > > +{ > > +int ret; > > + > > +/* > > + * OVMF places a GUIDed structures in the flash, so > > + * search for them > > + */ > > +pc_system_parse_ovmf_flash(ptr, size); > > Any reason you chose to put this outside

Re: [PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Daniel P . Berrangé
On Thu, Mar 31, 2022 at 10:35:48AM +0200, Gerd Hoffmann wrote: > move sev firmware setup to separate function so it can be used from > other code paths. No functional change. > > Signed-off-by: Gerd Hoffmann > Tested-by: Xiaoyao Li > --- > include/hw/i386/x86.h | 3 +++ > hw/i386/pc_sysfw.c

[PATCH 2/3] i386: factor out x86_firmware_configure()

2022-03-31 Thread Gerd Hoffmann
move sev firmware setup to separate function so it can be used from other code paths. No functional change. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li --- include/hw/i386/x86.h | 3 +++ hw/i386/pc_sysfw.c| 36 ++-- 2 files changed, 25 insertions(+),