Commit Graph

8345 Commits

Author SHA1 Message Date
Rob Bradford
2ef04671be main: Place --tpm in the correct argument group
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-11-08 00:12:23 +00:00
Rob Bradford
453bc31994 main: Require a payload to boot when any VM argument provided
If any VM argument (e.g. --disk) is provided require some payload (e.g.
--kernel or --firmware) when parsing the command line arguments.

See: #6831

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-11-08 00:12:23 +00:00
dependabot[bot]
6e6966df8f build: Bump xdg-home from 1.2.0 to 1.3.0
Bumps [xdg-home](https://github.com/zeenix/xdg-home) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/zeenix/xdg-home/releases)
- [Commits](https://github.com/zeenix/xdg-home/compare/1.2.0...1.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-07 09:23:49 +00:00
dependabot[bot]
f32c2638f6 build: Bump futures-core from 0.3.30 to 0.3.31
Bumps [futures-core](https://github.com/rust-lang/futures-rs) from 0.3.30 to 0.3.31.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 15:14:55 +00:00
Ruoqing He
fbe1cd6404 hypervisor: kvm: Add g/set_regs unit-test on riscv64
Add unit-test to make sure get_regs and set_regs on riscv64 architecture
work as expected, effectively avoiding typos in register names.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
778a72f52f ci: Enable riscv64 CI of hypervisor module
Integrate machine provided by @ISRC-CAS to run build, clippy and
unit-test on hypervisor module.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
76256230d6 hypervisor: kvm: Complement create_standard_regs
Complement `create_standard_regs` implementation on RISC-V platform to
work with `From` trait of `kvm_riscv_core`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
8cd80ea36b hypervisor: Introduce RISC-V architecture
Introduce cpu, vm, kvm, arch module RISC-V platform support. Add macro
definitions to implement methods interacting with RISC-V registers.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
5e937c8b88 hypervisor: vm: Introduce RISC-V Vm trait
Introduce RISC-V specific Vm traits and error variant, disable
`create_irq_chip` on RISC-V platform.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
710535343b hypervisor: cpu: Introduce RISC-V Vcpu trait
Add RISC-V specific Vcpu trait. Disable `set_guest_debug` on RISC-V
platform.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
59c5b0a1cd hypervisor: kvm: Integrate riscv64 regs & AIA
Incorporates riscv64 register interaction and AIA creation to kvm
module. Complete `Vcpu` trait on RISC-V platform.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
c13019d5b5 hypervisor: cpu: Introduce RISC-V specific error
Add error variants specific to RISC-V architecture.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
c5774685f4 hypervisor: kvm: Introduce AIA creation
Implement definition required to work with KVM in-kernel AIA device,
construction procedure of AIA.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
2df8d2fa1e hypervisor: kvm: Introduce riscv64 register g/set
Implement macros to calculate register ID on riscv64, definition of
RISC-V `VcpuKvmState`.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
dd00bd6ef2 hypervisor: arch: Integrate riscv64 to arch module
Integrate `aia` module into `riscv64` module, and enable `riscv64`
module if target architecture is RISC-V 64-bit.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Ruoqing He
2752149bb0 hypervisor: arch: Introduce riscv64 AIA
Introduce definitions, traits relate to RISC-V AIA (Advanced Interrupt
Architecutre) construction.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-06 14:32:39 +00:00
Andrew Consroe
1bc74e43f8 docs: remove old --api-socket behavior
default --api-socket removed in 78f9ddc6be

Signed-off-by: Andrew Consroe <aconz2@gmail.com>
2024-11-06 08:33:27 +00:00
Wojtek Czekalski
8acaeb5c82 vmm: Add serial option to the disk config doc
Signed-off-by: Wojtek Czekalski <wczekalski@me.com>
2024-11-05 19:48:25 +00:00
dependabot[bot]
5eaf510f90 build: Bump async-trait from 0.1.80 to 0.1.83
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.80 to 0.1.83.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.80...0.1.83)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 15:44:55 +00:00
Rob Bradford
df1d6eaaee virtio-devices: Enable VIRTIO_RING_F_INDIRECT_DESC
This improves sequential write performance using fio (2888MiB/s ->
3293MiB/s)

VM config: cloud-hypervisor --disk path=~/workloads/jammy.raw,direct=on path=~/workloads/big-disk.img,direct=on --cpus boot=1 --memory size=2G,shared=on --serial tty --console off --seccomp log --kernel ~/workloads/hypervisor-fw

Host: fio --filename=big-disk.img --direct=1 --rw=write --bs=256k --ioengine=libaio --iodepth=64 --runtime=120 --numjobs=1 --time_based --group_reporting --name=throughput-test-job --eta-newline=1

VM:  fio --filename=/dev/vdb --direct=1 --rw=write --bs=256k --ioengine=libaio --iodepth=64 --runtime=120 --numjobs=1 --time_based --group_reporting --name=throughput-test-job --eta-newline=1

Baseline (file on filesystem on host used as backing store for block
device):

throughput-test-job: (groupid=0, jobs=1): err= 0: pid=10169: Tue Nov  5 09:31:55 2024
  write: IOPS=13.5k, BW=3385MiB/s (3549MB/s)(397GiB/120008msec); 0 zone resets
    slat (usec): min=4, max=10222, avg=20.25, stdev=29.01
    clat (usec): min=984, max=45599, avg=4706.01, stdev=2278.11
     lat (usec): min=1002, max=45610, avg=4726.27, stdev=2278.77
    clat percentiles (usec):
     |  1.00th=[ 3195],  5.00th=[ 3228], 10.00th=[ 3261], 20.00th=[ 3261],
     | 30.00th=[ 3261], 40.00th=[ 3261], 50.00th=[ 3294], 60.00th=[ 3916],
     | 70.00th=[ 5014], 80.00th=[ 7308], 90.00th=[ 7635], 95.00th=[ 7898],
     | 99.00th=[ 8586], 99.50th=[ 8979], 99.90th=[36439], 99.95th=[36963],
     | 99.99th=[43779]
   bw (  MiB/s): min= 1934, max= 4821, per=100.00%, avg=3391.67, stdev=1266.42, samples=239
   iops        : min= 7738, max=19286, avg=13566.67, stdev=5065.65, samples=239
  lat (usec)   : 1000=0.01%
  lat (msec)   : 2=0.03%, 4=61.10%, 10=38.62%, 20=0.11%, 50=0.15%
  cpu          : usr=17.13%, sys=14.38%, ctx=1352501, majf=0, minf=11
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
     issued rwts: total=0,1624829,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
  WRITE: bw=3385MiB/s (3549MB/s), 3385MiB/s-3385MiB/s (3549MB/s-3549MB/s), io=397GiB (426GB), run=120008-120008msec

Disk stats (read/write):
    dm-2: ios=129/1624787, sectors=1872/831364040, merge=0/0, ticks=185/6960387, in_queue=6960572, util=100.00%, aggrios=130/1626025, aggsectors=1880/831915888, aggrmerge=0/0, aggrticks=194/6967818, aggrin_queue=6968012, aggrutil=99.97%
    dm-0: ios=130/1626025, sectors=1880/831915888, merge=0/0, ticks=194/6967818, in_queue=6968012, util=99.97%, aggrios=130/1606095, aggsectors=1880/831915888, aggrmerge=0/19930, aggrticks=204/6634488, aggrin_queue=6635288, aggrutil=58.59%
  nvme0n1: ios=130/1606095, sectors=1880/831915888, merge=0/19930, ticks=204/6634488, in_queue=6635288, util=58.59%

On block device in VM:

throughput-test-job: (groupid=0, jobs=1): err= 0: pid=667: Tue Nov  5 09:53:19 2024
  write: IOPS=13.2k, BW=3293MiB/s (3453MB/s)(386GiB/120008msec); 0 zone resets
    slat (usec): min=4, max=3518, avg=27.77, stdev=35.32
    clat (usec): min=723, max=44252, avg=4829.82, stdev=2222.41
     lat (usec): min=735, max=44270, avg=4857.85, stdev=2223.45
    clat percentiles (usec):
     |  1.00th=[ 3097],  5.00th=[ 3195], 10.00th=[ 3195], 20.00th=[ 3228],
     | 30.00th=[ 3261], 40.00th=[ 3294], 50.00th=[ 3621], 60.00th=[ 4555],
     | 70.00th=[ 5997], 80.00th=[ 7242], 90.00th=[ 7570], 95.00th=[ 7898],
     | 99.00th=[ 8586], 99.50th=[ 8848], 99.90th=[36439], 99.95th=[36963],
     | 99.99th=[40633]
   bw (  MiB/s): min= 1914, max= 4857, per=100.00%, avg=3299.46, stdev=1180.81, samples=239
   iops        : min= 7658, max=19430, avg=13197.77, stdev=4723.22, samples=239
  lat (usec)   : 750=0.01%, 1000=0.01%
  lat (msec)   : 2=0.01%, 4=52.79%, 10=46.95%, 20=0.10%, 50=0.14%
  cpu          : usr=25.95%, sys=16.71%, ctx=1111821, majf=0, minf=10
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
     issued rwts: total=0,1580693,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
  WRITE: bw=3293MiB/s (3453MB/s), 3293MiB/s-3293MiB/s (3453MB/s-3453MB/s), io=386GiB (414GB), run=120008-120008msec

Disk stats (read/write):
  vdb: ios=60/1953213, merge=0/0, ticks=14/8229134, in_queue=8229149, util=100.00%

Prior to change:

throughput-test-job: (groupid=0, jobs=1): err= 0: pid=667: Tue Nov  5 09:37:45 2024
  write: IOPS=11.6k, BW=2888MiB/s (3028MB/s)(338GiB/120008msec); 0 zone resets
    slat (usec): min=3, max=3200, avg=18.48, stdev=24.54
    clat (usec): min=1237, max=46575, avg=5521.41, stdev=2641.99
     lat (usec): min=1249, max=46591, avg=5540.06, stdev=2643.54
    clat percentiles (usec):
     |  1.00th=[ 2999],  5.00th=[ 3163], 10.00th=[ 3195], 20.00th=[ 3261],
     | 30.00th=[ 3294], 40.00th=[ 3359], 50.00th=[ 6063], 60.00th=[ 7111],
     | 70.00th=[ 7373], 80.00th=[ 7570], 90.00th=[ 7832], 95.00th=[ 8094],
     | 99.00th=[ 8717], 99.50th=[ 9241], 99.90th=[36963], 99.95th=[37487],
     | 99.99th=[41157]
   bw (  MiB/s): min= 1936, max= 4826, per=100.00%, avg=2892.43, stdev=1202.99, samples=239
   iops        : min= 7746, max=19306, avg=11569.68, stdev=4811.98, samples=239
  lat (msec)   : 2=0.01%, 4=46.26%, 10=53.38%, 20=0.09%, 50=0.26%
  cpu          : usr=14.20%, sys=8.59%, ctx=1246257, majf=0, minf=12
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
     issued rwts: total=0,1386102,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
  WRITE: bw=2888MiB/s (3028MB/s), 2888MiB/s-2888MiB/s (3028MB/s-3028MB/s), io=338GiB (363GB), run=120008-120008msec

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-11-05 15:44:41 +00:00
Ruoqing He
a6a3d247da ci: Enable consistency check for fuzz workspace
`fuzz` is a separate workspace, enable consistency check on rust-vmm
crates in `fuzz` to keep stuffs in sync with root workspace.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-04 11:08:29 +00:00
Ruoqing He
838a857311 hypervisor: Wrap get_device_attr with unsafe
`get_device_attr` in 0.19.0 kvm-ioctls is marked as unsafe, wrap
invokation of `get_device_attr` with `unsafe` block.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-04 11:08:29 +00:00
Ruoqing He
95229b24ab build: Bump rust-vmm crates
- Bump kvm-bindings from 0.9.1 to 0.10.0
- Bump kvm-ioctls from 0.18.0 to 0.19.0
- Bump vm-memory from 0.15.0 to 0.16.0
- Bump linux-loader from 0.12.0 to 0.13.0
- Bump virtio-bindings from 0.2.1 to 0.2.4
- Bump virtio-queue from 0.13.0 to 0.14.0
- Pin mshv-bindings to 0.3.1
- Pin mshv-ioctls to 0.3.1
- Pin vhost to rev "d983ae0"
- Pin vhost-user-backend to rev "d983ae0"

Since vhost 0.12.0 and vhost-user-backend 0.16.0 are going to be yanked,
temporarily pin these two to "d983ae0", which are expected to be
replaced by 0.13.0 vhost and 0.17.0 vhost-user-backend after released.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-04 11:08:29 +00:00
Ruoqing He
71b0eb3c21 ci: Enable consistency check for rust-vmm packages
Enable `package-consistency` check to prevent contributor or dependabot
accidentally break `rust-vmm` consistency.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-02 16:09:09 +00:00
Ruoqing He
337cbf3d33 scripts: Add consistency check script
Add `package-consistency-check.py` script to prevent #6809 and #6815
from happening. This script takes a string present in the repository
field of packages to identify pacakges from a specific source.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-02 16:09:09 +00:00
dependabot[bot]
675140f627 build: Bump lock_api from 0.4.11 to 0.4.12
Bumps [lock_api](https://github.com/Amanieu/parking_lot) from 0.4.11 to 0.4.12.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/lock_api-0.4.11...lock_api-0.4.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-02 10:14:51 +00:00
Ruoqing He
894a4dee6e build: Centralize vhost-user-backend to workspace
`vhost-user-backend` is left behind in #6764, move it to root workspace.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-11-02 08:08:51 +00:00
Rob Bradford
f57d00cd66 build: Revert "build: Bump vfio_user from bf7d7e8 to 3febcdd"
This reverts commit 39ab10244b.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-11-02 08:57:36 +00:00
dependabot[bot]
59a1719b6e build: Bump flume from 0.11.0 to 0.11.1
Bumps [flume](https://github.com/zesterer/flume) from 0.11.0 to 0.11.1.
- [Changelog](https://github.com/zesterer/flume/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zesterer/flume/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 00:41:24 +00:00
dependabot[bot]
39ab10244b build: Bump vfio_user from bf7d7e8 to 3febcdd
Bumps [vfio_user](https://github.com/rust-vmm/vfio-user) from `bf7d7e8` to `3febcdd`.
- [Commits](bf7d7e851b...3febcdd3fa)

---
updated-dependencies:
- dependency-name: vfio_user
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-29 00:35:41 +00:00
dependabot[bot]
b5d856b31a build: Bump pin-project-lite from 0.2.14 to 0.2.15
Bumps [pin-project-lite](https://github.com/taiki-e/pin-project-lite) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/taiki-e/pin-project-lite/releases)
- [Changelog](https://github.com/taiki-e/pin-project-lite/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project-lite/compare/v0.2.14...v0.2.15)

---
updated-dependencies:
- dependency-name: pin-project-lite
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-26 00:01:51 +00:00
Rob Bradford
7322f33368 build: Revert "build: Bump vfio-ioctls from a51a474 to bfbe1bd"
This reverts commit b264aebcde.

Pulls in new vm-memory so should be done as part of a global bump of
Rust-VMM crates.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-25 09:48:42 +01:00
Rob Bradford
58850d2679 build: Release v42.0
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-25 08:30:08 +01:00
dependabot[bot]
b264aebcde build: Bump vfio-ioctls from a51a474 to bfbe1bd
Bumps [vfio-ioctls](https://github.com/rust-vmm/vfio) from `a51a474` to `bfbe1bd`.
- [Release notes](https://github.com/rust-vmm/vfio/releases)
- [Commits](a51a4746b0...bfbe1bda73)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-25 00:20:43 +00:00
dependabot[bot]
329e3d0dad build: Bump event-listener from 5.3.0 to 5.3.1
Bumps [event-listener](https://github.com/smol-rs/event-listener) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/smol-rs/event-listener/releases)
- [Changelog](https://github.com/smol-rs/event-listener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/event-listener/compare/v5.3.0...v5.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-24 07:23:08 +00:00
Jonas Scholz
56ff396eef docs: Fix scripts link
Signed-off-by: Jonas Scholz <Jonas.Scholz@bbscholz.de>
2024-10-23 18:38:50 +01:00
Songqian Li
cc5e463ee3 docs: improve code coverage document
Fixes: #6507

This patch improves the code coverage use case for integration
tests and unit tests.

Signed-off-by: Songqian Li <sionli@tencent.com>
2024-10-23 18:38:34 +01:00
Songqian Li
7e6326b3c5 scripts: fix code coverage script args parsing
Signed-off-by: Songqian Li <sionli@tencent.com>
2024-10-23 18:38:34 +01:00
dependabot[bot]
4168f8a14c build: Bump tempfile from 3.10.1 to 3.11.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.1 to 3.11.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 08:30:55 +01:00
Rob Bradford
f0dd0819d2 build: Bump version in docker image upload
Fixes: 34dc97f74f

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-22 17:59:13 +01:00
Rob Bradford
34dc97f74f build: Bump dev container version
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-22 13:08:17 +00:00
Praveen K Paladugu
b9bd80faa0 resources: install swtpm from Jammy
Jammy packages swtpm, install it and drop the steps for building it.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-10-22 13:08:17 +00:00
dependabot[bot]
9b14ee830a build: Bump hashbrown from 0.14.3 to 0.14.5
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.14.3 to 0.14.5.
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 08:00:19 +00:00
Rob Bradford
166a005b76 hypervisor: mshv: Fix superflous lifetimes
warning: the following explicit lifetimes could be elided: 'a
   --> hypervisor/src/arch/x86/emulator/mod.rs:492:6
    |
492 | impl<'a, T: CpuStateManager> Emulator<'a, T> {
    |      ^^                               ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
492 - impl<'a, T: CpuStateManager> Emulator<'a, T> {
492 + impl<T: CpuStateManager> Emulator<'_, T> {
    |

warning: the following explicit lifetimes could be elided: 'a
  --> hypervisor/src/mshv/x86_64/emulator.rs:19:6
   |
19 | impl<'a> MshvEmulatorContext<'a> {
   |      ^^                      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
19 - impl<'a> MshvEmulatorContext<'a> {
19 + impl MshvEmulatorContext<'_> {
   |

warning: the following explicit lifetimes could be elided: 'a
  --> hypervisor/src/mshv/x86_64/emulator.rs:65:6
   |
65 | impl<'a> PlatformEmulator for MshvEmulatorContext<'a> {
   |      ^^                                           ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
65 - impl<'a> PlatformEmulator for MshvEmulatorContext<'a> {
65 + impl PlatformEmulator for MshvEmulatorContext<'_> {
   |

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-21 15:28:17 +00:00
Rob Bradford
107bfe1075 tests: Fix missing wait() on spawned support commands
Compiling cloud-hypervisor v41.0.0 (/home/rob/src/cloud-hypervisor)
warning: spawned process is never `wait()`ed on
    --> tests/integration.rs:4250:31
     |
4250 |         let mut socat_child = socat_command.spawn().unwrap();
     |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: consider calling `.wait()`
     = note: not doing so might leave behind zombie processes
     = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes
     = note: `#[warn(clippy::zombie_processes)]` on by default

warning: spawned process is never `wait()`ed on
    --> tests/integration.rs:6687:9
     |
6687 | /         Command::new("/usr/local/bin/spdk-nvme/nvmf_tgt")
6688 | |             .args(["-i", "0", "-m", "0x1"])
6689 | |             .spawn()
6690 | |             .unwrap();
     | |                     ^- help: try: `.wait()`
     | |_____________________|
     |
     |
     = note: not doing so might leave behind zombie processes
     = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes

warning: `cloud-hypervisor` (test "integration") generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.83s

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-21 15:28:17 +00:00
Rob Bradford
36b59a6d2b test_infra: Silence warnings about zombie spawned processes
--> test_infra/src/lib.rs:1307:25
     |
1307 |               let child = self
     |  _________________________^
1308 | |                 .command
1309 | |                 .stderr(Stdio::piped())
1310 | |                 .stdout(Stdio::piped())
1311 | |                 .spawn()
1312 | |                 .unwrap();
     | |_________________________^
     |
     = note: consider calling `.wait()`
     = note: not doing so might leave behind zombie processes
     = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes
     = note: `#[warn(clippy::zombie_processes)]` on by default

The API caller should ensure that they call .wait() or equivalent on the
spawned child to reap it.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-21 15:28:17 +00:00
Rob Bradford
bac762e472 performance-metrics: Reap child process
The snapshot/restore test didn't wait on the child being spawned:

warning: spawned process is never `wait()`ed on
   --> performance-metrics/src/performance_tests.rs:495:25
    |
495 |           let mut child = GuestCommand::new(&guest)
    |  _________________________^
496 | |             .args(["--api-socket", &api_socket_source])
497 | |             .args([
498 | |                 "--cpus",
...   |
507 | |             .spawn()
508 | |             .unwrap();
    | |_____________________^
    |
    = note: consider calling `.wait()`
    = note: not doing so might leave behind zombie processes
    = note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes
    = note: `#[warn(clippy::zombie_processes)]` on by default

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-21 15:28:17 +00:00
Rob Bradford
7a637fe1f4 vmm: memory_manager: Use div_ceil()
--> vmm/src/memory_manager.rs:1972:13
     |
1972 | ...   ((self.start_of_device_area.0 + SGX_PAGE_SIZE - 1) / SGX_PAGE_SIZE) * ...
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.start_of_device_area.0.div_ceil(SGX_PAGE_SIZE)`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
     = note: `#[warn(clippy::manual_div_ceil)]` on by default

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-10-21 15:28:17 +00:00
Ruoqing He
ebfc8df9f0 misc: Allow shared reference to mutable static
We know what we are doing within `tracer` crate, disable lint on these
shared reference to mutable static.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
2024-10-20 10:34:49 +00:00
dependabot[bot]
0e209edb1d build: Bump futures-sink from 0.3.30 to 0.3.31
Bumps [futures-sink](https://github.com/rust-lang/futures-rs) from 0.3.30 to 0.3.31.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-19 00:29:40 +00:00