Re: [edk2-devel] [PATCH 0/4] OvmfPkg: add virtio serial driver

2023-04-20 Thread Gupta, Pankaj via groups.io
libvirt snippet (add to ): Was thinking about the motivation to add the virtio serial device. AFAIU this can provide a console in bios/early boot based on "virtio". Currently we can only get it with emulated PTY device which is slow because of frequent VMEXITS because

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: add virtio serial driver

2023-04-20 Thread Gupta, Pankaj via groups.io
Hi Gerd, This seems useful - how do I use it? bare qemu (with guest console on stdin/stdout): qemu-system-x86_64 \ -enable-kvm -nodefaults -display none \ -bios Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd \ -chardev stdio,id=hvc0 \ -device virtio-serial-pci \

Re: [edk2-devel] [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/15/2023 12:07 AM, Dionna Glaze via groups.io wrote: This event should only trigger once. It should be idempotent, but the allocation of the memory map itself is observable and can cause ExitBootServices to fail with a modified map key. Cc: Ard Biesheuvel Cc: Thomas Lendacky Cc: Erdem

[edk2-devel] [PATCH] OvmfPkg: Remove gbs FreePool in AcceptAllMemory()

2023-02-14 Thread Gupta, Pankaj via groups.io
System Memory map is changed when a memory range is Accepted. While returning from AcceptAllMemory(), "gBS->FreePool" is wrongly used which results in changing memory map and hence return an error. Fix this by removing the "gBs->FreePool" call altogether. Before this patch, KVM guest throws an

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 9:44 PM, Dionna Amalie Glaze wrote: Adding the diff. diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index 6391d1f775..df51c2c050 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -123,7 +123,7 @@ AcceptAllMemory (

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 1:55 PM, Gupta, Pankaj via groups.io wrote: On 2/14/2023 1:51 PM, Gupta, Pankaj wrote: ConvertPages: range 100 - 41AEFFF covers multiple entries ConvertPages: range 100 - 41AEFFF covers multiple entries Accepting all memory Accepting all memory Accepting all memory

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 1:51 PM, Gupta, Pankaj wrote: ConvertPages: range 100 - 41AEFFF covers multiple entries ConvertPages: range 100 - 41AEFFF covers multiple entries Accepting all memory Accepting all memory Accepting all memory Accepting all memory EFI stub: ERROR: exit_boot() failed! EFI

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-14 Thread Gupta, Pankaj via groups.io
ConvertPages: range 100 - 41AEFFF covers multiple entries ConvertPages: range 100 - 41AEFFF covers multiple entries Accepting all memory Accepting all memory Accepting all memory Accepting all memory EFI stub: ERROR: exit_boot() failed! EFI stub: ERROR: efi_main() failed! StartImage

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
On 2/13/2023 7:31 PM, Dionna Amalie Glaze wrote: I'm rather confused at the moment how our internal testing succeeds given the premise of the protocol is to use the specified behavior that the OS must call get_memory_map again if ebs fails with efi_invalid_parameter, but upstream does not appear

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
- If no memory is getting accepted at all, should guest boot fail with below errors? No, the guest should not error. EBS should return success on the second call and permit progress. - Why unaccepted memory not being set in my setup but works fine for you? Does it require any other

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
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

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-10 Thread Gupta, Pankaj via groups.io
On 2/9/2023 10:27 PM, Dionna Amalie Glaze wrote: On Thu, Feb 9, 2023 at 8:52 AM Dionna Amalie Glaze 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

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-10 Thread Gupta, Pankaj via groups.io
[1] ConvertPages: range 100 - 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. Thanks for having a look. Yes, I was also

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-09 Thread Gupta, Pankaj via groups.io
Hi Dionna, The added behavior is to accept all unaccepted memory at ExitBootServices if the behavior is not disabled. This allows safe upgrades for OS loaders to affirm their support for the unaccepted memory type. With this patch I observe an issue where my Linux (6.2.0-rc7) guest recur to