Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151520707
D51554.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51554.id.diff
View Options
diff --git a/lib/libvmmapi/amd64/vmmapi_machdep.c b/lib/libvmmapi/amd64/vmmapi_machdep.c
--- a/lib/libvmmapi/amd64/vmmapi_machdep.c
+++ b/lib/libvmmapi/amd64/vmmapi_machdep.c
@@ -71,6 +71,9 @@
VM_ISA_PULSE_IRQ, \
VM_ISA_SET_IRQ_TRIGGER, \
VM_INJECT_NMI, \
+ VM_GET_CPUID, \
+ VM_SET_CPUID, \
+ VM_LEGACY_CPUID, \
VM_SET_X2APIC_STATE, \
VM_GET_X2APIC_STATE, \
VM_GET_HPET_CAPABILITIES, \
@@ -348,6 +351,37 @@
return (error);
}
+int
+vm_get_cpuid(struct vcpu *vcpu, struct vm_vcpu_cpuid_config *cfg)
+{
+ int error;
+
+ error = vcpu_ioctl(vcpu, VM_GET_CPUID, cfg);
+
+ return (error);
+}
+
+int
+vm_set_cpuid(struct vcpu *vcpu, struct vm_vcpu_cpuid_config *cfg)
+{
+ int error;
+
+ error = vcpu_ioctl(vcpu, VM_SET_CPUID, cfg);
+
+ return (error);
+}
+
+int
+vm_legacy_cpuid(struct vcpu *vcpu, struct vm_legacy_cpuid *vlc)
+{
+ int error;
+
+ bzero(vlc, sizeof (*vlc));
+ error = vcpu_ioctl(vcpu, VM_LEGACY_CPUID, vlc);
+
+ return (error);
+}
+
int
vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities)
{
diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h
--- a/lib/libvmmapi/vmmapi.h
+++ b/lib/libvmmapi/vmmapi.h
@@ -228,7 +228,9 @@
#ifdef __amd64__
int vm_get_x2apic_state(struct vcpu *vcpu, enum x2apic_state *s);
int vm_set_x2apic_state(struct vcpu *vcpu, enum x2apic_state s);
-
+int vm_get_cpuid(struct vcpu *vcpu, struct vm_vcpu_cpuid_config *cfg);
+int vm_set_cpuid(struct vcpu *vcpu, struct vm_vcpu_cpuid_config *cfg);
+int vm_legacy_cpuid(struct vcpu *vcpu, struct vm_legacy_cpuid *vlc);
int vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 12:02 AM (7 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31180110
Default Alt Text
D51554.id.diff (1 KB)
Attached To
Mode
D51554: libvmmapi/amd64: Add support for CPUID ioctls to libvmmapi
Attached
Detach File
Event Timeline
Log In to Comment