Skip to content

mana vf: poll for shmem ownership before use #966

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 2 commits into
base: main
Choose a base branch
from

Conversation

jimdaubert-ms
Copy link
Contributor

The 256-bit mmio aperture for bootstrap VF-PF communication has an
ownership mechanism in the high bit. If high bit is 1, the PF owns the
region, and writes by the VF are ignored. If it is 0, the VF owns the
region and may write. VF drivers should ensure this bit is 0 before
attempting a shared memory write.

…mory

- The 256-bit shared memory has an ownership mechanism in the high bit.
  If high bit is 1, the PF owns the region, and writes by the VF are
  ignored. If it is 0, the VF owns the region and may write. VF drivers
  should ensure this bit is 0 before attempting a shared memory write.
@jimdaubert-ms jimdaubert-ms requested a review from a team as a code owner March 5, 2025 21:19
let mut ctx =
mesh::CancelContext::new().with_timeout(Duration::from_millis(HWC_POLL_TIMEOUT_IN_MS));
let mut hw_failure = false;
loop {
Copy link
Member

Choose a reason for hiding this comment

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

This is copy/paste. Can we make it a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and will do. Each is slightly different as it was copied from the wait in each respective function where the response is waited on (one for establish hwc, one for destroy hwc, slightly different from each other though probably not for good reason). To be complete with making a function, we may want all four waits (establish/destroy before sending request, establish/destroy when waiting for response) to be commonized into a single function.

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