mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 21:19:35 +00:00
Revert "DM: Get max vcpu per vm from HV instead of hardcode"
This reverts commit 356bf18491
.
This commit is contained in:
parent
8bca0b1ae9
commit
5f9cd25324
@ -38,7 +38,6 @@
|
||||
#include <sysexits.h>
|
||||
#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "vmmapi.h"
|
||||
#include "sw_load.h"
|
||||
@ -696,20 +695,10 @@ vm_loop(struct vmctx *ctx)
|
||||
static int
|
||||
num_vcpus_allowed(struct vmctx *ctx)
|
||||
{
|
||||
int err;
|
||||
uint16_t max_cpu;
|
||||
struct platform_info info;
|
||||
|
||||
err = ioctl(ctx->fd, IC_GET_PLATFORM_INFO, &info);
|
||||
if (err != 0) {
|
||||
/* Use VM_MAXCPU as default */
|
||||
max_cpu = VM_MAXCPU;
|
||||
printf("Failed to get max vcpu from HV, use default: %d. errno(%d)\n", max_cpu, err);
|
||||
} else {
|
||||
max_cpu = info.max_vcpus_per_vm;
|
||||
}
|
||||
|
||||
return max_cpu;
|
||||
/* TODO: add ioctl to get gerneric information including
|
||||
* virtual cpus, now hardcode
|
||||
*/
|
||||
return VM_MAXCPU;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user