#
c4dc25de |
| 25-Sep-2020 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: kvm: aarch64: Trigger reset upon KVM_SYSTEM_EVENT_RESET
This will trigger Vm::vm_reboot to make the VM reboot.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
|
#
573a5c63 |
| 08-Oct-2020 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: kvm: Use unstable_sort() to keep clippy happy
"Using a stable sort consumes more memory and cpu cycles. Because values which compare equal are identical, preserving their relative order
hypervisor: kvm: Use unstable_sort() to keep clippy happy
"Using a stable sort consumes more memory and cpu cycles. Because values which compare equal are identical, preserving their relative order (the guarantee that a stable sort provides) means nothing, while the extra costs still apply."
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|
#
ed1fdd1f |
| 07-Oct-2020 |
Wei Liu <liuwe@microsoft.com> |
hypervisor, arch: rename "OneRegister" and relevant code
The OneRegister literally means "one (arbitrary) register". Just call it "Register" instead. There is no need to inherit KVM's naming scheme
hypervisor, arch: rename "OneRegister" and relevant code
The OneRegister literally means "one (arbitrary) register". Just call it "Register" instead. There is no need to inherit KVM's naming scheme in the hypervisor agnostic code.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
71c435ce |
| 03-Sep-2020 |
Praveen Paladugu <prapal@microsoft.com> |
hypervisor, vmm: Introduce VmmOps trait
Run loop in hypervisor needs a callback mechanism to access resources like guest memory, mmio, pio etc.
VmmOps trait is introduced here, which is implemented
hypervisor, vmm: Introduce VmmOps trait
Run loop in hypervisor needs a callback mechanism to access resources like guest memory, mmio, pio etc.
VmmOps trait is introduced here, which is implemented by vmm module. While handling vcpuexits in run loop, this trait allows hypervisor module access to the above mentioned resources via callbacks.
Signed-off-by: Praveen Paladugu <prapal@microsoft.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
#
4b322520 |
| 24-Sep-2020 |
Praveen Paladugu <prapal@microsoft.com> |
hypervisor, vmm: fix clippy warnings
Signed-off-by: Praveen Paladugu <prapal@microsoft.com>
|
#
89a6b63e |
| 31-Aug-2020 |
Henry Wang <Henry.Wang@arm.com> |
hypervisor: Implement `get_device_attr` method for AArch64
This commit implements the `get_device_attr` method for the `KVM_GET_DEVICE_ATTR` ioctl. This ioctl will be used in retrieving the GIC stat
hypervisor: Implement `get_device_attr` method for AArch64
This commit implements the `get_device_attr` method for the `KVM_GET_DEVICE_ATTR` ioctl. This ioctl will be used in retrieving the GIC status.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
show more ...
|
#
ffafeda4 |
| 30-Aug-2020 |
Henry Wang <Henry.Wang@arm.com> |
AArch64: Implement AArch64 vCPU states save/restore
This commit adds methods to save/restore AArch64 vCPU registers, including:
1. The AArch64 `VcpuKvmState` structure.
2. Some `Vcpu` trait method
AArch64: Implement AArch64 vCPU states save/restore
This commit adds methods to save/restore AArch64 vCPU registers, including:
1. The AArch64 `VcpuKvmState` structure.
2. Some `Vcpu` trait methods of the `KvmVcpu` structure to enable the save/restore of the AArch64 vCPU states.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
show more ...
|
#
e3d45be6 |
| 28-Aug-2020 |
Henry Wang <Henry.Wang@arm.com> |
AArch64: Preparation for vCPU save/restore
This commit ports code from firecracker and refactors the existing AArch64 code as the preparation for implementing save/restore AArch64 vCPU, including:
AArch64: Preparation for vCPU save/restore
This commit ports code from firecracker and refactors the existing AArch64 code as the preparation for implementing save/restore AArch64 vCPU, including:
1. Modification of `arm64_core_reg` macro to retrive the index of arm64 core register and implemention of a helper to determine if a register is a system register.
2. Move some macros and helpers in `arch` crate to the `hypervisor` crate.
3. Added related unit tests for above functions and macros.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
show more ...
|
#
da642fcf |
| 15-Sep-2020 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: Add "HyperV" exit to list of KVM exits
Currently we don't need to do anything to service these exits but when the synthetic interrupt controller is active an exit will be triggered to no
hypervisor: Add "HyperV" exit to list of KVM exits
Currently we don't need to do anything to service these exits but when the synthetic interrupt controller is active an exit will be triggered to notify the VMM of details of the synthetic interrupt page.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|
#
9b48ee38 |
| 15-Sep-2020 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: Support enabling HyperV synthetic interrupt controller
This adds a KVM HyperV synthetic interrupt controller in place of the emulated PIC.
Signed-off-by: Rob Bradford <robert.bradford@i
hypervisor: Support enabling HyperV synthetic interrupt controller
This adds a KVM HyperV synthetic interrupt controller in place of the emulated PIC.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|
#
53f4fed5 |
| 07-Sep-2020 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: drop get_api_version from Hypervisor trait
The new function already checks if the API version is compatible. There is no need to expose the get_api_version function to code outside hyper
hypervisor: drop get_api_version from Hypervisor trait
The new function already checks if the API version is compatible. There is no need to expose the get_api_version function to code outside hypervisor crate.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
d73971e4 |
| 07-Sep-2020 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: kvm: check API compatibility
Signed-off-by: Wei Liu <liuwe@microsoft.com>
|
#
afc98a5e |
| 23-Aug-2020 |
Michael Zhao <michael.zhao@arm.com> |
vmm: Fix AArch64 clippy warnings of vmm and other crates
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
|
#
92b4499c |
| 21-Aug-2020 |
Muminul Islam <muislam@microsoft.com> |
vmm, hypervisor: Add vmstate to snapshot and restore path
Signed-off-by: Muminul Islam <muislam@microsoft.com>
|
#
77e901a6 |
| 21-Aug-2020 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Introduce VM state to Vm hypervisor trait
We may need to store hypervisor speciific data to the VM. This support is needed for Microsoft hyperv implementations. This patch introduces two
hypervisor: Introduce VM state to Vm hypervisor trait
We may need to store hypervisor speciific data to the VM. This support is needed for Microsoft hyperv implementations. This patch introduces two new definitions to Vm trait and implements for KVM.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
#
0f1ab38d |
| 05-Aug-2020 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
hypervisor: kvm: Make MSRs set/get more flexible
Based on the way KVM_GET_MSRS and KVM_SET_MSRS work, both function are very unlikely to fail, as they simply stop looping through the list of MSRs as
hypervisor: kvm: Make MSRs set/get more flexible
Based on the way KVM_GET_MSRS and KVM_SET_MSRS work, both function are very unlikely to fail, as they simply stop looping through the list of MSRs as soon as getting or setting one fails. This is causing some issues with the snapshot/restore feature, as on some platforms, we only save a subset of the list of MSRs, leading to unproper way of saving the VM.
The way to address this issue is by checking the number of MSRs get/set matches the expected amount from the list. In case it does not match, we simply ignore the failing MSR and continue getting/setting the rest of the list. By doing this by iterations, we end up getting/setting as many MSRs as the platform can support.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
#
ddf1b769 |
| 21-Jul-2020 |
Michael Zhao <michael.zhao@arm.com> |
hypervisor: Refactor create_passthrough_device() for generic type
Changed the return type of create_passthrough_device() to generic type hypervisor::Device.
Signed-off-by: Michael Zhao <michael.zha
hypervisor: Refactor create_passthrough_device() for generic type
Changed the return type of create_passthrough_device() to generic type hypervisor::Device.
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
show more ...
|
#
e7288888 |
| 16-Jul-2020 |
Michael Zhao <michael.zhao@arm.com> |
hypervisor: Extend hypervisor crate with Device trait
Added Device trait and KvmDevice struct for KVM-emulated devices.
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
|
#
e1af251c |
| 17-Jul-2020 |
Wei Liu <liuwe@microsoft.com> |
vmm, hypervisor: adjust set_gsi_routing / set_gsi_routes
Make set_gsi_routing take a list of IrqRoutingEntry. The construction of hypervisor specific structure is left to set_gsi_routing.
Now set_g
vmm, hypervisor: adjust set_gsi_routing / set_gsi_routes
Make set_gsi_routing take a list of IrqRoutingEntry. The construction of hypervisor specific structure is left to set_gsi_routing.
Now set_gsi_routes, which is part of the interrupt module, is only responsible for constructing a list of routing entries.
This further splits hypervisor specific code from hypervisor agnostic code.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
ff8d7bfe |
| 17-Jul-2020 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: add create_passthrough_device call to Vm trait
That function is going to return a handle for passthrough related operations.
Move create_kvm_device code there.
Signed-off-by: Wei Liu <
hypervisor: add create_passthrough_device call to Vm trait
That function is going to return a handle for passthrough related operations.
Move create_kvm_device code there.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
e10d9b13 |
| 08-Jul-2020 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
arch, hypervisor, vmm: Patch CPUID subleaves to expose EPC sections
The support for SGX is exposed to the guest through CPUID 0x12. KVM passes static subleaves 0 and 1 from the host to the guest, wi
arch, hypervisor, vmm: Patch CPUID subleaves to expose EPC sections
The support for SGX is exposed to the guest through CPUID 0x12. KVM passes static subleaves 0 and 1 from the host to the guest, without needing any modification from the VMM itself.
But SGX also relies on dynamic subleaves 2 through N, used for describing each EPC section. This is not handled by KVM, which means the VMM is in charge of setting each subleaf starting from index 2 up to index N, depending on the number of EPC sections.
These subleaves 2 through N are not listed as part of the supported CPUID entries from KVM. But it's important to set them as long as index 0 and 1 are present and indicate that SGX is supported.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
#
cce62375 |
| 17-Jun-2020 |
Michael Zhao <michael.zhao@arm.com> |
pci: Enable GSI routing (MSI type) for AArch64
In this commit we saved the BDF of a PCI device and set it to "devid" in GSI routing entry, because this field is mandatory for GICv3-ITS.
Signed-off-
pci: Enable GSI routing (MSI type) for AArch64
In this commit we saved the BDF of a PCI device and set it to "devid" in GSI routing entry, because this field is mandatory for GICv3-ITS.
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
show more ...
|
#
82a0e29c |
| 07-Jul-2020 |
Michael Zhao <michael.zhao@arm.com> |
hypervisor: Export check_extension() API from hypervisor::Vm
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
|
#
a4f484bc |
| 03-Jul-2020 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: Define a VM-Exit abstraction
In order to move the hypervisor specific parts of the VM exit handling path, we're defining a generic, hypervisor agnostic VM exit enum.
This is what the hy
hypervisor: Define a VM-Exit abstraction
In order to move the hypervisor specific parts of the VM exit handling path, we're defining a generic, hypervisor agnostic VM exit enum.
This is what the hypervisor's Vcpu run() call should return when the VM exit can not be completely handled through the hypervisor specific bits. For KVM based hypervisors, this means directly forwarding the IO related exits back to the VMM itself. For other hypervisors that e.g. rely on the VMM to decode and emulate instructions, this means the decoding itself would happen in the hypervisor crate exclusively, and the rest of the VM exit handling would be handled through the VMM device model implementation.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Fix test_vm unit test by using the new abstraction and dropping some dead code.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
#
cfa758fb |
| 04-Jul-2020 |
Wei Liu <liuwe@microsoft.com> |
vmm, hypervisor: introduce and use make_user_memory_region
This removes the last KVM-ism from memory_manager. Also make use of that method in other places.
Signed-off-by: Wei Liu <liuwe@microsoft.c
vmm, hypervisor: introduce and use make_user_memory_region
This removes the last KVM-ism from memory_manager. Also make use of that method in other places.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|