mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-12 20:39:30 +00:00
qemu-virtiofs: Update to qemu 5.0 + virtiofs + dax
[ Port from packaging commit cbe53bdb14e303830fa9f2d5a7f3c9161a32f033 ] Update build scripts for qemu-virtiofs. - virtiofs-0.3 patches are not needed - Sync build on how vanilla qemu is built - Apply patches for virtiofsd if any (none today) - Apply patches that are used for the qemu vanilla - Apply patches in order Fixes: #461 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com> Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
committed by
Bo Chen
parent
3ec05a9f95
commit
04b156f604
@@ -1,26 +0,0 @@
|
||||
From 2317a63d2acab16be4655ec87542a2bf3d75551b Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Thu, 26 Sep 2019 18:41:34 +0100
|
||||
Subject: [PATCH] virtiofsd: Add time to seccomp
|
||||
|
||||
Needed by static builds
|
||||
|
||||
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
---
|
||||
contrib/virtiofsd/seccomp.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/contrib/virtiofsd/seccomp.c b/contrib/virtiofsd/seccomp.c
|
||||
index 3b92c6ee13..374bab2bef 100644
|
||||
--- a/contrib/virtiofsd/seccomp.c
|
||||
+++ b/contrib/virtiofsd/seccomp.c
|
||||
@@ -75,6 +75,7 @@ static const int syscall_whitelist[] = {
|
||||
SCMP_SYS(setresuid),
|
||||
SCMP_SYS(set_robust_list),
|
||||
SCMP_SYS(symlinkat),
|
||||
+ SCMP_SYS(time), /* Rarely needed, except on static builds */
|
||||
SCMP_SYS(tgkill),
|
||||
SCMP_SYS(unlinkat),
|
||||
SCMP_SYS(utimensat),
|
||||
--
|
||||
2.21.0
|
@@ -1,50 +0,0 @@
|
||||
From 47adda63e398a179b6211763377c8f61c5d62f5a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||
Date: Wed, 7 Aug 2019 07:15:32 -0700
|
||||
Subject: [PATCH] libvhost-user: Fix the VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
|
||||
check
|
||||
|
||||
Vhost user protocol features are set as a bitmask. And the following
|
||||
constant VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD value is 10 because the bit
|
||||
10 indicates if the features is set or not.
|
||||
|
||||
The proper way to check for the presence or absence of this feature is
|
||||
to shift 1 by the value of this constant and then mask it with the
|
||||
actual bitmask representing the supported protocol features.
|
||||
|
||||
This patch aims to fix the current code as it was not doing the
|
||||
shifting, but instead it was masking directly with the value of the
|
||||
constant itself.
|
||||
|
||||
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||
---
|
||||
contrib/libvhost-user/libvhost-user.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
|
||||
index 215ce22b79..626e2a035f 100644
|
||||
--- a/contrib/libvhost-user/libvhost-user.c
|
||||
+++ b/contrib/libvhost-user/libvhost-user.c
|
||||
@@ -1129,7 +1129,8 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *vq, int fd,
|
||||
|
||||
vmsg.fd_num = fd_num;
|
||||
|
||||
- if ((dev->protocol_features & VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) == 0) {
|
||||
+ if ((dev->protocol_features &
|
||||
+ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2554,7 +2555,8 @@ int64_t vu_fs_cache_request(VuDev *dev, VhostUserSlaveRequest req, int fd,
|
||||
|
||||
vmsg.fd_num = fd_num;
|
||||
|
||||
- if ((dev->protocol_features & VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) == 0) {
|
||||
+ if ((dev->protocol_features &
|
||||
+ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) == 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
Reference in New Issue
Block a user