Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177559264
D51554.1794719006.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D51554.1794719006.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
@@ -2,6 +2,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2011 NetApp, Inc.
+ * Copyright (c) 2026 The FreeBSD Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -71,6 +72,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 +352,36 @@
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;
+
+ 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
@@ -2,6 +2,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2011 NetApp, Inc.
+ * Copyright (c) 2026 The FreeBSD Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -228,7 +229,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
Sun, Nov 15, 5:03 AM (23 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41734228
Default Alt Text
D51554.1794719006.diff (2 KB)
Attached To
Mode
D51554: libvmmapi/amd64: Add support for CPUID ioctls to libvmmapi
Attached
Detach File
Event Timeline