Bug #15693
openvmm-data should allow specific MSR reads
0%
Description
The vmm-data interface to MSRs (via the VDC_MSR
class) currently allows a consumer to read all of the "default" MSRs by providing a buffer large enough to fit them all. If the user wants only a subset, however, (or MSRs which are not in that default set, like those related to DEBUGCTL) then the current logic malfunctions when using the VDX_FLAG_READ_COPYIN
functionality to perform a read of specific entries.
This should be made to operate like the VDC_VMM_ARCH
data, where providing entries with desired identifiers (vfe_ident
) will yield results for those specific MSRs.
This became apparent when writing test cases for #15676 and friends.
It should be noted that writes to MSRs via vmm-data are already functioning properly, since they do not have the open-ended "read all the entries the kernel offers" behavior.
Related issues
Updated by Patrick Mooney 11 days ago
- Related to Bug #15678: SVM should expose LBR MSRs added
- Related to Bug #15676: SVM feature detection broken in bhyve added
Updated by Patrick Mooney 11 days ago
A new testcase (datarw_msrs
) was added to the bhyve-tests suite in order to exercise more of this functionality. With the proposed fix in place, both catch-all reads and targeted (with VDX_FLAG_READ_COPYIN
set, and a shorter buffer populated with desired MSR identifiers) reads operate as desired.