Lines Matching refs:hax
15 * HAX common code for both Windows and Darwin
20 #include "target-i386/hax-i386.h"
54 /* Sync the vcpu state from hax kernel module */
90 * Sync the vcpu state to HAX kernel module
126 /* Least HAX kernel version */
129 static int hax_get_capability(struct hax_state *hax)
134 ret = hax_capability(hax, cap);
150 if (cap->mem_quota < hax->mem_quota)
160 static int hax_version_support(struct hax_state *hax)
165 ret = hax_mod_version(hax, &version);
222 dprint("Invalid HAX tunnel size \n");
253 * 2. hax_close_fd will require the HAX kernel module to free vcpu
268 dprint("Failed to create HAX vcpu\n");
278 struct hax_vm *hax_vm_create(struct hax_state *hax)
284 if (hax_invalid_fd(hax->fd))
287 if (hax->vm)
288 return hax->vm;
294 ret = hax_host_create_vm(hax, &vm_id);
300 vm->fd = hax_host_open_vm(hax, vm_id);
307 hax->vm = vm;
312 hax->vm = NULL;
334 struct hax_state *hax = &hax_global;
336 memset(hax, 0, sizeof(struct hax_state));
337 hax->mem_quota = ram_size;
344 struct hax_state *hax = NULL;
350 hax = &hax_global;
352 hax->fd = hax_mod_open();
353 if (hax_invalid_fd(hax->fd))
355 hax->fd = 0;
360 ret = hax_get_capability(hax);
368 if (!hax_version_support(hax))
370 dprint("Incompatible HAX version. Qemu current version %x ", hax_cur_version );
371 dprint("requires least HAX version %x\n", hax_lest_version);
376 hax->vm = hax_vm_create(hax);
377 if (!hax->vm)
379 dprint("Failed to create HAX VM\n");
386 hax_notify_qemu_version(hax->vm->fd, &qversion);
392 if (hax->vm)
393 hax_vm_destroy(hax->vm);
394 if (hax->fd)
395 hax_mod_close(hax);
479 * Unlike KVM, the HAX kernel module checks the eflags, instead.
516 * Request the HAX kernel module to run the CPU for us until one of
606 /* these situation will continue to hax module */
611 dprint("Unknow exit %x from hax\n", ht->_exit_status);
657 dprint("Unknown hax vcpu exec return %x\n", next);
726 /* The sregs has been synced with HAX kernel already before this call */
1103 dprint("Failed to sync HAX vcpu context\n");