Skip to content
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

Update to new OS.Xen grant API #125

Merged
merged 1 commit into from
Mar 24, 2019
Merged

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Mar 22, 2019

(see mirage/mirage-xen#9)

  • Gntref.t is now abstract - update sexp converters to use to_int32/from_int32.
  • gntshr_interface_open is no longer needed.
  • Instead of wrapping the underlying share type with our own (that just converts the grant refs to int32), use the underlying object directly. This is needed because Export.t is now abstract and we so cannot create them ourselves, but it seems simpler this way too.
  • The new Export.unshare requires us to say whether to release the grant refs too. It looks like we should have been doing this, so I passed true here, although the original code didn't. The old Gnt API was a bit vague about this; it looks like it released the refs on Unix but not on Xen.

Note that no version of mirage-xen with the new API has been released yet, so we might want to wait for that before merging.

/cc @yomimono

lib/in_memory.ml Outdated Show resolved Hide resolved
- `Gntref.t` is now abstract - update sexp converters to use
  `to_int32`/`from_int32`.
- `gntshr_interface_open` is no longer needed.
- Instead of wrapping the underlying share type with our own
  (that just converts the grant refs to `int32`), use the underlying
  object directly. This is needed because `Export.t` is now abstract
  and we so cannot create them ourselves, but it seems simpler this way
  too.
- The new `Export.unshare` requires us to say whether to release the
  grant refs too. It looks like we should have been doing this, so I
  passed `true` here, although the original code didn't. The old Gnt API
  was a bit vague about this; it looks like it released the refs on Unix
  but not on Xen.
@yomimono yomimono merged commit 64c28cd into mirage:master Mar 24, 2019
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