Skip to content

Commit dcce4e6

Browse files
committed
vmm: api: Add developer preview warning for device hot-plugging
Use log_dev_preview_warning() to warn the user about hot-plugging and unplugging being in developer preview and that it's possible that the APIs might change. Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
1 parent ad4b3b8 commit dcce4e6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vmm/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ use crate::devices::virtio::net::Net;
143143
use crate::devices::virtio::pmem::device::Pmem;
144144
use crate::devices::virtio::rng::Entropy;
145145
use crate::devices::virtio::vsock::{Vsock, VsockUnixBackend};
146-
use crate::logger::{METRICS, MetricsError};
146+
use crate::logger::{METRICS, MetricsError, log_dev_preview_warning};
147147
use crate::mmds::data_store::Mmds;
148148
use crate::persist::{MicrovmState, MicrovmStateError, VmInfo};
149149
use crate::rate_limiter::BucketUpdate;
@@ -706,6 +706,7 @@ impl Vmm {
706706
config: HotplugDeviceConfig,
707707
event_manager: &mut EventManager,
708708
) -> Result<(), VmmActionError> {
709+
log_dev_preview_warning("PCI device hotplug", None);
709710
let kvm_vm = self
710711
.vm
711712
.as_kvm()
@@ -722,6 +723,7 @@ impl Vmm {
722723
device_id: VirtioDeviceId,
723724
event_manager: &mut EventManager,
724725
) -> Result<(), VmmActionError> {
726+
log_dev_preview_warning("PCI device hot-unplug", None);
725727
let kvm_vm = self
726728
.vm
727729
.as_kvm()

0 commit comments

Comments
 (0)