mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 20:04:09 +00:00
server/red_memslots: use QXLPHYSICAL for addresses
Cannot assume unsigned long == QXLPHYSICAL, not true for 32 bit architectures.
This commit is contained in:
parent
f360273614
commit
5391736c29
@ -91,7 +91,7 @@ void validate_virt(RedMemSlotInfo *info, unsigned long virt, int slot_id,
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long get_virt(RedMemSlotInfo *info, unsigned long addr, uint32_t add_size,
|
||||
unsigned long get_virt(RedMemSlotInfo *info, QXLPHYSICAL addr, uint32_t add_size,
|
||||
int group_id)
|
||||
{
|
||||
int slot_id;
|
||||
|
||||
@ -43,12 +43,12 @@ typedef struct RedMemSlotInfo {
|
||||
unsigned long memslot_clean_virt_mask;
|
||||
} RedMemSlotInfo;
|
||||
|
||||
static inline int get_memslot_id(RedMemSlotInfo *info, unsigned long addr)
|
||||
static inline int get_memslot_id(RedMemSlotInfo *info, uint64_t addr)
|
||||
{
|
||||
return addr >> info->memslot_id_shift;
|
||||
}
|
||||
|
||||
static inline int get_generation(RedMemSlotInfo *info, unsigned long addr)
|
||||
static inline int get_generation(RedMemSlotInfo *info, uint64_t addr)
|
||||
{
|
||||
return (addr >> info->memslot_gen_shift) & info->memslot_gen_mask;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user