Commit graph

4 commits

Author SHA1 Message Date
Daniel Verkamp
78c474d423 virtio: create a DeviceType wrapper enum
This makes the VirtioDevice::device_type() function return type more
descriptive, and it lets us implement fmt::Display for the type instead
of a custom type_to_str() function.

BUG=None
TEST=tools/presubmit --all

Change-Id: Icfc2be37cf31ecab5e73f4b29c2eaaaa417317ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3582523
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-05-10 21:00:07 +00:00
Daniel Verkamp
3fab3baecc virtio-sys: add virtio_config and clean up imports
Restrict the bindgen patterns so that only the declarations from the
appropriate header are included in each binding, and add the
virtio_config binding to get the source of the VIRTIO_F_ and
VIRTIO_CONFIG_ #defines.

BUG=None
TEST=tools/presubmit --all

Change-Id: I216bd8d3540d918ad9bba162db0ae86b76d73f31
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3582522
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-05-09 21:20:27 +00:00
Noah Gold
3a3d73b3cb virtio_sys: add DataInit for net struct.
On Windows, we have to generate virtio_net_hdr_mrg_rxbuf ourselves since
there is no actual TAP device. Since we have to serialize it onto a
binary pipe, we need to get it as a binary slice, so here we implement
DataInit on that struct.

BUG=b:213151463
TEST=builds

Change-Id: I25a3333c20a87d6bf576f0225aac3e1c816a46ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3609237
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Noah Gold <nkgold@google.com>
2022-05-02 21:00:19 +00:00
Daniel Verkamp
f620437e8b virtio_sys: regenerate bindings
BUG=b:218388029
TEST=tools/presubmit --quick

Change-Id: I381dbc4d97e3a0a99dedd4416a347388daf4ccf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3339853
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-04-11 21:14:01 +00:00