qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] vhost-vdpa: skip TPM CRB memory section
@ 2023-06-20 19:50 Laurent Vivier
  2023-06-20 19:50 ` [PATCH 1/2] memory: introduce memory_region_init_ram_protected() Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Laurent Vivier @ 2023-06-20 19:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Stefan Berger, Philippe Mathieu-Daudé,
	jasowang, mst, David Hildenbrand, Paolo Bonzini, marcandre.lureau,
	eric.auger, Peter Xu, Laurent Vivier

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

Marc-André has proposed a fix to this problem by skipping
the memory region owned by the TPM CRB but it seems more generic
to skip not DMA-able memory.

We have a memory flag for that, RAM_PROTECTED.

This series expands the memory API to provide a way to initialize
a "protected" memory region and use it with the TPM CRB object.

For the previous discussions, see

https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg03670.html

and from Eric for VFIO:

https://lore.kernel.org/all/20220506132510.1847942-1-eric.auger@redhat.com/
https://lore.kernel.org/all/20220524091405.416256-1-eric.auger@redhat.com/

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

Thanks,
Laurent

Laurent Vivier (2):
  memory: introduce memory_region_init_ram_protected()
  tpm_crb: mark memory as protected

 hw/tpm/tpm_crb.c      |  2 +-
 include/exec/memory.h | 33 +++++++++++++++++++++++++++++++++
 softmmu/memory.c      | 33 +++++++++++++++++++++++++++------
 softmmu/physmem.c     |  4 ++--
 4 files changed, 63 insertions(+), 9 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-07-04  6:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20 19:50 [PATCH 0/2] vhost-vdpa: skip TPM CRB memory section Laurent Vivier
2023-06-20 19:50 ` [PATCH 1/2] memory: introduce memory_region_init_ram_protected() Laurent Vivier
2023-06-21 12:27   ` Stefan Berger
2023-06-22 13:05   ` David Hildenbrand
2023-06-22 13:16   ` Peter Maydell
2023-06-20 19:50 ` [PATCH 2/2] tpm_crb: mark memory as protected Laurent Vivier
2023-06-21  9:13   ` David Hildenbrand
2023-06-22 12:59     ` Laurent Vivier
2023-06-22 13:05       ` David Hildenbrand
2023-06-21 12:29   ` Stefan Berger
2023-06-22 13:05   ` David Hildenbrand
2023-06-22 13:12   ` Peter Maydell
2023-06-22 13:39     ` Laurent Vivier
2023-06-22 13:53       ` Peter Maydell
2023-07-04  3:07       ` Jason Wang
2023-07-04  6:45         ` Laurent Vivier
2023-06-21 15:32 ` [PATCH 0/2] vhost-vdpa: skip TPM CRB memory section Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).