vpci_cfg_read()

Handle a read from a PCI configuration space register

Synopsis:

#include <qvm/vpci.h>
unsigned vpci_cfg_read(const void *rw_cfg,
                       const struct qvm_slice_descriptor *desc,
                       const struct qvm_state_block *blk,
                       void *val,
                       const struct _pci_config_regs *ro_cfg)

Arguments:

rw_cfg
A pointer to the device's read/write state.
desc
A pointer to a slice descriptor array.
blk
The operand of the virtual PCI device's vread function (vopnd).
val
A pointer to a location where the bytes read in can be stored.
ro_cfg
A pointer to read-only configuration for the device.

Library:

Provided by qvm; no external library is required.

Description:

This function is designed to be called by the virtual PCI device's vread() function.

Returns:

A bitset of descriptor indexes used for the read.