accel/kvm: Directly pass KVMState argument to do_kvm_create_vm()
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20250703173248.44995-35-philmd@linaro.org>
This commit is contained in:
parent
4bc5c9ab62
commit
6b1ce32fee
1 changed files with 2 additions and 5 deletions
|
|
@ -2470,13 +2470,10 @@ uint32_t kvm_dirty_ring_size(void)
|
|||
return kvm_state->kvm_dirty_ring_size;
|
||||
}
|
||||
|
||||
static int do_kvm_create_vm(MachineState *ms, int type)
|
||||
static int do_kvm_create_vm(KVMState *s, int type)
|
||||
{
|
||||
KVMState *s;
|
||||
int ret;
|
||||
|
||||
s = KVM_STATE(ms->accelerator);
|
||||
|
||||
do {
|
||||
ret = kvm_ioctl(s, KVM_CREATE_VM, type);
|
||||
} while (ret == -EINTR);
|
||||
|
|
@ -2646,7 +2643,7 @@ static int kvm_init(AccelState *as, MachineState *ms)
|
|||
goto err;
|
||||
}
|
||||
|
||||
ret = do_kvm_create_vm(ms, type);
|
||||
ret = do_kvm_create_vm(s, type);
|
||||
if (ret < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue