Commit Graph

9 Commits

Author SHA1 Message Date
Viresh Kumar
ea699c86de tests: Initialize queues properly
The virtio-queue crate doesn't allow invalid queue state since commit
d951283a8e88 ("don't allow processing descriptors for invalid q").

Initialize the queues properly to fix testing failures.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-02-28 14:44:14 +05:30
Alex Bennée
2857681557 Updates crates to use virtio_config bindings
Rather incongruously the common VIRTIO feature flags where part of the
net binding. Now that the new binding are out we can update them to
something generic.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2023-02-28 14:19:12 +05:30
Viresh Kumar
b6e3fd4970 i2c: Change type of mem to GuestMemoryLoadGuard<>
This is what we need eventually, while parsing the requests, lets store
the correct type instead of creating the same everytime.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-02-13 23:41:17 +05:30
Viresh Kumar
26a0f3ad4d Fix clippy errors
New clippy errors were reported with an updated rust-vmm-ci submodule,
fix them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-01-16 15:20:10 +05:30
Viresh Kumar
f541481f30 i2c: Accept bus names instead of numbers
The I2C device names, /dev/i2c-N, can change from one boot to another of
the host machine and so aren't stable enough to be used for bus
selection.

Instead start accepting I2C master's name as parameter and parse based
on that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-12-05 17:15:38 +05:30
Viresh Kumar
26e0ff25ae i2c: Move Linux userspace specific code to PhysDevice
The path "/dev/i2c-N" is valid only for Linux userspace and must be
handled within PhysDevice's implementation.

Move it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-12-05 17:15:38 +05:30
Viresh Kumar
56b9ef46bb Add SAFETY comments
Add SAFETY comments to fix clippy warnings.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-11-09 13:05:04 +05:30
Stefano Garzarella
8ead248560 i2c: update License in source files and readme
Cargo.toml defines `license = "Apache-2.0 OR BSD-3-Clause"`,
so let's update the SPDX in source files and add a section
in the readme about the license.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2022-10-27 11:19:40 -06:00
Viresh Kumar
5e83d0c93f Move all crates in crates directory
Based on what other rust-vmm workspaces do, move all crates to crates
directory.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-10-13 16:28:11 +05:30