Commit graph

3306 commits

Author SHA1 Message Date
Dylan Reid
ee8293fd60 Add editor temp files to .gitignore
Change-Id: Ib15b732192de4d59798501f662b1806bc26ad1c3
Reviewed-on: https://chromium-review.googlesource.com/490907
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2017-05-02 05:20:26 -07:00
Zach Reizner
034134b2db kvm-sys: fix alignment and size errors in bindings
These errors were caught by the autogenerated test but required manual
fixing. The alignment issues are there because bindgen uses PhantomData
to emulate zero sized arrays at the end of structs, but rust will align
the structs as if PhantomData is not there. The single size issue seems
to be a bindgen bug in which an extra bitfield u8 was added.

BUG=chromium:711556
TEST=cargo test

Change-Id: Ib42674bc485e8b93b77d4d9e2f424c05f9746757
Reviewed-on: https://chromium-review.googlesource.com/477613
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2017-04-21 21:57:31 -07:00
Zach Reizner
30055ecabd kvm-sys: add arm bindings
Depending on which linux kernel headers are used, different outputs for
bindgen are given. In particular, some structs in x86's kvm.h are not in
arm's kvm.h and the other way around. This presented as compile time
failures when compiling the ioctl number functions which take these
struct types as parameters.

This change solves this my lumping ioctls into an x86 module, arm
module, and common module. Additionally, bindgen is run with the x86
kvm.h and the arm kvm.h header and only the appropriate one is included
at build time.

This change also fixes a few ioctls with the incorrect direction label.

TEST=cargo test [--target=armv7a-cros-linux-gnueabi]
BUG=chromium:711556

Change-Id: I7fc0e10587978006b89d16167df1107582b34670
Reviewed-on: https://chromium-review.googlesource.com/482411
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2017-04-21 21:57:31 -07:00
Zach Reizner
09a0a32345 kvm-sys: start low-level kvm bindings
These bindings are autogenerated via a manual invocation to bindgen.
Also included are the calculations for ioctl numbers, which bindgen was
not capable of generating. Note that a few of the autogenerated tests
fail currently.

BUG=chromium:711556
TEST=cargo test # note there are 4 failures

Change-Id: I818c5bba1f032aec131459de1346c548148e6612
Reviewed-on: https://chromium-review.googlesource.com/477375
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
2017-04-19 16:30:31 +00:00
Zach Reizner
be9feaa3d2 add LICENSE and README
TEST=None
BUG=None

Change-Id: I78e61545c6db18ae37925d02f7b0d6538deb6275
Reviewed-on: https://chromium-review.googlesource.com/478458
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2017-04-17 14:06:21 -07:00
Bernie Thompson
8bd0267331 Initial empty repository 2017-04-13 16:43:21 +00:00