-
Notifications
You must be signed in to change notification settings - Fork 128
vmm_tests: vmbus relay test for TDX #1472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…eation was failing
) | ||
|
||
$vssd = Get-Vssd $Vm | ||
$vssd | ForEach-Object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need ForEach-Object
here? For the other functions I was able to directly access the object members.
@@ -197,3 +197,37 @@ function Set-VmScsiControllerTargetVtl | |||
$rasd.TargetVtl = $TargetVtl | |||
$rasd | Set-VmResourceSettings | |||
} | |||
|
|||
function Enable-VmBusRelay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think the standard capitalization is VMBus
hyperv_openhcl_uefi_x64[vbs](vhd(windows_datacenter_core_2025_x64)), | ||
hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)) | ||
)] | ||
async fn vmbus_relay(config: Box<dyn PetriVmConfig>) -> anyhow::Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this test, I think we can remove the x86_64::vmbus_redirect openvmm-only test.
@@ -190,6 +190,10 @@ impl PetriVmConfig for PetriVmConfigOpenVmm { | |||
fn with_uefi_frontpage(self: Box<Self>, enable: bool) -> Box<dyn PetriVmConfig> { | |||
Box::new(Self::with_uefi_frontpage(*self, enable)) | |||
} | |||
|
|||
fn with_vmbus_relay(self: Box<Self>, _: bool) -> Box<dyn PetriVmConfig> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should we switch everything to use vmbus redirect (rather than vmbus relay) terminology to be consistent?
@@ -479,6 +485,9 @@ impl PetriVmConfigHyperV { | |||
)?; | |||
} | |||
|
|||
// Enable/Disable VMBusRelay if requested in config | |||
let _ = vm.set_vmbus_relay(self.vmbus_relay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we throwing away the result here? Shouldn't we just use ?
?
Also, this could probably be in the above if let Some(src_igvm_file)
block since this would only be relevant for OpenHCL VMs right?
Set-VmSystemSettings $vssd | ||
} | ||
|
||
function Disable-VmBusRelay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could simplify this and the calling code by just accepting a boolean and calling the function Set-VMBusRedirect
, but not a big deal.
Fix for issue #1268