vpci_bar_writable()

Generate the writable field for the slice descriptor of a BAR

Synopsis:

#include <qvm/vpci.h>
static uint32_t vpci_bar_writable(uint32_t const size,
                                  unsigned const flags)

Arguments:

size
The size of the BAR, in bytes.
flags
The bottom bits of the BAR value.

Library:

Provided by qvm; no external library is required.

Description:

See qvm_slice_descriptor.

Returns:

The set of bits a guest can write for the register.