9c5b4044 | 30-Jun-2021 |
Wei Liu <liuwe@microsoft.com> |
vmm: MSHV now supports VFIO-based device passthrough
Drop a few feature gates and adjust code a bit.
Signed-off-by: Wei Liu <liuwe@microsoft.com> |
6e9d3ecc | 30-Jun-2021 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: implement devicefd management for MSHV
Signed-off-by: Wei Liu <liuwe@microsoft.com> |
d74a219a | 24-Aug-2021 |
Henry Wang <Henry.Wang@arm.com> |
hypervisor: Remove useless check when saving Arm SystemRegs
Signed-off-by: Henry Wang <Henry.Wang@arm.com> |
a90260ff | 27-Aug-2021 |
Jiaqi Gao <jiaqi.gao@intel.com> |
hypervisor: kvm: Update TDX command INIT_VM
Definition of kvm_tdx_init_vm used by INIT_VM has been updated in latest kernel, needing an update on the Cloud Hypervisor side as well.
Update structure
hypervisor: kvm: Update TDX command INIT_VM
Definition of kvm_tdx_init_vm used by INIT_VM has been updated in latest kernel, needing an update on the Cloud Hypervisor side as well.
Update structure TdxInitVm to fit this change and avoid -EINVAL to be returned by the kernel.
Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
81895b9b | 08-Jul-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Implement start/stop_dirty_log for MSHV
This patch modify the existing live migration code to support MSHV. Adds couple of new functions to enable and disable dirty page tracking. Add mi
hypervisor: Implement start/stop_dirty_log for MSHV
This patch modify the existing live migration code to support MSHV. Adds couple of new functions to enable and disable dirty page tracking. Add missing IOCTL to the seccomp rules for live migration. Adds necessary flags for MSHV. This changes don't affect KVM functionality at all.
In order to get better performance it is good to enable dirty page tracking when we start live migration and disable it when the migration is done.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
6492496c | 28-Jul-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Keep track of dirty memory slots for MSHV
Keep the memory slots for enabling/disabling dirty page tracking on MSHV.
Signed-off-by: Muminul Islam <muislam@microsoft.com> |
fdecba69 | 08-Jul-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: MSHV needs gpa to retrieve dirty logs
Right now, get_dirty_log API has two parameters, slot and memory_size. MSHV needs gpa to retrieve the page states. GPA is needed as MSHV returns the
hypervisor: MSHV needs gpa to retrieve dirty logs
Right now, get_dirty_log API has two parameters, slot and memory_size. MSHV needs gpa to retrieve the page states. GPA is needed as MSHV returns the state base on PFN.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
dcc646f5 | 29-Jul-2021 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
clippy: Fix redundant allocations
With the new beta version, clippy complains about redundant allocation when using Arc<Box<dyn T>>, and suggests replacing it simply with Arc<dyn T>.
Signed-off-by:
clippy: Fix redundant allocations
With the new beta version, clippy complains about redundant allocation when using Arc<Box<dyn T>>, and suggests replacing it simply with Arc<dyn T>.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
e7c9954d | 26-Jul-2021 |
Bo Chen <chen.bo@intel.com> |
hypervisor, vmm: Abstract the interfaces to start/stop dirty log
Following KVM interfaces, the `hypervisor` crate now provides interfaces to start/stop the dirty pages logging on a per region basis,
hypervisor, vmm: Abstract the interfaces to start/stop dirty log
Following KVM interfaces, the `hypervisor` crate now provides interfaces to start/stop the dirty pages logging on a per region basis, and asks its users (e.g. the `vmm` crate) to iterate over the regions that needs dirty pages log. MSHV only has a global control to start/stop dirty pages log on all regions at once.
This patch refactors related APIs from the `hypervisor` crate to provide a global control to start/stop dirty pages log (following MSHV's behaviors), and keeps tracking the regions need dirty pages log for KVM. It avoids leaking hypervisor-specific behaviors out of the `hypervisor` crate.
Signed-off-by: Bo Chen <chen.bo@intel.com>
show more ...
|
5e0d4985 | 22-Jul-2021 |
Bo Chen <chen.bo@intel.com> |
hypervisor, vmm: Add dynamic control of logging dirty pages
This patch extends slightly the current live-migration code path with the ability to dynamically start and stop logging dirty-pages, which
hypervisor, vmm: Add dynamic control of logging dirty pages
This patch extends slightly the current live-migration code path with the ability to dynamically start and stop logging dirty-pages, which relies on two new methods added to the `hypervisor::vm::Vm` Trait. This patch also contains a complete implementation of the two new methods based on `kvm` and placeholders for `mshv` in the `hypervisor` crate.
Fixes: #2858
Signed-off-by: Bo Chen <chen.bo@intel.com>
show more ...
|
9ec0c981 | 07-Jul-2021 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
hypervisor: Add enable_sgx_attribute to the Vm API
We need a dedicated function to enable the SGX attribute capability through the Hypervisor abstraction.
Signed-off-by: Sebastien Boeuf <sebastien.
hypervisor: Add enable_sgx_attribute to the Vm API
We need a dedicated function to enable the SGX attribute capability through the Hypervisor abstraction.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
1f2915bf | 03-Jul-2021 |
Wei Liu <liuwe@microsoft.com> |
vmm: hypervisor: split set_user_memory_region to two functions
Previously the same function was used to both create and remove regions. This worked on KVM because it uses size 0 to indicate removal.
vmm: hypervisor: split set_user_memory_region to two functions
Previously the same function was used to both create and remove regions. This worked on KVM because it uses size 0 to indicate removal.
MSHV has two calls -- one for creation and one for removal. It also requires having the size field available because it is not slot based.
Split set_user_memory_region to {create/remove}_user_memory_region. For KVM they still use set_user_memory_region underneath, but for MSHV they map to different functions.
This fixes user memory region removal on MSHV.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
show more ...
|
e214bb9e | 17-Jun-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: implement Display for MSHV VcpuState
This functionality is useful for Snapshot/Restore debugging.
Signed-off-by: Muminul Islam <muislam@microsoft.com> |
5cd82cb2 | 17-Jun-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: implement get_suspend_regs for MSHV vcpu trait
This vcpu API is necessary for MSHV related debugging. These two registers controls the vcpu_run in the /dev/mshv driver code.
Signed-off-
hypervisor: implement get_suspend_regs for MSHV vcpu trait
This vcpu API is necessary for MSHV related debugging. These two registers controls the vcpu_run in the /dev/mshv driver code.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
5825ab2d | 23-Jun-2021 |
Bo Chen <chen.bo@intel.com> |
clippy: Address the issue 'needless-borrow'
Issue from beta verion of clippy:
Error: --> vm-virtio/src/queue.rs:700:59 | 700 | if let Some(used_event) = self.get_used_event(&mem)
clippy: Address the issue 'needless-borrow'
Issue from beta verion of clippy:
Error: --> vm-virtio/src/queue.rs:700:59 | 700 | if let Some(used_event) = self.get_used_event(&mem) { | ^^^^ help: change this to: `mem` | = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Bo Chen <chen.bo@intel.com>
show more ...
|
5432cbfa | 22-Jun-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Set MTRRdefType in MSHV guest initialization to enable cpu caching
Initialize MTRR defType register the same way the KVM code does - WB caching by default. Tested with latest mshv code.
hypervisor: Set MTRRdefType in MSHV guest initialization to enable cpu caching
Initialize MTRR defType register the same way the KVM code does - WB caching by default. Tested with latest mshv code.
Without this patch, these lines are present in guest serial log: [ 0.000032] x86/PAT: MTRRs disabled, skipping PAT initialization too. [ 0.000036] CPU MTRRs all blank - virtualized system. This indicates the guest is detecting the set MTRR.
Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com> Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
652e30c9 | 22-Jun-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Fix clippy error on MSHV
This patch addresses this issue https://github.com/rust-lang/rust-bindgen/pull/2064. While we access field of packed struct the compiler can generate the correct
hypervisor: Fix clippy error on MSHV
This patch addresses this issue https://github.com/rust-lang/rust-bindgen/pull/2064. While we access field of packed struct the compiler can generate the correct code to create a temporary variable to access the packed struct field. Access withing {} ensures that.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
show more ...
|
49e061d1 | 22-Jun-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Fix hv_translate_gva_result_code with correct value
Signed-off-by: Muminul Islam <muislam@microsoft.com> |
2fe3586e | 09-Jun-2021 |
Henry Wang <Henry.Wang@arm.com> |
hypervisor: support AArch64 `get_host_ipa_limit`
Not all AArch64 platforms support IPAs up to 40 bits. Since the kvm-ioctl crate now supports `get_host_ipa_limit` for AArch64, when creating the VM,
hypervisor: support AArch64 `get_host_ipa_limit`
Not all AArch64 platforms support IPAs up to 40 bits. Since the kvm-ioctl crate now supports `get_host_ipa_limit` for AArch64, when creating the VM, it is better to get the IPA size from the host and use that to create the VM.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
show more ...
|
805cb303 | 09-Jun-2021 |
Henry Wang <Henry.Wang@arm.com> |
hypervisor: Add `get_host_ipa_limit` for AArch64
This commit adds a helper `get_host_ipa_limit` to the AArch64 `KvmHypervisor` struct. This helper can be used to get the `Host_IPA_Limit`, which is t
hypervisor: Add `get_host_ipa_limit` for AArch64
This commit adds a helper `get_host_ipa_limit` to the AArch64 `KvmHypervisor` struct. This helper can be used to get the `Host_IPA_Limit`, which is the maximum possible value for IPA_Bits on the host and is dependent on the CPU capability and the kernel configuration.
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
show more ...
|
c419d328 | 07-Jun-2021 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: emulator: emulate OR instruction
Signed-off-by: Wei Liu <liuwe@microsoft.com> |
d76743ed | 07-Jun-2021 |
Wei Liu <liuwe@microsoft.com> |
hypervisor: x86: make debug output more useful
The debug output should show the range of memory read from / written to.
Signed-off-by: Wei Liu <liuwe@microsoft.com> |
c7b794a7 | 18-May-2021 |
Muminul Islam <muislam@microsoft.com> |
hypervisor: Fix MSHV set_xsave API call
MSHV set_xsave got changed to fix the Snapshot and restore issue. This patch fixes the API call.
Signed-off-by: Muminul Islam <muislam@microsoft.com> |
9f5325fd | 01-Jun-2021 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: tdx: Unconditionally enable TDX debug
For now enable the TDX attribute for TDX debug.
Signed-off-by: Rob Bradford <robert.bradford@intel.com> |
84454f14 | 19-May-2021 |
Rob Bradford <robert.bradford@intel.com> |
hypervisor: Remove panic from Hypervisor::check_required_extensions()
Remove the panic by replacing the .expect() with a cleaner error handling.
Signed-off-by: Rob Bradford <robert.bradford@intel.c
hypervisor: Remove panic from Hypervisor::check_required_extensions()
Remove the panic by replacing the .expect() with a cleaner error handling.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|