aboutsummaryrefslogtreecommitdiffstats
path: root/target-i386/hax-windows.c
diff options
context:
space:
mode:
authorJiang, Yunhong <yunhong.jiang@intel.com>2012-02-23 05:21:15 +0800
committerJiang, Yunhong <yunhong.jiang@intel.com>2012-02-23 05:29:53 +0800
commit1d1280d7d347bb9467bfe9c161cba254f9e55d1c (patch)
tree4c36cf3e4a285cf0397066b1d86db27ea27cb427 /target-i386/hax-windows.c
parent4a795dda3d916c591206d2c37d6b583098204108 (diff)
downloadexternal_qemu-1d1280d7d347bb9467bfe9c161cba254f9e55d1c.zip
external_qemu-1d1280d7d347bb9467bfe9c161cba254f9e55d1c.tar.gz
external_qemu-1d1280d7d347bb9467bfe9c161cba254f9e55d1c.tar.bz2
Fix the vmid issue in HAX
This patch is lost when submit the HAX patchset. Without this patch, only one emulator instance can use HAXM. Change-Id: Ia8e47ea471ae154036bb5721c51d6d099d9aff5f Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Diffstat (limited to 'target-i386/hax-windows.c')
-rw-r--r--target-i386/hax-windows.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/hax-windows.c b/target-i386/hax-windows.c
index 683a227..d66ec4a 100644
--- a/target-i386/hax-windows.c
+++ b/target-i386/hax-windows.c
@@ -198,9 +198,10 @@ static char *hax_vcpu_devfs_string(int vm_id, int vcpu_id)
return name;
}
-int hax_host_create_vm(struct hax_state *hax, int vm_id)
+int hax_host_create_vm(struct hax_state *hax, int *vmid)
{
int ret;
+ int vm_id = 0;
DWORD dSize = 0;
if (hax_invalid_fd(hax->fd))
@@ -219,7 +220,7 @@ int hax_host_create_vm(struct hax_state *hax, int vm_id)
dprint("error code:%d", GetLastError());
return -1;
}
-
+ *vmid = vm_id;
return 0;
}