Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102663726
D46432.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
D46432.diff
View Options
diff --git a/sys/amd64/include/vmm_dev.h b/sys/amd64/include/vmm_dev.h
--- a/sys/amd64/include/vmm_dev.h
+++ b/sys/amd64/include/vmm_dev.h
@@ -54,13 +54,6 @@
char name[VM_MAX_SUFFIXLEN + 1];
};
-struct vm_memseg_fbsd12 {
- int segid;
- size_t len;
- char name[64];
-};
-_Static_assert(sizeof(struct vm_memseg_fbsd12) == 80, "COMPAT_FREEBSD12 ABI");
-
struct vm_register {
int cpuid;
int regnum; /* enum vm_reg_name */
@@ -349,12 +342,8 @@
_IOW('v', IOCNUM_SUSPEND, struct vm_suspend)
#define VM_REINIT \
_IO('v', IOCNUM_REINIT)
-#define VM_ALLOC_MEMSEG_FBSD12 \
- _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg_fbsd12)
#define VM_ALLOC_MEMSEG \
_IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg)
-#define VM_GET_MEMSEG_FBSD12 \
- _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg_fbsd12)
#define VM_GET_MEMSEG \
_IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg)
#define VM_MMAP_MEMSEG \
diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c
--- a/sys/dev/vmm/vmm_dev.c
+++ b/sys/dev/vmm/vmm_dev.c
@@ -28,6 +28,20 @@
#include <dev/vmm/vmm_dev.h>
#include <dev/vmm/vmm_stat.h>
+#if defined(__amd64__) && defined(COMPAT_FREEBSD12)
+struct vm_memseg_fbsd12 {
+ int segid;
+ size_t len;
+ char name[64];
+};
+_Static_assert(sizeof(struct vm_memseg_fbsd12) == 80, "COMPAT_FREEBSD12 ABI");
+
+#define VM_ALLOC_MEMSEG_FBSD12 \
+ _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg_fbsd12)
+#define VM_GET_MEMSEG_FBSD12 \
+ _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg_fbsd12)
+#endif
+
static int devmem_create_cdev(const char *vmname, int id, char *devmem);
struct devmem_softc {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 1:14 PM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14659177
Default Alt Text
D46432.diff (1 KB)
Attached To
Mode
D46432: vmm: Move compat ioctl definitions to vmm_dev.c
Attached
Detach File
Event Timeline
Log In to Comment