qvm_overlap()

Determine if two [start,len] ranges overlap

Synopsis:

#include <qvm/utils.h>
int qvm_overlap(uint64_t loc_start,
                uint64_t loc_size,
                uint64_t rgn_start,
                uint64_t rgn_size)

Arguments:

loc_start
The start address of the first range.
loc_size
The length of the first range, in bytes.
rgn_start
The start address of the second range.
rgn_size
The length of the second range, in bytes.

Library:

Provided by qvm; no external library is required.

Description:

For more information, see the Virtual Device Developer's Guide.

Returns:

If the ranges overlap: true; otherwise 0 (the ranges don't overlap).