vmm_dev.c (264324) | vmm_dev.c (265062) |
---|---|
1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/amd64/vmm/vmm_dev.c 264324 2014-04-10 19:15:58Z grehan $ | 26 * $FreeBSD: head/sys/amd64/vmm/vmm_dev.c 265062 2014-04-28 22:06:40Z neel $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_dev.c 264324 2014-04-10 19:15:58Z grehan $"); | 30__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_dev.c 265062 2014-04-28 22:06:40Z neel $"); |
31 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/queue.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/malloc.h> 38#include <sys/conf.h> --- 122 unchanged lines hidden (view full) --- 161 struct vm_pptdev_mmio *pptmmio; 162 struct vm_pptdev_msi *pptmsi; 163 struct vm_pptdev_msix *pptmsix; 164 struct vm_nmi *vmnmi; 165 struct vm_stats *vmstats; 166 struct vm_stat_desc *statdesc; 167 struct vm_x2apic *x2apic; 168 struct vm_gpa_pte *gpapte; | 31 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/queue.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/malloc.h> 38#include <sys/conf.h> --- 122 unchanged lines hidden (view full) --- 161 struct vm_pptdev_mmio *pptmmio; 162 struct vm_pptdev_msi *pptmsi; 163 struct vm_pptdev_msix *pptmsix; 164 struct vm_nmi *vmnmi; 165 struct vm_stats *vmstats; 166 struct vm_stat_desc *statdesc; 167 struct vm_x2apic *x2apic; 168 struct vm_gpa_pte *gpapte; |
169 struct vm_suspend *vmsuspend; |
|
169 170 sc = vmmdev_lookup2(cdev); 171 if (sc == NULL) 172 return (ENXIO); 173 174 error = 0; 175 vcpu = -1; 176 state_changed = 0; --- 59 unchanged lines hidden (view full) --- 236 } 237 238 switch(cmd) { 239 case VM_RUN: 240 vmrun = (struct vm_run *)data; 241 error = vm_run(sc->vm, vmrun); 242 break; 243 case VM_SUSPEND: | 170 171 sc = vmmdev_lookup2(cdev); 172 if (sc == NULL) 173 return (ENXIO); 174 175 error = 0; 176 vcpu = -1; 177 state_changed = 0; --- 59 unchanged lines hidden (view full) --- 237 } 238 239 switch(cmd) { 240 case VM_RUN: 241 vmrun = (struct vm_run *)data; 242 error = vm_run(sc->vm, vmrun); 243 break; 244 case VM_SUSPEND: |
244 error = vm_suspend(sc->vm); | 245 vmsuspend = (struct vm_suspend *)data; 246 error = vm_suspend(sc->vm, vmsuspend->how); |
245 break; 246 case VM_STAT_DESC: { 247 statdesc = (struct vm_stat_desc *)data; 248 error = vmm_stat_desc_copy(statdesc->index, 249 statdesc->desc, sizeof(statdesc->desc)); 250 break; 251 } 252 case VM_STATS: { --- 344 unchanged lines hidden --- | 247 break; 248 case VM_STAT_DESC: { 249 statdesc = (struct vm_stat_desc *)data; 250 error = vmm_stat_desc_copy(statdesc->index, 251 statdesc->desc, sizeof(statdesc->desc)); 252 break; 253 } 254 case VM_STATS: { --- 344 unchanged lines hidden --- |