!95 [sync] PR-94: 【vsock】关闭VIRTIO_F_ACCESS_PLATFORM特性
From: @openeuler-sync-bot Reviewed-by: @yezengruan Signed-off-by: @yezengruan
This commit is contained in:
commit
2e88b96aa7
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: stratovirt
|
Name: stratovirt
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 13
|
Release: 14
|
||||||
Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization.
|
Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization.
|
||||||
|
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
@ -17,6 +17,7 @@ Source0: https://gitee.com/openeuler/stratovirt/releases/download/v%{vers
|
|||||||
ExclusiveArch: x86_64 aarch64
|
ExclusiveArch: x86_64 aarch64
|
||||||
|
|
||||||
Patch001: util-byte_code-Fix-UT-failure-under-high-version-rus.patch
|
Patch001: util-byte_code-Fix-UT-failure-under-high-version-rus.patch
|
||||||
|
Patch002: vsock-diable-VIRTIO_F_ACCESS_PLATFORM-feature.patch
|
||||||
|
|
||||||
Requires: pixman
|
Requires: pixman
|
||||||
Requires: pixman-devel
|
Requires: pixman-devel
|
||||||
@ -109,6 +110,9 @@ install -D -m555 ./target/%{rust_musl_target}/release/stratovirt %{buildroot}%{_
|
|||||||
install -D -m555 ./target/%{rust_musl_target}/release/vhost_user_fs %{buildroot}%{_libdir}/stratovirt/static
|
install -D -m555 ./target/%{rust_musl_target}/release/vhost_user_fs %{buildroot}%{_libdir}/stratovirt/static
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 1 2023 Yan Wang <wangyan122@huawei.com> - 2.2.0-14
|
||||||
|
- Diable VIRTIO_F_ACCESS_PLATFORM feature in vsock
|
||||||
|
|
||||||
* Sat Mar 11 2023 liuxiangdong <liuxiangdong5@huawei.com> - 2.2.0-13
|
* Sat Mar 11 2023 liuxiangdong <liuxiangdong5@huawei.com> - 2.2.0-13
|
||||||
- add -static-pie for musl
|
- add -static-pie for musl
|
||||||
|
|
||||||
|
|||||||
42
vsock-diable-VIRTIO_F_ACCESS_PLATFORM-feature.patch
Normal file
42
vsock-diable-VIRTIO_F_ACCESS_PLATFORM-feature.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 7e8d64b3c21f606dd0b030f324b098444d489bc3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yan Wang <wangyan122@huawei.com>
|
||||||
|
Date: Fri, 1 Sep 2023 17:19:26 +0800
|
||||||
|
Subject: [PATCH] vsock: diable VIRTIO_F_ACCESS_PLATFORM feature
|
||||||
|
|
||||||
|
Currently, we don't support VIRTIO_F_ACCESS_PLATFORM feature.
|
||||||
|
So, disable it.
|
||||||
|
|
||||||
|
Signed-off-by: Yan Wang <wangyan122@huawei.com>
|
||||||
|
---
|
||||||
|
virtio/src/vhost/kernel/vsock.rs | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/virtio/src/vhost/kernel/vsock.rs b/virtio/src/vhost/kernel/vsock.rs
|
||||||
|
index 17bc342..2b05fd0 100644
|
||||||
|
--- a/virtio/src/vhost/kernel/vsock.rs
|
||||||
|
+++ b/virtio/src/vhost/kernel/vsock.rs
|
||||||
|
@@ -30,7 +30,8 @@ use crate::VirtioError;
|
||||||
|
use anyhow::{anyhow, bail, Context, Result};
|
||||||
|
|
||||||
|
use super::super::super::{
|
||||||
|
- Queue, VirtioDevice, VirtioInterrupt, VirtioInterruptType, VIRTIO_TYPE_VSOCK,
|
||||||
|
+ Queue, VirtioDevice, VirtioInterrupt, VirtioInterruptType, VIRTIO_F_ACCESS_PLATFORM,
|
||||||
|
+ VIRTIO_TYPE_VSOCK,
|
||||||
|
};
|
||||||
|
use super::super::{VhostNotify, VhostOps};
|
||||||
|
use super::{VhostBackend, VhostIoHandler, VHOST_VSOCK_SET_GUEST_CID, VHOST_VSOCK_SET_RUNNING};
|
||||||
|
@@ -174,9 +175,10 @@ impl VirtioDevice for Vsock {
|
||||||
|
backend
|
||||||
|
.set_owner()
|
||||||
|
.with_context(|| "Failed to set owner for vsock")?;
|
||||||
|
- self.state.device_features = backend
|
||||||
|
+ let features = backend
|
||||||
|
.get_features()
|
||||||
|
.with_context(|| "Failed to get features for vsock")?;
|
||||||
|
+ self.state.device_features = features & !(1_u64 << VIRTIO_F_ACCESS_PLATFORM);
|
||||||
|
self.backend = Some(backend);
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user