From 4a5a0efd49f100c7d53920807c83d9c74304ecd8 Mon Sep 17 00:00:00 2001 From: "Jiang, Yunhong" Date: Thu, 23 Feb 2012 06:31:12 +0800 Subject: Check HAXM capability in QEMU Checking HAXM capability to check if emulator can use HAXM virtalization. Currently two possibility that HAXM not work. Firstly is VT/NX is not enabled in the system, seconly is HAXM have used up the memory quota. See code comemnts for the memry quota explaination. Checking the capability in advance can give user more information that why HAXM is not working and be more user friendly. Change-Id: I13f73734cf783398f485fabd19cce43364b571c3 Signed-off-by: Xin, Xiaohui Signed-off-by: Gao, Fengqian Signed-off-by: Jiang, Yunhong --- target-i386/hax-i386.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target-i386/hax-i386.h') diff --git a/target-i386/hax-i386.h b/target-i386/hax-i386.h index e55e584..27203cf 100644 --- a/target-i386/hax-i386.h +++ b/target-i386/hax-i386.h @@ -40,6 +40,7 @@ struct hax_state hax_fd fd; /* the global hax device interface */ uint32_t version; struct hax_vm *vm; + uint64_t mem_quota; }; #define HAX_MAX_VCPU 0x10 @@ -67,6 +68,7 @@ int hax_sync_vcpu_state(CPUState *env, struct vcpu_state_t *state, int set); int hax_sync_msr(CPUState *env, struct hax_msr_data *msrs, int set); int hax_sync_fpu(CPUState *env, struct fx_layout *fl, int set); int hax_vm_destroy(struct hax_vm *vm); +int hax_capability(struct hax_state *hax, struct hax_capabilityinfo *cap); /* Common host function */ int hax_host_create_vm(struct hax_state *hax, int vm_id); -- cgit v1.1