mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-03 20:15:45 +00:00
virtio-devices, vmm: Upgrade restore related messages to info!()
These happen only sporadically so can be included at the info!() level. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
64e217cf39
commit
e475b12cf7
@ -331,7 +331,7 @@ impl VirtioCommon {
|
|||||||
|
|
||||||
impl Pausable for VirtioCommon {
|
impl Pausable for VirtioCommon {
|
||||||
fn pause(&mut self) -> std::result::Result<(), MigratableError> {
|
fn pause(&mut self) -> std::result::Result<(), MigratableError> {
|
||||||
debug!(
|
info!(
|
||||||
"Pausing virtio-{}",
|
"Pausing virtio-{}",
|
||||||
VirtioDeviceType::from(self.device_type)
|
VirtioDeviceType::from(self.device_type)
|
||||||
);
|
);
|
||||||
@ -353,7 +353,7 @@ impl Pausable for VirtioCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn resume(&mut self) -> std::result::Result<(), MigratableError> {
|
fn resume(&mut self) -> std::result::Result<(), MigratableError> {
|
||||||
debug!(
|
info!(
|
||||||
"Resuming virtio-{}",
|
"Resuming virtio-{}",
|
||||||
VirtioDeviceType::from(self.device_type)
|
VirtioDeviceType::from(self.device_type)
|
||||||
);
|
);
|
||||||
|
@ -131,11 +131,11 @@ impl EpollHelper {
|
|||||||
|
|
||||||
match ev_type {
|
match ev_type {
|
||||||
EPOLL_HELPER_EVENT_KILL => {
|
EPOLL_HELPER_EVENT_KILL => {
|
||||||
debug!("KILL_EVENT received, stopping epoll loop");
|
info!("KILL_EVENT received, stopping epoll loop");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
EPOLL_HELPER_EVENT_PAUSE => {
|
EPOLL_HELPER_EVENT_PAUSE => {
|
||||||
debug!("PAUSE_EVENT received, pausing epoll loop");
|
info!("PAUSE_EVENT received, pausing epoll loop");
|
||||||
|
|
||||||
// Acknowledge the pause is effective by using the
|
// Acknowledge the pause is effective by using the
|
||||||
// paused_sync barrier.
|
// paused_sync barrier.
|
||||||
|
@ -1605,7 +1605,7 @@ impl Snapshottable for CpuManager {
|
|||||||
|
|
||||||
fn restore(&mut self, snapshot: Snapshot) -> std::result::Result<(), MigratableError> {
|
fn restore(&mut self, snapshot: Snapshot) -> std::result::Result<(), MigratableError> {
|
||||||
for (cpu_id, snapshot) in snapshot.snapshots.iter() {
|
for (cpu_id, snapshot) in snapshot.snapshots.iter() {
|
||||||
debug!("Restoring VCPU {}", cpu_id);
|
info!("Restoring VCPU {}", cpu_id);
|
||||||
self.create_vcpu(cpu_id.parse::<u8>().unwrap(), None, Some(*snapshot.clone()))
|
self.create_vcpu(cpu_id.parse::<u8>().unwrap(), None, Some(*snapshot.clone()))
|
||||||
.map_err(|e| MigratableError::Restore(anyhow!("Could not create vCPU {:?}", e)))?;
|
.map_err(|e| MigratableError::Restore(anyhow!("Could not create vCPU {:?}", e)))?;
|
||||||
}
|
}
|
||||||
|
@ -2195,7 +2195,7 @@ impl DeviceManager {
|
|||||||
// Look for the id in the device tree. If it can be found, that means
|
// Look for the id in the device tree. If it can be found, that means
|
||||||
// the device is being restored, otherwise it's created from scratch.
|
// the device is being restored, otherwise it's created from scratch.
|
||||||
let cache_range = if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
let cache_range = if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
||||||
debug!("Restoring virtio-fs {} resources", id);
|
info!("Restoring virtio-fs {} resources", id);
|
||||||
|
|
||||||
let mut cache_range: Option<(u64, u64)> = None;
|
let mut cache_range: Option<(u64, u64)> = None;
|
||||||
for resource in node.resources.iter() {
|
for resource in node.resources.iter() {
|
||||||
@ -2352,7 +2352,7 @@ impl DeviceManager {
|
|||||||
// Look for the id in the device tree. If it can be found, that means
|
// Look for the id in the device tree. If it can be found, that means
|
||||||
// the device is being restored, otherwise it's created from scratch.
|
// the device is being restored, otherwise it's created from scratch.
|
||||||
let region_range = if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
let region_range = if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
||||||
debug!("Restoring virtio-pmem {} resources", id);
|
info!("Restoring virtio-pmem {} resources", id);
|
||||||
|
|
||||||
let mut region_range: Option<(u64, u64)> = None;
|
let mut region_range: Option<(u64, u64)> = None;
|
||||||
for resource in node.resources.iter() {
|
for resource in node.resources.iter() {
|
||||||
@ -3074,7 +3074,7 @@ impl DeviceManager {
|
|||||||
// the device is being restored, otherwise it's created from scratch.
|
// the device is being restored, otherwise it's created from scratch.
|
||||||
let (pci_device_bdf, config_bar_addr) =
|
let (pci_device_bdf, config_bar_addr) =
|
||||||
if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
if let Some(node) = self.device_tree.lock().unwrap().get(&id) {
|
||||||
debug!("Restoring virtio-pci {} resources", id);
|
info!("Restoring virtio-pci {} resources", id);
|
||||||
let pci_device_bdf = node
|
let pci_device_bdf = node
|
||||||
.pci_bdf
|
.pci_bdf
|
||||||
.ok_or(DeviceManagerError::MissingDeviceNodePciBdf)?;
|
.ok_or(DeviceManagerError::MissingDeviceNodePciBdf)?;
|
||||||
@ -3667,7 +3667,7 @@ impl DeviceManager {
|
|||||||
{
|
{
|
||||||
// Restore the node
|
// Restore the node
|
||||||
if let Some(migratable) = &node.migratable {
|
if let Some(migratable) = &node.migratable {
|
||||||
debug!("Restoring {} from DeviceManager", node.id);
|
info!("Restoring {} from DeviceManager", node.id);
|
||||||
if let Some(snapshot) = snapshot.snapshots.get(&node.id) {
|
if let Some(snapshot) = snapshot.snapshots.get(&node.id) {
|
||||||
migratable.lock().unwrap().pause()?;
|
migratable.lock().unwrap().pause()?;
|
||||||
migratable.lock().unwrap().restore(*snapshot.clone())?;
|
migratable.lock().unwrap().restore(*snapshot.clone())?;
|
||||||
|
Loading…
Reference in New Issue
Block a user