diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2022-01-28 11:05:28 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2022-01-28 11:05:29 +0000 |
| commit | b367db48126d4ee14579af6cf5cdbffeb9496627 (patch) | |
| tree | ce28891185ed529af4e3bb18839af2528e403ea4 /hw/i386/xen/xen-mapcache.c | |
| parent | cfe63e46be0a1f8a7fd2fd5547222f8344a43279 (diff) | |
| parent | a021a2dd8b790437d27db95774969349632f856a (diff) | |
| download | focaccia-qemu-b367db48126d4ee14579af6cf5cdbffeb9496627.tar.gz focaccia-qemu-b367db48126d4ee14579af6cf5cdbffeb9496627.zip | |
Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20220127' into staging
Xen patches - bug fixes for mapcache and ioreq handling # gpg: Signature made Thu 27 Jan 2022 15:17:22 GMT # gpg: using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF # gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" [unknown] # gpg: aka "Anthony PERARD <anthony.perard@citrix.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 5379 2F71 024C 600F 778A 7161 D8D5 7199 DF83 42C8 # Subkey fingerprint: F80C 0063 08E2 2CFD 8A92 E798 0CF5 572F D7FB 55AF * remotes/aperard/tags/pull-xen-20220127: xen-mapcache: Avoid entry->lock overflow xen-hvm: Allow disabling buffer_io_timer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386/xen/xen-mapcache.c')
| -rw-r--r-- | hw/i386/xen/xen-mapcache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index bd47c3d672..f2ef977963 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -52,7 +52,7 @@ typedef struct MapCacheEntry { hwaddr paddr_index; uint8_t *vaddr_base; unsigned long *valid_mapping; - uint8_t lock; + uint32_t lock; #define XEN_MAPCACHE_ENTRY_DUMMY (1 << 0) uint8_t flags; hwaddr size; @@ -355,6 +355,12 @@ tryagain: if (lock) { MapCacheRev *reventry = g_malloc0(sizeof(MapCacheRev)); entry->lock++; + if (entry->lock == 0) { + fprintf(stderr, + "mapcache entry lock overflow: "TARGET_FMT_plx" -> %p\n", + entry->paddr_index, entry->vaddr_base); + abort(); + } reventry->dma = dma; reventry->vaddr_req = mapcache->last_entry->vaddr_base + address_offset; reventry->paddr_index = mapcache->last_entry->paddr_index; |