mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-30 16:35:31 +00:00
b157181656
The way the function write_reg() was implemented, it was not keeping the bits supposed to be read-only whenever the guest was writing to one of those. That's why this commit takes care of protecting those bits, preventing them from being updated. The tricky part is about the BARs since we also need to handle the very specific case where the BAR is being written with all 1's. In that case we want to return the size of the BAR instead of its address. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>