17
0

16 Commits

Author SHA256 Message Date
35c87fdee5 Accepting request 1323732 from Virtualization
- Update to version 50.0:
  * Configurable Nested Virtualization Option on x86_64
  * Compression Support for QCOW2
  * Notable Performance Improvements
  * Live Disk Resizing Support for Raw Images
  * Improved File-level Locking Support
  * Logging Improvements
  * Fix several issues around CPUID in the guest
  * Fix snapshot/restore for Windows Guest
  * Respect queue size in block performance tests
  * Fix several Serial Manager issues
  * Fix several seccomp violation issues
  * Fix various issues around block and qcow
  * Fix live migration (and snapshot/restore) with AMX state (forwarded request 1323731 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1323732
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=9
2025-12-20 20:46:16 +00:00
Richard Rahl
c1b350e602 - Update to version 50.0:
* Configurable Nested Virtualization Option on x86_64
  * Compression Support for QCOW2
  * Notable Performance Improvements
  * Live Disk Resizing Support for Raw Images
  * Improved File-level Locking Support
  * Logging Improvements
  * Fix several issues around CPUID in the guest
  * Fix snapshot/restore for Windows Guest
  * Respect queue size in block performance tests
  * Fix several Serial Manager issues
  * Fix several seccomp violation issues
  * Fix various issues around block and qcow
  * Fix live migration (and snapshot/restore) with AMX state

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=18
2025-12-20 03:00:21 +00:00
9c4cb7aa55 Accepting request 1316950 from Virtualization
- Update to verison 49.0:
  * MSHV Support Improvements
  * Logging Improvements
  * Removed Default IP and Mask for virtio-net Devices
  * Prevent crash on malformed vsock connect requests
  * Drop the VFIO container when no VFIO devices are active
  * Gracefully close preserved file descriptors on hot device removal
  * Fix race condition in pause–resume cycles
  * Add NetConfig offload parameters to the OpenAPI spec file
  * Fix seccomp filter violation from the http-server thread (forwarded request 1316949 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1316950
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=8
2025-11-10 18:21:37 +00:00
Richard Rahl
e999e09f01 - Update to verison 49.0:
* MSHV Support Improvements
  * Logging Improvements
  * Removed Default IP and Mask for virtio-net Devices
  * Prevent crash on malformed vsock connect requests
  * Drop the VFIO container when no VFIO devices are active
  * Gracefully close preserved file descriptors on hot device removal
  * Fix race condition in pause–resume cycles
  * Add NetConfig offload parameters to the OpenAPI spec file
  * Fix seccomp filter violation from the http-server thread

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=16
2025-11-10 15:07:09 +00:00
9ca3ef2633 Accepting request 1305129 from Virtualization
- update to version 48.0:
  * Experimental fw_cfg Device Support
  * Experimental ivshmem Device Support
  * Firmware Boot Support on riscv64
  * Increased vCPU Limit on x86_64/kvm
  * Improved Block Performance with Small Block Sizes
  * Faster VM Pause Operation
  * Updated Documentation on Windows Guest Support
  * Policy on AI Generated Code
  * Removed SGX Support
  * Seccomp filter fixes with glibc v2.42 (forwarded request 1305128 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1305129
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=7
2025-09-16 16:19:01 +00:00
Richard Rahl
631456f419 - update to version 48.0:
* Experimental fw_cfg Device Support
  * Experimental ivshmem Device Support
  * Firmware Boot Support on riscv64
  * Increased vCPU Limit on x86_64/kvm
  * Improved Block Performance with Small Block Sizes
  * Faster VM Pause Operation
  * Updated Documentation on Windows Guest Support
  * Policy on AI Generated Code
  * Removed SGX Support
  * Seccomp filter fixes with glibc v2.42

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=14
2025-09-16 09:54:44 +00:00
1a9735e319 Accepting request 1295288 from Virtualization
- update to version 47.0:
  DEPRECATION:
  * A default IP (192.168.249.1) and mask (255.255.255.0) are
    currently assigned to the virtio-net device if no value is
    specified by users
  FEATURES/BUG FIXES:
  * Block Device Error Reporting to the Guest
  * Nice Error Messages on Exit
  * Alphabetically Sorted CLI Options for ch-remote
  * Error out early when block device serial is too long
  * Fix partial commands being discarded for virtio-vsock
  * Disable the broken interrupt support for the rtc_pl031 device to
    prevent spurious guest interrupts (forwarded request 1295287 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1295288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=6
2025-07-23 14:36:29 +00:00
Richard Rahl
87344d5c59 - update to version 47.0:
DEPRECATION:
  * A default IP (192.168.249.1) and mask (255.255.255.0) are
    currently assigned to the virtio-net device if no value is
    specified by users
  FEATURES/BUG FIXES:
  * Block Device Error Reporting to the Guest
  * Nice Error Messages on Exit
  * Alphabetically Sorted CLI Options for ch-remote
  * Error out early when block device serial is too long
  * Fix partial commands being discarded for virtio-vsock
  * Disable the broken interrupt support for the rtc_pl031 device to
    prevent spurious guest interrupts

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=12
2025-07-23 11:34:46 +00:00
b0549658d6 Accepting request 1279758 from Virtualization
- update to 46.0:
  * File-level Locking Support with --disk
  * Improved Error Reporting with VM Resizing
  * IPv6 Address Support with --net
  * Deprecated SGX Support
  * Remove path as required for DiskConfig from the OpenAPI spec file
  * Properly parse PCI capabilities
  * Reprogram PCI device BAR when its MSE bit is set
  * Update IOMMU mappings of MMIO regions with BAR reprogram for VFIO
    devices
  * Avoid resizing VMs to zero vCPUs
  * Fix extended topology enumeration leaf exposed to the guest (forwarded request 1279757 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1279758
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=5
2025-05-26 16:35:27 +00:00
Richard Rahl
a9620079de - update to 46.0:
* File-level Locking Support with --disk
  * Improved Error Reporting with VM Resizing
  * IPv6 Address Support with --net
  * Deprecated SGX Support
  * Remove path as required for DiskConfig from the OpenAPI spec file
  * Properly parse PCI capabilities
  * Reprogram PCI device BAR when its MSE bit is set
  * Update IOMMU mappings of MMIO regions with BAR reprogram for VFIO
    devices
  * Avoid resizing VMs to zero vCPUs
  * Fix extended topology enumeration leaf exposed to the guest

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=10
2025-05-24 10:34:40 +00:00
8db80bf4d0 Accepting request 1265534 from Virtualization
- update to 45.0:
  * Experimental `riscv64` Architecture Support (direct kernel booting
    only)
  * Alphabetically Sorted CLI Options
  * Improved Downtime of VM Live Migration
  * Fix seccomp filters related to http-api thread
  * Handle cross-page access in the emulator for mshv
- enable riscv64 builds (forwarded request 1265533 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1265534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=4
2025-03-31 09:43:40 +00:00
Richard Rahl
594a415754 - update to 45.0:
* Experimental `riscv64` Architecture Support (direct kernel booting
    only)
  * Alphabetically Sorted CLI Options
  * Improved Downtime of VM Live Migration
  * Fix seccomp filters related to http-api thread
  * Handle cross-page access in the emulator for mshv
- enable riscv64 builds

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=8
2025-03-30 13:11:55 +00:00
38d37a5559 Accepting request 1243226 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1243226
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=3
2025-02-05 11:41:30 +00:00
Richard Rahl
d40bca27ac - update to 44.0:
* Configurable virtio-iommu Address Width
  * Notable Performance Improvements
  * New Fuzzers
  * Fix short read and short write that impact QCOW and VHDX support
  * Various bug fixes on VHDX support

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=6
2025-02-04 22:34:47 +00:00
2b2a528446 Accepting request 1232731 from Virtualization
- update to 43.0:
  * Live Migration over TCP Connections
  * Notable Performance Improvements
  * Cloud Hypervisor now accepts VFIO devices that use I/O PCI BARs
    on non x86-64
  * Command line groups were adjusted to ensure that at least one payload
    parameter was provided
- remove unsafe-device-attr.patch, as upstream carries this commit
- enable unit-tests (forwarded request 1232730 from rrahl0)

OBS-URL: https://build.opensuse.org/request/show/1232731
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-hypervisor?expand=0&rev=2
2024-12-20 14:27:33 +00:00
Richard Rahl
7b9cf09547 - update to 43.0:
* Live Migration over TCP Connections
  * Notable Performance Improvements
  * Cloud Hypervisor now accepts VFIO devices that use I/O PCI BARs
    on non x86-64
  * Command line groups were adjusted to ensure that at least one payload
    parameter was provided
- remove unsafe-device-attr.patch, as upstream carries this commit
- enable unit-tests

OBS-URL: https://build.opensuse.org/package/show/Virtualization/cloud-hypervisor?expand=0&rev=4
2024-12-20 04:10:55 +00:00
11 changed files with 150 additions and 3269 deletions

2996
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,121 +0,0 @@
[package]
authors = ["The Cloud Hypervisor Authors"]
build = "build.rs"
default-run = "cloud-hypervisor"
description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM & MSHV"
edition = "2021"
homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor"
license = "Apache-2.0 AND BSD-3-Clause"
name = "cloud-hypervisor"
version = "42.0.0"
# Minimum buildable version:
# Keep in sync with version in .github/workflows/build.yaml
# Policy on MSRV (see #4318):
# Can only be bumped by:
# a.) A dependency requires it,
# b.) If we want to use a new feature and that MSRV is at least 6 months old,
# c.) There is a security issue that is addressed by the toolchain update.
rust-version = "1.77.0"
[profile.release]
codegen-units = 1
lto = true
opt-level = "s"
strip = true
[profile.profiling]
debug = true
inherits = "release"
strip = false
[dependencies]
anyhow = "1.0.87"
api_client = { path = "api_client" }
clap = { version = "4.5.13", features = ["string"] }
dhat = { version = "0.3.3", optional = true }
epoll = "4.3.3"
event_monitor = { path = "event_monitor" }
hypervisor = { path = "hypervisor" }
libc = "0.2.158"
log = { version = "0.4.22", features = ["std"] }
option_parser = { path = "option_parser" }
seccompiler = { workspace = true }
serde_json = "1.0.120"
signal-hook = "0.3.17"
thiserror = "1.0.62"
tpm = { path = "tpm" }
tracer = { path = "tracer" }
vm-fdt = { git = "https://github.com/rust-vmm/vm-fdt", branch = "main" }
vm-memory = { workspace = true }
vmm = { path = "vmm" }
vmm-sys-util = { workspace = true }
zbus = { version = "4.4.0", optional = true }
[dev-dependencies]
dirs = "5.0.1"
net_util = { path = "net_util" }
once_cell = "1.20.2"
serde_json = "1.0.120"
test_infra = { path = "test_infra" }
wait-timeout = "0.2.0"
# Please adjust `vmm::feature_list()` accordingly when changing the
# feature list below
[features]
dbus_api = ["vmm/dbus_api", "zbus"]
default = ["io_uring", "kvm"]
dhat-heap = ["dhat", "vmm/dhat-heap"] # For heap profiling
guest_debug = ["vmm/guest_debug"]
igvm = ["mshv", "vmm/igvm"]
io_uring = ["vmm/io_uring"]
kvm = ["vmm/kvm"]
mshv = ["vmm/mshv"]
pvmemcontrol = ["vmm/pvmemcontrol"]
sev_snp = ["igvm", "mshv", "vmm/sev_snp"]
tdx = ["vmm/tdx"]
tracing = ["tracer/tracing", "vmm/tracing"]
[workspace]
members = [
"api_client",
"arch",
"block",
"devices",
"event_monitor",
"hypervisor",
"net_gen",
"net_util",
"option_parser",
"pci",
"performance-metrics",
"rate_limiter",
"serial_buffer",
"test_infra",
"tracer",
"vhost_user_block",
"vhost_user_net",
"virtio-devices",
"vm-allocator",
"vm-device",
"vm-migration",
"vm-virtio",
"vmm",
]
[workspace.dependencies]
acpi_tables = { git = "https://github.com/rust-vmm/acpi_tables", branch = "main" }
kvm-bindings = "0.10.0"
kvm-ioctls = "0.19.1"
linux-loader = "0.13.0"
mshv-bindings = { git = "https://github.com/rust-vmm/mshv", tag = "v0.3.0" }
mshv-ioctls = { git = "https://github.com/rust-vmm/mshv", tag = "v0.3.0" }
seccompiler = "0.4.0"
vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main" }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
vfio_user = { git = "https://github.com/rust-vmm/vfio-user", branch = "main" }
vhost = "0.13.0"
virtio-bindings = "0.2.2"
virtio-queue = "0.14.0"
vm-fdt = { git = "https://github.com/rust-vmm/vm-fdt", branch = "main" }
vm-memory = "0.16.1"
vmm-sys-util = "0.12.1"

View File

@@ -2,7 +2,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/cloud-hypervisor/cloud-hypervisor.git</param>
<param name="revision">refs/tags/v42.0</param>
<param name="revision">refs/tags/v50.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>

View File

@@ -1,35 +0,0 @@
[source.crates-io]
replace-with = "vendored-sources"
[source."git+https://github.com/firecracker-microvm/micro-http?branch=main"]
git = "https://github.com/firecracker-microvm/micro-http"
branch = "main"
replace-with = "vendored-sources"
[source."git+https://github.com/rust-vmm/acpi_tables?branch=main"]
git = "https://github.com/rust-vmm/acpi_tables"
branch = "main"
replace-with = "vendored-sources"
[source."git+https://github.com/rust-vmm/mshv?tag=v0.3.0"]
git = "https://github.com/rust-vmm/mshv"
tag = "v0.3.0"
replace-with = "vendored-sources"
[source."git+https://github.com/rust-vmm/vfio-user?branch=main"]
git = "https://github.com/rust-vmm/vfio-user"
branch = "main"
replace-with = "vendored-sources"
[source."git+https://github.com/rust-vmm/vfio?branch=main"]
git = "https://github.com/rust-vmm/vfio"
branch = "main"
replace-with = "vendored-sources"
[source."git+https://github.com/rust-vmm/vm-fdt?branch=main"]
git = "https://github.com/rust-vmm/vm-fdt"
branch = "main"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:95888681f6a2cd5cb3d0ddaeb9b824fc2451360ad72a3fe554766be80e4271f2
size 4842508

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b2f528f2ba5be3c00d8b7d71eb44eba000d22cdbf22240aef5672c0d0535fe4a
size 5143053

View File

@@ -1,3 +1,118 @@
-------------------------------------------------------------------
Fri Dec 19 11:23:48 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- Update to version 50.0:
* Configurable Nested Virtualization Option on x86_64
* Compression Support for QCOW2
* Notable Performance Improvements
* Live Disk Resizing Support for Raw Images
* Improved File-level Locking Support
* Logging Improvements
* Fix several issues around CPUID in the guest
* Fix snapshot/restore for Windows Guest
* Respect queue size in block performance tests
* Fix several Serial Manager issues
* Fix several seccomp violation issues
* Fix various issues around block and qcow
* Fix live migration (and snapshot/restore) with AMX state
-------------------------------------------------------------------
Mon Nov 10 14:52:17 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- Update to verison 49.0:
* MSHV Support Improvements
* Logging Improvements
* Removed Default IP and Mask for virtio-net Devices
* Prevent crash on malformed vsock connect requests
* Drop the VFIO container when no VFIO devices are active
* Gracefully close preserved file descriptors on hot device removal
* Fix race condition in pauseresume cycles
* Add NetConfig offload parameters to the OpenAPI spec file
* Fix seccomp filter violation from the http-server thread
-------------------------------------------------------------------
Tue Sep 16 09:48:19 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to version 48.0:
* Experimental fw_cfg Device Support
* Experimental ivshmem Device Support
* Firmware Boot Support on riscv64
* Increased vCPU Limit on x86_64/kvm
* Improved Block Performance with Small Block Sizes
* Faster VM Pause Operation
* Updated Documentation on Windows Guest Support
* Policy on AI Generated Code
* Removed SGX Support
* Seccomp filter fixes with glibc v2.42
-------------------------------------------------------------------
Wed Jul 23 11:22:46 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to version 47.0:
DEPRECATION:
* A default IP (192.168.249.1) and mask (255.255.255.0) are
currently assigned to the virtio-net device if no value is
specified by users
FEATURES/BUG FIXES:
* Block Device Error Reporting to the Guest
* Nice Error Messages on Exit
* Alphabetically Sorted CLI Options for ch-remote
* Error out early when block device serial is too long
* Fix partial commands being discarded for virtio-vsock
* Disable the broken interrupt support for the rtc_pl031 device to
prevent spurious guest interrupts
-------------------------------------------------------------------
Sat May 24 10:24:13 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 46.0:
* File-level Locking Support with --disk
* Improved Error Reporting with VM Resizing
* IPv6 Address Support with --net
* Deprecated SGX Support
* Remove path as required for DiskConfig from the OpenAPI spec file
* Properly parse PCI capabilities
* Reprogram PCI device BAR when its MSE bit is set
* Update IOMMU mappings of MMIO regions with BAR reprogram for VFIO
devices
* Avoid resizing VMs to zero vCPUs
* Fix extended topology enumeration leaf exposed to the guest
-------------------------------------------------------------------
Sun Mar 30 11:37:05 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 45.0:
* Experimental `riscv64` Architecture Support (direct kernel booting
only)
* Alphabetically Sorted CLI Options
* Improved Downtime of VM Live Migration
* Fix seccomp filters related to http-api thread
* Handle cross-page access in the emulator for mshv
- enable riscv64 builds
-------------------------------------------------------------------
Tue Feb 4 22:13:14 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 44.0:
* Configurable virtio-iommu Address Width
* Notable Performance Improvements
* New Fuzzers
* Fix short read and short write that impact QCOW and VHDX support
* Various bug fixes on VHDX support
-------------------------------------------------------------------
Fri Dec 20 02:30:23 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 43.0:
* Live Migration over TCP Connections
* Notable Performance Improvements
* Cloud Hypervisor now accepts VFIO devices that use I/O PCI BARs
on non x86-64
* Command line groups were adjusted to ensure that at least one payload
parameter was provided
- remove unsafe-device-attr.patch, as upstream carries this commit
- enable unit-tests
-------------------------------------------------------------------
Wed Dec 11 23:27:05 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>

View File

@@ -1,4 +1,4 @@
name: cloud-hypervisor
version: 42.0
mtime: 1729846122
commit: 7322f33368dfbdbe7b46334bba17c56b35675c00
version: 50.0
mtime: 1766102881
commit: 9a24680abdfedf014e496bced49e11b26dda582c

View File

@@ -1,7 +1,7 @@
#
# spec file for package cloud-hypervisor
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,29 +17,25 @@
Name: cloud-hypervisor
Version: 42.0
Version: 50.0
Release: 0
Summary: A Virtual Machine Monitor
License: Apache-2.0 AND BSD-3-Clause
URL: https://cloudhypervisor.org
Source0: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
Source2: Cargo.toml
Source3: Cargo.lock
Source4: cargo.config
## FIX-UPSTREAM remove by 43.0 get_device_attr is now an unsafe call
Patch0: https://github.com/cloud-hypervisor/cloud-hypervisor/commit/838a8573115efc344648efac29e07ccaa2d008fa.patch#/unsafe-device-attr.patch
BuildRequires: bison
BuildRequires: cargo
BuildRequires: cargo-packaging
BuildRequires: clang-devel
BuildRequires: flex
BuildRequires: git-core
BuildRequires: qemu-tools
BuildRequires: rust >= 1.77
BuildRequires: rust >= 1.89
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(ossp-uuid)
# restrict to aarch64 x86_64 (and from 43.0 riscv64)
ExclusiveArch: aarch64 x86_64
#riscv is still not ready
ExclusiveArch: aarch64 riscv64 x86_64
%description
Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on
@@ -60,11 +56,7 @@ Summary: Remote tool for accessing a cloud hypervisor instance
%{summary}.
%prep
%autosetup -a1 -p1
cp %{SOURCE2} .
cp %{SOURCE3} .
mkdir -p .cargo
cp %{SOURCE4} .cargo/config.toml
%autosetup -a1
%build
%{cargo_build}
@@ -73,6 +65,25 @@ cp %{SOURCE4} .cargo/config.toml
install -Dm0755 ./target/release/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm0755 ./target/release/ch-remote %{buildroot}%{_bindir}/ch-remote
%ifnarch riscv64
%check
# skipped tests need kvm enabled
%{cargo_test} -- --test unit_tests:: \
--skip cpu::unit_tests:: \
--skip unit_tests::test_vmm_vm_cold_add_device \
--skip unit_tests::test_vmm_vm_cold_add_disk \
--skip unit_tests::test_vmm_vm_cold_add_fs \
--skip unit_tests::test_vmm_vm_cold_add_net \
--skip unit_tests::test_vmm_vm_cold_add_pmem \
--skip unit_tests::test_vmm_vm_cold_add_user_device \
--skip unit_tests::test_vmm_vm_cold_add_vdpa \
--skip unit_tests::test_vmm_vm_cold_add_vsock \
--skip unit_tests::test_vmm_vm_create \
--skip vm::unit_tests::test_vm \
--skip kvm::aarch64:: \
--skip vm::unit_tests::test_create_fdt_with_devices
%endif
%files
%license LICENSES/Apache-2.0.txt LICENSES/BSD-3-Clause.txt LICENSES/CC-BY-4.0.txt
%doc README.md

View File

@@ -1,93 +0,0 @@
From 838a8573115efc344648efac29e07ccaa2d008fa Mon Sep 17 00:00:00 2001
From: Ruoqing He <heruoqing@iscas.ac.cn>
Date: Mon, 4 Nov 2024 15:04:36 +0800
Subject: [PATCH] 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>
---
hypervisor/src/kvm/aarch64/gic/dist_regs.rs | 6 ++----
hypervisor/src/kvm/aarch64/gic/icc_regs.rs | 3 +--
hypervisor/src/kvm/aarch64/gic/mod.rs | 9 +++------
hypervisor/src/kvm/aarch64/gic/redist_regs.rs | 3 +--
4 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/hypervisor/src/kvm/aarch64/gic/dist_regs.rs b/hypervisor/src/kvm/aarch64/gic/dist_regs.rs
index 8c4809476c..9135ad0031 100644
--- a/hypervisor/src/kvm/aarch64/gic/dist_regs.rs
+++ b/hypervisor/src/kvm/aarch64/gic/dist_regs.rs
@@ -103,9 +103,8 @@ fn dist_attr_get(gic: &DeviceFd, offset: u32) -> Result<u32> {
flags: 0,
};
- // get_device_attr should be marked as unsafe, and will be in future.
// SAFETY: gic_dist_attr.addr is safe to write to.
- gic.get_device_attr(&mut gic_dist_attr).map_err(|e| {
+ unsafe { gic.get_device_attr(&mut gic_dist_attr) }.map_err(|e| {
Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
})?;
@@ -131,9 +130,8 @@ fn get_interrupts_num(gic: &DeviceFd) -> Result<u32> {
addr: &mut num_irq as *mut u32 as u64,
flags: 0,
};
- // get_device_attr should be marked as unsafe, and will be in future.
// SAFETY: nr_irqs_attr.addr is safe to write to.
- gic.get_device_attr(&mut nr_irqs_attr).map_err(|e| {
+ unsafe { gic.get_device_attr(&mut nr_irqs_attr) }.map_err(|e| {
Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
})?;
Ok(num_irq)
diff --git a/hypervisor/src/kvm/aarch64/gic/icc_regs.rs b/hypervisor/src/kvm/aarch64/gic/icc_regs.rs
index 24fba17278..f993581840 100644
--- a/hypervisor/src/kvm/aarch64/gic/icc_regs.rs
+++ b/hypervisor/src/kvm/aarch64/gic/icc_regs.rs
@@ -105,9 +105,8 @@ fn icc_attr_get(gic: &DeviceFd, offset: u64, typer: u64) -> Result<u32> {
flags: 0,
};
- // get_device_attr should be marked as unsafe, and will be in future.
// SAFETY: gic_icc_attr.addr is safe to write to.
- gic.get_device_attr(&mut gic_icc_attr).map_err(|e| {
+ unsafe { gic.get_device_attr(&mut gic_icc_attr) }.map_err(|e| {
Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
})?;
diff --git a/hypervisor/src/kvm/aarch64/gic/mod.rs b/hypervisor/src/kvm/aarch64/gic/mod.rs
index eead0da7df..9b8b8668e3 100644
--- a/hypervisor/src/kvm/aarch64/gic/mod.rs
+++ b/hypervisor/src/kvm/aarch64/gic/mod.rs
@@ -49,13 +49,10 @@ fn gicv3_its_attr_get(its_device: &DeviceFd, group: u32, attr: u32) -> Result<u6
flags: 0,
};
- // get_device_attr should be marked as unsafe, and will be in future.
// SAFETY: gicv3_its_attr.addr is safe to write to.
- its_device
- .get_device_attr(&mut gicv3_its_attr)
- .map_err(|e| {
- Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
- })?;
+ unsafe { its_device.get_device_attr(&mut gicv3_its_attr) }.map_err(|e| {
+ Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
+ })?;
Ok(val)
}
diff --git a/hypervisor/src/kvm/aarch64/gic/redist_regs.rs b/hypervisor/src/kvm/aarch64/gic/redist_regs.rs
index c1803a12fa..13f7cffc4d 100644
--- a/hypervisor/src/kvm/aarch64/gic/redist_regs.rs
+++ b/hypervisor/src/kvm/aarch64/gic/redist_regs.rs
@@ -121,9 +121,8 @@ fn redist_attr_get(gic: &DeviceFd, offset: u32, typer: u64) -> Result<u32> {
flags: 0,
};
- // get_device_attr should be marked as unsafe, and will be in future.
// SAFETY: gic_redist_attr.addr is safe to write to.
- gic.get_device_attr(&mut gic_redist_attr).map_err(|e| {
+ unsafe { gic.get_device_attr(&mut gic_redist_attr) }.map_err(|e| {
Error::GetDeviceAttribute(HypervisorDeviceError::GetDeviceAttribute(e.into()))
})?;

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c775480ee4158e7c78404c197c2f8865f98ae6562daf5fb9df44e13d1c9b5ef
size 49656669
oid sha256:f14fc60babba2335757ecaaab048578c177d5492f5fd8788d4563aa1b5fef572
size 28831009