Muminul Islam
959ea7115f
vmm: implement AccessPlatform for SEV-SNP proxy struct
...
Implement AccessPlatform for SEV-SNP guest to access
restricted page using IO. VMM calls MSHV api to get access
of the pages, MSHV requests guest to release the access.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2024-08-09 17:40:13 +00:00
Muminul Islam
398e9338a7
vmm: add a proxy struct for SEV-SNP guest
...
Add a structure to hold the reference of the Vm trait
from Hypervisor crate to access of restricted page
from SEV-SNP guest.
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2024-08-09 17:40:13 +00:00
Muminul Islam
5c4b5c0e40
hypervisor: mshv: add definition to get access pages
...
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2024-08-09 17:40:13 +00:00
dependabot[bot]
f9bd2aaf9f
build: Bump errno from 0.3.8 to 0.3.9
...
Bumps [errno](https://github.com/lambda-fairy/rust-errno ) from 0.3.8 to 0.3.9.
- [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>
2024-08-09 07:38:12 +00:00
dependabot[bot]
f126288159
build: Bump anstyle-wincon from 3.0.3 to 3.0.4 in /fuzz
...
Bumps [anstyle-wincon](https://github.com/rust-cli/anstyle ) from 3.0.3 to 3.0.4.
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-wincon-v3.0.3...anstyle-wincon-v3.0.4 )
---
updated-dependencies:
- dependency-name: anstyle-wincon
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 00:05:18 +00:00
dependabot[bot]
9f9a4e657f
build: Bump async-channel from 2.2.0 to 2.3.0
...
Bumps [async-channel](https://github.com/smol-rs/async-channel ) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/smol-rs/async-channel/releases )
- [Changelog](https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/async-channel/compare/v2.2.0...v2.3.0 )
---
updated-dependencies:
- dependency-name: async-channel
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 00:44:32 +00:00
dependabot[bot]
3097d78c6e
build: Bump jobserver from 0.1.31 to 0.1.32 in /fuzz
...
Bumps [jobserver](https://github.com/rust-lang/jobserver-rs ) from 0.1.31 to 0.1.32.
- [Commits](https://github.com/rust-lang/jobserver-rs/compare/0.1.31...0.1.32 )
---
updated-dependencies:
- dependency-name: jobserver
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 00:34:17 +00:00
dependabot[bot]
7c2a252c02
build: Bump toml_datetime from 0.6.6 to 0.6.8 in /fuzz
...
Bumps [toml_datetime](https://github.com/toml-rs/toml ) from 0.6.6 to 0.6.8.
- [Commits](https://github.com/toml-rs/toml/compare/toml_datetime-v0.6.6...toml_datetime-v0.6.8 )
---
updated-dependencies:
- dependency-name: toml_datetime
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 00:06:19 +00:00
dependabot[bot]
a87b25a962
build: Bump bumpalo from 3.15.4 to 3.16.0
...
Bumps [bumpalo](https://github.com/fitzgen/bumpalo ) from 3.15.4 to 3.16.0.
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md )
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.15.4...3.16.0 )
---
updated-dependencies:
- dependency-name: bumpalo
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 23:55:41 +00:00
Wei Liu
24ed063dbe
github: add build and clippy tests for pvmemcontrol
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-08-06 18:39:30 +00:00
dependabot[bot]
fbac81843f
build: Bump clap from 4.5.9 to 4.5.13 in /fuzz
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.9 to 4.5.13.
- [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/clap_complete-v4.5.9...v4.5.13 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 08:08:06 +00:00
dependabot[bot]
610a2234dc
build: Bump ppv-lite86 from 0.2.17 to 0.2.20
...
Bumps [ppv-lite86](https://github.com/cryptocorrosion/cryptocorrosion ) from 0.2.17 to 0.2.20.
- [Commits](https://github.com/cryptocorrosion/cryptocorrosion/commits )
---
updated-dependencies:
- dependency-name: ppv-lite86
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:49:43 +00:00
Yuanchu Xie
5f18ac3bc0
devices: Add pvmemcontrol device
...
Pvmemcontrol provides a way for the guest to control its physical memory
properties, and enables optimizations and security features. For
example, the guest can provide information to the host where parts of a
hugepage may be unbacked, or sensitive data may not be swapped out, etc.
Pvmemcontrol allows guests to manipulate its gPTE entries in the SLAT,
and also some other properties of the memory map the back's host memory.
This is achieved by using the KVM_CAP_SYNC_MMU capability. When this
capability is available, the changes in the backing of the memory region
on the host are automatically reflected into the guest. For example, an
mmap() or madvise() that affects the region will be made visible
immediately.
There are two components of the implementation: the guest Linux driver
and Virtual Machine Monitor (VMM) device. A guest-allocated shared
buffer is negotiated per-cpu through a few PCI MMIO registers, the VMM
device assigns a unique command for each per-cpu buffer. The guest
writes its pvmemcontrol request in the per-cpu buffer, then writes the
corresponding command into the command register, calling into the VMM
device to perform the pvmemcontrol request.
The synchronous per-cpu shared buffer approach avoids the kick and busy
waiting that the guest would have to do with virtio virtqueue transport.
The Cloud Hypervisor component can be enabled with --pvmemcontrol.
Co-developed-by: Stanko Novakovic <stanko@google.com>
Co-developed-by: Pasha Tatashin <tatashin@google.com>
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2024-08-05 22:41:56 +00:00
Yuanchu Xie
4bf2d4f7dd
pci: Remove BusDevice requirement from PciDevice
...
The BusDevice requirement is not needed, only Send is required.
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2024-08-05 22:41:56 +00:00
Yuanchu Xie
954f3dd057
vm-device: generalize BusDevice to use a shared reference
...
BusDevice trait functions currently holds a mutable reference to self,
and exclusive access is guaranteed by taking a Mutex when dispatched by
the Bus object. However, this prevents individual devices from serving
accesses that do not require an mutable reference or is better served
with different synchronization primitives. We switch Bus to dispatch via
BusDeviceSync, which holds a shared reference, and delegate locking to
the BusDeviceSync trait implementation for Mutex<BusDevice>.
Other changes are made to make use of the dyn BusDeviceSync
trait object.
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2024-08-05 22:41:56 +00:00
Praveen K Paladugu
026e2c6aa8
docs: Minor doc update
...
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-08-05 17:46:30 +00:00
Praveen K Paladugu
be9f57dcf9
vmm: Add landlock elements to openapi spec
...
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-08-05 17:46:30 +00:00
Praveen K Paladugu
bd180bc3eb
main: rename landlock_config to landlock_rules
...
To keep the naming consistent, rename all uses of landlock_config
to landlock_rules.
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-08-05 17:46:30 +00:00
Praveen K Paladugu
b9f086bcb3
tests: drop landlock parameter while starting dest
...
After moving landlock config to VMConfig, there is no need to start
destination VM with landlock cmdline options in
test_live_migration_with_landlock test.
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-08-05 17:46:30 +00:00
Praveen K Paladugu
d2f0e8aebb
Revert "vmm: make landlock configs VMM-level config"
...
This reverts commit 94929889ac
.
This revert moves landlock config back to VMConfig.
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2024-08-05 17:46:30 +00:00
dependabot[bot]
513973873c
build: Bump igvm from 0.3.1 to 0.3.3
...
Bumps [igvm](https://github.com/microsoft/igvm ) from 0.3.1 to 0.3.3.
- [Release notes](https://github.com/microsoft/igvm/releases )
- [Commits](https://github.com/microsoft/igvm/compare/igvm-v0.3.1...igvm-v0.3.3 )
---
updated-dependencies:
- dependency-name: igvm
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 23:56:38 +00:00
dependabot[bot]
4c52fa344e
build: Bump anstyle-query from 1.1.0 to 1.1.1 in /fuzz
...
Bumps [anstyle-query](https://github.com/rust-cli/anstyle ) from 1.1.0 to 1.1.1.
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.1.0...anstyle-query-v1.1.1 )
---
updated-dependencies:
- dependency-name: anstyle-query
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 23:48:15 +00:00
Songqian Li
e18d32bac2
performance-metrics: add restore latency performance metric
...
This patch calculates the recovery latency from the start of
recovery program to the end of restore.
Signed-off-by: Songqian Li <sionli@tencent.com>
2024-08-02 08:29:03 +00:00
dependabot[bot]
59185050d5
build: Bump colorchoice from 1.0.1 to 1.0.2 in /fuzz
...
Bumps [colorchoice](https://github.com/rust-cli/anstyle ) from 1.0.1 to 1.0.2.
- [Commits](https://github.com/rust-cli/anstyle/compare/colorchoice-v1.0.1...colorchoice-v1.0.2 )
---
updated-dependencies:
- dependency-name: colorchoice
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 00:44:49 +00:00
dependabot[bot]
dc72ef42dc
build: Bump serde_with from 3.7.0 to 3.9.0
...
Bumps [serde_with](https://github.com/jonasbb/serde_with ) from 3.7.0 to 3.9.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases )
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.7.0...v3.9.0 )
---
updated-dependencies:
- dependency-name: serde_with
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 00:35:54 +00:00
dependabot[bot]
68bb32a3e7
build: Bump cc from 1.0.104 to 1.1.7 in /fuzz
...
Bumps [cc](https://github.com/rust-lang/cc-rs ) from 1.0.104 to 1.1.7.
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.104...cc-v1.1.7 )
---
updated-dependencies:
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 12:27:25 +00:00
dependabot[bot]
0f89387475
build: Bump zerocopy from 0.7.32 to 0.7.35
...
Bumps [zerocopy](https://github.com/google/zerocopy ) from 0.7.32 to 0.7.35.
- [Release notes](https://github.com/google/zerocopy/releases )
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md )
- [Commits](https://github.com/google/zerocopy/commits )
---
updated-dependencies:
- dependency-name: zerocopy
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 00:34:37 +00:00
Wei Liu
f5b2eb5c76
virtio-devices: vsock: drop a useless line
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-31 16:36:10 +00:00
Wei Liu
82ac114b8a
virtio-devices: vsock: handle short read in muxer
...
Use read_exact to make sure we really get the minimum number of bytes.
Fixes : #6621
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-31 16:36:10 +00:00
dependabot[bot]
2ffd5df018
build: Bump clap_lex from 0.7.1 to 0.7.2 in /fuzz
...
Bumps [clap_lex](https://github.com/clap-rs/clap ) from 0.7.1 to 0.7.2.
- [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/clap_lex-v0.7.1...clap_lex-v0.7.2 )
---
updated-dependencies:
- dependency-name: clap_lex
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 07:30:47 +00:00
dependabot[bot]
006a12d911
build: Bump colorchoice from 1.0.0 to 1.0.2
...
Bumps [colorchoice](https://github.com/rust-cli/anstyle ) from 1.0.0 to 1.0.2.
- [Commits](https://github.com/rust-cli/anstyle/compare/colorchoice-v1.0.0...colorchoice-v1.0.2 )
---
updated-dependencies:
- dependency-name: colorchoice
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 00:22:37 +00:00
dependabot[bot]
bb55976454
build: Bump num_enum from 0.7.2 to 0.7.3
...
Bumps [num_enum](https://github.com/illicitonion/num_enum ) from 0.7.2 to 0.7.3.
- [Commits](https://github.com/illicitonion/num_enum/compare/0.7.2...0.7.3 )
---
updated-dependencies:
- dependency-name: num_enum
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 08:24:29 +00:00
dependabot[bot]
a15e041138
build: Bump anstyle from 1.0.7 to 1.0.8 in /fuzz
...
Bumps [anstyle](https://github.com/rust-cli/anstyle ) from 1.0.7 to 1.0.8.
- [Commits](https://github.com/rust-cli/anstyle/compare/v1.0.7...v1.0.8 )
---
updated-dependencies:
- dependency-name: anstyle
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 00:44:06 +00:00
dependabot[bot]
0fa96402b8
build: Bump paste from 1.0.14 to 1.0.15
...
Bumps [paste](https://github.com/dtolnay/paste ) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/dtolnay/paste/releases )
- [Commits](https://github.com/dtolnay/paste/compare/1.0.14...1.0.15 )
---
updated-dependencies:
- dependency-name: paste
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 16:25:22 +00:00
dependabot[bot]
bc0ef1d8ba
build: Bump is_terminal_polyfill from 1.70.0 to 1.70.1 in /fuzz
...
Bumps [is_terminal_polyfill](https://github.com/polyfill-rs/is_terminal_polyfill ) from 1.70.0 to 1.70.1.
- [Changelog](https://github.com/polyfill-rs/is_terminal_polyfill/blob/main-v1.70/CHANGELOG.md )
- [Commits](https://github.com/polyfill-rs/is_terminal_polyfill/compare/v1.70.0...v1.70.1 )
---
updated-dependencies:
- dependency-name: is_terminal_polyfill
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-27 00:41:27 +00:00
dependabot[bot]
86153225cf
build: Bump darling from 0.20.8 to 0.20.10 in /fuzz
...
Bumps [darling](https://github.com/TedDriggs/darling ) from 0.20.8 to 0.20.10.
- [Release notes](https://github.com/TedDriggs/darling/releases )
- [Changelog](https://github.com/TedDriggs/darling/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TedDriggs/darling/compare/v0.20.8...v0.20.10 )
---
updated-dependencies:
- dependency-name: darling
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 08:31:02 +00:00
dependabot[bot]
ddc3f194aa
build: Bump anyhow from 1.0.81 to 1.0.86
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.81 to 1.0.86.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.86 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-26 00:25:08 +00:00
dependabot[bot]
c6cc3d3ba9
build: Bump utf8parse from 0.2.1 to 0.2.2 in /fuzz
...
Bumps [utf8parse](https://github.com/alacritty/vte ) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/alacritty/vte/releases )
- [Changelog](https://github.com/alacritty/vte/blob/master/CHANGELOG.md )
- [Commits](https://github.com/alacritty/vte/compare/utf8parse_v0.2.1...utf8parse_v0.2.2 )
---
updated-dependencies:
- dependency-name: utf8parse
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 12:19:27 +00:00
dependabot[bot]
0fbb3e2c2c
build: Bump serde_json from 1.0.115 to 1.0.120
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.115 to 1.0.120.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.120 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 00:28:26 +00:00
Jinank Jain
330e1aac36
hypervisor: mshv: Clear SW_EXIT_INFO1 in case of no error
...
There were some scenarios where we are not clearing SW_EXIT_INFO1 to
indicate that there were no error while handling the GHCB exit.
Recently, new Linux guests got stricter with checking the value of
SW_EXIT_INFO1 after coming back from VMGEXIT and started crashing. Fix
this behavior by clearing out SW_EXIT_INFO1 in case of no error.
Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2024-07-24 01:31:10 +00:00
dependabot[bot]
5fddf76a3b
build: Bump remain from 0.2.13 to 0.2.14
...
Bumps [remain](https://github.com/dtolnay/remain ) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/dtolnay/remain/releases )
- [Commits](https://github.com/dtolnay/remain/compare/0.2.13...0.2.14 )
---
updated-dependencies:
- dependency-name: remain
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 00:28:08 +00:00
dependabot[bot]
b50dfb3538
build: Bump syn from 2.0.70 to 2.0.72 in /fuzz
...
Bumps [syn](https://github.com/dtolnay/syn ) from 2.0.70 to 2.0.72.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.70...2.0.72 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 00:19:04 +00:00
dependabot[bot]
502995746a
build: Bump anstream from 0.6.13 to 0.6.14
...
Bumps [anstream](https://github.com/rust-cli/anstyle ) from 0.6.13 to 0.6.14.
- [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.13...anstream-v0.6.14 )
---
updated-dependencies:
- dependency-name: anstream
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 21:07:26 +00:00
Wei Liu
8aa2d7ab2a
devices: use byte strings directly
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
Wei Liu
bd8c28d341
vmm: use inspect_err instead of map_err
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
Wei Liu
422906a0c7
performance-metrics: use inspect_err instead of map_err
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
Wei Liu
b7512263be
virtio-devices: iommu: use inspect_err instead of map_err
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
Wei Liu
7e749c0390
block: use inspect_err instead of map_err
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
Wei Liu
61a5bae25c
option_parser: use an array directly to simplify code
...
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2024-07-23 21:07:17 +00:00
wuxinyue
a2438700e4
virtio-devices: support event idx for virtio-blk
...
Support event idx feature for virtio-blk device.
This feature could improve disk IO performance by suppressing
notifications from guest to host and interrupts from host to
guest, which has been already supported in virtio-net and
vhost-user devices.
To achieve this, virtqueue's event-idx-related API is
leveraged for avail_event field update and needs_notification
check.
Fixes : #6580
Signed-off-by: wuxinyue <wuxinyue.wxy@antgroup.com>
2024-07-23 14:16:34 +00:00