qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-7.2] vhost-vdpa: skip TPM CRB memory section


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-7.2] vhost-vdpa: skip TPM CRB memory section
Date: Tue, 22 Nov 2022 16:18:57 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 22/11/22 15:53, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>

851d6d1a0f ("vfio/common: remove spurious tpm-crb-cmd misalignment
warning") removed the warning on vfio_listener_region_add() path.

An error is reported for vhost-vdpa case:
qemu-kvm: vhost_vdpa_listener_region_add received unaligned region

Skip the CRB device.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=2141965

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  hw/virtio/vhost-vdpa.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 7468e44b87..9d7206e4b8 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -19,6 +19,7 @@
  #include "hw/virtio/virtio-net.h"
  #include "hw/virtio/vhost-shadow-virtqueue.h"
  #include "hw/virtio/vhost-vdpa.h"
+#include "sysemu/tpm.h"
  #include "exec/address-spaces.h"
  #include "migration/blocker.h"
  #include "qemu/cutils.h"
@@ -46,6 +47,11 @@ static bool 
vhost_vdpa_listener_skipped_section(MemoryRegionSection *section,
  {
      Int128 llend;
+ if (TPM_IS_CRB(section->mr->owner)) {
+        /* The CRB command buffer has its base address unaligned. */
+        return true;
+    }

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]