Commit Graph

14 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
dependabot[bot]
b32559eb72 build(deps): bump clap from 4.1.4 to 4.1.6
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.1.4...v4.1.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 12:09:24 +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
dependabot[bot]
443da37860 build(deps): bump env_logger from 0.9.3 to 0.10.0
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 14:50:11 +05:30
Viresh Kumar
27f0f0b75b Update virtio crates to new versions
This is required to fix the errors with individual pull requests with
these crates.

Also update other dependencies with general `cargo update`.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-12-01 13:07:50 +05:30
dependabot[bot]
cf0f146414 build(deps): bump vmm-sys-util from 0.10.0 to 0.11.0
Bumps [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Changelog](https://github.com/rust-vmm/vmm-sys-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vmm-sys-util/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: vmm-sys-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-01 13:07:50 +05:30
Viresh Kumar
c2e566c493 Switch to caret versions
Specify the dependencies with caret versions.

Fixes: rust-vmm/community#131
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-11-15 14:23:38 +00:00
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