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

Conversation

Projects
None yet
2 participants
@talex5
Copy link
Contributor

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

Show resolved Hide resolved lib/in_memory.ml Outdated

@talex5 talex5 force-pushed the talex5:new-gnt-api branch from 0ef649a to 38ecf6e Mar 23, 2019

Update to new OS.Xen grant API
- `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.

@talex5 talex5 force-pushed the talex5:new-gnt-api branch from 38ecf6e to a337236 Mar 24, 2019

@yomimono yomimono merged commit 64c28cd into mirage:master Mar 24, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.