mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pci: Make self mutable when reading from PCI config space
In order to anticipate the need to support more features related to the access of a device's PCI config space, this commits changes the self reference in the function read_config_register() to be mutable. This also brings some more flexibility for any implementation of the PciDevice trait. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
655d9cdb0d
commit
db9f9b7820
@@ -556,7 +556,7 @@ impl PciDevice for VirtioPciDevice {
|
||||
.write_config_register(reg_idx, offset, data);
|
||||
}
|
||||
|
||||
fn read_config_register(&self, reg_idx: usize) -> u32 {
|
||||
fn read_config_register(&mut self, reg_idx: usize) -> u32 {
|
||||
self.configuration.read_reg(reg_idx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user