From 762ee5d73590b0f3c22952ef35a48217655b0c1c Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 25 Oct 2013 19:38:50 +0200 Subject: [PATCH] kernel/vmm: Rename struct guest_options to vmm_guest_options. --- sys/kern/sys_vmm.c | 6 +++--- sys/kern/syscalls.master | 2 +- sys/platform/pc32/include/vmm.h | 2 +- sys/platform/pc64/include/vmm.h | 2 +- sys/platform/pc64/vmm/svm.c | 2 +- sys/platform/pc64/vmm/vmm.c | 2 +- sys/platform/pc64/vmm/vmm.h | 2 +- sys/platform/pc64/vmm/vmx.c | 8 ++++---- sys/platform/vkernel/include/vmm.h | 2 +- sys/platform/vkernel64/include/vmm.h | 2 +- sys/platform/vkernel64/platform/init.c | 2 +- sys/sys/sysproto.h | 2 +- sys/sys/vmm.h | 4 ++-- test/vmm/vmm_test.c | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/kern/sys_vmm.c b/sys/kern/sys_vmm.c index dd81d68f9a..414c154d4d 100644 --- a/sys/kern/sys_vmm.c +++ b/sys/kern/sys_vmm.c @@ -55,7 +55,7 @@ int sys_vmm_guest_ctl(struct vmm_guest_ctl_args *uap) { int error = 0; - struct guest_options options; + struct vmm_guest_options options; struct trapframe *tf = uap->sysmsg_frame; unsigned long stack_limit = USRSTACK; unsigned char stack_page[PAGE_SIZE]; @@ -64,9 +64,9 @@ sys_vmm_guest_ctl(struct vmm_guest_ctl_args *uap) switch (uap->op) { case VMM_GUEST_RUN: - error = copyin(uap->options, &options, sizeof(struct guest_options)); + error = copyin(uap->options, &options, sizeof(struct vmm_guest_options)); if (error) { - kprintf("sys_vmm_guest: error copyin guest_options\n"); + kprintf("sys_vmm_guest: error copyin vmm_guest_options\n"); goto out; } diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 832a1e150c..ea198db3c8 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -749,5 +749,5 @@ char *path2, int flags); } 532 STD BSD { int eaccess(char *path, int flags); } 533 STD BSD { int lpathconf(char *path, int name); } -534 STD BSD { int vmm_guest_ctl(int op, struct guest_options *options); } +534 STD BSD { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } 535 STD BSD { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } diff --git a/sys/platform/pc32/include/vmm.h b/sys/platform/pc32/include/vmm.h index 520099a3ae..ef2a9b0669 100644 --- a/sys/platform/pc32/include/vmm.h +++ b/sys/platform/pc32/include/vmm.h @@ -38,7 +38,7 @@ #include static __inline -int vmm_vminit(struct guest_options* opts) { +int vmm_vminit(struct vmm_guest_options* opts) { return 0; } diff --git a/sys/platform/pc64/include/vmm.h b/sys/platform/pc64/include/vmm.h index 3510921911..bb8365fe81 100644 --- a/sys/platform/pc64/include/vmm.h +++ b/sys/platform/pc64/include/vmm.h @@ -37,7 +37,7 @@ #include -int vmm_vminit(struct guest_options*); +int vmm_vminit(struct vmm_guest_options*); int vmm_vmdestroy(void); int vmm_vmrun(void); int vmm_vm_set_tls_area(void); diff --git a/sys/platform/pc64/vmm/svm.c b/sys/platform/pc64/vmm/svm.c index bf9cd9ea0d..b7bab291a4 100644 --- a/sys/platform/pc64/vmm/svm.c +++ b/sys/platform/pc64/vmm/svm.c @@ -120,7 +120,7 @@ static int svm_disable(void) { * Allocates a VMCB for the current thread and flags the thread to return * to usermode via svm_vmrun(). */ -static int svm_vminit(struct guest_options *options) { +static int svm_vminit(struct vmm_guest_options *options) { return (ENODEV); } diff --git a/sys/platform/pc64/vmm/vmm.c b/sys/platform/pc64/vmm/vmm.c index 74e6fc52c9..493923b868 100644 --- a/sys/platform/pc64/vmm/vmm.c +++ b/sys/platform/pc64/vmm/vmm.c @@ -139,7 +139,7 @@ SYSINIT(vmm_init, SI_BOOT2_CPU_TOPOLOGY, SI_ORDER_ANY, vmm_init, NULL); int -vmm_vminit(struct guest_options *options) +vmm_vminit(struct vmm_guest_options *options) { if (!vmm_enabled) { return ENODEV; diff --git a/sys/platform/pc64/vmm/vmm.h b/sys/platform/pc64/vmm/vmm.h index 97092d0b5f..4580f84db7 100644 --- a/sys/platform/pc64/vmm/vmm.h +++ b/sys/platform/pc64/vmm/vmm.h @@ -71,7 +71,7 @@ struct vmm_ctl { int (*init)(void); int (*enable)(void); int (*disable)(void); - int (*vminit)(struct guest_options *); + int (*vminit)(struct vmm_guest_options *); int (*vmdestroy)(void); int (*vmrun)(void); int (*vm_set_tls_area)(void); diff --git a/sys/platform/pc64/vmm/vmx.c b/sys/platform/pc64/vmm/vmx.c index 84767a87ea..82d429ba3b 100644 --- a/sys/platform/pc64/vmm/vmx.c +++ b/sys/platform/pc64/vmm/vmx.c @@ -700,7 +700,7 @@ error: * - remove the old vmspace */ static int -vmx_vminit_master(struct guest_options *options) +vmx_vminit_master(struct vmm_guest_options *options) { struct vmspace *oldvmspace; struct vmspace *newvmspace; @@ -740,7 +740,7 @@ vmx_vminit_master(struct guest_options *options) } static int -vmx_vminit(struct guest_options *options) +vmx_vminit(struct vmm_guest_options *options) { struct vmx_thread_info * vti; int err; @@ -1514,13 +1514,13 @@ error2: static void vmx_lwp_return(struct lwp *lp, struct trapframe *frame) { - struct guest_options options; + struct vmm_guest_options options; int vmrun_err; struct vmm_proc *p_vmm = (struct vmm_proc *)curproc->p_vmm; dkprintf("VMM: vmx_lwp_return \n"); - bzero(&options, sizeof(struct guest_options)); + bzero(&options, sizeof(struct vmm_guest_options)); bcopy(frame, &options.tf, sizeof(struct trapframe)); diff --git a/sys/platform/vkernel/include/vmm.h b/sys/platform/vkernel/include/vmm.h index 520099a3ae..ef2a9b0669 100644 --- a/sys/platform/vkernel/include/vmm.h +++ b/sys/platform/vkernel/include/vmm.h @@ -38,7 +38,7 @@ #include static __inline -int vmm_vminit(struct guest_options* opts) { +int vmm_vminit(struct vmm_guest_options* opts) { return 0; } diff --git a/sys/platform/vkernel64/include/vmm.h b/sys/platform/vkernel64/include/vmm.h index 520099a3ae..ef2a9b0669 100644 --- a/sys/platform/vkernel64/include/vmm.h +++ b/sys/platform/vkernel64/include/vmm.h @@ -38,7 +38,7 @@ #include static __inline -int vmm_vminit(struct guest_options* opts) { +int vmm_vminit(struct vmm_guest_options* opts) { return 0; } diff --git a/sys/platform/vkernel64/platform/init.c b/sys/platform/vkernel64/platform/init.c index 14427fb774..29fd11433b 100644 --- a/sys/platform/vkernel64/platform/init.c +++ b/sys/platform/vkernel64/platform/init.c @@ -668,7 +668,7 @@ init_kern_memory_vmm(void) { int i; void *firstfree; - struct guest_options options; + struct vmm_guest_options options; void *dmap_address; KvaStart = (vm_offset_t)KERNEL_KVA_START; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 3a975fff5b..a696e4ea0a 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2286,7 +2286,7 @@ struct vmm_guest_ctl_args { struct sysmsg sysmsg; #endif int op; char op_[PAD_(int)]; - struct guest_options * options; char options_[PAD_(struct guest_options *)]; + struct vmm_guest_options * options; char options_[PAD_(struct vmm_guest_options *)]; }; struct vmm_guest_sync_addr_args { #ifdef _KERNEL diff --git a/sys/sys/vmm.h b/sys/sys/vmm.h index be21e6639e..9ad91cd687 100644 --- a/sys/sys/vmm.h +++ b/sys/sys/vmm.h @@ -46,7 +46,7 @@ #include #include -struct guest_options { +struct vmm_guest_options { register_t guest_cr3; register_t vmm_cr3; register_t new_stack; @@ -55,7 +55,7 @@ struct guest_options { }; -int vmm_guest_ctl (int, struct guest_options *); +int vmm_guest_ctl (int, struct vmm_guest_options *); int vmm_guest_sync_addr (long *, long *); diff --git a/test/vmm/vmm_test.c b/test/vmm/vmm_test.c index eb597bf27c..fce7c60498 100644 --- a/test/vmm/vmm_test.c +++ b/test/vmm/vmm_test.c @@ -24,7 +24,7 @@ int vmm_boostrap(void) { - struct guest_options options; + struct vmm_guest_options options; uint64_t *ptr; uint64_t stack_source; uint64_t stack_size; -- 2.41.0