dm: rename fbsdrun_addcpu and fbsdrun_deletecpu

Remove weird prefix "fbsdrun" from the function name.
Since "fbsdrun_addcpu" has never been called by external
functions, Let's remove its declaration from "dm.h" and
make it as a static function to keep consistency with
"fbsdrun_deletecpu".

Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jie Deng 2018-04-26 19:17:31 +08:00 committed by lijinxia
parent 8feec7bde2
commit 7f2de5960a
2 changed files with 5 additions and 6 deletions

View File

@ -267,8 +267,8 @@ fbsdrun_start_thread(void *param)
return NULL;
}
void
fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus)
static void
add_cpu(struct vmctx *ctx, int guest_ncpus)
{
int i;
int error;
@ -290,7 +290,7 @@ fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus)
}
static int
fbsdrun_deletecpu(struct vmctx *ctx, int vcpu)
delete_cpu(struct vmctx *ctx, int vcpu)
{
if (!CPU_ISSET(vcpu, &cpumask)) {
fprintf(stderr, "Attempting to delete unknown cpu %d\n", vcpu);
@ -845,7 +845,7 @@ main(int argc, char *argv[])
/*
* Add CPU 0
*/
fbsdrun_addcpu(ctx, guest_ncpus);
add_cpu(ctx, guest_ncpus);
/* Make a copy for ctx */
_ctx = ctx;
@ -856,7 +856,7 @@ main(int argc, char *argv[])
mevent_dispatch();
vm_pause(ctx);
fbsdrun_deletecpu(ctx, BSP);
delete_cpu(ctx, BSP);
if (vm_get_suspend_mode() != VM_SUSPEND_RESET)
break;

View File

@ -48,7 +48,6 @@ int vmexit_task_switch(struct vmctx *ctx, struct vhm_request *vhm_req,
void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len);
void *dm_gpa2hva(uint64_t gpa, size_t size);
void fbsdrun_addcpu(struct vmctx *ctx, int guest_ncpus);
int fbsdrun_muxed(void);
int fbsdrun_vmexit_on_hlt(void);
int fbsdrun_vmexit_on_pause(void);