Deleted Added
full compact
vmmapi.c (262350) vmmapi.c (267393)
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: stable/10/lib/libvmmapi/vmmapi.c 262350 2014-02-23 00:46:05Z jhb $
26 * $FreeBSD: stable/10/lib/libvmmapi/vmmapi.c 267393 2014-06-12 13:13:15Z jhb $
27 */
28
29#include <sys/cdefs.h>
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: stable/10/lib/libvmmapi/vmmapi.c 262350 2014-02-23 00:46:05Z jhb $");
30__FBSDID("$FreeBSD: stable/10/lib/libvmmapi/vmmapi.c 267393 2014-06-12 13:13:15Z jhb $");
31
32#include <sys/types.h>
33#include <sys/sysctl.h>
34#include <sys/ioctl.h>
35#include <sys/mman.h>
36
37#include <machine/specialreg.h>
38

--- 410 unchanged lines hidden (view full) ---

449
450 bzero(&ioapic_irq, sizeof(struct vm_ioapic_irq));
451 ioapic_irq.irq = irq;
452
453 return (ioctl(ctx->fd, VM_IOAPIC_PULSE_IRQ, &ioapic_irq));
454}
455
456int
31
32#include <sys/types.h>
33#include <sys/sysctl.h>
34#include <sys/ioctl.h>
35#include <sys/mman.h>
36
37#include <machine/specialreg.h>
38

--- 410 unchanged lines hidden (view full) ---

449
450 bzero(&ioapic_irq, sizeof(struct vm_ioapic_irq));
451 ioapic_irq.irq = irq;
452
453 return (ioctl(ctx->fd, VM_IOAPIC_PULSE_IRQ, &ioapic_irq));
454}
455
456int
457vm_ioapic_pincount(struct vmctx *ctx, int *pincount)
458{
459
460 return (ioctl(ctx->fd, VM_IOAPIC_PINCOUNT, pincount));
461}
462
463int
457vm_inject_nmi(struct vmctx *ctx, int vcpu)
458{
459 struct vm_nmi vmnmi;
460
461 bzero(&vmnmi, sizeof(vmnmi));
462 vmnmi.cpuid = vcpu;
463
464 return (ioctl(ctx->fd, VM_INJECT_NMI, &vmnmi));

--- 400 unchanged lines hidden ---
464vm_inject_nmi(struct vmctx *ctx, int vcpu)
465{
466 struct vm_nmi vmnmi;
467
468 bzero(&vmnmi, sizeof(vmnmi));
469 vmnmi.cpuid = vcpu;
470
471 return (ioctl(ctx->fd, VM_INJECT_NMI, &vmnmi));

--- 400 unchanged lines hidden ---