mythril
mythril copied to clipboard
Resolve #78, EmulatedDevice::services should access the VM config
Resolve issue #78
- Changes
EmulatedDevice::services
method to access the virtual machine config - Adds a new struct called
DeviceMapBuilder
to be able to manipulateDeviceMap
throughVirtualMachineConfig
@dlrobertson do you have any comment on this? I'm not sure what your thinking was here
Wouldn't it make sense to pass the required information to the device during its construction, so it can determine whatever it needs to inside services?
Yeah, I think at this point something along these lines would be a better approach.
I think #78 and this PR should now be changed to instead reduce the use of magic numbers like src/kmain.rs:79 and src/virtdev/ioapic.rs:21. Instead we should probably use a constant defined in the virtdev implementation when we construct the MADT.
Thanks to you both for taking a look at our PR. We are not sure to understand what would be the best way moving forward, do you just want to remove magic numbers in the implementation or do you still want a way for devices to access the virtual machine configuration ? In what structure would you like to define the magic numbers used by the MADT ?