Skip to content

Commit 19460df

Browse files
authored
openhcl: remove cmdline to configure shared vis pool + tests (#2189)
Tests were setting this flag, but weren't actually testing their device DMA with shared visibility pool. The shared visibility pool is *only* used when the VM is isolated. Bring this back in one of two ways: 1. Add isolated tests (and get the right behavior), or 2. Change the devices to force into using the shared pool. Sorta fixes #2185 (the real issue there is that we weren't testing what we thought we were ... :()
1 parent 04c15e0 commit 19460df

File tree

5 files changed

+0
-35
lines changed

5 files changed

+0
-35
lines changed

openhcl/underhill_core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ async fn launch_workers(
319319
force_load_vtl0_image: opt.force_load_vtl0_image,
320320
nvme_vfio: opt.nvme_vfio,
321321
mcr: opt.mcr,
322-
enable_shared_visibility_pool: opt.enable_shared_visibility_pool,
323322
halt_on_guest_halt: opt.halt_on_guest_halt,
324323
no_sidecar_hotplug: opt.no_sidecar_hotplug,
325324
gdbstub: opt.gdbstub,

openhcl/underhill_core/src/options.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ pub struct Options {
166166
/// MCR Device Enable
167167
pub mcr: bool, // TODO MCR: support closed-source ENV vars
168168

169-
/// (OPENHCL_ENABLE_SHARED_VISIBILITY_POOL=1)
170-
/// Enable the shared visibility pool. This is enabled by default on
171-
/// hardware isolated platforms, but can be enabled for testing.
172-
pub enable_shared_visibility_pool: bool,
173-
174169
/// (OPENHCL_HIDE_ISOLATION=1)
175170
/// Hide the isolation mode from the guest.
176171
pub hide_isolation: bool,
@@ -328,8 +323,6 @@ impl Options {
328323
let serial_wait_for_rts = parse_legacy_env_bool("OPENHCL_SERIAL_WAIT_FOR_RTS");
329324
let nvme_vfio = parse_legacy_env_bool("OPENHCL_NVME_VFIO");
330325
let mcr = parse_legacy_env_bool("OPENHCL_MCR_DEVICE");
331-
let enable_shared_visibility_pool =
332-
parse_legacy_env_bool("OPENHCL_ENABLE_SHARED_VISIBILITY_POOL");
333326
let hide_isolation = parse_env_bool("OPENHCL_HIDE_ISOLATION");
334327
let halt_on_guest_halt = parse_legacy_env_bool("OPENHCL_HALT_ON_GUEST_HALT");
335328
let no_sidecar_hotplug = parse_legacy_env_bool("OPENHCL_NO_SIDECAR_HOTPLUG");
@@ -418,7 +411,6 @@ impl Options {
418411
force_load_vtl0_image,
419412
nvme_vfio,
420413
mcr,
421-
enable_shared_visibility_pool,
422414
hide_isolation,
423415
halt_on_guest_halt,
424416
no_sidecar_hotplug,

openhcl/underhill_core/src/worker.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ pub struct UnderhillEnvCfg {
274274
pub nvme_vfio: bool,
275275
// TODO MCR: support closed-source configuration logic for MCR device
276276
pub mcr: bool,
277-
/// Enable the shared visibility pool. This is enabled by default on
278-
/// hardware isolated platforms, but can be enabled for testing.
279-
pub enable_shared_visibility_pool: bool,
280277
/// Halt on a guest halt request instead of forwarding to the host.
281278
pub halt_on_guest_halt: bool,
282279
/// Leave sidecar VPs remote even if they hit exits.
@@ -1381,7 +1378,6 @@ async fn new_underhill_vm(
13811378
round_up_to_2mb(cpu_bytes + device_dma + attestation)
13821379
}
13831380
virt::IsolationType::Vbs => round_up_to_2mb(device_dma + attestation),
1384-
_ if env_cfg.enable_shared_visibility_pool => round_up_to_2mb(device_dma + attestation),
13851381
_ => 0,
13861382
};
13871383

vmm_tests/vmm_tests/tests/tests/x86_64/openhcl_linux_direct.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ async fn mana_nic_shared_pool(
6464
let (vm, agent) = config
6565
.with_vmbus_redirect(true)
6666
.modify_backend(|b| b.with_nic())
67-
.with_openhcl_command_line("OPENHCL_ENABLE_SHARED_VISIBILITY_POOL=1")
6867
.run()
6968
.await?;
7069

@@ -87,7 +86,6 @@ async fn mana_nic_servicing(
8786
let (mut vm, agent) = config
8887
.with_vmbus_redirect(true)
8988
.modify_backend(|b| b.with_nic())
90-
.with_openhcl_command_line("OPENHCL_ENABLE_SHARED_VISIBILITY_POOL=1")
9189
.run()
9290
.await?;
9391

vmm_tests/vmm_tests/tests/tests/x86_64/openhcl_uefi.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -152,26 +152,6 @@ async fn nvme_relay(config: PetriVmBuilder<OpenVmmPetriBackend>) -> Result<(), a
152152
nvme_relay_test_core(config, "", None).await
153153
}
154154

155-
/// Test an OpenHCL uefi VM with a NVME disk assigned to VTL2 that boots
156-
/// linux, with vmbus relay. This should expose a disk to VTL0 via vmbus.
157-
///
158-
/// Use the shared pool override to test the shared pool dma path.
159-
#[openvmm_test(openhcl_uefi_x64[nvme](vhd(ubuntu_2504_server_x64)))]
160-
async fn nvme_relay_shared_pool(
161-
config: PetriVmBuilder<OpenVmmPetriBackend>,
162-
) -> Result<(), anyhow::Error> {
163-
nvme_relay_test_core(
164-
config,
165-
"OPENHCL_ENABLE_SHARED_VISIBILITY_POOL=1",
166-
Some(ExpectedNvmeDeviceProperties {
167-
save_restore_supported: false, // No private pool, so no save/restore of memory.
168-
qsize: 64, // Should be 256, but #2185.
169-
nvme_keepalive: false,
170-
}),
171-
)
172-
.await
173-
}
174-
175155
/// Test an OpenHCL uefi VM with a NVME disk assigned to VTL2 that boots
176156
/// linux, with vmbus relay. This should expose a disk to VTL0 via vmbus.
177157
///

0 commit comments

Comments
 (0)