Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-05 Thread Alexander Graf
On 26.03.25 13:27, Gerd Hoffman wrote: Hi, The problem is that add-ons are 1) Separate binaries. So you need to match multiple files. 2) In this case, get generated out of the vendor (RH)'s control in a one-off fashion. I don't think "signing" is the correct way to address the latt

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-04-05 Thread Alexander Graf
Hey Gerd, On 18.03.25 12:11, Gerd Hoffman wrote: Hi, Maybe not from the user's point of view, but surely for the vmfwupdate interface design and for the launch measurement calculations. When using igvm parameters for the kernel hashes we need to pass on (at least) two items via vmfwupdate

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-25 Thread Alexander Graf
On 24.03.25 18:53, Gerd Hoffman wrote: On Mon, Mar 24, 2025 at 05:31:30PM +0100, Alexander Graf wrote: What does all this mean for the hypervisor interface ? That means we'll go scratch the region list idea and depend on igvm instead. Which means we are back to the single firmware image

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-24 Thread Alexander Graf
On 24.03.25 16:48, Gerd Hoffman wrote: On Mon, Mar 24, 2025 at 04:42:28PM +0530, Ani Sinha wrote: On Mon, Mar 24, 2025 at 1:13 PM Gerd Hoffman wrote: Hi, Going ship the distro kernel as igvm image would work too. Will simplify the measurement pre-calculation. Also there is no need to

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-21 Thread Alexander Graf
On 21.03.25 04:36, Ani Sinha wrote: On Thu, Mar 20, 2025 at 7:24 PM Alexander Graf wrote: Hey Gerd, On 18.03.25 12:11, Gerd Hoffman wrote: Hi, Maybe not from the user's point of view, but surely for the vmfwupdate interface design and for the launch measurement calculations.

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-17 Thread Alexander Graf
On 17.03.25 10:56, Gerd Hoffman wrote: On Fri, Mar 14, 2025 at 03:50:19PM +0100, Alexander Graf wrote: On 14.03.25 15:08, Gerd Hoffman wrote: Hi, Ok, assuming we allow the guest submit a IGVM image (which makes sense indeed, otherwise we'll probably end up re-inventing IGVM). How

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-15 Thread Alexander Graf
On 14.03.25 15:08, Gerd Hoffman wrote: Hi, Ok, assuming we allow the guest submit a IGVM image (which makes sense indeed, otherwise we'll probably end up re-inventing IGVM). How will the kernel hashes be handled then? I assume they will not be part of the igvm image, but they must be par

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-14 Thread Alexander Graf
On 14.03.25 12:27, Gerd Hoffman wrote: Hi, Open question is what we do about IGVM. One option would be the guest vmfwupdate tool loading and parsing igvm, preparing the region list, then invoke the update. Problem is that some igvm feaures such as initial register state can not be easily

Re: [PATCH v6] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-03-13 Thread Alexander Graf
Hi Jörg, On 13.03.25 16:39, Jörg Rödel wrote: On Thu, Mar 13, 2025 at 08:23:44PM +0530, Ani Sinha wrote: Note that even with this approach where the hypervisor *thinks* it's dealing with a real firmware, you can imagine a small rust based firmware image that is loaded by the guest in the firmwa

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-14 Thread Alexander Graf
On 14.02.25 16:35, Ani Sinha wrote: On Mon, Feb 3, 2025 at 3:50 AM Alexander Graf wrote: Hey Ani! On 28.01.25 22:31, Ani Sinha wrote: [...] diff --git a/hw/core/machine.c b/hw/core/machine.c index c23b399496..0eaf8aa3ba 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -34,6

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-14 Thread Alexander Graf
On 14.02.25 12:16, Gerd Hoffmann wrote: On Fri, Feb 14, 2025 at 10:51:17AM +0100, Alexander Graf wrote: I also like to have dedicated register spaces per component. So even if you choose to make it a hard split, I think we're better off with 4k at 0xfef1 for control and 64k at 0xfef

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-14 Thread Alexander Graf
On 14.02.25 08:55, Gerd Hoffmann wrote: Hi, How do your patches pick the transfer mode? Is that dictated by the host? Or is the guest free to choose? In case of the latter: How does the guest decide what to do? In our version, the guest gets to pick. It defaults to the DMA interface u

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-13 Thread Alexander Graf
On 13.02.25 15:54, Gerd Hoffmann wrote: On Thu, Feb 13, 2025 at 11:14:03AM +0100, Alexander Graf wrote: I don't think so. The firmware driver knows this actually is normal ram and can setup mappings and memory attributes accordingly. The situation is a bit different from vga memory

[PATCH] hw/virtio/virtio-nsm: Respond with correct length

2025-02-13 Thread Alexander Graf
instead. Fixes: bb154e3e0cc715 ("device/virtio-nsm: Support for Nitro Secure Module device") Reported-by: Vikrant Garg Signed-off-by: Alexander Graf --- hw/virtio/virtio-nsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-nsm.c b/hw/virtio/virtio-n

Re: [Qemu Nitro Enclave] NSM virtio attestation response is always of size 0x3000

2025-02-13 Thread Alexander Graf
Hi Vikrant, On 13.02.25 11:01, Vikrant Garg wrote: Hello All, I am using the QEMU for emulating nitro enclave images. In my enclave image, I have an attestation service implemented in Rust. This application fetches attestations using IOCTL command. I have noticed that response from the nsm

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-13 Thread Alexander Graf
On 13.02.25 10:28, Ard Biesheuvel wrote: On Wed, 12 Feb 2025 at 22:26, Alexander Graf wrote: On 12.02.25 16:18, Gerd Hoffmann wrote: Hi, Yes. Knowing both physical and virtual address works only for memory you allocated yourself before ExitBootServices. So you can't pass on poi

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-13 Thread Alexander Graf
On 13.02.25 10:52, Gerd Hoffmann wrote: Hi, That will bring back all issues with cached vs non-cached memory accesses, no? So edk2 will always access that memory as device memory which means it bypasses the cache, while QEMU will access it through the cache. So that buffer would need to ac

Re: [PATCH v3 00/23] hw/uefi: add uefi variable service

2025-02-13 Thread Alexander Graf
On 13.02.25 10:41, Ard Biesheuvel wrote: On Tue, 11 Feb 2025 at 10:23, Gerd Hoffmann wrote: This patch adds a virtual device to qemu which the uefi firmware can use to store variables. This moves the UEFI variable management from privileged guest code (managing vars in pflash) to the host.

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Alexander Graf
On 12.02.25 16:18, Gerd Hoffmann wrote: Hi, Yes. Knowing both physical and virtual address works only for memory you allocated yourself before ExitBootServices. So you can't pass on pointers from the OS, you have to copy the data to a buffer where you know the physical address instead.

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Alexander Graf
On 12.02.25 13:28, Gerd Hoffmann wrote: On Wed, Feb 12, 2025 at 12:30:20PM +0100, Alexander Graf wrote: On 12.02.25 11:24, Gerd Hoffmann wrote: Why do you use confidential computing in the first place if you trust the host with your EFI variables? I'd rather see something simliar ru

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-12 Thread Alexander Graf
On 12.02.25 11:24, Gerd Hoffmann wrote: Hi, +/* read header */ +dma_memory_read(&address_space_memory, dma, +uv->buffer, sizeof(*mhdr), +MEMTXATTRS_UNSPECIFIED); Depending on DMA sounds appealing at first, but can fall apart in corner cases.

Re: [PATCH v3 09/23] hw/uefi: add var-service-core.c

2025-02-11 Thread Alexander Graf
On 11.02.25 10:23, Gerd Hoffmann wrote: This is the core code for guest <-> host communication. This accepts request messages from the guest, dispatches them to the service called, and sends back the response message. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 237 ++

Re: [PATCH v5] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2025-02-02 Thread Alexander Graf
Hey Ani! On 28.01.25 22:31, Ani Sinha wrote: VM firmware update is a mechanism where the virtual machines can use their preferred and trusted firmware image in their execution environment without having to depend on a untrusted party to provide the firmware bundle. This is particularly useful fo

Re: [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE

2025-01-26 Thread Alexander Graf
eviewed-by: Alexander Graf Alex

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-20 Thread Alexander Graf
On 20.12.24 14:31, Ani Sinha wrote: On Fri, Dec 20, 2024 at 5:03 PM Alexander Graf wrote: On 20.12.24 11:00, Ani Sinha wrote: Either add the I386 dependency or don't use PC_MACHINE, because on non-x86 targets PC_MACHINE(qdev_get_machine()) will crash. Ah this is where we have a disco

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-20 Thread Alexander Graf
On 20.12.24 11:00, Ani Sinha wrote: Either add the I386 dependency or don't use PC_MACHINE, because on non-x86 targets PC_MACHINE(qdev_get_machine()) will crash. Ah this is where we have a disconnect. I assumed that pcms = PC_MACHINE(m_obj) would return NULL on non-x86. Seems a better way to

[PATCH 1/1] docs/nitro-enclave: Clarify Enclave and Firecracker relationship

2024-12-11 Thread Alexander Graf
The documentation says that Nitro Enclaves are based on Firecracker. AWS has never made that statement. This patch nudges the wording to instead say it "looks like a Firecracker microvm". Signed-off-by: Alexander Graf --- docs/system/i386/nitro-enclave.rst | 2 +- 1 file changed, 1

Re: [PATCH 02/11] arm/hvf: Initialise GICv3 state just before first vCPU run

2024-12-10 Thread Alexander Graf
for the first time, the GIC will definitely be fully initialised at that point. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Alexander Graf Alex

Re: [PATCH 01/11] hvf: Add facility for initialisation code prior to first vCPU run

2024-12-10 Thread Alexander Graf
such architecture-specific initialisation. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Alexander Graf Alex

Re: [PATCH] docs/nitro-enclave: Fix terminal commands formatting

2024-12-02 Thread Alexander Graf
On 09.11.24 13:28, Dorjoy Chowdhury wrote: Signed-off-by: Dorjoy Chowdhury (nit: Please make sure to always have a patch description in the body of the patch, even if it feels like the subject says it all) Reviewed-by: Alexander Graf Alex Amazon Web Services Development Center

Re: [PATCH] eif: Use stateful qcrypto apis

2024-12-02 Thread Alexander Graf
update the hashes inline in the read_eif_* functions which makes the code much simpler. Signed-off-by: Dorjoy Chowdhury Reviewed-by: Alexander Graf Alex Amazon Web Services Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss

Re: [PATCH] device/virtio-nsm: Support string data for extendPCR

2024-12-02 Thread Alexander Graf
On 09.11.24 13:32, Dorjoy Chowdhury wrote: NSM device in AWS Nitro Enclaves supports extending with both bytestring and string data. Signed-off-by: Dorjoy Chowdhury Reviewed-by: Alexander Graf Alex --- hw/virtio/virtio-nsm.c | 21 ++--- 1 file changed, 14 insertions

Re: [PATCH] docs: Document that hvf on Arm is supported

2024-11-27 Thread Alexander Graf
> Am 27.11.2024 um 07:15 schrieb Akihiko Odaki : > > hvf on Arm is supported since commit a1477da3ddeb ("hvf: Add Apple > Silicon support"). > > Signed-off-by: Akihiko Odaki Reviewed-by: Alexander Graf Alex > --- > docs/about/build-platforms.rst |

Re: [PATCH] fuzz: disable tcg for OSS-Fuzz builds

2024-11-13 Thread Alexander Bulekov
On 241113 2040, Philippe Mathieu-Daud?? wrote: > On 13/11/24 16:37, Alexander Bulekov wrote: > > OSS-Fuzz builds have been failing due to some strange issues that seem > > to be related to color codes from libffi: > > https://oss-fuzz-build-logs.storage.googleapis.com/log-8d

Re: [PATCH] fuzz: disable tcg for OSS-Fuzz builds

2024-11-13 Thread Alexander Bulekov
On 241113 1928, Paolo Bonzini wrote: > On Wed, Nov 13, 2024 at 5:38???PM Alexander Bulekov wrote: > > > > OSS-Fuzz builds have been failing due to some strange issues that seem > > to be related to color codes from libffi: > > https://oss-fuzz-build-logs.storage.googl

[PATCH] fuzz: disable tcg for OSS-Fuzz builds

2024-11-13 Thread Alexander Bulekov
OSS-Fuzz builds have been failing due to some strange issues that seem to be related to color codes from libffi: https://oss-fuzz-build-logs.storage.googleapis.com/log-8d5435ee-1677-40af-9656-b4162fa881e1.txt Disable tcg to disable libffi. Signed-off-by: Alexander Bulekov --- scripts/oss-fuzz

Re: [PATCH] device/virtio-nsm: Support string data for extendPCR

2024-11-12 Thread Alexander Graf
Hey Dorjoy, On 12.11.24 13:32, Dorjoy Chowdhury wrote: Hey Alex, On Tue, Nov 12, 2024, 6:14 PM Alexander Graf wrote: Hey Dorjoy, Thanks a lot for the patch! Would you mind to send to the ML so it can go through the normal review + apply cycle? :) Same comment for the

Re: [Stable-7.2.15 17/33] target/i386: Walk NPT in guest real mode

2024-11-12 Thread Alexander Graf
Hey Michael, Does this queue also include the fix for the fix ("target/i386: Fix legacy page table walk")? https://lore.kernel.org/qemu-devel/20241106154329.67218-1-g...@amazon.com/ Alex On 09.11.24 07:38, Michael Tokarev wrote: From: Alexander Graf When translating virtual t

Re: [PATCH] device/virtio-nsm: Support string data for extendPCR

2024-11-12 Thread Alexander Graf
Hey Dorjoy, Thanks a lot for the patch! Would you mind to send to the ML so it can go through the normal review + apply cycle? :) Same comment for the other patches. Alex On 09.11.24 13:32, Dorjoy Chowdhury wrote: NSM device in AWS Nitro Enclaves supports extending with both bytestring and

Re: [PATCH v10 0/8] memory: prevent dma-reentracy issues

2024-11-08 Thread Alexander Bulekov
On 230427 1710, Alexander Bulekov wrote: > These patches aim to solve two types of DMA-reentrancy issues: > > 1.) mmio -> dma -> mmio case > To solve this, we track whether the device is engaged in io by > checking/setting a reentrancy-guard within APIs used for MMIO acces

[PATCH] target/i386: Fix legacy page table walk

2024-11-06 Thread Alexander Graf
es whether paging is active at all and uses that to determine whether we are in real mode or not. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2654 Fixes: b56617bbcb4 ("target/i386: Walk NPT in guest real mode") Signed-off-by: Alexander Graf Reported-

Re: [PATCH v3] target-i386: Walk NPT in guest real mode

2024-11-05 Thread Alexander Graf
Hey Mark, On 05.11.24 23:54, Mark Cave-Ayland wrote: Hi Alex, This commit appears to break my WinXP boot test: with this patch applied, attempting to boot WinXP from CDROM fails with SeaBIOS getting stuck early in a boot loop. It is possible to reproduce the issue easily with:   ./build/qe

Re: QEMU Nitro Enclave Emulation on macOS

2024-11-05 Thread Alexander Graf
Hi Payton, On 05.11.24 18:31, Payton Garland wrote: Hello all, I have been watching the Nitro Enclave Emulation patch . This would be a huge win for developer experience in Nitro Enclave de

Re: [PULL 23/49] hw/core: Add Enclave Image Format (EIF) related helpers

2024-11-05 Thread Alexander Graf
Hi Dorjoy, On 05.11.24 14:56, Dorjoy Chowdhury wrote: On Tue, Nov 5, 2024 at 6:51 PM Paolo Bonzini wrote: On Tue, Nov 5, 2024 at 12:44 PM Peter Maydell wrote: Hi; Coverity raises a couple of potential issues with the read_eif_file() function in this commit, which are both "Coverity assumes

Re: [PATCH v8 0/6] AWS Nitro Enclave emulation support

2024-10-30 Thread Alexander Graf
Hey Paolo, On 29.10.24 20:32, Paolo Bonzini wrote: On 10/23/24 16:27, Dorjoy Chowdhury wrote: On Wed, Oct 16, 2024 at 7:58 PM Dorjoy Chowdhury wrote: Ping This patch series has been reviewed by Alex. I am not sure if it needs more review. If not, maybe this can be picked up for merging. Th

Re: [PATCH v8 0/6] AWS Nitro Enclave emulation support

2024-10-09 Thread Alexander Graf
well. This is a patch series adding AWS Nitro Enclave[1] emulation support in QEMU. Alexander Graf is mentoring me on this work. I have a gitlab branch where you can view the patches in the gitlab web UI for each commit: https://gitlab.com/dorjoy03/qemu/-/tree/nitro-enclave-emulation AWS nitro enclav

[PATCH v3] target-i386: Walk NPT in guest real mode

2024-09-21 Thread Alexander Graf
stays and we successfully walk the NPT in real mode. Fixes: fe441054bb3f0 ("target-i386: Add NPT support") Signed-off-by: Alexander Graf Reported-by: Eduard Vlad Reviewed-by: Richard Henderson --- v1 -> v2: - Remove hack where we fake a PTE and instead just set the corresponding re

[PATCH v2] target-i386: Walk NPT in guest real mode

2024-09-20 Thread Alexander Graf
stays and we successfully walk the NPT in real mode. Fixes: fe441054bb3f0 ("target-i386: Add NPT support") Signed-off-by: Alexander Graf Reported-by: Eduard Vlad --- v1 -> v2: - Remove hack where we fake a PTE and instead just set the corresponding resolved variables and jump straig

Re: vm events, userspace, the vmgenid driver, and the future [was: the uevent revert thread]

2024-09-18 Thread Alexander Graf
On 19.09.24 00:27, Jason A. Donenfeld wrote: [broadened subject line and added relevant parties to cc list] On Tue, Sep 17, 2024 at 10:55:20PM +0200, Alexander Graf wrote: What is still open are user space applications that require event based notification on VM clone events - and *only* VM

[PATCH] target-i386: Walk NPT in guest real mode

2024-08-27 Thread Alexander Graf
stays and we successfully walk the NPT in real mode. Fixes: fe441054bb3f0 ("target-i386: Add NPT support") Signed-off-by: Alexander Graf Reported-by: Eduard Vlad --- target/i386/tcg/sysemu/excp_helper.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH v4 4/6] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-19 Thread Alexander Graf
On 19.08.24 17:28, Dorjoy Chowdhury wrote: Hey Alex, On Mon, Aug 19, 2024 at 4:13 PM Alexander Graf wrote: Hey Dorjoy, On 18.08.24 13:42, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like

Re: [PATCH v4 4/6] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-19 Thread Alexander Graf
Hey Dorjoy, On 18.08.24 13:42, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like attestation. This commit adds the built-in NSM device in the nitro-enclave machine type. In Nitro Enclaves, all the PCR

Re: [PATCH v4 3/6] device/virtio-nsm: Support for Nitro Secure Module device

2024-08-19 Thread Alexander Graf
On 18.08.24 13:42, Dorjoy Chowdhury wrote: Nitro Secure Module (NSM)[1] device is used in AWS Nitro Enclaves for stripped down TPM functionality like cryptographic attestation. The requests to and responses from NSM device are CBOR[2] encoded. This commit adds support for NSM device in QEMU. Al

Re: [PATCH v3 2/5] machine/nitro-enclave: Add vhost-user-vsock device

2024-08-14 Thread Alexander Graf
On 13.08.24 20:02, Dorjoy Chowdhury wrote: On Mon, Aug 12, 2024 at 8:24 PM Daniel P. Berrangé wrote: On Sat, Aug 10, 2024 at 10:44:59PM +0600, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in vhost-vsock device support which enables applications in enclave VMs to communicate with the

Re: [PATCH v3 4/5] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-13 Thread Alexander Graf
On 10.08.24 18:45, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like attestation. This commit adds the built-in NSM device in the nitro-enclave machine type. In Nitro Enclaves, all the PCRs start in a

Re: [PATCH v3 3/5] device/virtio-nsm: Support for Nitro Secure Module device

2024-08-13 Thread Alexander Graf
On 10.08.24 18:45, Dorjoy Chowdhury wrote: Nitro Secure Module (NSM)[1] device is used in AWS Nitro Enclaves for stripped down TPM functionality like cryptographic attestation. The requests to and responses from NSM device are CBOR[2] encoded. This commit adds support for NSM device in QEMU. Al

Re: [PATCH v3 1/5] machine/nitro-enclave: New machine type for AWS Nitro Enclaves

2024-08-12 Thread Alexander Graf
On 10.08.24 18:44, Dorjoy Chowdhury wrote: AWS nitro enclaves[1] is an Amazon EC2[2] feature that allows creating isolated execution environments, called enclaves, from Amazon EC2 instances which are used for processing highly sensitive data. Enclaves have no persistent storage and no external n

Re: [PATCH v3 4/5] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-12 Thread Alexander Graf
On 10.08.24 18:45, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like attestation. This commit adds the built-in NSM device in the nitro-enclave machine type. In Nitro Enclaves, all the PCRs start in a

Re: [PATCH v3 4/5] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-12 Thread Alexander Graf
On 10.08.24 18:45, Dorjoy Chowdhury wrote: AWS Nitro Enclaves have built-in Nitro Secure Module (NSM) device which is used for stripped down TPM functionality like attestation. This commit adds the built-in NSM device in the nitro-enclave machine type. In Nitro Enclaves, all the PCRs start in a

[PATCH v2 1/1] module: Move local_err initialization to the loop in module_load_qom_all()

2024-08-12 Thread Alexander Ivanov
local_err variable is freed in error_report_err() so there is no any leak. Signed-off-by: Alexander Ivanov --- util/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/module.c b/util/module.c index 32e263163c..3eb0f06df1 100644 --- a/util/module.c +++ b/util

[PATCH v2 0/1] module: Move local_err initialization to the loop in module_load_qom_all()

2024-08-12 Thread Alexander Ivanov
odule: Prevent crash by resetting local_err in module_load_qom_all()" v2: Move local_err initialization inside the loop. Alexander Ivanov (1): module: Move local_err initialization to the loop in module_load_qom_all() util/module.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 1/1] module: Prevent crash by resetting local_err in module_load_qom_all()

2024-08-12 Thread Alexander Ivanov
On 8/12/24 00:05, Richard Henderson wrote: On 8/9/24 22:13, Alexander Ivanov wrote: Set local_err to NULL after it has been freed in error_report_err(). This avoids triggering assert(*errp == NULL) failure in error_setv() when local_err is reused in the loop. Signed-off-by: Alexander Ivanov

[PATCH 0/1] module: Prevent crash by resetting local_err in module_load_qom_all()

2024-08-09 Thread Alexander Ivanov
After updating QEMU modules previously executed QEMU processes crash on module loading. It happens because error_setg() calls with a not NULL errp argument. There is a discussion - https://issues.redhat.com/browse/RHEL-29848 Alexander Ivanov (1): module: Prevent crash by resetting local_err in

[PATCH 1/1] module: Prevent crash by resetting local_err in module_load_qom_all()

2024-08-09 Thread Alexander Ivanov
Set local_err to NULL after it has been freed in error_report_err(). This avoids triggering assert(*errp == NULL) failure in error_setv() when local_err is reused in the loop. Signed-off-by: Alexander Ivanov --- util/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/module.c b

Re: [PATCH 07/13] qtest/fuzz: make range overlap check more readable

2024-07-21 Thread Alexander Bulekov
On 240722 0007, Yao Xingtao wrote: > use ranges_overlap() instead of open-coding the overlap check to improve > the readability of the code. > > Signed-off-by: Yao Xingtao Reviewed-by: Alexander Bulekov Thank you > --- > tests/qtest/fuzz/generic_fuzz.c | 3 ++- &g

Re: [PATCH v3] block: Use LVM tools for LV block device truncation

2024-06-28 Thread Alexander Ivanov
One more ping... On 3/15/24 09:58, Alexander Ivanov wrote: If a block device is an LVM logical volume we can resize it using standard LVM tools. Add a helper to detect if a device is a DM device. In raw_co_truncate() check if the block device is DM and resize it executing lvresize. Signed-off

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-28 Thread Alexander Ivanov
Ping? On 6/7/24 17:00, Alexander Ivanov wrote: static void nbd_blockdev_client_closed(NBDClient *client, bool ignored) { nbd_client_put(client); +if (nbd_server == NULL) { +return; +} assert(nbd_server->connections > 0); nbd_server->co

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-23 Thread Alexander Monakov
FLAGS are accessed all together on context switches I think). Is there something I'm not seeing? Thanks. Alexander

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-18 Thread Alexander Ivanov
Hello Eric, Do you have any ideas about the bug? Thank you. On 6/10/24 14:33, Eric Blake wrote: On Sat, Jun 08, 2024 at 11:36:59AM GMT, Alexander Ivanov wrote: There is a bug reproducer in the attachment. Summarizing the reproducer, you are repeatedly calling QMP nbd-server-start/nbd-server

Re: [PATCH v2 0/2] AWS Nitro Enclave emulation

2024-06-14 Thread Alexander Graf
am working on adding AWS Nitro Enclave[1] emulation support in QEMU. Alexander Graf is mentoring me on this work. This is a patch series adding, not yet complete, but useful emulation support of nitro enclaves. I have a gitlab branch where you can view the patches in the gitlab web UI for each

Re: [PATCH] tests/qtest/fuzz/virtio_net_fuzz.c: fix virtio_net_fuzz_multi

2024-06-13 Thread Alexander Bulekov
This fixes the almost-immediate timeout issue for me on the virtio_net_fuzz target, but I'm not sure why this works or if it is fixing the right problem: qtest_probe_child is designed to run from a libqtest process which uses waitpid on the PID of the child (qemu) process (stored in QTestState->qe

Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c

2024-06-13 Thread Alexander Bulekov
Reviewed-by: Alexander Bulekov On 240521 1331, Dmitry Frolov wrote: > Found with fuzzing for qemu-8.2, but also relevant for master > > Signed-off-by: Dmitry Frolov > --- > tests/qtest/fuzz/qos_fuzz.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
sfies the letter of Fedora rules, and not what's good for the spirit of a wider community. Alexander

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 3:34 PM Alexander Monakov wrote: > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > > I found out from the mailing list. My Core2-based desktop would be > > > > affected. > > > &g

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
you tell me why you never commented on buffer_is_zero improvements, where v1 was sent in October? Just trying to understand how you care for 2% of L1D use but could be ok with those kinds of speedups be dropped on the floor. Alexander

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
f my distro maintainers, who I imagine would be put in an uncomfortable position by this change. Alexander

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Paolo Bonzini wrote: > On Wed, Jun 12, 2024 at 1:19 PM Alexander Monakov wrote: > > On Wed, 12 Jun 2024, Paolo Bonzini wrote: > > > I didn't do this because of RHEL9, I did it because it's silly that > > > QEMU cannot use POPCNT and

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
om looking at that POPCNT patch I understood that Qemu detects presence of POPCNT at runtime and will only use the fallback when POPCNT is unavailable. Did I misunderstand? Alexander

Re: [PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
On Wed, 12 Jun 2024, Daniel P. Berrangé wrote: > On Wed, Jun 12, 2024 at 01:55:20PM +0300, Alexander Monakov wrote: > > Hello, > > > > I'm sending straightforward reverts to recent patches that bumped minimum > > required x86 instruction set to SSE4.2. The older

[PATCH 4/5] Revert "host/i386: assume presence of CMOV"

2024-06-12 Thread Alexander Monakov
This reverts commit e68e97ce55b3d17af22dd62c3b3dc72f761b0862. Revert in preparation to rolling back x86_64-v2 ISA requirement. Signed-off-by: Alexander Monakov --- host/include/i386/host/cpuinfo.h | 1 + tcg/i386/tcg-target.c.inc| 15 ++- util/cpuinfo-i386.c

[PATCH 1/5] Revert "host/i386: assume presence of POPCNT"

2024-06-12 Thread Alexander Monakov
This reverts commit 45ccdbcb24baf99667997fac5cf60318e5e7db51. Revert in preparation to rolling back x86_64-v2 ISA requirement. Signed-off-by: Alexander Monakov --- host/include/i386/host/cpuinfo.h | 1 + tcg/i386/tcg-target.h| 5 +++-- util/cpuinfo-i386.c | 1 + 3

[PATCH 0/5] Reinstate ability to use Qemu on pre-SSE4.1 x86 hosts

2024-06-12 Thread Alexander Monakov
very minor gains from the baseline raise, I'm honestly not sure why it happened. It seems better to let distributions handle that. Alexander Monakov (5): Revert "host/i386: assume presence of POPCNT" Revert "host/i386: assume presence of SSSE3" Revert "host/i386

[PATCH 3/5] Revert "host/i386: assume presence of SSE2"

2024-06-12 Thread Alexander Monakov
This reverts commit b18236897ca15c3db1506d8edb9a191dfe51429c. Revert in preparation to rolling back x86_64-v2 ISA requirement. Signed-off-by: Alexander Monakov --- host/include/i386/host/cpuinfo.h | 1 + util/bufferiszero.c | 4 ++-- util/cpuinfo-i386.c | 1 + 3 files

[PATCH 5/5] Revert "meson: assume x86-64-v2 baseline ISA"

2024-06-12 Thread Alexander Monakov
This reverts commit 294ac64e459aca023f43441651d860980c9784f1. Reinstate the ability to use Qemu on x86 hosts that do not meet x86_64-v2 ISA baseline. Signed-off-by: Alexander Monakov --- meson.build | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/meson.build b

[PATCH 2/5] Revert "host/i386: assume presence of SSSE3"

2024-06-12 Thread Alexander Monakov
This reverts commit 433cd6d94a8256af70a5200f236dc8047c3c1468. Revert in preparation to rolling back x86_64-v2 ISA requirement. Signed-off-by: Alexander Monakov --- util/cpuinfo-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/cpuinfo-i386.c b/util/cpuinfo

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-10 Thread Alexander Ivanov
On 6/10/24 14:33, Eric Blake wrote: On Sat, Jun 08, 2024 at 11:36:59AM GMT, Alexander Ivanov wrote: There is a bug reproducer in the attachment. Summarizing the reproducer, you are repeatedly calling QMP nbd-server-start/nbd-server-stop on qemu as NBD server in one thread, and repeatedly

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-08 Thread Alexander Ivanov
There is a bug reproducer in the attachment. On 6/7/24 17:00, Alexander Ivanov wrote: In some cases, the NBD server can be stopped before nbd_blockdev_client_closed() is called, causing the nbd_server variable to be nullified. This leads to a NULL pointer dereference when accessing nbd_server

[PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-07 Thread Alexander Ivanov
NULL pointer dereference. Signed-off-by: Alexander Ivanov --- blockdev-nbd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blockdev-nbd.c b/blockdev-nbd.c index 213012435f..fb1f30ae0d 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -52,6 +52,9 @@ int nbd_server_max_connections(void

Re: [PATCH 0/6] host/i386: require x86-64-v2 ISA

2024-06-06 Thread Alexander Monakov
ing? I think basing the decision on when the earliest x86_64-v2 processors appeared is not right. Would you consider a reversal of the three patches that bump the baseline beyond SSE2? > meson: assume x86-64-v2 baseline ISA > host/i386: assume presence of SSSE3 > host/i386: assume presence of POPCNT Thank you. Alexander

Re: [PATCH v3] block: Use LVM tools for LV block device truncation

2024-06-04 Thread Alexander Ivanov
ping 2 On 3/15/24 09:58, Alexander Ivanov wrote: If a block device is an LVM logical volume we can resize it using standard LVM tools. Add a helper to detect if a device is a DM device. In raw_co_truncate() check if the block device is DM and resize it executing lvresize. Signed-off-by

Re: [PATCH v1 1/2] machine/microvm: support for loading EIF image

2024-05-31 Thread Alexander Graf
On 22.05.24 19:23, Dorjoy Chowdhury wrote: Hi Daniel, Thanks for reviewing. On Wed, May 22, 2024 at 9:32 PM Daniel P. Berrangé wrote: On Sat, May 18, 2024 at 02:07:52PM +0600, Dorjoy Chowdhury wrote: An EIF (Enclave Image Format)[1] image is used to boot an AWS nitro enclave[2] virtual machi

Re: [PATCH v1 1/2] machine/microvm: support for loading EIF image

2024-05-27 Thread Alexander Graf
On 27.05.24 16:52, Dorjoy Chowdhury wrote: Hi Philippe, Thank you for reviewing. On Mon, May 27, 2024 at 4:47 PM Philippe Mathieu-Daudé wrote: Hi Dorjoy, On 18/5/24 10:07, Dorjoy Chowdhury wrote: An EIF (Enclave Image Format)[1] image is used to boot an AWS nitro enclave[2] virtual machine.

[PATCH] fuzz: disable leak-detection for oss-fuzz builds

2024-05-27 Thread Alexander Bulekov
When we are building for OSS-Fuzz, we want to ensure that the fuzzer targets are actually created, regardless of leaks. Leaks will be detected by the subsequent tests of the individual fuzz-targets. Signed-off-by: Alexander Bulekov --- scripts/oss-fuzz/build.sh | 1 + 1 file changed, 1

Re: [PATCH] fuzz: specify audiodev for usb-audio

2024-05-27 Thread Alexander Bulekov
On 240527 1007, Alexander Bulekov wrote: > On 240527 0734, Thomas Huth wrote: > > On 27/05/2024 06.07, Alexander Bulekov wrote: > > > Fixes test-failure on Fedora 40 CI. > > > > > > Reported-by: Thomas Huth > > > Signed-off-by: Alexande

Re: [PATCH] fuzz: specify audiodev for usb-audio

2024-05-27 Thread Alexander Bulekov
On 240527 0734, Thomas Huth wrote: > On 27/05/2024 06.07, Alexander Bulekov wrote: > > Fixes test-failure on Fedora 40 CI. > > > > Reported-by: Thomas Huth > > Signed-off-by: Alexander Bulekov > > --- > > tests/qtest/fuzz/generic_fuzz_configs.h | 3 ++- &

[PATCH] fuzz: specify audiodev for usb-audio

2024-05-26 Thread Alexander Bulekov
Fixes test-failure on Fedora 40 CI. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h

Re: [PATCH] qga: Add an interactive mode to guest-exec via VSOCK for Linux

2024-05-23 Thread Alexander Ivanov
On 5/22/24 18:10, Daniel P. Berrangé wrote: On Wed, May 22, 2024 at 05:06:57PM +0200, Alexander Ivanov wrote: Add an interactive mode to the guest-exec command in the QEMU Guest Agent using the VSOCK communication mechanism. It enables interactive sessions with the executed command in the

Test scripts

2024-05-22 Thread Alexander Ivanov
directory containing a copy of the script in VM. Execute the host script with net arguments: ./vsock_guest_exec_test.py srv -- Best regards, Alexander Ivanov #!/usr/bin/python3 import sys, os, struct, subprocess, json, socket TYPE_MASK = 0x8000 def parse_block_header(data): res

[PATCH] qga: Add an interactive mode to guest-exec via VSOCK for Linux

2024-05-22 Thread Alexander Ivanov
a transmitted to the server is redirected to stdin. Data from stdout and stderr is redirected to the client. All data blocks are preceded by 32-bit headers (network byte order): most significant bit contains a sign of stream (stdout - 0, stderr - 1), all the other bits contain the payload size. S

Re: [PATCH v2 11/11] iotests/271: add test cases for subcluster-based discard/unmap

2024-05-21 Thread Alexander Ivanov
ize=1048576 +write -q -P PATTERN 0 32k +L2 entry #0: 0x8005 +discard -q 32k 32k +file_do_fallocate fd=N mode=0x03 offset=360448 len=32768 +L2 entry #0: 0x8005 +write -q -P PATTERN 0 64k +L2 entry #0: 0x8005 +discard -q 0 8

  1   2   3   4   5   6   7   8   9   10   >