vmmapi.c (239700) | vmmapi.c (240922) |
---|---|
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 --- 523 unchanged lines hidden (view full) --- 532 533 statdesc.index = index; 534 if (ioctl(ctx->fd, VM_STAT_DESC, &statdesc) == 0) 535 return (statdesc.desc); 536 else 537 return (NULL); 538} 539 | 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 --- 523 unchanged lines hidden (view full) --- 532 533 statdesc.index = index; 534 if (ioctl(ctx->fd, VM_STAT_DESC, &statdesc) == 0) 535 return (statdesc.desc); 536 else 537 return (NULL); 538} 539 |
540int 541vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *state) 542{ 543 int error; 544 struct vm_x2apic x2apic; 545 546 bzero(&x2apic, sizeof(x2apic)); 547 x2apic.cpuid = vcpu; 548 549 error = ioctl(ctx->fd, VM_GET_X2APIC_STATE, &x2apic); 550 *state = x2apic.state; 551 return (error); 552} 553 554int 555vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state state) 556{ 557 int error; 558 struct vm_x2apic x2apic; 559 560 bzero(&x2apic, sizeof(x2apic)); 561 x2apic.cpuid = vcpu; 562 x2apic.state = state; 563 564 error = ioctl(ctx->fd, VM_SET_X2APIC_STATE, &x2apic); 565 566 return (error); 567} 568 |
|
540/* 541 * From Intel Vol 3a: 542 * Table 9-1. IA-32 Processor States Following Power-up, Reset or INIT 543 */ 544int 545vcpu_reset(struct vmctx *vmctx, int vcpu) 546{ 547 int error; --- 148 unchanged lines hidden --- | 569/* 570 * From Intel Vol 3a: 571 * Table 9-1. IA-32 Processor States Following Power-up, Reset or INIT 572 */ 573int 574vcpu_reset(struct vmctx *vmctx, int vcpu) 575{ 576 int error; --- 148 unchanged lines hidden --- |