red-replay-qxl: Fix replay on 32 bit systems

Enterprise / Virtualization / SPICE - Frediano Ziglio [] - 11 August 2019 09:18 EDT

On 32 systems pointers are 32 bit while QXLPHYSICAL is always 64 bit. Using pointer -> intptr_t -> QXLPHYSICAL conversion cause pointers to have higher 32 bit set to 1 if the address is >= 0x80000000. This is possible depending on address space. The QXLPHYSICAL is split in 3 sections:- slot ID;- generation;
- virtual address. Current utility using record file (spice-server-replay) set slot ID and generation to 0 so if the higher bits become all 1 slot ID and generation won't be 0 causing the utility to fail. Use pointer -> uintptr_t -> QXLPHYSICAL conversion to avoid this issue. Note that for opposite conversion (QXLPHYSICAL_TO_PTR) the conversion does not change, type is changed just for consistency.

c289a6ee red-replay-qxl: Fix replay on 32 bit systems
server/red-replay-qxl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


  • Share