mythril icon indicating copy to clipboard operation
mythril copied to clipboard

Resolve #78, EmulatedDevice::services should access the VM config

Open AntoineRR opened this issue 3 years ago • 4 comments

Resolve issue #78

  • Changes EmulatedDevice::services method to access the virtual machine config
  • Adds a new struct called DeviceMapBuilder to be able to manipulate DeviceMap through VirtualMachineConfig

AntoineRR avatar Jan 14 '21 11:01 AntoineRR

@dlrobertson do you have any comment on this? I'm not sure what your thinking was here

ALSchwalm avatar Jan 20 '21 03:01 ALSchwalm

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.

dlrobertson avatar Jan 22 '21 16:01 dlrobertson

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.

dlrobertson avatar Jan 22 '21 16:01 dlrobertson

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 ?

paulcacheux avatar Jan 29 '21 14:01 paulcacheux