diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-16 21:14:05 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-16 23:46:01 +0100 |
commit | 17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb (patch) | |
tree | 27c03ef02dcf03770d77957f76313ab5557bf980 /pkgs | |
parent | 8af86fe4f1ce32b34c434f236ff9cca0f58e6292 (diff) | |
download | spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar.gz spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar.bz2 spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar.lz spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar.xz spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.tar.zst spectrum-17a2bf52cf5615d7e9b2cfcf613e5a3f771b10eb.zip |
lib/nixpkgs.default.nix: update
crosvm renumbered VHOST_USER_PROTOCOL_F_SHARED_MEMORY_REGIONS to avoid conflicts with actually standardised protocol features, so we need to renumber the version in cloud hypervisor to match. Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs')
5 files changed, 55 insertions, 6 deletions
diff --git a/pkgs/cloud-hypervisor/default.nix b/pkgs/cloud-hypervisor/default.nix index fe34ad9..f7b82c3 100644 --- a/pkgs/cloud-hypervisor/default.nix +++ b/pkgs/cloud-hypervisor/default.nix @@ -42,6 +42,7 @@ final.rustPlatform.buildRustPackage { vhost/0001-vhost-fix-receiving-reply-payloads.patch vhost/0002-vhost_user-add-shared-memory-region-support.patch vhost/0003-vhost-user-add-protocol-flag-for-shmem.patch + vhost/0004-vmm_vhost-renumber-SHARED_MEMORY_REGIONS.patch ]; # Don't concatenate versions from super.cloud-hypervisor, diff --git a/pkgs/cloud-hypervisor/vhost/0001-vhost-fix-receiving-reply-payloads.patch b/pkgs/cloud-hypervisor/vhost/0001-vhost-fix-receiving-reply-payloads.patch index 05238e6..2ac5e59 100644 --- a/pkgs/cloud-hypervisor/vhost/0001-vhost-fix-receiving-reply-payloads.patch +++ b/pkgs/cloud-hypervisor/vhost/0001-vhost-fix-receiving-reply-payloads.patch @@ -1,7 +1,7 @@ -From a1434fa3cb740ecf675c56db746f5098e6267a12 Mon Sep 17 00:00:00 2001 +From dc7bfffa0601317e41c011f0f468fca9bc21a6c8 Mon Sep 17 00:00:00 2001 From: David Stevens <stevensd@chromium.org> Date: Wed, 15 Jun 2022 15:56:18 +0900 -Subject: [PATCH 1/3] vhost: fix receiving reply payloads +Subject: [PATCH 1/4] vhost: fix receiving reply payloads SPDX-FileCopyrightText: 2019 Alibaba Cloud Computing. All rights reserved. SPDX-FileCopyrightText: The Chromium OS Authors SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is> diff --git a/pkgs/cloud-hypervisor/vhost/0002-vhost_user-add-shared-memory-region-support.patch b/pkgs/cloud-hypervisor/vhost/0002-vhost_user-add-shared-memory-region-support.patch index ce1b2d9..6448006 100644 --- a/pkgs/cloud-hypervisor/vhost/0002-vhost_user-add-shared-memory-region-support.patch +++ b/pkgs/cloud-hypervisor/vhost/0002-vhost_user-add-shared-memory-region-support.patch @@ -1,7 +1,7 @@ -From e1f7130bfbe529a7fda1a598866e0dea41b6ba74 Mon Sep 17 00:00:00 2001 +From d639bc15129a07a2844b417cb8ead155bf714368 Mon Sep 17 00:00:00 2001 From: David Stevens <stevensd@chromium.org> Date: Wed, 15 Jun 2022 16:45:12 +0900 -Subject: [PATCH 2/3] vhost_user: add shared memory region support +Subject: [PATCH 2/4] vhost_user: add shared memory region support SPDX-FileCopyrightText: 2019 Intel Corporation. All Rights Reserved. SPDX-FileCopyrightText: 2019-2021 Alibaba Cloud. All rights reserved. SPDX-FileCopyrightText: The Chromium OS Authors diff --git a/pkgs/cloud-hypervisor/vhost/0003-vhost-user-add-protocol-flag-for-shmem.patch b/pkgs/cloud-hypervisor/vhost/0003-vhost-user-add-protocol-flag-for-shmem.patch index 4f0f799..5f4c5d2 100644 --- a/pkgs/cloud-hypervisor/vhost/0003-vhost-user-add-protocol-flag-for-shmem.patch +++ b/pkgs/cloud-hypervisor/vhost/0003-vhost-user-add-protocol-flag-for-shmem.patch @@ -1,7 +1,7 @@ -From 3a44f7aaad8dd8ce1c2c5b75a30326df1f043f22 Mon Sep 17 00:00:00 2001 +From 5ce74080b5846c7183cd0696aab8b5653c0830a7 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/3] vhost-user: add protocol flag for shmem +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> diff --git a/pkgs/cloud-hypervisor/vhost/0004-vmm_vhost-renumber-SHARED_MEMORY_REGIONS.patch b/pkgs/cloud-hypervisor/vhost/0004-vmm_vhost-renumber-SHARED_MEMORY_REGIONS.patch new file mode 100644 index 0000000..018c11e --- /dev/null +++ b/pkgs/cloud-hypervisor/vhost/0004-vmm_vhost-renumber-SHARED_MEMORY_REGIONS.patch @@ -0,0 +1,48 @@ +From ca160417c77eaf0b70f53568b34917c16a72e25a Mon Sep 17 00:00:00 2001 +From: Alyssa Ross <hi@alyssa.is> +Date: Sat, 29 Jul 2023 12:03:18 +0000 +Subject: [PATCH 4/4] vmm_vhost: renumber SHARED_MEMORY_REGIONS +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 + +0x0002_0000 is now standardized as VHOST_USER_PROTOCOL_F_XEN_MMAP[1]. +Renumber SHARED_MEMORY_REGIONS to an available value to avoid +interoperability problems with other vhost-user implementations. + +(It would be nice if VHOST_USER_PROTOCOL_F_SHARED_MEMORY was +standardised, to avoid this problem in future!) + +[1]: https://gitlab.com/qemu-project/qemu/-/commit/f21e95ee97d5adb4a274b48c6c8f70a221c1f513 + +TEST=run crosvm vhost-user-gpu device with cross domain + +Change-Id: I56c36e5ef75b68fd4244dee1206a2cd1bee7c452 +Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4727935 +Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> +Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> +(cherry-picked from commit 6795b3edf3ddc0b3a2e2b928033f21dabcf8be78) +Signed-off-by: Alyssa Ross <hi@alyssa.is> +--- + crates/vhost/src/vhost_user/message.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/crates/vhost/src/vhost_user/message.rs b/crates/vhost/src/vhost_user/message.rs +index 5fb2fb8..8ea19d3 100644 +--- a/crates/vhost/src/vhost_user/message.rs ++++ b/crates/vhost/src/vhost_user/message.rs +@@ -435,8 +435,8 @@ bitflags! { + const STATUS = 0x0001_0000; + /// Support Xen mmap. + const XEN_MMAP = 0x0002_0000; +- /// Support shared memory regions. +- const SHARED_MEMORY_REGIONS = 0x0002_0000; ++ /// Support shared memory regions. (Non-standard.) ++ const SHARED_MEMORY_REGIONS = 0x8000_0000; + } + } + +-- +2.42.0 + |