Add a command to bhyvectl to fetch and print the CPUID configuration
for a VCPU. The CPUID entries, if any, are printed in hex and ASCII. No
pretty-printing of the information is performed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 65755 Build 62638: arc lint + arc unit
Event Timeline
| usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c | ||
|---|---|---|
| 1927 | Where exactly does it get filled in? This looks like it always queries vcpu 0, ignoring the --cpu parameter. | |
| usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c | ||
|---|---|---|
| 1927 | This is done in vcpu_ioctl() in vmmapi.c, called by vm_get_cpuid() in vmmapi_machdep.c: int
vcpu_ioctl(struct vcpu *vcpu, u_long cmd, void *arg)
{
/*
* XXX: fragile, handle with care
* Assumes that the first field of the ioctl data
* is the vcpuid.
*/
*(int *)arg = vcpu->vcpuid;
return (ioctl(vcpu->ctx->fd, cmd, arg));
} | |
| usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c | ||
|---|---|---|
| 1927 | Right, I forgot about that bit of magic. (I'd rather initialize vvcc_vcpuid = -1 in that case.) | |