[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/48] i386: hvf: Remove hvf_disabled
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 15/48] i386: hvf: Remove hvf_disabled |
Date: |
Thu, 18 Oct 2018 22:31:42 +0200 |
From: Roman Bolshakov <address@hidden>
accel_init_machine sets *(acc->allowed) to true if acc->init_machine(ms)
succeeds. There's no need to have both hvf_allowed and hvf_disabled.
Signed-off-by: Roman Bolshakov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/sysemu/hvf.h | 4 ++--
target/i386/hvf/hvf.c | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index 2411188..aaa51d2 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -17,7 +17,7 @@
#include "exec/memory.h"
#include "sysemu/accel.h"
-extern int hvf_disabled;
+extern bool hvf_allowed;
#ifdef CONFIG_HVF
#include <Hypervisor/hv.h>
#include <Hypervisor/hv_vmx.h>
@@ -26,7 +26,7 @@ extern int hvf_disabled;
#include "hw/hw.h"
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
int reg);
-#define hvf_enabled() !hvf_disabled
+#define hvf_enabled() (hvf_allowed)
#else
#define hvf_enabled() 0
#define hvf_get_supported_cpuid(func, idx, reg) 0
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 9f52bc4..e193022 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -73,7 +73,6 @@
#include "target/i386/cpu.h"
HVFState *hvf_state;
-int hvf_disabled = 1;
static void assert_hvf_ok(hv_return_t ret)
{
@@ -604,11 +603,6 @@ int hvf_init_vcpu(CPUState *cpu)
return 0;
}
-void hvf_disable(int shouldDisable)
-{
- hvf_disabled = shouldDisable;
-}
-
static void hvf_store_events(CPUState *cpu, uint32_t ins_len, uint64_t
idtvec_info)
{
X86CPU *x86_cpu = X86_CPU(cpu);
@@ -934,7 +928,7 @@ int hvf_vcpu_exec(CPUState *cpu)
return ret;
}
-static bool hvf_allowed;
+bool hvf_allowed;
static int hvf_accel_init(MachineState *ms)
{
@@ -942,7 +936,6 @@ static int hvf_accel_init(MachineState *ms)
hv_return_t ret;
HVFState *s;
- hvf_disable(0);
ret = hv_vm_create(HV_VM_DEFAULT);
assert_hvf_ok(ret);
--
1.8.3.1
- [Qemu-devel] [PULL 11/48] target-i386: add q35 0xcf8 port as coalesced_pio, (continued)
- [Qemu-devel] [PULL 11/48] target-i386: add q35 0xcf8 port as coalesced_pio, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 13/48] i386/kvm: add support for Hyper-V IPI send, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 16/48] vl: improve/fix documentation related to RTC function, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 18/48] Fixes RTC bug with base datetime shifts in clock=vm, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 19/48] vl, qapi: offset calculation in RTC_CHANGE event reverted, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 20/48] call HotplugHandler->plug() as the last step in device realization, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 21/48] hw: edu: drop DO_UPCAST, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 25/48] hyperv_testdev: drop unnecessary includes, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 10/48] target-i386: add i440fx 0xcf8 port as coalesced_pio, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 17/48] vl: refactor -rtc option references, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 15/48] i386: hvf: Remove hvf_disabled,
Paolo Bonzini <=
- [Qemu-devel] [PULL 14/48] i386: hvf: Fix register refs if REX is present, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 24/48] hyperv_testdev: refactor for better maintainability, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 23/48] scsi-disk: fix rerror/werror=ignore, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 22/48] scsi-disk: fix double completion of failing passthrough requests, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 26/48] hyperv: cosmetic: g_malloc -> g_new, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 27/48] hyperv: synic: only setup ack notifier if there's a callback, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 29/48] hyperv: address HvSintRoute by X86CPU pointer, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 35/48] default-configs: collect CONFIG_HYPERV* in hyperv.mak, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 37/48] hyperv:synic: split capability testing and setting, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 33/48] hyperv: make hyperv_vp_index inline, Paolo Bonzini, 2018/10/18