mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
misc: Fix spelling issues
Misspellings were identified by: https://github.com/marketplace/actions/check-spelling * Initial corrections based on forbidden patterns from the action * Additional corrections by Google Chrome auto-suggest * Some manual corrections * Adding markdown bullets to readme credits section Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
46c5fb5f2c
commit
42e9632c53
@ -1,5 +1,5 @@
|
|||||||
include = ["**/Cargo.toml"]
|
include = ["**/Cargo.toml"]
|
||||||
|
|
||||||
[formatting]
|
[formatting]
|
||||||
reoder_arrays = true
|
reorder_arrays = true
|
||||||
reorder_keys = true
|
reorder_keys = true
|
||||||
|
@ -112,5 +112,5 @@ Fixes #88
|
|||||||
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, after the corresponding PR is merged, Github will automatically close that issue when parsing the
|
Then, after the corresponding PR is merged, GitHub will automatically close that issue when parsing the
|
||||||
[commit message](https://help.github.com/articles/closing-issues-via-commit-messages/).
|
[commit message](https://help.github.com/articles/closing-issues-via-commit-messages/).
|
||||||
|
@ -525,7 +525,7 @@ fn create_memory_node(
|
|||||||
let memory_region_size: u64 = memory_region.size() as u64;
|
let memory_region_size: u64 = memory_region.size() as u64;
|
||||||
mem_reg_prop.push(memory_region_start_addr);
|
mem_reg_prop.push(memory_region_start_addr);
|
||||||
mem_reg_prop.push(memory_region_size);
|
mem_reg_prop.push(memory_region_size);
|
||||||
// Set the node address the first non-zero regison address
|
// Set the node address the first non-zero region address
|
||||||
if node_memory_addr == 0 {
|
if node_memory_addr == 0 {
|
||||||
node_memory_addr = memory_region_start_addr;
|
node_memory_addr = memory_region_start_addr;
|
||||||
}
|
}
|
||||||
@ -571,7 +571,7 @@ fn create_memory_node(
|
|||||||
|
|
||||||
if ram_regions.len() > 2 {
|
if ram_regions.len() > 2 {
|
||||||
panic!(
|
panic!(
|
||||||
"There should be up to two non-continuous regions, devidided by the
|
"There should be up to two non-continuous regions, divided by the
|
||||||
gap at the end of 32bit address space."
|
gap at the end of 32bit address space."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -896,7 +896,7 @@ fn create_pci_nodes(
|
|||||||
for pci_device_info_elem in pci_device_info.iter() {
|
for pci_device_info_elem in pci_device_info.iter() {
|
||||||
// EDK2 requires the PCIe high space above 4G address.
|
// EDK2 requires the PCIe high space above 4G address.
|
||||||
// The actual space in CLH follows the RAM. If the RAM space is small, the PCIe high space
|
// The actual space in CLH follows the RAM. If the RAM space is small, the PCIe high space
|
||||||
// could fall bellow 4G.
|
// could fall below 4G.
|
||||||
// Here we cut off PCI device space below 8G in FDT to workaround the EDK2 check.
|
// Here we cut off PCI device space below 8G in FDT to workaround the EDK2 check.
|
||||||
// But the address written in ACPI is not impacted.
|
// But the address written in ACPI is not impacted.
|
||||||
let (pci_device_base_64bit, pci_device_size_64bit) =
|
let (pci_device_base_64bit, pci_device_size_64bit) =
|
||||||
|
@ -577,7 +577,7 @@ impl CpuidFeatureEntry {
|
|||||||
if !entry_compatible {
|
if !entry_compatible {
|
||||||
error!(
|
error!(
|
||||||
"Detected incompatible CPUID entry: leaf={:#02x} (subleaf={:#02x}), register='{:?}', \
|
"Detected incompatible CPUID entry: leaf={:#02x} (subleaf={:#02x}), register='{:?}', \
|
||||||
compatilbe_check='{:?}', source VM feature='{:#04x}', destination VM feature'{:#04x}'.",
|
compatible_check='{:?}', source VM feature='{:#04x}', destination VM feature'{:#04x}'.",
|
||||||
entry.function, entry.index, entry.feature_reg,
|
entry.function, entry.index, entry.feature_reg,
|
||||||
entry.compatible_check, src_vm_feature, dest_vm_feature
|
entry.compatible_check, src_vm_feature, dest_vm_feature
|
||||||
);
|
);
|
||||||
|
@ -450,7 +450,7 @@ impl BusDevice for Tpm {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
error!("Invalid value passed to CRTL_REQ register");
|
error!("Invalid value passed to CTRL_REQ register");
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -159,10 +159,10 @@ as we might need to update the direct kernel boot command line, replacing
|
|||||||
|
|
||||||
Update all references to the previous image name to the new one.
|
Update all references to the previous image name to the new one.
|
||||||
|
|
||||||
## NVIDIA image for VFIO baremetal CI
|
## NVIDIA image for VFIO bare-metal CI
|
||||||
|
|
||||||
Here we are going to describe how to create a cloud image that contains the
|
Here we are going to describe how to create a cloud image that contains the
|
||||||
necessary NVIDIA drivers for our VFIO baremetal CI.
|
necessary NVIDIA drivers for our VFIO bare-metal CI.
|
||||||
|
|
||||||
### Download base image
|
### Download base image
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Cloud Hypervisor uses [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) for fuzzing individual components.
|
Cloud Hypervisor uses [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) for fuzzing individual components.
|
||||||
|
|
||||||
The fuzzers are are in the `fuzz/fuzz_targets` directory
|
The fuzzers are in the `fuzz/fuzz_targets` directory
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ On-line CPU(s) list: 0-7
|
|||||||
|
|
||||||
After a reboot the added CPUs will remain.
|
After a reboot the added CPUs will remain.
|
||||||
|
|
||||||
Removing CPUs works similarly by reducing the number in the "desired_vcpus" field of the reisze API. The CPUs will be automatically offlined inside the guest so there is no need to run any commands inside the guest:
|
Removing CPUs works similarly by reducing the number in the "desired_vcpus" field of the resize API. The CPUs will be automatically offlined inside the guest so there is no need to run any commands inside the guest:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./ch-remote --api-socket=/tmp/ch-socket resize --cpus 2
|
./ch-remote --api-socket=/tmp/ch-socket resize --cpus 2
|
||||||
|
@ -466,7 +466,7 @@ List of virtual CPUs attached to the guest NUMA node identified by the
|
|||||||
`guest_numa_id` option. This allows for describing a list of CPUs which
|
`guest_numa_id` option. This allows for describing a list of CPUs which
|
||||||
must be seen by the guest as belonging to the NUMA node `guest_numa_id`.
|
must be seen by the guest as belonging to the NUMA node `guest_numa_id`.
|
||||||
|
|
||||||
One can use this option for a fine grained description of the NUMA topology
|
One can use this option for a fine-grained description of the NUMA topology
|
||||||
regarding the CPUs associated with it, which might help the guest run more
|
regarding the CPUs associated with it, which might help the guest run more
|
||||||
efficiently.
|
efficiently.
|
||||||
|
|
||||||
@ -573,7 +573,7 @@ _Example_
|
|||||||
### PCI bus
|
### PCI bus
|
||||||
|
|
||||||
Cloud Hypervisor supports guests with one or more PCI segments. The default PCI segment always
|
Cloud Hypervisor supports guests with one or more PCI segments. The default PCI segment always
|
||||||
has affinity to NUMA node 0. Be default, all other PCI segments have afffinity to NUMA node 0.
|
has affinity to NUMA node 0. Be default, all other PCI segments have affinity to NUMA node 0.
|
||||||
The user may configure the NUMA affinity for any additional PCI segments.
|
The user may configure the NUMA affinity for any additional PCI segments.
|
||||||
|
|
||||||
_Example_
|
_Example_
|
||||||
|
@ -95,7 +95,7 @@ E - EOL
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### LTS Stablity Considerations
|
### LTS Stability Considerations
|
||||||
|
|
||||||
An LTS release is just a `MAJOR` release for which point releases are made for
|
An LTS release is just a `MAJOR` release for which point releases are made for
|
||||||
longer following the same rules for what can be backported to a `POINT` release.
|
longer following the same rules for what can be backported to a `POINT` release.
|
||||||
|
@ -37,6 +37,6 @@ generating traces of the boot. These can be relocated for focus tracing on a
|
|||||||
narrow part of the code base.
|
narrow part of the code base.
|
||||||
|
|
||||||
A `tracer::trace_point!()` macro is also provided for an instantaneous trace
|
A `tracer::trace_point!()` macro is also provided for an instantaneous trace
|
||||||
point however this is not in use in the code base currently nor is handled by
|
point however this is neither in use in the code base currently nor is handled by
|
||||||
the visualisation script due to the difficulty in representation in the SVG.
|
the visualisation script due to the difficulty in representation in the SVG.
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ pub trait Hypervisor: Send + Sync {
|
|||||||
CpuVendor::AMD
|
CpuVendor::AMD
|
||||||
} else {
|
} else {
|
||||||
// Not known yet, the corresponding manufacturer manual should contain the
|
// Not known yet, the corresponding manufacturer manual should contain the
|
||||||
// necesssary info. See also https://wiki.osdev.org/CPUID#CPU_Vendor_ID_String
|
// necessary info. See also https://wiki.osdev.org/CPUID#CPU_Vendor_ID_String
|
||||||
CpuVendor::default()
|
CpuVendor::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ const KVM_ARM64_SYSREG_MPIDR_EL1: u64 = KVM_REG_ARM64
|
|||||||
| (((5_u64) << KVM_REG_ARM64_SYSREG_OP2_SHIFT) & KVM_REG_ARM64_SYSREG_OP2_MASK as u64);
|
| (((5_u64) << KVM_REG_ARM64_SYSREG_OP2_SHIFT) & KVM_REG_ARM64_SYSREG_OP2_MASK as u64);
|
||||||
|
|
||||||
/// This is how we represent the registers of a distributor.
|
/// This is how we represent the registers of a distributor.
|
||||||
/// It is relrvant their offset from the base address of the
|
/// It is relevant their offset from the base address of the
|
||||||
/// distributor.
|
/// distributor.
|
||||||
/// Each register has a different number
|
/// Each register has a different number
|
||||||
/// of bits_per_irq and is therefore variable length.
|
/// of bits_per_irq and is therefore variable length.
|
||||||
|
@ -1505,7 +1505,7 @@ impl cpu::Vcpu for KvmVcpu {
|
|||||||
|
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
///
|
///
|
||||||
/// Set the floating point state (FPU) of a vCPU using the `KVM_SET_FPU` ioct.
|
/// Set the floating point state (FPU) of a vCPU using the `KVM_SET_FPU` ioctl.
|
||||||
///
|
///
|
||||||
fn set_fpu(&self, fpu: &FpuState) -> cpu::Result<()> {
|
fn set_fpu(&self, fpu: &FpuState) -> cpu::Result<()> {
|
||||||
let fpu: kvm_bindings::kvm_fpu = (*fpu).clone().into();
|
let fpu: kvm_bindings::kvm_fpu = (*fpu).clone().into();
|
||||||
@ -1986,7 +1986,7 @@ impl cpu::Vcpu for KvmVcpu {
|
|||||||
/// SREGS saves/restores a pending interrupt, similar to what
|
/// SREGS saves/restores a pending interrupt, similar to what
|
||||||
/// VCPU_EVENTS also does.
|
/// VCPU_EVENTS also does.
|
||||||
///
|
///
|
||||||
/// GET_MSRS requires a pre-populated data structure to do something
|
/// GET_MSRS requires a prepopulated data structure to do something
|
||||||
/// meaningful. For SET_MSRS it will then contain good data.
|
/// meaningful. For SET_MSRS it will then contain good data.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
|
@ -1329,7 +1329,7 @@ impl cpu::Vcpu for MshvVcpu {
|
|||||||
self.set_fpu(&state.fpu)?;
|
self.set_fpu(&state.fpu)?;
|
||||||
self.set_xcrs(&state.xcrs)?;
|
self.set_xcrs(&state.xcrs)?;
|
||||||
// These registers are global and needed to be set only for first VCPU
|
// These registers are global and needed to be set only for first VCPU
|
||||||
// as Microsoft Hypervisor allows setting this regsier for only one VCPU
|
// as Microsoft Hypervisor allows setting this register for only one VCPU
|
||||||
if self.vp_index == 0 {
|
if self.vp_index == 0 {
|
||||||
self.fd
|
self.fd
|
||||||
.set_misc_regs(&state.misc)
|
.set_misc_regs(&state.misc)
|
||||||
|
@ -190,7 +190,7 @@ pub enum HypervisorVmError {
|
|||||||
/// Assert virtual interrupt error
|
/// Assert virtual interrupt error
|
||||||
///
|
///
|
||||||
#[error("Failed to assert virtual Interrupt: {0}")]
|
#[error("Failed to assert virtual Interrupt: {0}")]
|
||||||
AsserttVirtualInterrupt(#[source] anyhow::Error),
|
AssertVirtualInterrupt(#[source] anyhow::Error),
|
||||||
|
|
||||||
#[cfg(feature = "sev_snp")]
|
#[cfg(feature = "sev_snp")]
|
||||||
///
|
///
|
||||||
|
@ -418,7 +418,7 @@ impl NetQueuePair {
|
|||||||
.map_or(false, |r| r.is_blocked());
|
.map_or(false, |r| r.is_blocked());
|
||||||
|
|
||||||
// Stop listening on the `RX_TAP_EVENT` when:
|
// Stop listening on the `RX_TAP_EVENT` when:
|
||||||
// 1) there is no available describles, or
|
// 1) there is no available describes, or
|
||||||
// 2) the RX rate limit is reached.
|
// 2) the RX rate limit is reached.
|
||||||
if self.rx_tap_listening && (!self.rx_desc_avail || rate_limit_reached) {
|
if self.rx_tap_listening && (!self.rx_desc_avail || rate_limit_reached) {
|
||||||
unregister_listener(
|
unregister_listener(
|
||||||
|
@ -291,7 +291,7 @@ pub enum PciExpressCapabilityId {
|
|||||||
VfResizeableBar = 0x0024,
|
VfResizeableBar = 0x0024,
|
||||||
DataLinkFeature = 0x0025,
|
DataLinkFeature = 0x0025,
|
||||||
PhysicalLayerSixteenGts = 0x0026,
|
PhysicalLayerSixteenGts = 0x0026,
|
||||||
LaneMargeningAtTheReceiver = 0x0027,
|
LaneMarginingAtTheReceiver = 0x0027,
|
||||||
HierarchyId = 0x0028,
|
HierarchyId = 0x0028,
|
||||||
NativePcieEnclosureManagement = 0x0029,
|
NativePcieEnclosureManagement = 0x0029,
|
||||||
PhysicalLayerThirtyTwoGts = 0x002a,
|
PhysicalLayerThirtyTwoGts = 0x002a,
|
||||||
@ -345,7 +345,7 @@ impl From<u16> for PciExpressCapabilityId {
|
|||||||
0x0024 => PciExpressCapabilityId::VfResizeableBar,
|
0x0024 => PciExpressCapabilityId::VfResizeableBar,
|
||||||
0x0025 => PciExpressCapabilityId::DataLinkFeature,
|
0x0025 => PciExpressCapabilityId::DataLinkFeature,
|
||||||
0x0026 => PciExpressCapabilityId::PhysicalLayerSixteenGts,
|
0x0026 => PciExpressCapabilityId::PhysicalLayerSixteenGts,
|
||||||
0x0027 => PciExpressCapabilityId::LaneMargeningAtTheReceiver,
|
0x0027 => PciExpressCapabilityId::LaneMarginingAtTheReceiver,
|
||||||
0x0028 => PciExpressCapabilityId::HierarchyId,
|
0x0028 => PciExpressCapabilityId::HierarchyId,
|
||||||
0x0029 => PciExpressCapabilityId::NativePcieEnclosureManagement,
|
0x0029 => PciExpressCapabilityId::NativePcieEnclosureManagement,
|
||||||
0x002a => PciExpressCapabilityId::PhysicalLayerThirtyTwoGts,
|
0x002a => PciExpressCapabilityId::PhysicalLayerThirtyTwoGts,
|
||||||
|
@ -199,7 +199,7 @@ fn parse_boot_time_output(output: &[u8]) -> Result<f64, Error> {
|
|||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
t[7].eq("seconds"),
|
t[7].eq("seconds"),
|
||||||
"Expecting 'seconds' as the the last word of the 'Debug I/O port' output"
|
"Expecting 'seconds' as the last word of the 'Debug I/O port' output"
|
||||||
);
|
);
|
||||||
|
|
||||||
t[6].parse::<f64>().unwrap()
|
t[6].parse::<f64>().unwrap()
|
||||||
@ -226,7 +226,7 @@ fn parse_boot_time_output(output: &[u8]) -> Result<f64, Error> {
|
|||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
t[7].eq("seconds"),
|
t[7].eq("seconds"),
|
||||||
"Expecting 'seconds' as the the last word of the 'Debug I/O port' output"
|
"Expecting 'seconds' as the last word of the 'Debug I/O port' output"
|
||||||
);
|
);
|
||||||
|
|
||||||
t[6].parse::<f64>().unwrap()
|
t[6].parse::<f64>().unwrap()
|
||||||
|
@ -1081,7 +1081,7 @@ releases of the LTS.
|
|||||||
|
|
||||||
### Virtualised TPM Support
|
### Virtualised TPM Support
|
||||||
|
|
||||||
Support for adding an emulated CRB TPM has been added. This has it's own [TPM
|
Support for adding an emulated CRB TPM has been added. This has its own [TPM
|
||||||
documentation](docs/tpm.md).
|
documentation](docs/tpm.md).
|
||||||
|
|
||||||
### Transparent Huge Page Support
|
### Transparent Huge Page Support
|
||||||
@ -1272,7 +1272,7 @@ plan to use alternatives.
|
|||||||
The following functionality has been removed:
|
The following functionality has been removed:
|
||||||
|
|
||||||
* The unused `poll_queue` parameter has been removed from `--disk` and
|
* The unused `poll_queue` parameter has been removed from `--disk` and
|
||||||
equivalent. This was residual from the the removal of the `vhost-user-block`
|
equivalent. This was residual from the removal of the `vhost-user-block`
|
||||||
spawning feature (#4402.)
|
spawning feature (#4402.)
|
||||||
|
|
||||||
### Contributors
|
### Contributors
|
||||||
@ -2094,19 +2094,19 @@ Deprecated features will be removed in a subsequent release and users should pla
|
|||||||
Many thanks to everyone who has contributed to our 0.14.0 release including
|
Many thanks to everyone who has contributed to our 0.14.0 release including
|
||||||
some new faces.
|
some new faces.
|
||||||
|
|
||||||
Bo Chen <chen.bo@intel.com>
|
* Bo Chen <chen.bo@intel.com>
|
||||||
Henry Wang <Henry.Wang@arm.com>
|
* Henry Wang <Henry.Wang@arm.com>
|
||||||
Iggy Jackson <iggy@theiggy.com>
|
* Iggy Jackson <iggy@theiggy.com>
|
||||||
Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
|
* Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
|
||||||
Michael Zhao <michael.zhao@arm.com>
|
* Michael Zhao <michael.zhao@arm.com>
|
||||||
Muminul Islam <muislam@microsoft.com>
|
* Muminul Islam <muislam@microsoft.com>
|
||||||
Penny Zheng <Penny.Zheng@arm.com>
|
* Penny Zheng <Penny.Zheng@arm.com>
|
||||||
Rob Bradford <robert.bradford@intel.com>
|
* Rob Bradford <robert.bradford@intel.com>
|
||||||
Sebastien Boeuf <sebastien.boeuf@intel.com>
|
* Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||||
Vineeth Pillai <viremana@linux.microsoft.com>
|
* Vineeth Pillai <viremana@linux.microsoft.com>
|
||||||
Wei Liu <liuwe@microsoft.com>
|
* Wei Liu <liuwe@microsoft.com>
|
||||||
William Douglas <william.r.douglas@gmail.com>
|
* William Douglas <william.r.douglas@gmail.com>
|
||||||
Zide Chen <zide.chen@intel.com>
|
* Zide Chen <zide.chen@intel.com>
|
||||||
|
|
||||||
# v0.13.0
|
# v0.13.0
|
||||||
|
|
||||||
@ -2191,7 +2191,7 @@ removed.
|
|||||||
### Migration of `vhost-user-fs` backend
|
### Migration of `vhost-user-fs` backend
|
||||||
|
|
||||||
The `vhost-user-fs` backend is no longer included in Cloud Hypervisor and it is
|
The `vhost-user-fs` backend is no longer included in Cloud Hypervisor and it is
|
||||||
instead hosted in [it's own
|
instead hosted in [its own
|
||||||
repository](https://gitlab.com/virtio-fs/virtiofsd-rs)
|
repository](https://gitlab.com/virtio-fs/virtiofsd-rs)
|
||||||
|
|
||||||
### Enhanced "info" API
|
### Enhanced "info" API
|
||||||
@ -2325,7 +2325,7 @@ Some `virtio-block` device drivers may generate requests with multiple descripto
|
|||||||
|
|
||||||
### Memory Zones
|
### Memory Zones
|
||||||
|
|
||||||
Support has been added for fine grained control of memory allocation for the guest. This includes controlling the backing of sections of guest memory, assigning to specific host NUMA nodes and assigning memory and vCPUs to specific memory nodes inside the guest. Full details of this can be found in the [memory documentation](docs/memory.md).
|
Support has been added for fine-grained control of memory allocation for the guest. This includes controlling the backing of sections of guest memory, assigning to specific host NUMA nodes and assigning memory and vCPUs to specific memory nodes inside the guest. Full details of this can be found in the [memory documentation](docs/memory.md).
|
||||||
|
|
||||||
### `Seccomp` Sandbox Improvements
|
### `Seccomp` Sandbox Improvements
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# This set of vfio tests require to be ran on a specific machine with
|
# This set of vfio tests require to be ran on a specific machine with
|
||||||
# specific hardware (e.g. the "vfio" bera-metal worker equipped with a
|
# specific hardware (e.g. the "vfio" bare-metal worker equipped with a
|
||||||
# Nvidia Tesla T4 card). So the provisioning of the running machine is
|
# Nvidia Tesla T4 card). So the provisioning of the running machine is
|
||||||
# out of the scope of this script, including the custom guest image with
|
# out of the scope of this script, including the custom guest image with
|
||||||
# Nvidia drivers installed, and properly configured Nvidia Tesla T4 card.
|
# Nvidia drivers installed, and properly configured Nvidia Tesla T4 card.
|
||||||
|
@ -800,7 +800,7 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
|
|||||||
// The table has initially 64 entries on amd64 and every time it fills up, a new
|
// The table has initially 64 entries on amd64 and every time it fills up, a new
|
||||||
// table is created, double the size of the current one, and the entries are
|
// table is created, double the size of the current one, and the entries are
|
||||||
// copied to the new table. The filesystem code that does this uses
|
// copied to the new table. The filesystem code that does this uses
|
||||||
// synchronize_rcu() to ensure all pre-existing RCU read-side critical sections
|
// synchronize_rcu() to ensure all preexisting RCU read-side critical sections
|
||||||
// have completed:
|
// have completed:
|
||||||
//
|
//
|
||||||
// https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/file.c?h=v6.9.1#n162
|
// https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/file.c?h=v6.9.1#n162
|
||||||
|
@ -264,7 +264,7 @@ impl DiskConfig for UbuntuDiskConfig {
|
|||||||
fs::File::open(source_file_dir.join("user-data"))
|
fs::File::open(source_file_dir.join("user-data"))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.read_to_string(&mut user_data_string)
|
.read_to_string(&mut user_data_string)
|
||||||
.expect("Expected reading user-data file in to succeed");
|
.expect("Expected reading user-data file to succeed");
|
||||||
user_data_string = user_data_string.replace(
|
user_data_string = user_data_string.replace(
|
||||||
"@DEFAULT_TCP_LISTENER_MESSAGE",
|
"@DEFAULT_TCP_LISTENER_MESSAGE",
|
||||||
DEFAULT_TCP_LISTENER_MESSAGE,
|
DEFAULT_TCP_LISTENER_MESSAGE,
|
||||||
@ -283,7 +283,7 @@ impl DiskConfig for UbuntuDiskConfig {
|
|||||||
fs::File::open(source_file_dir.join("network-config"))
|
fs::File::open(source_file_dir.join("network-config"))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.read_to_string(&mut network_config_string)
|
.read_to_string(&mut network_config_string)
|
||||||
.expect("Expected reading network-config file in to succeed");
|
.expect("Expected reading network-config file to succeed");
|
||||||
|
|
||||||
network_config_string = network_config_string.replace("192.168.2.1", &network.host_ip);
|
network_config_string = network_config_string.replace("192.168.2.1", &network.host_ip);
|
||||||
network_config_string = network_config_string.replace("192.168.2.2", &network.guest_ip);
|
network_config_string = network_config_string.replace("192.168.2.2", &network.guest_ip);
|
||||||
@ -1622,7 +1622,7 @@ pub fn measure_virtio_net_throughput(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !failed {
|
if !failed {
|
||||||
// Safe to unwrap as we know the child has terminated succesffully
|
// Safe to unwrap as we know the child has terminated successfully
|
||||||
let output = c.wait_with_output().unwrap();
|
let output = c.wait_with_output().unwrap();
|
||||||
results.push(parse_iperf3_output(&output.stdout, receive, bandwidth)?);
|
results.push(parse_iperf3_output(&output.stdout, receive, bandwidth)?);
|
||||||
} else {
|
} else {
|
||||||
|
@ -9061,7 +9061,7 @@ mod live_migration {
|
|||||||
dest_api_socket: &str,
|
dest_api_socket: &str,
|
||||||
local: bool,
|
local: bool,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
// Start to receive migration from the destintion VM
|
// Start to receive migration from the destination VM
|
||||||
let mut receive_migration = Command::new(clh_command("ch-remote"))
|
let mut receive_migration = Command::new(clh_command("ch-remote"))
|
||||||
.args([
|
.args([
|
||||||
&format!("--api-socket={dest_api_socket}"),
|
&format!("--api-socket={dest_api_socket}"),
|
||||||
@ -9258,7 +9258,7 @@ mod live_migration {
|
|||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
guest.wait_vm_boot(None).unwrap();
|
guest.wait_vm_boot(None).unwrap();
|
||||||
|
|
||||||
// Make sure the source VM is functaionl
|
// Make sure the source VM is functional
|
||||||
// Check the number of vCPUs
|
// Check the number of vCPUs
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
|
|
||||||
@ -9326,7 +9326,7 @@ mod live_migration {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post live-migration check to make sure the destination VM is funcational
|
// Post live-migration check to make sure the destination VM is functional
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Perform same checks to validate VM has been properly migrated
|
// Perform same checks to validate VM has been properly migrated
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
@ -9340,7 +9340,7 @@ mod live_migration {
|
|||||||
let dest_output = dest_child.wait_with_output().unwrap();
|
let dest_output = dest_child.wait_with_output().unwrap();
|
||||||
handle_child_output(r, &dest_output);
|
handle_child_output(r, &dest_output);
|
||||||
|
|
||||||
// Check the destination VM has the expected 'concole_text' from its output
|
// Check the destination VM has the expected 'console_text' from its output
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
||||||
});
|
});
|
||||||
@ -9422,7 +9422,7 @@ mod live_migration {
|
|||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
guest.wait_vm_boot(None).unwrap();
|
guest.wait_vm_boot(None).unwrap();
|
||||||
|
|
||||||
// Make sure the source VM is functaionl
|
// Make sure the source VM is functional
|
||||||
// Check the number of vCPUs
|
// Check the number of vCPUs
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
|
|
||||||
@ -9500,7 +9500,7 @@ mod live_migration {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post live-migration check to make sure the destination VM is funcational
|
// Post live-migration check to make sure the destination VM is functional
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Perform same checks to validate VM has been properly migrated
|
// Perform same checks to validate VM has been properly migrated
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
@ -9529,7 +9529,7 @@ mod live_migration {
|
|||||||
let dest_output = dest_child.wait_with_output().unwrap();
|
let dest_output = dest_child.wait_with_output().unwrap();
|
||||||
handle_child_output(r, &dest_output);
|
handle_child_output(r, &dest_output);
|
||||||
|
|
||||||
// Check the destination VM has the expected 'concole_text' from its output
|
// Check the destination VM has the expected 'console_text' from its output
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
||||||
});
|
});
|
||||||
@ -9623,7 +9623,7 @@ mod live_migration {
|
|||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
guest.wait_vm_boot(None).unwrap();
|
guest.wait_vm_boot(None).unwrap();
|
||||||
|
|
||||||
// Make sure the source VM is functaionl
|
// Make sure the source VM is functional
|
||||||
// Check the number of vCPUs
|
// Check the number of vCPUs
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
|
|
||||||
@ -9718,7 +9718,7 @@ mod live_migration {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post live-migration check to make sure the destination VM is funcational
|
// Post live-migration check to make sure the destination VM is functional
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Perform same checks to validate VM has been properly migrated
|
// Perform same checks to validate VM has been properly migrated
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
@ -9776,7 +9776,7 @@ mod live_migration {
|
|||||||
let dest_output = dest_child.wait_with_output().unwrap();
|
let dest_output = dest_child.wait_with_output().unwrap();
|
||||||
handle_child_output(r, &dest_output);
|
handle_child_output(r, &dest_output);
|
||||||
|
|
||||||
// Check the destination VM has the expected 'concole_text' from its output
|
// Check the destination VM has the expected 'console_text' from its output
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
||||||
});
|
});
|
||||||
@ -9849,7 +9849,7 @@ mod live_migration {
|
|||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
guest.wait_vm_boot(None).unwrap();
|
guest.wait_vm_boot(None).unwrap();
|
||||||
|
|
||||||
// Make sure the source VM is functaionl
|
// Make sure the source VM is functional
|
||||||
// Check the number of vCPUs
|
// Check the number of vCPUs
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
// Check the guest RAM
|
// Check the guest RAM
|
||||||
@ -9934,7 +9934,7 @@ mod live_migration {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post live-migration check to make sure the destination VM is funcational
|
// Post live-migration check to make sure the destination VM is functional
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Perform same checks to validate VM has been properly migrated
|
// Perform same checks to validate VM has been properly migrated
|
||||||
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
assert_eq!(guest.get_cpu_count().unwrap_or_default(), boot_vcpus);
|
||||||
@ -9975,7 +9975,7 @@ mod live_migration {
|
|||||||
let dest_output = dest_child.wait_with_output().unwrap();
|
let dest_output = dest_child.wait_with_output().unwrap();
|
||||||
handle_child_output(r, &dest_output);
|
handle_child_output(r, &dest_output);
|
||||||
|
|
||||||
// Check the destination VM has the expected 'concole_text' from its output
|
// Check the destination VM has the expected 'console_text' from its output
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
assert!(String::from_utf8_lossy(&dest_output.stdout).contains(&console_text));
|
||||||
});
|
});
|
||||||
@ -10044,7 +10044,7 @@ mod live_migration {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Post live-migration check to make sure the destination VM is funcational
|
// Post live-migration check to make sure the destination VM is functional
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
// Perform same checks to validate VM has been properly migrated
|
// Perform same checks to validate VM has been properly migrated
|
||||||
// Spawn a new netcat listener in the OVS VM
|
// Spawn a new netcat listener in the OVS VM
|
||||||
@ -10126,7 +10126,7 @@ mod live_migration {
|
|||||||
mod live_migration_sequential {
|
mod live_migration_sequential {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
// NUMA & baalloon live migration tests are large so run sequentially
|
// NUMA & balloon live migration tests are large so run sequentially
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_live_migration_balloon() {
|
fn test_live_migration_balloon() {
|
||||||
|
@ -181,7 +181,7 @@ impl Emulator {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if minimum set of capabitlies are supported
|
/// Check if minimum set of capabilities are supported
|
||||||
fn check_caps(&mut self) -> bool {
|
fn check_caps(&mut self) -> bool {
|
||||||
/* min. required capabilities for TPM 2.0*/
|
/* min. required capabilities for TPM 2.0*/
|
||||||
let caps: PtmCap = PTM_CAP_INIT
|
let caps: PtmCap = PTM_CAP_INIT
|
||||||
|
@ -247,7 +247,7 @@ impl BlockEpollHandler {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn find_inflight_request(&mut self, completed_head: u16) -> Result<Request> {
|
fn find_inflight_request(&mut self, completed_head: u16) -> Result<Request> {
|
||||||
// This loop neatly handles the fast path where the completions are
|
// This loop neatly handles the fast path where the completions are
|
||||||
// in order (it turng into just a pop_front()) and the 1% of the time
|
// in order (it turns into just a pop_front()) and the 1% of the time
|
||||||
// (analysis during boot) where slight out of ordering has been
|
// (analysis during boot) where slight out of ordering has been
|
||||||
// observed e.g.
|
// observed e.g.
|
||||||
// Submissions: 1 2 3 4 5 6 7
|
// Submissions: 1 2 3 4 5 6 7
|
||||||
|
@ -126,7 +126,7 @@ pub trait VsockEpollListener {
|
|||||||
/// Get the set of events for which the listener wants to be notified.
|
/// Get the set of events for which the listener wants to be notified.
|
||||||
fn get_polled_evset(&self) -> epoll::Events;
|
fn get_polled_evset(&self) -> epoll::Events;
|
||||||
|
|
||||||
/// Notify the listener that one ore more events have occurred.
|
/// Notify the listener that one or more events have occurred.
|
||||||
fn notify(&mut self, evset: epoll::Events);
|
fn notify(&mut self, evset: epoll::Events);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ impl VsockPacket {
|
|||||||
buf_size: 0,
|
buf_size: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
// No point looking for a data/buffer descriptor, if the packet is zero-lengthed.
|
// No point looking for a data/buffer descriptor, if the packet is zero-length.
|
||||||
if pkt.is_empty() {
|
if pkt.is_empty() {
|
||||||
return Ok(pkt);
|
return Ok(pkt);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
//! `VsockConnection`.
|
//! `VsockConnection`.
|
||||||
//!
|
//!
|
||||||
//! The muxer gets notified about all of these events, because, as a `VsockEpollListener`
|
//! The muxer gets notified about all of these events, because, as a `VsockEpollListener`
|
||||||
//! implementor, it gets to register a nested epoll FD into the main VMM epolling loop. All
|
//! implementor, it gets to register a nested epoll FD into the main VMM epoll()ing loop. All
|
||||||
//! other pollable FDs are then registered under this nested epoll FD.
|
//! other pollable FDs are then registered under this nested epoll FD.
|
||||||
//!
|
//!
|
||||||
//! To route all these events to their handlers, the muxer uses another `HashMap` object,
|
//! To route all these events to their handlers, the muxer uses another `HashMap` object,
|
||||||
|
@ -151,7 +151,7 @@ pub enum ApiError {
|
|||||||
/// The vsock device could not be added to the VM.
|
/// The vsock device could not be added to the VM.
|
||||||
VmAddVsock(VmError),
|
VmAddVsock(VmError),
|
||||||
|
|
||||||
/// Error starting migration receiever
|
/// Error starting migration receiver
|
||||||
VmReceiveMigration(MigratableError),
|
VmReceiveMigration(MigratableError),
|
||||||
|
|
||||||
/// Error starting migration sender
|
/// Error starting migration sender
|
||||||
|
@ -2488,7 +2488,7 @@ impl VmConfig {
|
|||||||
return Err(ValidationError::CpuTopologyZeroPart);
|
return Err(ValidationError::CpuTopologyZeroPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The setting of dies doesen't apply on AArch64.
|
// The setting of dies doesn't apply on AArch64.
|
||||||
// Only '1' value is accepted, so its impact on the vcpu topology
|
// Only '1' value is accepted, so its impact on the vcpu topology
|
||||||
// setting can be ignored.
|
// setting can be ignored.
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
|
@ -1766,7 +1766,7 @@ impl MemoryManager {
|
|||||||
};
|
};
|
||||||
if ret != 0 {
|
if ret != 0 {
|
||||||
let e = io::Error::last_os_error();
|
let e = io::Error::last_os_error();
|
||||||
warn!("Failed to mark mappin as MADV_DONTDUMP: {}", e);
|
warn!("Failed to mark mapping as MADV_DONTDUMP: {}", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark the pages as mergeable if explicitly asked for.
|
// Mark the pages as mergeable if explicitly asked for.
|
||||||
|
Loading…
Reference in New Issue
Block a user