summary refs log tree commit diff
path: root/pkgs/cloud-hypervisor/vhost/0003-vhost_user-add-protocol-flag-for-shmem.patch
blob: 0ab20dd1e873dbcd45c91c88288f2c6cc2d94f39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From d0dfc05aa3789cbc2a1a2057ae4f5aae0913ae3d Mon Sep 17 00:00:00 2001
From: David Stevens <stevensd@chromium.org>
Date: Thu, 13 Oct 2022 10:37:47 +0900
Subject: [PATCH 3/4] vhost_user: add protocol flag for shmem
SPDX-FileCopyrightText: 2019-2021 Alibaba Cloud. All rights reserved.
SPDX-FileCopyrightText: The Chromium OS Authors
SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
SPDX-License-Identifier: Apache-2.0

Add a vhost protocol feature flag for shared memory region support. This
is necessary to avoid sending the GET_SHARED_MEMORY_REGIONS message to
backends which don't support it.

BUG=b:252901073
TEST=crosvm device wl

Change-Id: I044926e982526c3c76063b5386cab0db72524707
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3951472
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
(cherry-picked from commit 60aa43629ae9be2cc3df37c648ab7e0e5ff2172c)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
 vhost/src/vhost_user/message.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vhost/src/vhost_user/message.rs b/vhost/src/vhost_user/message.rs
index 67fc19a..7815d3e 100644
--- a/vhost/src/vhost_user/message.rs
+++ b/vhost/src/vhost_user/message.rs
@@ -440,6 +440,8 @@ bitflags! {
         const STATUS = 0x0001_0000;
         /// Support Xen mmap.
         const XEN_MMAP = 0x0002_0000;
+        /// Support shared memory regions.
+        const SHARED_MEMORY_REGIONS = 0x0002_0000;
     }
 }
 
-- 
2.43.0