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

Initial code import #1

Closed

Conversation

rbradford
Copy link
Collaborator

  • vfio_user: Implement client side support
  • vfio_user: Fix debug output to include reply for DeviceGetRegionInfo
  • build: bump anyhow from 1.0.42 to 1.0.43
  • vfio_user: DmaUnmap expects a reply with payload
  • build: bump libc from 0.2.99 to 0.2.100
  • build: bump libc from 0.2.100 to 0.2.101
  • build: bump thiserror from 1.0.26 to 1.0.28
  • build: Update vfio_user's vm-memory dependency
  • build: bump thiserror from 1.0.28 to 1.0.29
  • build: bump anyhow from 1.0.43 to 1.0.44
  • build: bump libc from 0.2.101 to 0.2.102
  • build: bump libc from 0.2.102 to 0.2.103
  • build: bump thiserror from 1.0.29 to 1.0.30
  • build: bump libc from 0.2.103 to 0.2.104
  • build: bump vm-memory from 0.6.0 to 0.7.0
  • Revert "build: bump vm-memory from 0.6.0 to 0.7.0"
  • build: bump libc from 0.2.104 to 0.2.105
  • build: bump libc from 0.2.105 to 0.2.106
  • build: bump anyhow from 1.0.44 to 1.0.45
  • build: bump libc from 0.2.106 to 0.2.107
  • build: bump anyhow from 1.0.45 to 1.0.46
  • deps: Downgrade anyhow
  • vfio_user: add safety comments for impl ByteValued
  • build: bump anyhow from 1.0.45 to 1.0.48
  • build: bump libc from 0.2.107 to 0.2.108
  • vfio_user: Replace info! with debug!
  • build: bump anyhow from 1.0.48 to 1.0.51
  • build: bump libc from 0.2.108 to 0.2.109
  • build: bump libc from 0.2.109 to 0.2.112
  • build: bump vfio-bindings from 0.2.0 to 0.3.1
  • deps: Bump vm-memory to 0.7.0
  • build: bump anyhow from 1.0.51 to 1.0.52
  • build: bump libc from 0.2.112 to 0.2.113
  • build: bump anyhow from 1.0.52 to 1.0.53
  • build: bump libc from 0.2.113 to 0.2.114
  • build: bump libc from 0.2.114 to 0.2.115
  • build: bump libc from 0.2.115 to 0.2.116
  • build: bump libc from 0.2.116 to 0.2.117
  • build: bump libc from 0.2.117 to 0.2.118
  • build: bump anyhow from 1.0.53 to 1.0.55
  • build: bump libc from 0.2.118 to 0.2.119
  • build: bump anyhow from 1.0.55 to 1.0.56
  • build: bump libc from 0.2.119 to 0.2.120
  • vfio_user: Shutdown the communication with the backend
  • build: bump libc from 0.2.120 to 0.2.121
  • build: bump log from 0.4.14 to 0.4.16
  • build: bump libc from 0.2.121 to 0.2.122
  • build: bump libc from 0.2.122 to 0.2.123
  • build: bump libc from 0.2.123 to 0.2.124
  • build: bump anyhow from 1.0.56 to 1.0.57
  • build: bump thiserror from 1.0.30 to 1.0.31
  • build: bump libc from 0.2.124 to 0.2.125
  • build: bump log from 0.4.16 to 0.4.17
  • vfio_user: Import "std::mem::size_of" for shorter reference
  • vfio_user: Split the function for getting device regions
  • vfio_user: Parse region capability 'VFIO_REGION_INFO_CAP_SPARSE_MMAP'
  • vfio_user: Embed retry of getting region caps into 'get_region_info'
  • build: bump virtio-queue from 0.2.0 to 0.3.0
  • build: bump libc from 0.2.125 to 0.2.126
  • build: bump anyhow from 1.0.57 to 1.0.58
  • build: Fix beta clippy issue (derive_partial_eq_without_eq)
  • tree-wide: drop unneeded dependencies
  • build: bump libc from 0.2.126 to 0.2.127
  • build: bump thiserror from 1.0.31 to 1.0.32
  • deps: Bulk upgrade dependencies
  • vfio_user: fix two clippy warnings
  • build: bump serde from 1.0.142 to 1.0.143
  • build: bump libc from 0.2.127 to 0.2.129
  • build: bump libc from 0.2.129 to 0.2.131
  • build: bump libc from 0.2.131 to 0.2.132
  • build: bump serde from 1.0.143 to 1.0.144
  • build: bump serde_json from 1.0.83 to 1.0.85
  • build: bump thiserror from 1.0.32 to 1.0.33
  • build: bump thiserror from 1.0.33 to 1.0.34
  • build: bump thiserror from 1.0.34 to 1.0.35
  • build: Bulk dependencies update
  • build: Bump libc from 0.2.132 to 0.2.133
  • build: Bump serde from 1.0.144 to 1.0.145
  • build: Bump thiserror from 1.0.35 to 1.0.36
  • build: Bump thiserror from 1.0.36 to 1.0.37
  • build: Bump libc from 0.2.133 to 0.2.134
  • build: Bump serde_json from 1.0.85 to 1.0.86
  • build: Bump libc from 0.2.134 to 0.2.135
  • build: Bump serde_json from 1.0.86 to 1.0.87
  • build: Bump serde from 1.0.145 to 1.0.147
  • build: Bump libc from 0.2.135 to 0.2.137
  • vfio_user: modify the style of safety comments
  • build: Bulk update dependencies
  • build: Bump libc from 0.2.137 to 0.2.138
  • misc: Bulk update dependencies
  • build: Bump serde from 1.0.149 to 1.0.150
  • build: Bump serde from 1.0.150 to 1.0.151
  • build: Bump libc from 0.2.138 to 0.2.139
  • build: Bump thiserror from 1.0.37 to 1.0.38
  • misc: Automatically fix cargo clippy issues added in 1.68 (beta)
  • build: Bump serde_json from 1.0.91 to 1.0.93
  • vfio_user: Improve flags for DMA_MAP command
  • vfio_user: Add flags for DMA_UNMAP command
  • vfio_user: Add basic server side support
  • vfio_user: Add a simple sample device
  • vfio_user: Always generate an error for commands
  • vfio_user: Add TODOs for missing functionality
  • vfio_user: Reject SET_IRQS with VFIO_IRQ_SET_DATA_BOOL
  • vfio_user: Add command line parsing for socket option
  • vfio_user: Make GPIO device more interesting
  • build: Point to Cloud Hypervisor PCI crate for examples to build
  • README: Replace template README
  • misc: Remove LICENSE-BSD-3-Clause
  • misc: Update CODEOWNERS
  • build: Add GitHub actions

rbradford and others added 30 commits February 17, 2023 11:42
Implement (most) of the client side (i.e. VMM side) of the vfio-user
protocol:

https://github.com/nutanix/libvfio-user/blob/master/docs/vfio-user.rst

Items that are not implemented (because they are optimisations or unused
due to alternative solutions:

* VFIO_USER_DMA_READ/WRITE - this is a way for the server to read guest
  memory if the guest memory is not shared by fd where the client
  doesn't support it. However since we do support sharing the memory by
  fd this is not required.
* VFIO_USER_GET_REGION_IO_FDS - an optimisation to bypass the VMM by
  having KVM talk directly to the backend using ioregionfd
* VFIO_USER_DIRTY_PAGES - for the implementation of live migration

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
The reply was being printed before it had been read so it was just
showing the default values.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.42 to 1.0.43.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.42...1.0.43)

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

Signed-off-by: dependabot[bot] <support@github.com>
The current code was expecting a reply with only the header, which
wasn't reading the rest of payload that was provided. This was causing
the following replies to be completely wrong as they were shifted by the
previous payload that wasn't read.

The simple way to fix this issue is by reading the header and the
expected payload when getting a reply from a DmaUnmap request.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.99 to 0.2.100.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.99...0.2.100)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.100 to 0.2.101.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.100...0.2.101)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.26 to 1.0.28.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.26...1.0.28)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.28 to 1.0.29.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.28...1.0.29)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.43 to 1.0.44.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.43...1.0.44)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.101 to 0.2.102.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.101...0.2.102)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.102 to 0.2.103.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.102...0.2.103)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.29...1.0.30)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.103 to 0.2.104.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.103...0.2.104)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
This was causing some issues because of the use of 2 different versions
for the vm-memmory crate. We'll wait for all dependencies to be properly
resolved before we move to 0.7.0.

This reverts commit 76b6c62d0766e46f80521c2dc24d532665db4be1.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.104 to 0.2.105.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.104...0.2.105)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.105 to 0.2.106.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.105...0.2.106)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.44 to 1.0.45.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.44...1.0.45)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.106 to 0.2.107.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.106...0.2.107)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.45 to 1.0.46.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.45...1.0.46)

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

Signed-off-by: dependabot[bot] <support@github.com>
Because anyhow version 1.0.46 has been yanked, let's move back to the
previous version 1.0.45.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.45 to 1.0.48.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.45...1.0.48)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.107 to 0.2.108.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.107...0.2.108)

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

Signed-off-by: dependabot[bot] <support@github.com>
In my opinion, it is enough to use debug!

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.48 to 1.0.51.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.48...1.0.51)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.108 to 0.2.109.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.108...0.2.109)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.109 to 0.2.112.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.109...0.2.112)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vfio-bindings](https://github.com/rust-vmm/vfio) from 0.2.0 to 0.3.1.
- [Release notes](https://github.com/rust-vmm/vfio/releases)
- [Commits](https://github.com/rust-vmm/vfio/commits/vfio-bindings-v0.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
dependabot bot and others added 28 commits February 17, 2023 11:43
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.134 to 0.2.135.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.134...0.2.135)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.86...v1.0.87)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.145 to 1.0.147.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.145...v1.0.147)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.135 to 0.2.137.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.135...0.2.137)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.137 to 0.2.138.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.137...0.2.138)

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

Signed-off-by: dependabot[bot] <support@github.com>
In particular update to latest linux-loader release and point to latest
vfio repository for both crates hosted there.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.149 to 1.0.150.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.149...v1.0.150)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.150...v1.0.151)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.138 to 0.2.139.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](rust-lang/libc@0.2.138...0.2.139)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.37...1.0.38)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.91 to 1.0.93.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.91...v1.0.93)

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

Signed-off-by: dependabot[bot] <support@github.com>
Replace the use of an enum with a bitfield representation which means
that is now possible to logical OR flags together.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This allows the implementation of PCI devices in a different process
using the vfio-user protocol.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This implements a similar GPIO device to that found in the libvfio-user
source code.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Any error from the backend or from the protocol handling code will now
result in an error reply being sent. This is cleanly achieved by
splitting the command handling out into its own method and using the
Rust Result<> based error handling to trigger the generation of the
error reply.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This is unsupported.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Every third read on the GPIO pin will return 1 and also trigger an
interrupt in the guest.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
In the future ideally we could use a crate from Rust VMM or add our own
code for populating the PCI config space.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Populate with details of the modules and where real life examples can be
found.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This code is currently only covered by the Apache 2.0 licence.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Add those who have contributed in the past or have an interest in the
crate.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
@rbradford
Copy link
Collaborator Author

Going to try again with squashing the dependabot bumps. There are rather more than I thought there were.

@rbradford rbradford closed this Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants