diff options
Diffstat (limited to 'server/red_memslots.c')
-rw-r--r-- | server/red_memslots.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/red_memslots.c b/server/red_memslots.c index 1b3ec622..841ea4c0 100644 --- a/server/red_memslots.c +++ b/server/red_memslots.c @@ -118,6 +118,18 @@ unsigned long get_virt(RedMemSlotInfo *info, QXLPHYSICAL addr, uint32_t add_size *error = 1; return 0; } + { + static int memset_test = -1; + uint8_t *start = (uint8_t *)h_virt; + + if (memset_test == -1) { + memset_test = (getenv("SPICE_GET_VIRT_MEMSET") != NULL); + } + + if (memset_test > 0) { + memmove(start, start, add_size); + } + } return h_virt; } |