Commit Graph

4749 Commits

Author SHA1 Message Date
dependabot[bot]
a18b818227 build: bump vfio-ioctls from bcf2e64 to 19e5b83
Bumps [vfio-ioctls](https://github.com/rust-vmm/vfio-ioctls) from `bcf2e64` to `19e5b83`.
- [Release notes](https://github.com/rust-vmm/vfio-ioctls/releases)
- [Commits](bcf2e6486d...19e5b83ddf)

---
updated-dependencies:
- dependency-name: vfio-ioctls
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 02:43:50 +00:00
dependabot[bot]
0a5111b6c3 build: bump clap from 2.33.3 to 2.34.0
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.3 to 2.34.0.
- [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/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 01:50:01 +00:00
Michael Zhao
17b0f40154 tests: Enable PCI-segment tests
Enabled following hot-plug tests:
 - virtio-net
 - virtio-pmem
 - virtio-fs

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-12-01 09:24:01 +08:00
Michael Zhao
8c88b10384 vmm: Add some missing fields in IORT table
Added fields:
- `Memory address size limit`: the missing of this field triggered
  warnings in guest kernel
- `Node ID`

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-12-01 09:24:01 +08:00
Michael Zhao
b0d245be70 vmm: Add ID mappings in IORT Root Complex Nodes
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-12-01 09:24:01 +08:00
Michael Zhao
fad29fdf1a vmm: Add PCI segment in IORT table
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-12-01 09:24:01 +08:00
Michael Zhao
c9374d87ac vmm: Update devid in kvm_irq_routing_entry
After introducing multiple PCI segments, the `devid` value in
`kvm_irq_routing_entry` exceeds the maximum supported range on AArch64.

This commit restructed the `devid` to the allowed range.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-12-01 09:24:01 +08:00
dependabot[bot]
649e1fa1a6 build: bump clap from 2.33.3 to 2.34.0 in /fuzz
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.3 to 2.34.0.
- [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/commits)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-30 23:34:46 +00:00
Sebastien Boeuf
c7725f921c devices: legacy: cmos: Fix register D emulation
The register D has only one bit that is not reserved, and its purpose is
to report if the RTC/CMOS device is powered or not.

The OVMF firmware was failing to boot as it was getting the information
that the device was powered off from the register D.

The simple way to fix this issue is by always returning the bit 7 from
register D as 1, indicating the device is always powered.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-11-30 09:08:44 -08:00
Rob Bradford
82d06c0efa vmm: Add support for booting raw binary (e.g. firmware) on x86-64
If the provided binary isn't an ELF binary assume that it is a firmware
to be loaded in directly. In this case we shouldn't program any of the
registers as KVM starts in that state.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-11-30 13:39:36 +01:00
Ziye Yang
bc827ee3be vhost_user_net: fix some comments style in lib.rs
Fix the comments style to make them consistent.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-30 10:05:58 +01:00
Michael Zhao
ac25172176 scripts: Fix an error in virtiofsd build commands
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-11-30 10:04:38 +01:00
dependabot[bot]
c7977aa4a6 build: bump anyhow from 1.0.48 to 1.0.51 in /fuzz
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.48 to 1.0.51.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.48...1.0.51)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-30 01:08:18 +00:00
dependabot[bot]
d93b7bb04e build: bump ryu from 1.0.5 to 1.0.6 in /fuzz
Bumps [ryu](https://github.com/dtolnay/ryu) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/dtolnay/ryu/releases)
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.5...1.0.6)

---
updated-dependencies:
- dependency-name: ryu
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-30 00:14:10 +00:00
dependabot[bot]
c4454f54bd build: bump anyhow from 1.0.48 to 1.0.51
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.48 to 1.0.51.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/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>
2021-11-29 23:43:56 +00:00
dependabot[bot]
580db833f0 build: bump ryu from 1.0.5 to 1.0.6
Bumps [ryu](https://github.com/dtolnay/ryu) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/dtolnay/ryu/releases)
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.5...1.0.6)

---
updated-dependencies:
- dependency-name: ryu
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 23:35:44 +00:00
Ziye Yang
e91409956d vfio_user: Replace info! with debug!
In my opinion, it is enough to use debug!

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-29 10:20:16 +01:00
Ziye Yang
61ce4b8f31 vmm: Update comments related with enum Error struct in config.rs
Make the comments style consistent

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-26 10:22:57 +01:00
dependabot[bot]
154cca4170 build: bump serde_json from 1.0.71 to 1.0.72
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.71...v1.0.72)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-26 00:38:27 +00:00
dependabot[bot]
6032e30807 build: bump syn from 1.0.81 to 1.0.82
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.81...1.0.82)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-26 00:15:57 +00:00
dependabot[bot]
7b7d720f37 build: bump serde_json from 1.0.71 to 1.0.72 in /fuzz
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.71...v1.0.72)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 23:40:56 +00:00
dependabot[bot]
d23c1abbf0 build: bump syn from 1.0.81 to 1.0.82 in /fuzz
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.81...1.0.82)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 23:31:18 +00:00
Wei Liu
9b9015d907 qcow: check return value of alloc_zeroed and add safety comments
Function alloc_zeroed can fail. Check its return in read and write
functions. Its return value in is_valid_alignment is not checked because
handling error in that case does not give us much benefit. Instead, an
assertion is added.

Add safety comments to all `unsafe`s.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-25 10:32:07 +01:00
dependabot[bot]
60b44141b4 build: bump vfio-ioctls from 3c45864 to bcf2e64
Bumps [vfio-ioctls](https://github.com/rust-vmm/vfio-ioctls) from `3c45864` to `bcf2e64`.
- [Release notes](https://github.com/rust-vmm/vfio-ioctls/releases)
- [Commits](3c45864aa6...bcf2e6486d)

---
updated-dependencies:
- dependency-name: vfio-ioctls
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 23:38:58 +00:00
Ziye Yang
896a651b5c vmm: Update some comments and error message info in config.rs
Update some comments and error message info related with TDX.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-24 10:02:00 +01:00
Ziye Yang
9075809494 virtio-devices: Update some comments in epoll_helper.rs
Make some comments more clear.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-23 14:03:05 +01:00
dependabot[bot]
6b23227e10 build: bump libc from 0.2.107 to 0.2.108
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](https://github.com/rust-lang/libc/compare/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>
2021-11-23 00:05:13 +00:00
dependabot[bot]
f68d63ef6c build: bump libc from 0.2.107 to 0.2.108 in /fuzz
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](https://github.com/rust-lang/libc/compare/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>
2021-11-22 23:35:58 +00:00
dependabot[bot]
1bcb07b68b build: bump anyhow from 1.0.45 to 1.0.48
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.45 to 1.0.48.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/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>
2021-11-22 20:13:56 +00:00
Ziye Yang
ef1ac5c670 docs/vfio-user: Add more description on NVMe Device part
Add more info on how to set up SPDK NVMe-oF tgt for vfio-user usage
in NVMe device example part.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-22 11:34:42 -08:00
dependabot[bot]
5e7c9eaefd build: bump kvm-ioctls from 0.10.0 to 0.11.0 in /fuzz
Bumps [kvm-ioctls](https://github.com/rust-vmm/kvm-ioctls) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/rust-vmm/kvm-ioctls/releases)
- [Changelog](https://github.com/rust-vmm/kvm-ioctls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/kvm-ioctls/commits)

---
updated-dependencies:
- dependency-name: kvm-ioctls
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-20 00:09:12 +00:00
dependabot[bot]
c4211686ab build: bump anyhow from 1.0.46 to 1.0.47 in /fuzz
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.46...1.0.47)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 23:34:43 +00:00
Ziye Yang
51cfffd24f vmm: Make the comments consistent in 'DeviceManager'
Change  "Failed xxing" to "Failed to xx", then
we can only we one style.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2021-11-19 08:43:23 +00:00
dependabot[bot]
e34c25cf6f build: bump vm-fdt from ad7e182 to 9cfa0c8
Bumps [vm-fdt](https://github.com/rust-vmm/vm-fdt) from `ad7e182` to `9cfa0c8`.
- [Release notes](https://github.com/rust-vmm/vm-fdt/releases)
- [Commits](ad7e182d56...9cfa0c8d7c)

---
updated-dependencies:
- dependency-name: vm-fdt
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 23:39:38 +00:00
dependabot[bot]
366f058d61 build: bump kvm-ioctls from 0.10.0 to 0.11.0
Bumps [kvm-ioctls](https://github.com/rust-vmm/kvm-ioctls) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/rust-vmm/kvm-ioctls/releases)
- [Changelog](https://github.com/rust-vmm/kvm-ioctls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/kvm-ioctls/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 23:32:01 +00:00
Bo Chen
2a312cd4fe vmm: Fix a comment typo from 'DeviceManager'
Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-11-18 12:00:39 -08:00
Bo Chen
0d7328da01 pci: vfio_user: Merge duplicate 'impl VfioUserPciDevice' block
Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-11-18 12:00:39 -08:00
Rob Bradford
589dc77354 build: Add GitHub action to build test TDX feature
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-11-18 07:03:13 -08:00
Wei Liu
58d984f6b8 hypervisor: add a few safety comments
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-18 14:42:55 +00:00
Wei Liu
dd3c086a0a hypervisor: drop one unsafe from mock_vmm
Simple aggregate types are Sync by default. There is no need to use
`impl Sync` for MockVmm (a simple struct).

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-18 14:42:55 +00:00
dependabot[bot]
46953db3ca build: bump serde_json from 1.0.70 to 1.0.71
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.70 to 1.0.71.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.70...v1.0.71)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 00:37:08 +00:00
dependabot[bot]
f855d9e237 build: bump serde_json from 1.0.70 to 1.0.71 in /fuzz
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.70 to 1.0.71.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.70...v1.0.71)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 23:33:57 +00:00
Wei Liu
ff0e92ab88 vmm: add a safety comment for EpollContext
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 23:12:11 +00:00
Wei Liu
32af6f9723 virtio-device: add a safety comment for a dup(2) call
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 23:12:11 +00:00
Wei Liu
9b3cab8c72 device_manager: check return value of dup(2)
That function call can return -1 when it fails. Wrapping -1 into File
causes the code to panic when the File is dropped.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 23:12:11 +00:00
Wei Liu
84630aa0b5 device_manager: provide a few safety comments
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 23:12:11 +00:00
Alyssa Ross
ad8ed80eb1 vmm: use the tty raw mode implementation from libc
I encountered some trouble trying to use a virtio-console hooked up to
a PTY.  Reading from the PTY would produce stuff like this
"\n\nsh-5.1# \n\nsh-5.1# " (where I'm just pressing enter at a shell
prompt), and a terminal would render that like this:

----------------------------------------------------------------

sh-5.1#

       sh-5.1#
----------------------------------------------------------------

This was because we weren't disabling the ICRNL termios iflag, which
turns carriage returns (\r) into line feeds (\n).  Other raw mode
implementations (like QEMU's) set this flag, and don't have this
problem.

Instead of fixing our raw mode implementation to just disable ICRNL,
or copy the flags from QEMU's, though, here I've changed it to use the
raw mode implementation in libc.  It seems to work correctly in my
testing, and means we don't have to worry about what exactly raw mode
looks like under the hood any more.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
2021-11-17 14:41:00 +00:00
Wei Liu
f035cff10f vm-virtio: drop VirtqUsedElem from its test module
Use the one defined in virtio_queue instead.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 14:40:51 +00:00
Wei Liu
1a2b01888c vm-migration: add safety comments for impl ByteValued
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 14:40:51 +00:00
Wei Liu
94fcfa9f1f virtio-queue: add safety comments for impl ByteValued
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-11-17 14:40:51 +00:00