Skip to content

vmm_core: Remove is_mmio from CpuIo #1301

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smalis-msft
Copy link
Contributor

This function is a footgun, as it doesn't capture MNF or MMIO ranges emulated elsewhere (like on the host for OpenHCL). It also only has one user. Just remove it. This will likely result in virt_whp sending more intercepts to OpenHCL instead of handling them locally, which may incur a perf penalty (hopefully not a big one), but it should not cause any functional issues (in theory 🤞).

@smalis-msft smalis-msft requested a review from a team as a code owner May 6, 2025 16:28
@smalis-msft smalis-msft changed the title Remove is_mmio from CpuIo vmm_core: Remove is_mmio from CpuIo May 6, 2025
@@ -802,7 +802,6 @@ mod x86 {

if self.intercept_state().is_some()
&& self.state.active_vtl == Vtl::Vtl0
&& !dev.is_mmio(access.Gpa)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously it would enter the 'else' and call self.emulate(...); is this going to break device emulation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't, as UH should end up emulating the intercept. Slightly more overhead, but the same end result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants