|
From: | Stefan Berger |
Subject: | Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region |
Date: | Tue, 8 Feb 2022 12:16:29 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 2/8/22 08:38, Eric Auger wrote:
Representing the CRB cmd/response buffer as a standard RAM region causes some trouble when the device is used with VFIO. Indeed VFIO attempts to DMA_MAP this region as usual RAM but this latter does not have a valid page size alignment causing such an error report: "vfio_listener_region_add received unaligned region". To allow VFIO to detect that failing dma mapping this region is not an issue, let's use a ram_device memory region type instead. Signed-off-by: Eric Auger <eric.auger@redhat.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Stefan Berger <stefanb@linux.ibm.com> [PMD: Keep tpm_crb.c in meson's softmmu_ss] Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
v4 doesn't build for me: ../hw/tpm/tpm_crb.c: In function ?tpm_crb_realize?:../hw/tpm/tpm_crb.c:297:33: error: implicit declaration of function ?HOST_PAGE_ALIGN? [-Werror=implicit-function-declaration]
297 | HOST_PAGE_ALIGN(CRB_CTRL_CMD_SIZE)); | ^~~~~~~~~~~~~~~../hw/tpm/tpm_crb.c:297:33: error: nested extern declaration of ?HOST_PAGE_ALIGN? [-Werror=nested-externs]
cc1: all warnings being treated as errors
[Prev in Thread] | Current Thread | [Next in Thread] |