Update README.md

merge-requests/1/head
_xeroxz 4 years ago
parent 5c55d645d8
commit 5fa90c44c1

@ -197,4 +197,21 @@ the PTE mapping that page will not be used to map the `map_type::src` page.
<p>Figure 2. demo VDM example and read/write virtual memory...</p>
</div>
The demo code demonstrates bluepill integration with VDM and a read/write physical memory, and virtual memory of other address spaces.
The demo code demonstrates bluepill integration with VDM and a read/write physical memory, and virtual memory of other address spaces.
```cpp
// use the hypervisor to read and write physical memory...
vdm::read_phys_t _read_phys =
[&](void* addr, void* buffer, std::size_t size) -> bool
{
return bluepill::read_phys(
reinterpret_cast<u64>(addr), buffer, size);
};
vdm::write_phys_t _write_phys =
[&](void* addr, void* buffer, std::size_t size) -> bool
{
return bluepill::write_phys(
reinterpret_cast<u64>(addr), buffer, size);
};
```

Loading…
Cancel
Save