Commit Graph

7349 Commits

Author SHA1 Message Date
Ravi kumar Veeramally
fa22cb0be5 docs: update command line options to use clap
Reverts commit a0922930b1
and update to latest changes.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
2023-10-20 11:44:28 -07:00
Wei Liu
7bc3452139 main: switch command parsing to use clap
Partially revert 111225a2a5
and add the new dbus and pvpanic arguments.

As we are switching back to clap observe the following changes.

A few examples:

1. `-v -v -v` needs to be written as`-vvv`
2. `--disk D1 --disk D2` and others need to be written as `--disk D1 D2`.
3. `--option value` needs to be written as `--option=value.`

Change integration tests to adapt to the breaking changes.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
2023-10-20 11:44:28 -07:00
Wei Liu
6113483363 docs: add notes on collecting coverage data from in-tree tests
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
Wei Liu
8ba5682e3b scripts: propagate RUSTFLAGS and TARGET_CC to test scripts
There is no need to set them in the test scripts while the main script
already has them.

The consolidates how things are done.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
Wei Liu
c7e51e51e5 scripts: pass BUILD_TARGET directly to test scripts
There is no need to reconstruct it from within the scripts since the
main script already constructed it once.

Drop the previously useless setting of BUILD_TARGET from various
scripts. The value was always overwritten at a later point.

No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
Wei Liu
9d42f48f49 scripts: dev_cli.sh: respect preset RUSTFLAGS
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
dependabot[bot]
ec0e0b1b96 build: Bump iced-x86 from 1.19.0 to 1.20.0
Bumps [iced-x86](https://github.com/icedland/iced) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/icedland/iced/releases)
- [Commits](https://github.com/icedland/iced/compare/v1.19.0...v1.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-20 11:07:18 +01:00
dependabot[bot]
2123a65288 build: Bump serde from 1.0.188 to 1.0.189 in /fuzz
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.188 to 1.0.189.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.189)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 23:47:11 +00:00
Wei Liu
fc6ff07fd7 docs: add a document for collecting coverage data
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-19 13:07:54 -07:00
Yi Wang
83b1a30f29 docs: fix the description of host/guest in vsock
In Connecting from Host to Guest section, the host/guest are misused,
this patch fix that.

Signed-off-by: Yi Wang <foxywang@tencent.com>
2023-10-19 09:39:17 -07:00
Muminul Islam
274f1aa2e7 virtio-devices,vm-allocator: Fix clippy warnings
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2023-10-19 08:42:17 +01:00
Muminul Islam
a1ce37c2af build: Bump MSRV to 1.65
Sev-Snp on MSHV uses igvm crate to parse the igvm file.
igvm crate needs minimum rust version 1.65 to build.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2023-10-19 08:42:17 +01:00
dependabot[bot]
6e35fe741e build: Bump bitflags from 2.3.3 to 2.4.1
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.3.3 to 2.4.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.3.3...2.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 23:58:34 +00:00
dependabot[bot]
b713ded414 build: Bump lock_api from 0.4.10 to 0.4.11 in /fuzz
Bumps [lock_api](https://github.com/Amanieu/parking_lot) from 0.4.10 to 0.4.11.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/lock_api-0.4.10...lock_api-0.4.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 23:43:08 +00:00
dependabot[bot]
88aceca983 build: Bump rustix from 0.37.21 to 0.37.25
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.21 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.21...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 20:25:58 +00:00
Thomas Barrett
3029fbeafd vmm: Allow assignment of PCI segments to NUMA node
Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
2023-10-18 11:18:15 -07:00
Bo Chen
0b4c153d4d arch, vmm: Clear AMX CPUID bits if the feature is not enabled
Fixes: #5833

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-10-18 11:13:12 -07:00
Bo Chen
7dd260f82f arch, vmm: Add new struct CpuidConfig
This struct contains all configuration fields that controls the way how
we generate CPUID for the guest on x86_64. This allows cleaner extension
when adding new configuration fields.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-10-18 11:13:12 -07:00
dependabot[bot]
30975ea102 build: Bump serde_with from 3.3.0 to 3.4.0 in /fuzz
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.3.0...v3.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 00:04:08 +00:00
Jinank Jain
1afac185ff hypervisor: Enable VMGEXIT offload for SEV-SNP partition
For a SEV-SNP enabled partition on MSHV, some of the VMGEXITS are
offloaded for Hypervisor to handle while the rest are handled by VMM.
By setting this additional partition property hypervisor is informed
about the VMGEXITs it needs to take care off, rest all would be handled
by the CloudHypervisor.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2023-10-17 14:15:38 -07:00
Bo Chen
aa6e83126c vmm: tdx: Fix a deadlock while accessing vm_config
The lock to `vm_config` is held for accessing `cpus.kvm_hyperv` passing
as a reference to `arch::generate_common_cpuid()`, so acquiring the same
lock again while calling to the same function is a deadlock.

Fixes: 3793ffe888

Reported-by: Yi Wang <foxywang@tencent.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-10-17 19:41:33 +01:00
Jinank Jain
1b59ab3d7b vmm, hypervisor: Initialize SEV-SNP VM
As part of this initialization for a SEV-SNP VM on MSHV, it is required
that we transition the guest state to secure state using partition
hypercall. This implies all the created VPs will transition to secure
state and could access the guest encrypted memory.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2023-10-17 17:45:28 +01:00
Anatol Belski
311fc05417 cpu: Store hypervisor object directly instead of separate props
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-10-17 18:43:22 +02:00
Anatol Belski
b52966a12c cpu: Implement AMD compatible topology handling
cpu: Pass APIC id explicitly where needed
topology: Set subleaf number explicitly

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-10-17 18:43:22 +02:00
dependabot[bot]
31686b91d3 build: Bump semver from 1.0.19 to 1.0.20
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.19 to 1.0.20.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.19...1.0.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 03:56:17 +00:00
dependabot[bot]
1a23a98847 build: Bump jobserver from 0.1.26 to 0.1.27 in /fuzz
Bumps [jobserver](https://github.com/alexcrichton/jobserver-rs) from 0.1.26 to 0.1.27.
- [Commits](https://github.com/alexcrichton/jobserver-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 23:30:44 +00:00
dependabot[bot]
2b8b04c129 build: Bump regex from 1.9.1 to 1.9.4
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.1 to 1.9.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.1...1.9.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 00:12:19 +00:00
dependabot[bot]
d8e71da071 build: Bump zerocopy from 0.7.8 to 0.7.11 in /fuzz
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.8 to 0.7.11.
- [Commits](https://github.com/google/zerocopy/compare/v0.7.8...v0.7.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 23:26:07 +00:00
dom.song
7f47a030e7 tests: Update spdk code to support Ampere's new CPU
When performing integration testing on the Ampere One server, an error occurred when compiling spdk and not recognizing the CPU ID.
The latest spdk already contains fixes.

Signed-off-by: dom.song <dom.song@amperecomputing.com>
2023-10-12 11:25:38 -07:00
dependabot[bot]
88f7124c5f build: Bump hermit-abi from 0.3.2 to 0.3.3
Bumps [hermit-abi](https://github.com/hermitcore/hermit-rs) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/hermitcore/hermit-rs/releases)
- [Commits](https://github.com/hermitcore/hermit-rs/compare/hermit-abi-0.3.2...hermit-abi-0.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 03:32:24 +00:00
dependabot[bot]
85894476d8 build: Bump semver from 1.0.19 to 1.0.20 in /fuzz
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.19 to 1.0.20.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.19...1.0.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 00:17:32 +00:00
Jinank Jain
a5763bcb6c hypervisor: Set isolation policy for SNP guest
It's a requirement that a SEV-SNP enabled guest on MSHV must have
isolation policy set before launching the guest.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2023-10-11 17:15:51 -07:00
dependabot[bot]
3981642dd1 build: Bump tempfile from 3.7.1 to 3.8.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.1 to 3.8.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.7.1...v3.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 08:46:02 +01:00
dependabot[bot]
4889c4847c build: Bump errno from 0.3.2 to 0.3.5
Bumps [errno](https://github.com/lambda-fairy/rust-errno) from 0.3.2 to 0.3.5.
- [Changelog](https://github.com/lambda-fairy/rust-errno/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lambda-fairy/rust-errno/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 00:22:44 +00:00
dependabot[bot]
0e798c0e92 build: Bump proc-macro2 from 1.0.67 to 1.0.69 in /fuzz
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.67 to 1.0.69.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.67...1.0.69)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 23:39:53 +00:00
dependabot[bot]
032098b10c build: Bump zerocopy from 0.7.1 to 0.7.8
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.1 to 0.7.8.
- [Commits](https://github.com/google/zerocopy/compare/v0.7.1...v0.7.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 00:17:50 +00:00
dependabot[bot]
81bee58ab3 build: Bump libc from 0.2.148 to 0.2.149 in /fuzz
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.148 to 0.2.149.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.148...0.2.149)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 23:40:40 +00:00
dependabot[bot]
328a1710f6 build: Bump sha1 from 0.10.5 to 0.10.6
Bumps [sha1](https://github.com/RustCrypto/hashes) from 0.10.5 to 0.10.6.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha1-v0.10.5...sha1-v0.10.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 08:31:47 +00:00
dependabot[bot]
12120c2e3e build: Bump byteorder from 1.4.3 to 1.5.0 in /fuzz
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.4.3 to 1.5.0.
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.4.3...1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 23:44:05 +00:00
Praveen K Paladugu
cf1ec56d3a tests: Add test for socket backend of serial port
This test creates a pty link to the socket and checks pty
interactions.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2023-10-05 15:26:29 +01:00
Praveen K Paladugu
044f3f758e serial_manager: Remove serial socket
Remove the backend socket of serial port while shutting down guest.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2023-10-05 15:26:29 +01:00
Praveen K Paladugu
6d1077fc3c vmm: Unix socket backend for serial port
Cloud-Hypervisor takes a path for Unix socket, where it will listen
on. Users can connect to the other end of the socket and access serial
port on the guest.

    "--serial socket=/path/to/socket" is the cmdline option to pass to
cloud-hypervisor.

Users can use socat like below to access guest's serial port once the
guest starts to boot:

    socat -,crnl UNIX-CONNECT:/path/to/socket

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2023-10-05 15:26:29 +01:00
dependabot[bot]
399c596af8 build: Bump zerocopy from 0.7.6 to 0.7.8 in /fuzz
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.6 to 0.7.8.
- [Commits](https://github.com/google/zerocopy/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 07:49:43 +00:00
Bo Chen
1e01b5eabc main: Report enabled features from CLI with "--version -v"
Fixes: #5817

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-10-05 08:40:50 +01:00
Bo Chen
ff651e0e28 vmm: Report enabled features from the '/vmm.ping' endpoint
Fixes: #5817

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-10-05 08:40:50 +01:00
dependabot[bot]
11838fca11 build: Bump openssl-src from 300.1.3+3.1.2 to 300.1.5+3.1.3
Bumps [openssl-src](https://github.com/alexcrichton/openssl-src-rs) from 300.1.3+3.1.2 to 300.1.5+3.1.3.
- [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases)
- [Commits](https://github.com/alexcrichton/openssl-src-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 00:10:10 +00:00
dependabot[bot]
ddf332b127 build: Bump enumflags2 from 0.7.7 to 0.7.8
Bumps [enumflags2](https://github.com/meithecatte/enumflags2) from 0.7.7 to 0.7.8.
- [Release notes](https://github.com/meithecatte/enumflags2/releases)
- [Commits](https://github.com/meithecatte/enumflags2/compare/v0.7.7...v0.7.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-04 00:02:28 +00:00
dependabot[bot]
eaee6eec2b build: Bump atomic-waker from 1.1.1 to 1.1.2
Bumps [atomic-waker](https://github.com/smol-rs/atomic-waker) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/smol-rs/atomic-waker/releases)
- [Changelog](https://github.com/smol-rs/atomic-waker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/atomic-waker/compare/v1.1.1...v1.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-03 10:06:28 -07:00
dependabot[bot]
0692cb99fb build: Bump zerocopy from 0.7.5 to 0.7.6 in /fuzz
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.5 to 0.7.6.
- [Commits](https://github.com/google/zerocopy/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 23:58:10 +00:00
dependabot[bot]
b1cc3e3cc3 build: Bump semver from 1.0.18 to 1.0.19
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.18 to 1.0.19.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.18...1.0.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-30 08:29:40 +01:00