Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/vmm_dev.c
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
#include <vm/vm_object.h> | #include <vm/vm_object.h> | ||||
#include <machine/vmparam.h> | #include <machine/vmparam.h> | ||||
#include <machine/vmm.h> | #include <machine/vmm.h> | ||||
#include <machine/vmm_dev.h> | #include <machine/vmm_dev.h> | ||||
#include <machine/vmm_instruction_emul.h> | #include <machine/vmm_instruction_emul.h> | ||||
#include <machine/vmm_snapshot.h> | #include <machine/vmm_snapshot.h> | ||||
#include <x86/apicreg.h> | #include <x86/apicreg.h> | ||||
#include <machine/vmm_migration.h> | |||||
#include "vmm_lapic.h" | #include "vmm_lapic.h" | ||||
#include "vmm_stat.h" | #include "vmm_stat.h" | ||||
#include "vmm_mem.h" | #include "vmm_mem.h" | ||||
#include "io/ppt.h" | #include "io/ppt.h" | ||||
#include "io/vatpic.h" | #include "io/vatpic.h" | ||||
#include "io/vioapic.h" | #include "io/vioapic.h" | ||||
#include "io/vhpet.h" | #include "io/vhpet.h" | ||||
▲ Show 20 Lines • Show All 313 Lines • ▼ Show 20 Lines | vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, | ||||
struct vm_memmap *mm; | struct vm_memmap *mm; | ||||
struct vm_munmap *mu; | struct vm_munmap *mu; | ||||
struct vm_cpu_topology *topology; | struct vm_cpu_topology *topology; | ||||
struct vm_readwrite_kernemu_device *kernemu; | struct vm_readwrite_kernemu_device *kernemu; | ||||
uint64_t *regvals; | uint64_t *regvals; | ||||
int *regnums; | int *regnums; | ||||
#ifdef BHYVE_SNAPSHOT | #ifdef BHYVE_SNAPSHOT | ||||
struct vm_snapshot_meta *snapshot_meta; | struct vm_snapshot_meta *snapshot_meta; | ||||
struct vm_get_dirty_page_list *page_list; | |||||
struct vmm_migration_pages_req *pages_req; | |||||
#endif | #endif | ||||
error = vmm_priv_check(curthread->td_ucred); | error = vmm_priv_check(curthread->td_ucred); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
sc = vmmdev_lookup2(cdev); | sc = vmmdev_lookup2(cdev); | ||||
if (sc == NULL) | if (sc == NULL) | ||||
▲ Show 20 Lines • Show All 466 Lines • ▼ Show 20 Lines | case VM_GET_TOPOLOGY: | ||||
break; | break; | ||||
#ifdef BHYVE_SNAPSHOT | #ifdef BHYVE_SNAPSHOT | ||||
case VM_SNAPSHOT_REQ: | case VM_SNAPSHOT_REQ: | ||||
snapshot_meta = (struct vm_snapshot_meta *)data; | snapshot_meta = (struct vm_snapshot_meta *)data; | ||||
error = vm_snapshot_req(sc->vm, snapshot_meta); | error = vm_snapshot_req(sc->vm, snapshot_meta); | ||||
break; | break; | ||||
case VM_RESTORE_TIME: | case VM_RESTORE_TIME: | ||||
error = vm_restore_time(sc->vm); | error = vm_restore_time(sc->vm); | ||||
break; | |||||
case VM_GET_DIRTY_PAGE_LIST: | |||||
page_list = (struct vm_get_dirty_page_list *)data; | |||||
error = vm_get_dirty_page_list(sc->vm, page_list); | |||||
break; | |||||
case VM_COPY_VMM_PAGES: | |||||
pages_req = (struct vmm_migration_pages_req *)data; | |||||
error = vm_copy_vmm_pages(sc->vm, pages_req); | |||||
break; | break; | ||||
#endif | #endif | ||||
default: | default: | ||||
error = ENOTTY; | error = ENOTTY; | ||||
break; | break; | ||||
} | } | ||||
if (state_changed == 1) | if (state_changed == 1) | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |