dev-amdgpu,configs: checkpoint before MMIOs

The flow for Full System amdgpu is the use KVM to boot linux and begin
loading the driver module. However, the amdgpu module requires reading
the VGA ROM located at 0xc0000 in X86. KVM does not support having a
small 128KiB hole at this location, therefore we take a checkpoint and
switch to a timing CPU to continue loading the drivers before the VGA
ROM is read.

This creates a checkpoint just before the first MMIOs. This is indicated
by three interrupts being sent to the PCI device. After three interrupts
in a row are counted a checkpoint exit event occurs. The interrupt
counter is reset if a non-interrupt PCI read is seen.

Change-Id: I23b320abe81ff6e766cb3f604eca2979339938e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46161
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matthew Poremba
2021-05-13 18:50:32 -05:00
parent 7426a0da8e
commit e9bac9df87
5 changed files with 54 additions and 3 deletions

View File

@@ -102,6 +102,9 @@ class AMDGPUDevice : public PciDevice
*/
std::unordered_map<uint32_t, uint64_t> regs;
bool checkpoint_before_mmios;
int init_interrupt_count;
public:
AMDGPUDevice(const AMDGPUDeviceParams &p);