summary refs log tree commit diff stats
path: root/hw/vfio/helpers.c
diff options
context:
space:
mode:
authorZhenzhong Duan <zhenzhong.duan@intel.com>2024-06-05 16:30:31 +0800
committerCédric Le Goater <clg@redhat.com>2024-06-24 23:15:30 +0200
commit6f274444c579305d14d355bab24af31ea2bef224 (patch)
tree6054ac4f2962035c04b000c0064dff570548adec /hw/vfio/helpers.c
parent9005f928447841ed253e000d5e8220e381872cb0 (diff)
downloadfocaccia-qemu-6f274444c579305d14d355bab24af31ea2bef224.tar.gz
focaccia-qemu-6f274444c579305d14d355bab24af31ea2bef224.zip
range: Introduce range_get_last_bit()
This helper get the highest 1 bit position of the upper bound.

If the range is empty or upper bound is zero, -1 is returned.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/vfio/helpers.c')
0 files changed, 0 insertions, 0 deletions