vm.cc (10842:0c0506575409) | vm.cc (10859:0ba6f47025d1) |
---|---|
1/* 2 * Copyright 2014 Google, Inc. | 1/* 2 * Copyright 2014 Google, Inc. |
3 * Copyright (c) 2012 ARM Limited | 3 * Copyright (c) 2012, 2015 ARM Limited |
4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license 11 * terms below provided that you ensure that this notice is replicated --- 469 unchanged lines hidden (view full) --- 481 kvm_level.level = high ? 1 : 0; 482 483 if (ioctl(KVM_IRQ_LINE, &kvm_level) == -1) 484 panic("KVM: Failed to set IRQ line level (errno: %i)\n", 485 errno); 486} 487 488int | 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license 11 * terms below provided that you ensure that this notice is replicated --- 469 unchanged lines hidden (view full) --- 481 kvm_level.level = high ? 1 : 0; 482 483 if (ioctl(KVM_IRQ_LINE, &kvm_level) == -1) 484 panic("KVM: Failed to set IRQ line level (errno: %i)\n", 485 errno); 486} 487 488int |
489KvmVM::createDevice(uint32_t type, uint32_t flags) 490{ 491#if defined(KVM_CREATE_DEVICE) 492 struct kvm_create_device dev = { type, 0, flags }; 493 494 if (ioctl(KVM_CREATE_DEVICE, &dev) == -1) { 495 panic("KVM: Failed to create device (errno: %i)\n", 496 errno); 497 } 498 499 return dev.fd; 500#else 501 panic("Kernel headers don't support KVM_CREATE_DEVICE\n"); 502#endif 503} 504 505int |
|
489KvmVM::createVCPU(long vcpuID) 490{ 491 int fd; 492 493 fd = ioctl(KVM_CREATE_VCPU, vcpuID); 494 if (fd == -1) 495 panic("KVM: Failed to create virtual CPU"); 496 --- 29 unchanged lines hidden --- | 506KvmVM::createVCPU(long vcpuID) 507{ 508 int fd; 509 510 fd = ioctl(KVM_CREATE_VCPU, vcpuID); 511 if (fd == -1) 512 panic("KVM: Failed to create virtual CPU"); 513 --- 29 unchanged lines hidden --- |