Page MenuHomeFreeBSD

guestrpc module to handle VMware backdoor port GuestRPC functionality
ClosedPublic

Authored by stevek on Mar 27 2024, 3:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 27, 2:09 AM
Unknown Object (File)
Mon, May 27, 2:09 AM
Unknown Object (File)
Sun, May 19, 5:58 AM
Unknown Object (File)
Sun, May 19, 5:58 AM
Unknown Object (File)
Sun, May 19, 5:58 AM
Unknown Object (File)
Wed, May 15, 5:01 AM
Unknown Object (File)
Mon, May 6, 1:02 AM
Unknown Object (File)
Sat, May 4, 1:23 PM
Subscribers

Details

Summary

Convert existing FreeBSD vmware_hvcall function to take a channel
and parameter arguments.

Added vmware_guestrpc_cmd() to send GuestRPC commands to the VMware
hypervisor. The sbuf argument is used for both the command to send
and to store the data to return to the caller.

The following KPIs can be used to get and set FreeBSD-specific guest
information in key/value pairs:

  • vmware_guestrpc_set_guestinfo
    • set a value into the guestinfo.fbsd.<keyword> key
  • vmware_guestrpc_get_guestinfo
    • get the value stored in the guestinfo.fbsd.<keyword> key

Add VMware devices to x86 NOTES

Obtained from: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56803
Build 53691: arc lint + arc unit

Event Timeline

A few small suggestions and nits, but looks great to me overall.

sys/amd64/conf/NOTES
516

Should this be in sys/x86/conf/NOTES instead?

520

vmx is already in both the i386 and amd64 NOTES files

sys/conf/files.amd64
442

Maybe add this in sys/conf/files.x86 instead since it is the same in both files?

sys/x86/include/vmware.h
36

Does it make sense to define a VMW_HVCMD_DEFAULT_PARAM or some such that is UINT_MAX that existing commands should use? That might be more readable to others in the future.

sys/x86/include/vmware_guestrpc.h
5

Is Juniper ok with dropping the "All rights reserved." line? The project prefers not using this for new files (and removing it when licensees agree to do so even).

sys/x86/x86/vmware_guestrpc.c
102

style(9) wants ()'s around return values. Most places in this file already do this, but a few do not.

sys/amd64/conf/NOTES
516

Yes, I think you are correct.

sys/x86/include/vmware.h
36

Yes, that would be a good idea.

sys/x86/include/vmware_guestrpc.h
5

Yes, that would be fine.

Updated according to review comments

Ok with the few nits

sys/conf/files.x86
381–384 ↗(On Diff #137621)

(I'll try to fix the delay.c sorting error separately)

sys/x86/acpica/madt.c
162
This revision is now accepted and ready to land.Tue, Apr 30, 9:13 PM