Page MenuHomeFreeBSD

bhyve: add ioctl to modify the second level address translation
AbandonedPublic

Authored by corvink on Nov 29 2021, 10:36 AM.
Tags
Referenced Files
Unknown Object (File)
Mar 5 2024, 5:27 AM
Unknown Object (File)
Feb 11 2024, 4:43 AM
Unknown Object (File)
Dec 29 2023, 10:26 PM
Unknown Object (File)
Dec 23 2023, 1:37 AM
Unknown Object (File)
Dec 11 2023, 12:38 AM
Unknown Object (File)
Oct 10 2023, 6:52 PM
Unknown Object (File)
Sep 6 2023, 2:41 AM
Unknown Object (File)
Aug 14 2023, 2:40 PM

Details

Reviewers
manu
markj
jhb
Group Reviewers
bhyve
Summary

Second level address translation is used to create a mapping between
guest addresses and host addresses. In order to allow passthru of
mmio devices like a TPM, we need to modify the SLAT. Therefore,
add an ioctl for several modifications of the SLAT.

Note: You can take a look at https://github.com/Beckhoff/freebsd-src/commits/phab/corvink/vm_modify_slat

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lib/libvmmapi/vmmapi.h
190

Whitespace is inconsistent.

sys/amd64/vmm/vmm.c
649

This functions return Mach error numbers, for legacy reasons. They need to be translated to errno values before a return to user mode. See vm_mmap_memseg() for an example.

sys/amd64/vmm/vmm_dev.c
550

There is no validation that the HPA actually corresponds to a SLAT...?

sys/amd64/vmm/vmm_dev.c
550

HPA isn't part of the SLAT. vm_map_mmio should add it to EPT.

This patch was required for my TPM passthrough patch (D32961). I'll change the TPM passthrough patch in the future. After that, this patch won't be required any more.