VFIO fixes 2018-04-05

- Convert over zealous error_report to trace point and make more
    meaningful (Eric Auger)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJaxmheAAoJECObm247sIsib6YP/1/c73dFlXrLYM4y7mi2vNaX
 mXPeOYmfvoKS72w+KP2VXxYP/CC4dofX2xRRwPsAlkYmgzykjElPXO+P35wM3gf8
 Le5bG18SMqIgBkYM85uOvW9O8xWbuoso2kPtUYqRp34lawCIeoN3ZNZPbchMS/KW
 HkvMJnUSOK0Fi3WXBQkkhq0KQuI8n0i2q/DklEuK97arNU65CiTdq6WPFCbCcRnm
 PduNfUMOdKyHGgmJyjaJFeQI8r/TqCkPFWZ5EdZwPnWpScnXES8J8nE9+/10rUQl
 t/4bqdYmknb+53UnY+XR/0ksnpYuHmKsgNqWtfeNc+fN6lQ//U+doKmXmqpFsWJF
 rksoDhln+89QY2NKh7fLc9uO0XPMTw4h01U9xZUX5ULm7+YifXkS0j385IGE2ecO
 E6n2oaHoAesEXFGErcVboPR0VOK8OAGjqvzB5CZK/bgMgI6RLudk0qB97iLnQF0Q
 b3hdEbwv9Rxc2GMISEHR6yR+UNzMYdMel4RrNo5SlJdMbpmiOMNYdhDbSh7Qnn1h
 +OJJQQHyZsI5qQ3rsWtSPcs6AhasL6jcP9Ltf8KJt+aOkrCrAaOTzZjH09A95USr
 S6OOC2ZU/v796JTVEZobOBxrBGRj2Zot08cxMiSod1aLZxCu+hAsjrC5uVZCBdhS
 QG2maCj+7nO3COYLkEyD
 =Y8Ig
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20180405.0' into staging

VFIO fixes 2018-04-05

 - Convert over zealous error_report to trace point and make more
   meaningful (Eric Auger)

# gpg: Signature made Thu 05 Apr 2018 19:18:06 BST
# gpg:                using RSA key 239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
# gpg:                 aka "Alex Williamson <alex@shazbot.org>"
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* remotes/awilliam/tags/vfio-fixes-20180405.0:
  vfio: Use a trace point when a RAM section cannot be DMA mapped

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2018-04-06 10:05:32 +01:00
commit 8267cf8b4b
2 changed files with 6 additions and 6 deletions

View File

@ -548,12 +548,11 @@ static void vfio_listener_region_add(MemoryListener *listener,
hwaddr pgmask = (1ULL << ctz64(hostwin->iova_pgsizes)) - 1;
if ((iova & pgmask) || (int128_get64(llsize) & pgmask)) {
error_report("Region 0x%"HWADDR_PRIx"..0x%"HWADDR_PRIx
" is not aligned to 0x%"HWADDR_PRIx
" and cannot be mapped for DMA",
section->offset_within_region,
int128_getlo(section->size),
pgmask + 1);
trace_vfio_listener_region_add_no_dma_map(
memory_region_name(section->mr),
section->offset_within_address_space,
int128_getlo(section->size),
pgmask + 1);
return;
}
}

View File

@ -90,6 +90,7 @@ vfio_iommu_map_notify(const char *op, uint64_t iova_start, uint64_t iova_end) "i
vfio_listener_region_add_skip(uint64_t start, uint64_t end) "SKIPPING region_add 0x%"PRIx64" - 0x%"PRIx64
vfio_listener_region_add_iommu(uint64_t start, uint64_t end) "region_add [iommu] 0x%"PRIx64" - 0x%"PRIx64
vfio_listener_region_add_ram(uint64_t iova_start, uint64_t iova_end, void *vaddr) "region_add [ram] 0x%"PRIx64" - 0x%"PRIx64" [%p]"
vfio_listener_region_add_no_dma_map(const char *name, uint64_t iova, uint64_t size, uint64_t page_size) "Region \"%s\" 0x%"PRIx64" size=0x%"PRIx64" is not aligned to 0x%"PRIx64" and cannot be mapped for DMA"
vfio_listener_region_del_skip(uint64_t start, uint64_t end) "SKIPPING region_del 0x%"PRIx64" - 0x%"PRIx64
vfio_listener_region_del(uint64_t start, uint64_t end) "region_del 0x%"PRIx64" - 0x%"PRIx64
vfio_disconnect_container(int fd) "close container->fd=%d"