* [PATCH nixpkgs 1/4] kernelPatches: drop export_kernel_fpu_functions
@ 2021-06-03 9:11 Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 2/4] chromiumOSPackages: 89.13729.0.0-rc1 -> 91.13904.0.0-rc2 Alyssa Ross
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alyssa Ross @ 2021-06-03 9:11 UTC (permalink / raw)
To: devel
From: Atemu <atemu.main@gmail.com>
Hasn't been necessary since ZFS 0.8.3
(cherry picked from commit 88f877e07def90a2c77106b86802b143ca8f97b3)
Backporting this for Spectrum because it won't apply to future CrOS
kernels.
---
.../export_kernel_fpu_functions_4_14.patch | 60 -------------------
.../export_kernel_fpu_functions_5_3.patch | 42 -------------
pkgs/os-specific/linux/kernel/patches.nix | 11 ----
pkgs/top-level/all-packages.nix | 6 --
4 files changed, 119 deletions(-)
delete mode 100644 pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch
delete mode 100644 pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch
diff --git a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch
deleted file mode 100644
index 205497aee2d..00000000000
--- a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 245e0f743d814c9ff2d1c748175e321301eb16cf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
-Date: Thu, 2 May 2019 05:28:08 +0100
-Subject: [PATCH] x86/fpu: Export __kernel_fpu_{begin,end}()
-
-This partially undo commit:
-
-12209993 x86/fpu: Don't export __kernel_fpu_{begin,end}()
-
-We need this symbol in zfs for AES-NI/AVX support.
----
- arch/x86/include/asm/fpu/api.h | 2 ++
- arch/x86/kernel/fpu/core.c | 6 ++++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h
-index b56d504af6545..7d53388d266ea 100644
---- a/arch/x86/include/asm/fpu/api.h
-+++ b/arch/x86/include/asm/fpu/api.h
-@@ -18,6 +18,8 @@
- * If you intend to use the FPU in softirq you need to check first with
- * irq_fpu_usable() if it is possible.
- */
-+extern void __kernel_fpu_begin(void);
-+extern void __kernel_fpu_end(void);
- extern void kernel_fpu_begin(void);
- extern void kernel_fpu_end(void);
- extern bool irq_fpu_usable(void);
-diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
-index 2e5003fef51a9..2ea85b32421a0 100644
---- a/arch/x86/kernel/fpu/core.c
-+++ b/arch/x86/kernel/fpu/core.c
-@@ -93,7 +93,7 @@ bool irq_fpu_usable(void)
- }
- EXPORT_SYMBOL(irq_fpu_usable);
-
--static void __kernel_fpu_begin(void)
-+void __kernel_fpu_begin(void)
- {
- struct fpu *fpu = ¤t->thread.fpu;
-
-@@ -111,8 +111,9 @@ static void __kernel_fpu_begin(void)
- __cpu_invalidate_fpregs_state();
- }
- }
-+EXPORT_SYMBOL(__kernel_fpu_begin);
-
--static void __kernel_fpu_end(void)
-+void __kernel_fpu_end(void)
- {
- struct fpu *fpu = ¤t->thread.fpu;
-
-@@ -121,6 +122,7 @@ static void __kernel_fpu_end(void)
-
- kernel_fpu_enable();
- }
-+EXPORT_SYMBOL(__kernel_fpu_end);
-
- void kernel_fpu_begin(void)
- {
diff --git a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch
deleted file mode 100644
index dc9ca64bdc1..00000000000
--- a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1e010beda2896bdf3082fb37a3e49f8ce20e04d8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
-Date: Thu, 2 May 2019 05:28:08 +0100
-Subject: [PATCH] x86/fpu: Export kernel_fpu_{begin,end}() with
- EXPORT_SYMBOL_GPL
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We need these symbols in zfs as the fpu implementation breaks userspace:
-
-https://github.com/zfsonlinux/zfs/issues/9346
-Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
----
- arch/x86/kernel/fpu/core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
-index 12c70840980e..352538b3bb5d 100644
---- a/arch/x86/kernel/fpu/core.c
-+++ b/arch/x86/kernel/fpu/core.c
-@@ -102,7 +102,7 @@ void kernel_fpu_begin(void)
- }
- __cpu_invalidate_fpregs_state();
- }
--EXPORT_SYMBOL_GPL(kernel_fpu_begin);
-+EXPORT_SYMBOL(kernel_fpu_begin);
-
- void kernel_fpu_end(void)
- {
-@@ -111,7 +111,7 @@ void kernel_fpu_end(void)
- this_cpu_write(in_kernel_fpu, false);
- preempt_enable();
- }
--EXPORT_SYMBOL_GPL(kernel_fpu_end);
-+EXPORT_SYMBOL(kernel_fpu_end);
-
- /*
- * Save the FPU state (mark it for reload if necessary):
---
-2.23.0
-
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 8ce1ac2b587..678cec34b70 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -76,17 +76,6 @@
};
};
- export_kernel_fpu_functions = {
- "4.14" = {
- name = "export_kernel_fpu_functions";
- patch = ./export_kernel_fpu_functions_4_14.patch;
- };
- "5.3" = {
- name = "export_kernel_fpu_functions";
- patch = ./export_kernel_fpu_functions_5_3.patch;
- };
- };
-
# patches from https://lkml.org/lkml/2019/7/15/1748
mac_nvme_t2 = rec {
name = "mac_nvme_t2";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c22a62456db..6ba0505cb8a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17500,7 +17500,6 @@ in
# when adding a new linux version
kernelPatches.cpu-cgroup-v2."4.11"
kernelPatches.modinst_arg_list_too_long
- kernelPatches.export_kernel_fpu_functions."4.14"
];
};
@@ -17509,7 +17508,6 @@ in
[ kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
kernelPatches.modinst_arg_list_too_long
- kernelPatches.export_kernel_fpu_functions."4.14"
];
};
@@ -17517,7 +17515,6 @@ in
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
- kernelPatches.export_kernel_fpu_functions."5.3"
];
};
@@ -17525,7 +17522,6 @@ in
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
- kernelPatches.export_kernel_fpu_functions."5.3"
];
};
@@ -17533,7 +17529,6 @@ in
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
- kernelPatches.export_kernel_fpu_functions."5.3"
];
};
@@ -17563,7 +17558,6 @@ in
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
- kernelPatches.export_kernel_fpu_functions."5.3"
];
};
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nixpkgs 2/4] chromiumOSPackages: 89.13729.0.0-rc1 -> 91.13904.0.0-rc2
2021-06-03 9:11 [PATCH nixpkgs 1/4] kernelPatches: drop export_kernel_fpu_functions Alyssa Ross
@ 2021-06-03 9:11 ` Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 3/4] chromiumOSPackages: rebase platform2 packages Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 4/4] crosvm: fix build Alyssa Ross
2 siblings, 0 replies; 4+ messages in thread
From: Alyssa Ross @ 2021-06-03 9:11 UTC (permalink / raw)
To: devel
---
.../linux/chromium-os/upstream-info.json | 44 +++++++++----------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index cec5a21b1e4..4a4101b37d7 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,66 +1,66 @@
{
- "version": "89.13729.0.0-rc1",
+ "version": "91.13904.0.0-rc2",
"components": {
"src/aosp/external/minijail": {
"name": "minijail",
"url": "https://android.googlesource.com/platform/external/minijail",
- "rev": "b49291144e126662b8c7d1551fd1dc572e1d55da",
- "sha256": "19z0qrfyh7p2kmsgvm4k053vrzz2w6zysqh3bm2rx0irsdv0pnqm"
+ "rev": "4f830bddad22ccbb5862a866efd9931393a4b83b",
+ "sha256": "044ll9jmanjlv6ibb8n77nsqifsb1iqck3bgkyix43i3yqamlq5h"
},
"src/platform/crosvm": {
"name": "crosvm",
"url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
- "rev": "f35d2c43ff19520855cffee761dc8899c5a439a1",
- "sha256": "0fahrcw7x33d21i6azgr787afrhp002f8mvz81ich5w7vk2xjzxr"
+ "rev": "401340ee7fa81db720a4f7a9476b6eea133e5b64",
+ "sha256": "0wbfprqqm0hqhypdb0x90bqn65kv0f3vpibr84p3paby6hmx14y2"
},
"src/platform/minigbm": {
"name": "minigbm",
"url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
- "rev": "9fe8c20f05116869f86d91fc542a17b9badf9ec3",
- "sha256": "0gr81qngfa1g58cz3v9dlms997ry3h5dh7vcv2ak1j53dzfdzckn"
+ "rev": "231913e75751498902132c825d5b8567684e3b8d",
+ "sha256": "03wcdwd4l0wg9k6z9nnqim2wqqddlmppa49v6bkry7mhmiar1jc9"
},
"src/platform2": {
"name": "platform2",
"url": "https://chromium.googlesource.com/chromiumos/platform2",
- "rev": "e6e2faf2abb10fcbca3b6eccdcf7cf2506bcc212",
- "sha256": "1g6kxmiffizqlxwakma1rp26p9mwpjbl3cv5hn7k5zd6cn8wixj7"
+ "rev": "1fcefaa166e868069ad1b81091333ff75e0657f6",
+ "sha256": "1p4rcq53qz35sfbqldmcnjz5ikjxppdw1xcb348zn8n3hnb6vmqf"
},
"src/third_party/adhd": {
"name": "adhd",
"url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
- "rev": "0458a459ad51cc0b386835f5b909d0d04003ab16",
- "sha256": "1y1g0h2dcmgpz9nk2hc6fcb0c53ip3mf27yyf7gg6syx764pr2gb"
+ "rev": "3624a4296888926a21462bfd499d4ba91268046b",
+ "sha256": "0flph3fagyl21dbwpdvhhizwnhbrgll87yfpq1i00xzr0c9xc1cc"
},
"src/third_party/chromiumos-overlay": {
"name": "chromiumos-overlay",
"url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
- "rev": "dd29be74a5c6fa492411ec7feed734004c6a1ea5",
- "sha256": "0pbrbbr39j9zsc10dhhhmwx1c69a40nsv4cprh7biz1b8f840l1b"
+ "rev": "f5b0e4767c2e5f8caa899127c8b3060fda2a3694",
+ "sha256": "1vpfccb0ikqa1xh6m0wizbxcaick2arki7d76sacz8qgrxinq8mn"
},
"src/third_party/kernel/v5.4": {
"name": "v5.4",
"url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
- "rev": "eb179ec7ef3e053acb48366e72299055b2b66ca8",
- "sha256": "13i7f3742cnw7lm0b2zal4lxbqrkmniajqp5c1gllvrfvxcw4a45",
- "version": "5.4.88"
+ "rev": "15178e41cf17cd7ce9f9a087bcb0677eaa57f82b",
+ "sha256": "0cwvxm5bx0xs80l2rq3dqj88445qdhiqxp1999ix1gcc8awvwzdb",
+ "version": "5.4.109"
},
"src/third_party/libqmi": {
"name": "libqmi",
"url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
- "rev": "072abd58da99c00b79dbf7e4642fa19fb791aed9",
- "sha256": "1a6x5hwghkrvi82szhabxf2by4x7x9pfk6bvpgz0ipz8yqg8fwih"
+ "rev": "d9def40a2e068fd7e961aa0a4c699cf62cb8672c",
+ "sha256": "0grf510l85p32hc8gn7ks12ma0c2s3gnk76dyq62kmrvfb43ijzm"
},
"src/third_party/modemmanager-next": {
"name": "modemmanager-next",
"url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
- "rev": "3eba6678dfe0d7b35f128bb58b63e71d1a3a64d4",
- "sha256": "0lviwkkqsv5zmajqdlc0s83yq12ikk0gf7wq9za58p92g0970i4l"
+ "rev": "2de7877b2662d64c162434a7d3fb89d43f24b913",
+ "sha256": "027pnj92kidfgrzfpgwz18pl7gjgxi128il6wx1s8jdxsk2m00jc"
},
"src/third_party/modp_b64": {
"name": "modp_b64",
"url": "https://chromium.googlesource.com/aosp/platform/external/modp_b64",
- "rev": "467734f4870d3ab23968f5ebdd461f6112e4103b",
- "sha256": "1hlk9vzivy0n3xf9hm9bhj7i09yifirc1af6pli471m00v3s0zvg"
+ "rev": "269b6fb8401617b85e2dff7ae8a7b0f97613e2cd",
+ "sha256": "1mc5w70svgj7rq49r6lxkw9ix6q09dxrw0lamx3hn8anq5q8y532"
}
}
}
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nixpkgs 3/4] chromiumOSPackages: rebase platform2 packages
2021-06-03 9:11 [PATCH nixpkgs 1/4] kernelPatches: drop export_kernel_fpu_functions Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 2/4] chromiumOSPackages: 89.13729.0.0-rc1 -> 91.13904.0.0-rc2 Alyssa Ross
@ 2021-06-03 9:11 ` Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 4/4] crosvm: fix build Alyssa Ross
2 siblings, 0 replies; 4+ messages in thread
From: Alyssa Ross @ 2021-06-03 9:11 UTC (permalink / raw)
To: devel
---
...-mk-don-t-leak-source-absolute-paths.patch | 59 +++++++--------
...ommon-mk-.gn-don-t-hardcode-env-path.patch | 4 +-
...ier-don-t-leak-source-absolute-paths.patch | 4 +-
..._tools-sommelier-Switch-to-the-stabl.patch | 71 ++++++++++---------
4 files changed, 71 insertions(+), 67 deletions(-)
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index 479cb96eddf..03ec2b1df64 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,4 +1,4 @@
-From 8b87e0d6ee0e645d1ac2b27c2fba0c97f2929e31 Mon Sep 17 00:00:00 2001
+From ae0c98ed2715c685b0cb97ac6e5d65101168b625 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 24 Nov 2019 16:56:11 +0000
Subject: [PATCH 1/4] common-mk: don't leak source-absolute paths
@@ -11,12 +11,12 @@ outputs, and normal Unix paths are passed to subprocesses.
common-mk/external_dependencies/BUILD.gn | 3 ++-
common-mk/mojom_bindings_generator.gni | 12 ++++++------
common-mk/mojom_type_mappings_generator.gni | 2 +-
- common-mk/pkg_config.gni | 5 +++--
- common-mk/proto_library.gni | 21 +++++++++++----------
- 5 files changed, 23 insertions(+), 20 deletions(-)
+ common-mk/pkg_config.gni | 3 ++-
+ common-mk/proto_library.gni | 19 ++++++++++---------
+ 5 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/common-mk/external_dependencies/BUILD.gn b/common-mk/external_dependencies/BUILD.gn
-index dbf45368ff..94aae4e2e2 100644
+index 2581d31ac8..2ead288006 100644
--- a/common-mk/external_dependencies/BUILD.gn
+++ b/common-mk/external_dependencies/BUILD.gn
@@ -45,6 +45,7 @@ genxml2cpp("dbus-proxies") {
@@ -104,10 +104,10 @@ index ff09397111..959a8b6ca9 100644
}
}
diff --git a/common-mk/pkg_config.gni b/common-mk/pkg_config.gni
-index 24e2cf1401..151c49e560 100644
+index b2c58845d4..31d3f4ab51 100644
--- a/common-mk/pkg_config.gni
+++ b/common-mk/pkg_config.gni
-@@ -81,10 +81,11 @@ template("generate_pkg_config") {
+@@ -81,7 +81,8 @@ template("generate_pkg_config") {
if (!defined(output_name)) {
output_name = name
}
@@ -116,13 +116,9 @@ index 24e2cf1401..151c49e560 100644
+ outputs = [ lib_path ]
script = "//common-mk/generate-pc.py"
-- args = [ "--output" ] + outputs + [ "--name=" + name ]
-+ args = [ "--output", rebase_path(lib_path), "--name=" + name ]
- if (defined(description)) {
- args += [ "--description=" + description ]
- }
+ args = [ "--output" ] + rebase_path(outputs) + [ "--name=" + name ]
diff --git a/common-mk/proto_library.gni b/common-mk/proto_library.gni
-index 68b7904acc..2bef5f44ef 100644
+index e64aedabe0..fb9fb4231d 100644
--- a/common-mk/proto_library.gni
+++ b/common-mk/proto_library.gni
@@ -56,7 +56,7 @@ template("proto_library") {
@@ -134,8 +130,8 @@ index 68b7904acc..2bef5f44ef 100644
proto_lib_dirs = [
proto_in_dir,
-@@ -94,24 +94,23 @@ template("proto_library") {
- args += [ "${proto_in_dir}/{{source_name_part}}.proto" ]
+@@ -96,10 +96,9 @@ template("proto_library") {
+ }
outputs = []
if (gen_python) {
- python_dir = "${root_gen_dir}/${proto_out_dir}/py"
@@ -144,14 +140,19 @@ index 68b7904acc..2bef5f44ef 100644
- "${python_dir}",
+ "${proto_out_dir}/py",
]
-- outputs += [ "${python_dir}/{{source_name_part}}_pb.py" ]
-+ outputs += [ "${cc_dir}/py/{{source_name_part}}_pb.py" ]
+ foreach(source, sources) {
+ source = rebase_path(source, proto_in_dir)
+@@ -109,19 +108,19 @@ template("proto_library") {
}
if (gen_grpc) {
if (gen_grpc_gmock) {
- args += [ "--grpc_out=generate_mock_code=true:${cc_dir}" ]
+ args += [ "--grpc_out=generate_mock_code=true:${proto_out_dir}" ]
- outputs += [ "${cc_dir}/{{source_name_part}}_mock.grpc.pb.h" ]
+ foreach(source, sources) {
+ source = rebase_path(source, proto_in_dir)
+ source = string_replace(source, ".proto", "")
+ outputs += [ "${cc_dir}/${source}_mock.grpc.pb.h" ]
+ }
} else {
- args += [ "--grpc_out=${cc_dir}" ]
+ args += [ "--grpc_out=${proto_out_dir}" ]
@@ -162,18 +163,18 @@ index 68b7904acc..2bef5f44ef 100644
- "--cpp_out=${gen_cpp_mode}${cc_dir}",
+ "--cpp_out=${gen_cpp_mode}${proto_out_dir}",
]
- outputs += [
- "${cc_dir}/{{source_name_part}}.grpc.pb.cc",
-@@ -121,7 +120,7 @@ template("proto_library") {
- ]
+ foreach(source, sources) {
+ source = rebase_path(source, proto_in_dir)
+@@ -135,7 +134,7 @@ template("proto_library") {
+ }
}
if (!gen_grpc && !gen_python) {
- args += [ "--cpp_out=${gen_cpp_mode}${cc_dir}" ]
+ args += [ "--cpp_out=${gen_cpp_mode}${proto_out_dir}" ]
- outputs += [
- "${cc_dir}/{{source_name_part}}.pb.cc",
- "${cc_dir}/{{source_name_part}}.pb.h",
-@@ -218,7 +217,9 @@ template("goproto_library") {
+ foreach(source, sources) {
+ source = rebase_path(source, proto_in_dir)
+ source = string_replace(source, ".proto", "")
+@@ -238,7 +237,9 @@ template("goproto_library") {
# otherwise file descriptor var name will conflict.
# cf) https://github.com/golang/protobuf/issues/109
@@ -183,7 +184,7 @@ index 68b7904acc..2bef5f44ef 100644
# Build protoc command line to run.
script = "//common-mk/file_generator_wrapper.py"
-@@ -258,7 +259,7 @@ template("goproto_library") {
+@@ -278,7 +279,7 @@ template("goproto_library") {
"--go_out",
# go_out_prefix can be empty, so we can always add a colon here.
@@ -192,7 +193,7 @@ index 68b7904acc..2bef5f44ef 100644
]
foreach(source, sources) {
args += [ rebase_path(source) ]
-@@ -268,7 +269,7 @@ template("goproto_library") {
+@@ -288,7 +289,7 @@ template("goproto_library") {
outputs = []
foreach(source, invoker.sources) {
name = get_path_info(source, "name")
@@ -202,5 +203,5 @@ index 68b7904acc..2bef5f44ef 100644
}
}
--
-2.30.0
+2.31.1
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index feac017d253..95f29531fec 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,4 +1,4 @@
-From 1589ff7aa30d61be9ebe4b53a1b8d504b72ff4de Mon Sep 17 00:00:00 2001
+From 7d33bcd724ec79d00281c2752f9642be25782370 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 24 Nov 2019 17:20:46 +0000
Subject: [PATCH 2/4] common-mk: .gn: don't hardcode env path
@@ -19,5 +19,5 @@ index e7dba8c91c..e29fcd61ee 100644
-script_executable = "/usr/bin/env"
+script_executable = "env"
--
-2.30.0
+2.31.1
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
index 515daf80073..c37876988f9 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
@@ -1,4 +1,4 @@
-From 98cff9d9c6cd0642ecb54f0fbb799a6a9c666035 Mon Sep 17 00:00:00 2001
+From e3995d3367ae642f3eb0b4c395813af47464a65f Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 1 Dec 2019 17:04:04 +0000
Subject: [PATCH 3/4] sommelier: don't leak source-absolute paths
@@ -21,5 +21,5 @@ index f894adf81d..28bb5a006b 100644
}
}
--
-2.30.0
+2.31.1
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0004-Revert-Revert-vm_tools-sommelier-Switch-to-the-stabl.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0004-Revert-Revert-vm_tools-sommelier-Switch-to-the-stabl.patch
index fcc8a5d8ad7..5db01538eae 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0004-Revert-Revert-vm_tools-sommelier-Switch-to-the-stabl.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0004-Revert-Revert-vm_tools-sommelier-Switch-to-the-stabl.patch
@@ -1,4 +1,4 @@
-From 1ff39f1a4e5ac194a1e3ca52632342794eedc130 Mon Sep 17 00:00:00 2001
+From ac39fe3d341cc33dfd5f47d5301c2a6aaf743a34 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Fri, 2 Apr 2021 17:55:55 +0000
Subject: [PATCH 4/4] Revert "Revert "vm_tools: sommelier: Switch to the stable
@@ -16,10 +16,10 @@ This reverts commit 32050c0ea6c00c16999915856b40a6a6b8b41bb9.
rename vm_tools/sommelier/protocol/{xdg-shell-unstable-v6.xml => xdg-shell.xml} (71%)
diff --git a/vm_tools/sommelier/BUILD.gn b/vm_tools/sommelier/BUILD.gn
-index fe8481bee1..7fdebbb201 100644
+index 52df0e3403..fe543138ef 100644
--- a/vm_tools/sommelier/BUILD.gn
+++ b/vm_tools/sommelier/BUILD.gn
-@@ -64,7 +64,7 @@ wayland_protocol_library("sommelier-protocol") {
+@@ -49,7 +49,7 @@ wayland_protocol_library("sommelier-protocol") {
"protocol/relative-pointer-unstable-v1.xml",
"protocol/text-input-unstable-v1.xml",
"protocol/viewporter.xml",
@@ -29,7 +29,7 @@ index fe8481bee1..7fdebbb201 100644
}
diff --git a/vm_tools/sommelier/meson.build b/vm_tools/sommelier/meson.build
-index cd33ec8fec..9eb8a2fb30 100644
+index 088e3e173f..86bcced912 100644
--- a/vm_tools/sommelier/meson.build
+++ b/vm_tools/sommelier/meson.build
@@ -58,7 +58,7 @@ wl_protocols = [
@@ -1341,7 +1341,7 @@ index 91744a67e3..45b8eeb93e 100644
sl_bind_host_xdg_shell);
}
diff --git a/vm_tools/sommelier/sommelier.cc b/vm_tools/sommelier/sommelier.cc
-index 0560672d46..8435dbe082 100644
+index 2833e52a61..8f53b3b65b 100644
--- a/vm_tools/sommelier/sommelier.cc
+++ b/vm_tools/sommelier/sommelier.cc
@@ -39,7 +39,7 @@
@@ -1353,7 +1353,7 @@ index 0560672d46..8435dbe082 100644
#define errno_assert(rv) \
{ \
-@@ -376,13 +376,13 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
+@@ -372,13 +372,13 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
}
static void sl_internal_xdg_shell_ping(void* data,
@@ -1381,8 +1381,8 @@ index 0560672d46..8435dbe082 100644
}
window->pending_config.serial = 0;
-@@ -560,11 +560,12 @@ int sl_process_pending_configure_acks(struct sl_window* window,
- return 1;
+@@ -567,11 +567,12 @@ void sl_commit(struct sl_window* window, struct sl_host_surface* host_surface) {
+ }
}
-static void sl_internal_xdg_surface_configure(
@@ -1397,7 +1397,7 @@ index 0560672d46..8435dbe082 100644
window->next_config.serial = serial;
if (!window->pending_config.serial) {
-@@ -586,18 +587,18 @@ static void sl_internal_xdg_surface_configure(
+@@ -589,18 +590,18 @@ static void sl_internal_xdg_surface_configure(
}
}
@@ -1420,7 +1420,7 @@ index 0560672d46..8435dbe082 100644
int activated = 0;
uint32_t* state;
int i = 0;
-@@ -627,21 +628,21 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -630,24 +631,24 @@ static void sl_internal_xdg_toplevel_configure(
window->allow_resize = 1;
sl_array_for_each(state, states) {
@@ -1438,15 +1438,18 @@ index 0560672d46..8435dbe082 100644
window->next_config.states[i++] =
window->ctx->atoms[ATOM_NET_WM_STATE_MAXIMIZED_HORZ].value;
}
-- if (*state == ZXDG_TOPLEVEL_V6_STATE_ACTIVATED)
-+ if (*state == XDG_TOPLEVEL_STATE_ACTIVATED)
+- if (*state == ZXDG_TOPLEVEL_V6_STATE_ACTIVATED) {
++ if (*state == XDG_TOPLEVEL_STATE_ACTIVATED) {
activated = 1;
+ window->next_config.states[i++] =
+ window->ctx->atoms[ATOM_NET_WM_STATE_FOCUSED].value;
+ }
- if (*state == ZXDG_TOPLEVEL_V6_STATE_RESIZING)
+ if (*state == XDG_TOPLEVEL_STATE_RESIZING)
window->allow_resize = 0;
}
-@@ -656,11 +657,11 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -662,11 +663,11 @@ static void sl_internal_xdg_toplevel_configure(
window->next_config.states_length = i;
}
@@ -1461,7 +1464,7 @@ index 0560672d46..8435dbe082 100644
xcb_client_message_event_t event = {};
event.response_type = XCB_CLIENT_MESSAGE;
event.format = 32;
-@@ -673,21 +674,20 @@ static void sl_internal_xdg_toplevel_close(
+@@ -679,21 +680,20 @@ static void sl_internal_xdg_toplevel_close(
XCB_EVENT_MASK_NO_EVENT, (const char*)&event);
}
@@ -1488,7 +1491,7 @@ index 0560672d46..8435dbe082 100644
sl_internal_xdg_popup_configure, sl_internal_xdg_popup_done};
static void sl_window_set_wm_state(struct sl_window* window, int state) {
-@@ -759,15 +759,15 @@ void sl_window_update(struct sl_window* window) {
+@@ -765,15 +765,15 @@ void sl_window_update(struct sl_window* window) {
window->aura_surface = NULL;
}
if (window->xdg_toplevel) {
@@ -1507,7 +1510,7 @@ index 0560672d46..8435dbe082 100644
window->xdg_surface = NULL;
}
window->realized = 0;
-@@ -843,11 +843,11 @@ void sl_window_update(struct sl_window* window) {
+@@ -849,11 +849,11 @@ void sl_window_update(struct sl_window* window) {
}
if (!window->xdg_surface) {
@@ -1524,7 +1527,7 @@ index 0560672d46..8435dbe082 100644
}
if (ctx->aura_shell) {
-@@ -882,50 +882,46 @@ void sl_window_update(struct sl_window* window) {
+@@ -888,50 +888,46 @@ void sl_window_update(struct sl_window* window) {
// window is closed.
if (ctx->xwayland || !parent) {
if (!window->xdg_toplevel) {
@@ -1601,7 +1604,7 @@ index 0560672d46..8435dbe082 100644
}
if ((window->size_flags & (US_POSITION | P_POSITION)) && parent &&
-@@ -1326,7 +1322,7 @@ static void sl_registry_handler(void* data,
+@@ -1332,7 +1328,7 @@ static void sl_registry_handler(void* data,
data_device_manager->host_global =
sl_data_device_manager_global_create(ctx);
}
@@ -1610,7 +1613,7 @@ index 0560672d46..8435dbe082 100644
struct sl_xdg_shell* xdg_shell =
static_cast<sl_xdg_shell*>(malloc(sizeof(struct sl_xdg_shell)));
assert(xdg_shell);
-@@ -1337,10 +1333,10 @@ static void sl_registry_handler(void* data,
+@@ -1343,10 +1339,10 @@ static void sl_registry_handler(void* data,
assert(!ctx->xdg_shell);
ctx->xdg_shell = xdg_shell;
if (ctx->xwayland) {
@@ -1625,7 +1628,7 @@ index 0560672d46..8435dbe082 100644
} else {
xdg_shell->host_global = sl_xdg_shell_global_create(ctx);
}
-@@ -1473,7 +1469,7 @@ static void sl_registry_remover(void* data,
+@@ -1479,7 +1475,7 @@ static void sl_registry_remover(void* data,
if (ctx->xdg_shell->host_global)
sl_global_destroy(ctx->xdg_shell->host_global);
if (ctx->xdg_shell->internal)
@@ -1634,7 +1637,7 @@ index 0560672d46..8435dbe082 100644
free(ctx->xdg_shell);
ctx->xdg_shell = NULL;
return;
-@@ -1650,11 +1646,11 @@ static void sl_destroy_window(struct sl_window* window) {
+@@ -1656,11 +1652,11 @@ static void sl_destroy_window(struct sl_window* window) {
}
if (window->xdg_popup)
@@ -1649,7 +1652,7 @@ index 0560672d46..8435dbe082 100644
if (window->aura_surface)
zaura_surface_destroy(window->aura_surface);
-@@ -2118,15 +2114,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
+@@ -2124,15 +2120,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
// that matching contents will arrive.
if (window->xdg_toplevel) {
if (window->pending_config.serial) {
@@ -1669,7 +1672,7 @@ index 0560672d46..8435dbe082 100644
window->next_config.serial = 0;
window->next_config.mask = 0;
window->next_config.states_length = 0;
-@@ -2247,23 +2243,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
+@@ -2253,23 +2249,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
static uint32_t sl_resize_edge(int net_wm_moveresize_size) {
switch (net_wm_moveresize_size) {
case NET_WM_MOVERESIZE_SIZE_TOPLEFT:
@@ -1702,7 +1705,7 @@ index 0560672d46..8435dbe082 100644
}
}
-@@ -2362,16 +2358,16 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2368,16 +2364,16 @@ static void sl_handle_client_message(struct sl_context* ctx,
return;
if (event->data.data32[2] == NET_WM_MOVERESIZE_MOVE) {
@@ -1724,7 +1727,7 @@ index 0560672d46..8435dbe082 100644
}
}
} else if (event->type == ctx->atoms[ATOM_NET_WM_STATE].value) {
-@@ -2392,9 +2388,9 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2398,9 +2394,9 @@ static void sl_handle_client_message(struct sl_context* ctx,
"action", net_wm_state_to_string(action), "window->name",
window->name);
if (action == NET_WM_STATE_ADD)
@@ -1736,7 +1739,7 @@ index 0560672d46..8435dbe082 100644
}
if (changed[ATOM_NET_WM_STATE_MAXIMIZED_VERT] &&
-@@ -2405,9 +2401,9 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2411,9 +2407,9 @@ static void sl_handle_client_message(struct sl_context* ctx,
"action", net_wm_state_to_string(action), "window->name",
window->name);
if (action == NET_WM_STATE_ADD)
@@ -1748,7 +1751,7 @@ index 0560672d46..8435dbe082 100644
}
}
} else if (event->type == ctx->atoms[ATOM_WM_CHANGE_STATE].value &&
-@@ -2416,7 +2412,7 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2422,7 +2418,7 @@ static void sl_handle_client_message(struct sl_context* ctx,
TRACE_EVENT("x11wm", "XCB_CLIENT_MESSAGE: WM_STATE_ICONIC (minimize)",
"window->name", window ? window->name : "<unknown>");
if (window && window->xdg_toplevel) {
@@ -1757,7 +1760,7 @@ index 0560672d46..8435dbe082 100644
}
}
}
-@@ -2429,7 +2425,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
+@@ -2435,7 +2431,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
// window was realized.
struct sl_window* parent = sl_lookup_window(ctx, window->transient_for);
if (parent && parent->xdg_toplevel && window->xdg_toplevel)
@@ -1766,7 +1769,7 @@ index 0560672d46..8435dbe082 100644
}
}
-@@ -2738,9 +2734,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2744,9 +2740,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
return;
if (window->name) {
@@ -1778,7 +1781,7 @@ index 0560672d46..8435dbe082 100644
}
} else if (event->atom == XCB_ATOM_WM_CLASS) {
struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -2796,19 +2792,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2802,19 +2798,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
return;
if (window->size_flags & P_MIN_SIZE) {
@@ -1807,10 +1810,10 @@ index 0560672d46..8435dbe082 100644
} else if (event->atom == XCB_ATOM_WM_HINTS) {
struct sl_window* window = sl_lookup_window(ctx, event->window);
diff --git a/vm_tools/sommelier/sommelier.h b/vm_tools/sommelier/sommelier.h
-index 1e00a0b981..f07a826c99 100644
+index 79bcf6a3b3..d3157cd8a9 100644
--- a/vm_tools/sommelier/sommelier.h
+++ b/vm_tools/sommelier/sommelier.h
-@@ -411,7 +411,7 @@ struct sl_xdg_shell {
+@@ -400,7 +400,7 @@ struct sl_xdg_shell {
struct sl_context* ctx;
uint32_t id;
struct sl_global* host_global;
@@ -1819,7 +1822,7 @@ index 1e00a0b981..f07a826c99 100644
};
struct sl_aura_shell {
-@@ -511,9 +511,9 @@ struct sl_window {
+@@ -500,9 +500,9 @@ struct sl_window {
int max_height;
struct sl_config next_config;
struct sl_config pending_config;
@@ -1833,5 +1836,5 @@ index 1e00a0b981..f07a826c99 100644
struct wl_list link;
};
--
-2.30.0
+2.31.1
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nixpkgs 4/4] crosvm: fix build
2021-06-03 9:11 [PATCH nixpkgs 1/4] kernelPatches: drop export_kernel_fpu_functions Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 2/4] chromiumOSPackages: 89.13729.0.0-rc1 -> 91.13904.0.0-rc2 Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 3/4] chromiumOSPackages: rebase platform2 packages Alyssa Ross
@ 2021-06-03 9:11 ` Alyssa Ross
2 siblings, 0 replies; 4+ messages in thread
From: Alyssa Ross @ 2021-06-03 9:11 UTC (permalink / raw)
To: devel
* Add new vhost source dependency
* Drop Cargo.lock patch
* Re-enable test on x86_64 (seems to work fine now)
* Drop syslog patch
* Rebase VIRTIO_NET_F_MAC patch -- I renamed TapFdOptions to
TapFdOption for consistency with newly-added similar structs.
---
.../crosvm/Regenerate-Cargo.lock.patch | 681 ------------------
.../chromium-os/crosvm/VIRTIO_NET_F_MAC.patch | 130 ++--
.../linux/chromium-os/crosvm/default.nix | 15 +-
pkgs/os-specific/linux/chromium-os/update.py | 1 +
.../linux/chromium-os/upstream-info.json | 6 +
5 files changed, 88 insertions(+), 745 deletions(-)
delete mode 100644 pkgs/os-specific/linux/chromium-os/crosvm/Regenerate-Cargo.lock.patch
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/Regenerate-Cargo.lock.patch b/pkgs/os-specific/linux/chromium-os/crosvm/Regenerate-Cargo.lock.patch
deleted file mode 100644
index 07dbd5469e7..00000000000
--- a/pkgs/os-specific/linux/chromium-os/crosvm/Regenerate-Cargo.lock.patch
+++ /dev/null
@@ -1,681 +0,0 @@
-From 972ee713ae8e48c3a99fbddca68018e20bb148c7 Mon Sep 17 00:00:00 2001
-From: Alyssa Ross <hi@alyssa.is>
-Date: Fri, 2 Apr 2021 16:38:28 +0000
-Subject: [PATCH crosvm] Regenerate Cargo.lock
-
----
- Cargo.lock | 327 +++++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 240 insertions(+), 87 deletions(-)
-
-diff --git a/Cargo.lock b/Cargo.lock
-index 3179b43f5..c82916b06 100644
---- a/Cargo.lock
-+++ b/Cargo.lock
-@@ -26,7 +26,7 @@ name = "acpi_tables"
- version = "0.1.0"
- dependencies = [
- "data_model",
-- "tempfile",
-+ "tempfile 3.0.7",
- ]
-
- [[package]]
-@@ -61,9 +61,9 @@ version = "0.1.0"
-
- [[package]]
- name = "async-trait"
--version = "0.1.36"
-+version = "0.1.48"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92"
-+checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf"
- dependencies = [
- "proc-macro2",
- "quote",
-@@ -113,9 +113,9 @@ dependencies = [
-
- [[package]]
- name = "bitflags"
--version = "1.1.0"
-+version = "1.2.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
-+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
-
- [[package]]
- name = "cc"
-@@ -129,6 +129,12 @@ version = "0.1.10"
- source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
-
-+[[package]]
-+name = "cfg-if"
-+version = "1.0.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-+
- [[package]]
- name = "cras-sys"
- version = "0.1.0"
-@@ -189,7 +195,7 @@ dependencies = [
- "resources",
- "rutabaga_gfx",
- "sync",
-- "tempfile",
-+ "tempfile 3.2.0",
- "thiserror",
- "vhost",
- "vm_control",
-@@ -262,7 +268,7 @@ dependencies = [
- "rutabaga_gfx",
- "sync",
- "syscall_defines",
-- "tempfile",
-+ "tempfile 3.0.7",
- "tpm2",
- "usb_util",
- "vfio_sys",
-@@ -285,7 +291,7 @@ dependencies = [
- "protobuf",
- "protos",
- "remain",
-- "tempfile",
-+ "tempfile 3.2.0",
- "vm_memory",
- ]
-
-@@ -295,6 +301,12 @@ version = "1.2.0"
- source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
-
-+[[package]]
-+name = "either"
-+version = "1.6.1"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
-+
- [[package]]
- name = "enumn"
- version = "0.1.0"
-@@ -318,9 +330,9 @@ dependencies = [
-
- [[package]]
- name = "futures"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "b6f16056ecbb57525ff698bb955162d0cd03bee84e6241c27ff75c08d8ca5987"
-+checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1"
- dependencies = [
- "futures-channel",
- "futures-core",
-@@ -333,9 +345,9 @@ dependencies = [
-
- [[package]]
- name = "futures-channel"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "fcae98ca17d102fd8a3603727b9259fcf7fa4239b603d2142926189bc8999b86"
-+checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939"
- dependencies = [
- "futures-core",
- "futures-sink",
-@@ -343,15 +355,15 @@ dependencies = [
-
- [[package]]
- name = "futures-core"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866"
-+checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94"
-
- [[package]]
- name = "futures-executor"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "1e274736563f686a837a0568b478bdabfeaec2dca794b5649b04e2fe1627c231"
-+checksum = "891a4b7b96d84d5940084b2a37632dd65deeae662c114ceaa2c879629c9c0ad1"
- dependencies = [
- "futures-core",
- "futures-task",
-@@ -360,15 +372,15 @@ dependencies = [
-
- [[package]]
- name = "futures-io"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "e676577d229e70952ab25f3945795ba5b16d63ca794ca9d2c860e5595d20b5ff"
-+checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59"
-
- [[package]]
- name = "futures-macro"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "52e7c56c15537adb4f76d0b7a76ad131cb4d2f4f32d3b0bcabcbe1c7c5e87764"
-+checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7"
- dependencies = [
- "proc-macro-hack",
- "proc-macro2",
-@@ -378,21 +390,21 @@ dependencies = [
-
- [[package]]
- name = "futures-sink"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "171be33efae63c2d59e6dbba34186fe0d6394fb378069a76dfd80fdcffd43c16"
-+checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3"
-
- [[package]]
- name = "futures-task"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "0bae52d6b29cf440e298856fec3965ee6fa71b06aa7495178615953fd669e5f9"
-+checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80"
-
- [[package]]
- name = "futures-util"
--version = "0.3.1"
-+version = "0.3.13"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "c0d66274fb76985d3c62c886d1da7ac4c0903a8c9f754e8fe0f35a6a6cc39e76"
-+checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1"
- dependencies = [
- "futures-channel",
- "futures-core",
-@@ -401,6 +413,7 @@ dependencies = [
- "futures-sink",
- "futures-task",
- "memchr",
-+ "pin-project-lite",
- "pin-utils",
- "proc-macro-hack",
- "proc-macro-nested",
-@@ -409,11 +422,11 @@ dependencies = [
-
- [[package]]
- name = "gdbstub"
--version = "0.4.0"
-+version = "0.4.5"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "347c27d24b8ac4a2bcad3ff3d0695271a0510c020bd8134b53d189e973ed58bf"
-+checksum = "d79a8fc10e9c4a4009deacc1d1e632cc2860c63c5169abc737f838e07534ab1a"
- dependencies = [
-- "cfg-if",
-+ "cfg-if 0.1.10",
- "log",
- "managed",
- "num-traits",
-@@ -422,13 +435,24 @@ dependencies = [
-
- [[package]]
- name = "getopts"
--version = "0.2.18"
-+version = "0.2.21"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797"
-+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
- dependencies = [
- "unicode-width",
- ]
-
-+[[package]]
-+name = "getrandom"
-+version = "0.2.2"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
-+dependencies = [
-+ "cfg-if 1.0.0",
-+ "libc",
-+ "wasi",
-+]
-+
- [[package]]
- name = "gpu_buffer"
- version = "0.1.0"
-@@ -448,6 +472,15 @@ dependencies = [
- "linux_input_sys",
- ]
-
-+[[package]]
-+name = "hermit-abi"
-+version = "0.1.18"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
-+dependencies = [
-+ "libc",
-+]
-+
- [[package]]
- name = "hypervisor"
- version = "0.1.0"
-@@ -496,7 +529,7 @@ version = "0.1.0"
- dependencies = [
- "base",
- "libc",
-- "tempfile",
-+ "tempfile 3.2.0",
- "vm_memory",
- ]
-
-@@ -524,9 +557,9 @@ dependencies = [
-
- [[package]]
- name = "libc"
--version = "0.2.65"
-+version = "0.2.92"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8"
-+checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714"
-
- [[package]]
- name = "libchromeos"
-@@ -538,6 +571,7 @@ dependencies = [
- "libc",
- "log",
- "protobuf",
-+ "thiserror",
- ]
-
- [[package]]
-@@ -580,11 +614,11 @@ dependencies = [
-
- [[package]]
- name = "log"
--version = "0.4.5"
-+version = "0.4.14"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
-+checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
- dependencies = [
-- "cfg-if",
-+ "cfg-if 1.0.0",
- ]
-
- [[package]]
-@@ -595,9 +629,9 @@ checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d"
-
- [[package]]
- name = "memchr"
--version = "2.3.0"
-+version = "2.3.4"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223"
-+checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
-
- [[package]]
- name = "memoffset"
-@@ -666,19 +700,20 @@ dependencies = [
-
- [[package]]
- name = "num-traits"
--version = "0.2.12"
-+version = "0.2.14"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
-+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
- dependencies = [
- "autocfg",
- ]
-
- [[package]]
- name = "num_cpus"
--version = "1.9.0"
-+version = "1.13.0"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238"
-+checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
- dependencies = [
-+ "hermit-abi",
- "libc",
- ]
-
-@@ -693,21 +728,27 @@ dependencies = [
-
- [[package]]
- name = "paste"
--version = "1.0.2"
-+version = "1.0.5"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "ba7ae1a2180ed02ddfdb5ab70c70d596a26dd642e097bb6fe78b1bde8588ed97"
-+checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58"
-+
-+[[package]]
-+name = "pin-project-lite"
-+version = "0.2.6"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
-
- [[package]]
- name = "pin-utils"
--version = "0.1.0-alpha.4"
-+version = "0.1.0"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
-+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
-
- [[package]]
- name = "pkg-config"
--version = "0.3.11"
-+version = "0.3.19"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f"
-+checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
-
- [[package]]
- name = "poll_token_derive"
-@@ -729,65 +770,67 @@ dependencies = [
- ]
-
- [[package]]
--name = "proc-macro-hack"
--version = "0.5.11"
-+name = "ppv-lite86"
-+version = "0.2.10"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
--dependencies = [
-- "proc-macro2",
-- "quote",
-- "syn",
--]
-+checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
-+
-+[[package]]
-+name = "proc-macro-hack"
-+version = "0.5.19"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
-
- [[package]]
- name = "proc-macro-nested"
--version = "0.1.3"
-+version = "0.1.7"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
-+checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
-
- [[package]]
- name = "proc-macro2"
--version = "1.0.8"
-+version = "1.0.26"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
-+checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
- dependencies = [
- "unicode-xid",
- ]
-
- [[package]]
- name = "protobuf"
--version = "2.8.1"
-+version = "2.22.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "40361836defdd5871ff7e84096c6f6444af7fc157f8ef1789f54f147687caa20"
-+checksum = "1b7f4a129bb3754c25a4e04032a90173c68f85168f77118ac4cb4936e7f06f92"
-
- [[package]]
- name = "protobuf-codegen"
--version = "2.8.1"
-+version = "2.22.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "12c6abd78435445fc86898ebbd0521a68438063d4a73e23527b7134e6bf58b4a"
-+checksum = "e5d2fa3a461857508103b914da60dd7b489c1a834967c2e214ecc1496f0c486a"
- dependencies = [
- "protobuf",
- ]
-
- [[package]]
- name = "protoc"
--version = "2.8.1"
-+version = "2.22.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "3998c4bc0af8ccbd3cc68245ee9f72663c5ae2fb78bc48ff7719aef11562edea"
-+checksum = "e6653d384a260fedff0a466e894e05c5b8d75e261a14e9f93e81e43ef86cad23"
- dependencies = [
- "log",
-+ "which",
- ]
-
- [[package]]
- name = "protoc-rust"
--version = "2.8.1"
-+version = "2.22.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "234c97039c32bb58a883d0deafa57db37e59428ce536f3bdfe1c46cffec04113"
-+checksum = "e5198afa8fca3f419b36db9a70ede51ff845938ef0386b49f4b02a5a322015a6"
- dependencies = [
- "protobuf",
- "protobuf-codegen",
- "protoc",
-- "tempfile",
-+ "tempfile 3.2.0",
- ]
-
- [[package]]
-@@ -811,28 +854,86 @@ dependencies = [
-
- [[package]]
- name = "quote"
--version = "1.0.2"
-+version = "1.0.9"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
-+checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
- dependencies = [
- "proc-macro2",
- ]
-
-+[[package]]
-+name = "rand"
-+version = "0.8.3"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
-+dependencies = [
-+ "libc",
-+ "rand_chacha",
-+ "rand_core",
-+ "rand_hc",
-+]
-+
-+[[package]]
-+name = "rand_chacha"
-+version = "0.3.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
-+dependencies = [
-+ "ppv-lite86",
-+ "rand_core",
-+]
-+
-+[[package]]
-+name = "rand_core"
-+version = "0.6.2"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
-+dependencies = [
-+ "getrandom",
-+]
-+
-+[[package]]
-+name = "rand_hc"
-+version = "0.3.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
-+dependencies = [
-+ "rand_core",
-+]
-+
- [[package]]
- name = "rand_ish"
- version = "0.1.0"
-
- [[package]]
--name = "remain"
--version = "0.2.1"
-+name = "redox_syscall"
-+version = "0.2.5"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "99c861227fc40c8da6fdaa3d58144ac84c0537080a43eb1d7d45c28f88dcb888"
-+checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
-+dependencies = [
-+ "bitflags",
-+]
-+
-+[[package]]
-+name = "remain"
-+version = "0.2.2"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "70ba1e78fa68412cb93ef642fd4d20b9a941be49ee9333875ebaf13112673ea7"
- dependencies = [
- "proc-macro2",
- "quote",
- "syn",
- ]
-
-+[[package]]
-+name = "remove_dir_all"
-+version = "0.5.3"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
-+dependencies = [
-+ "winapi",
-+]
-+
- [[package]]
- name = "resources"
- version = "0.1.0"
-@@ -860,9 +961,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
-
- [[package]]
- name = "syn"
--version = "1.0.14"
-+version = "1.0.68"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5"
-+checksum = "3ce15dd3ed8aa2f8eeac4716d6ef5ab58b6b9256db41d7e1a0224c2788e8fd87"
- dependencies = [
- "proc-macro2",
- "quote",
-@@ -883,7 +984,7 @@ dependencies = [
- "poll_token_derive",
- "sync",
- "syscall_defines",
-- "tempfile",
-+ "tempfile 3.0.7",
- ]
-
- [[package]]
-@@ -898,19 +999,33 @@ dependencies = [
- ]
-
- [[package]]
--name = "thiserror"
--version = "1.0.20"
-+name = "tempfile"
-+version = "3.2.0"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08"
-+checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
-+dependencies = [
-+ "cfg-if 1.0.0",
-+ "libc",
-+ "rand",
-+ "redox_syscall",
-+ "remove_dir_all",
-+ "winapi",
-+]
-+
-+[[package]]
-+name = "thiserror"
-+version = "1.0.24"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
- dependencies = [
- "thiserror-impl",
- ]
-
- [[package]]
- name = "thiserror-impl"
--version = "1.0.20"
-+version = "1.0.24"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"
-+checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
- dependencies = [
- "proc-macro2",
- "quote",
-@@ -934,15 +1049,15 @@ dependencies = [
-
- [[package]]
- name = "unicode-width"
--version = "0.1.5"
-+version = "0.1.8"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
-+checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
-
- [[package]]
- name = "unicode-xid"
--version = "0.2.0"
-+version = "0.2.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
--checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
-+checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
-
- [[package]]
- name = "usb_sys"
-@@ -1015,6 +1130,44 @@ dependencies = [
- "syscall_defines",
- ]
-
-+[[package]]
-+name = "wasi"
-+version = "0.10.2+wasi-snapshot-preview1"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
-+
-+[[package]]
-+name = "which"
-+version = "4.1.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe"
-+dependencies = [
-+ "either",
-+ "libc",
-+]
-+
-+[[package]]
-+name = "winapi"
-+version = "0.3.9"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
-+dependencies = [
-+ "winapi-i686-pc-windows-gnu",
-+ "winapi-x86_64-pc-windows-gnu",
-+]
-+
-+[[package]]
-+name = "winapi-i686-pc-windows-gnu"
-+version = "0.4.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
-+
-+[[package]]
-+name = "winapi-x86_64-pc-windows-gnu"
-+version = "0.4.0"
-+source = "registry+https://github.com/rust-lang/crates.io-index"
-+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-+
- [[package]]
- name = "wire_format_derive"
- version = "0.1.0"
---
-2.30.0
-
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch b/pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch
index 7f79cb90c18..80cab56b1f8 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch
@@ -1,7 +1,7 @@
-From 655988f0b66ccf22ce197024d6eb2682f3bbada8 Mon Sep 17 00:00:00 2001
+From 2b5a83bd9e2c1c9642773c1daf785d03f95f33a3 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 27 Sep 2020 15:34:02 +0000
-Subject: [PATCH crosvm v2] crosvm: support setting guest MAC from tap-fd
+Subject: [PATCH crosvm v3] crosvm: support setting guest MAC from tap-fd
This adds a mac= option to crosvm's --tap-fd option. The virtio-net
driver in the guest will read the desired MAC from virtio
@@ -15,14 +15,14 @@ Thanks-to: Puck Meerburg <puck@puckipedia.com>
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Message-Id: <20210517185700.3591932-1-hi@alyssa.is>
---
- devices/src/virtio/net.rs | 12 ++++++--
+ devices/src/virtio/net.rs | 20 ++++++++++--
src/crosvm.rs | 8 +++--
- src/linux.rs | 12 ++++----
- src/main.rs | 63 ++++++++++++++++++++++++++++++---------
- 4 files changed, 71 insertions(+), 24 deletions(-)
+ src/linux.rs | 19 +++++++-----
+ src/main.rs | 64 +++++++++++++++++++++++++++++++--------
+ 4 files changed, 88 insertions(+), 23 deletions(-)
diff --git a/devices/src/virtio/net.rs b/devices/src/virtio/net.rs
-index 92368c440..4d0ea1560 100644
+index b88dc44ae..b7489eb2b 100644
--- a/devices/src/virtio/net.rs
+++ b/devices/src/virtio/net.rs
@@ -419,6 +419,7 @@ where
@@ -40,8 +40,8 @@ index 92368c440..4d0ea1560 100644
+ guest_mac_addr: Option<MacAddress>,
vq_pairs: u16,
) -> Result<Net<T>, NetError> {
- let multi_queue = if vq_pairs > 1 { true } else { false };
-@@ -450,12 +452,12 @@ where
+ let multi_queue = vq_pairs > 1;
+@@ -450,12 +452,17 @@ where
tap.enable().map_err(NetError::TapEnable)?;
@@ -52,11 +52,16 @@ index 92368c440..4d0ea1560 100644
/// Creates a new virtio network device from a tap device that has already been
/// configured.
- pub fn from(base_features: u64, tap: T, vq_pairs: u16) -> Result<Net<T>, NetError> {
-+ pub fn with_tap(base_features: u64, tap: T, vq_pairs: u16, mac_address: Option<MacAddress>) -> Result<Net<T>, NetError> {
++ pub fn with_tap(
++ base_features: u64,
++ tap: T,
++ vq_pairs: u16,
++ mac_address: Option<MacAddress>,
++ ) -> Result<Net<T>, NetError> {
let taps = tap.into_mq_taps(vq_pairs).map_err(NetError::TapOpen)?;
// This would also validate a tap created by Self::new(), but that's a good thing as it
-@@ -488,7 +490,12 @@ where
+@@ -488,7 +495,12 @@ where
workers_kill_evt.push(worker_kill_evt);
}
@@ -69,39 +74,42 @@ index 92368c440..4d0ea1560 100644
queue_sizes: vec![QUEUE_SIZE; (vq_pairs * 2 + 1) as usize].into_boxed_slice(),
workers_kill_evt,
kill_evts,
-@@ -503,6 +510,7 @@ where
+@@ -503,6 +515,10 @@ where
let vq_pairs = self.queue_sizes.len() as u16 / 2;
VirtioNetConfig {
-+ mac: self.mac_address.map(|m| m.octets()).unwrap_or_else(Default::default),
++ mac: self
++ .mac_address
++ .map(|m| m.octets())
++ .unwrap_or_else(Default::default),
max_vq_pairs: Le16::from(vq_pairs),
// Other field has meaningful value when the corresponding feature
// is enabled, but all these features aren't supported now.
diff --git a/src/crosvm.rs b/src/crosvm.rs
-index 04e267d6c..1dde7d769 100644
+index eededc02e..62b3019db 100644
--- a/src/crosvm.rs
+++ b/src/crosvm.rs
-@@ -171,6 +171,10 @@ impl Default for SharedDir {
+@@ -191,6 +191,10 @@ impl Default for SharedDir {
}
}
-+pub struct TapFdOptions {
++pub struct TapFdOption {
+ pub mac: Option<net_util::MacAddress>,
+}
+
/// Aggregate of all configurable options for a running VM.
pub struct Config {
- pub vcpu_count: Option<usize>,
-@@ -194,7 +198,7 @@ pub struct Config {
+ pub kvm_device_path: PathBuf,
+@@ -217,7 +221,7 @@ pub struct Config {
pub mac_address: Option<net_util::MacAddress>,
pub net_vq_pairs: Option<u16>,
pub vhost_net: bool,
- pub tap_fd: Vec<RawFd>,
-+ pub tap_fd: BTreeMap<RawFd, TapFdOptions>,
++ pub tap_fd: BTreeMap<RawFd, TapFdOption>,
pub cid: Option<u64>,
pub wayland_socket_paths: BTreeMap<String, PathBuf>,
pub wayland_dmabuf: bool,
-@@ -253,7 +257,7 @@ impl Default for Config {
+@@ -291,7 +295,7 @@ impl Default for Config {
mac_address: None,
net_vq_pairs: None,
vhost_net: false,
@@ -111,37 +119,44 @@ index 04e267d6c..1dde7d769 100644
#[cfg(feature = "gpu")]
gpu_parameters: None,
diff --git a/src/linux.rs b/src/linux.rs
-index f452fef3f..42c07df4f 100644
+index ba2d28f96..e9601478a 100644
--- a/src/linux.rs
+++ b/src/linux.rs
-@@ -75,7 +75,7 @@ use vm_memory::{GuestAddress, GuestMemory};
-
+@@ -60,8 +60,8 @@ use vm_memory::{GuestAddress, GuestMemory};
#[cfg(all(target_arch = "x86_64", feature = "gdb"))]
use crate::gdb::{gdb_thread, GdbStub};
--use crate::{Config, DiskOption, Executable, SharedDir, SharedDirKind, TouchDeviceOption};
-+use crate::{Config, DiskOption, Executable, SharedDir, SharedDirKind, TapFdOptions, TouchDeviceOption};
+ use crate::{
+- Config, DiskOption, Executable, SharedDir, SharedDirKind, TouchDeviceOption, VhostUserFsOption,
+- VhostUserOption,
++ Config, DiskOption, Executable, SharedDir, SharedDirKind, TapFdOption, TouchDeviceOption,
++ VhostUserFsOption, VhostUserOption,
+ };
use arch::{
self, LinuxArch, RunnableLinuxVm, SerialHardware, SerialParameters, VcpuAffinity,
- VirtioDeviceStub, VmComponents, VmImage,
-@@ -675,7 +675,7 @@ fn create_balloon_device(cfg: &Config, socket: BalloonControlResponseSocket) ->
+@@ -763,7 +763,11 @@ fn create_balloon_device(cfg: &Config, tube: Tube) -> DeviceResult {
})
}
-fn create_tap_net_device(cfg: &Config, tap_fd: RawDescriptor) -> DeviceResult {
-+fn create_tap_net_device(cfg: &Config, tap_fd: RawDescriptor, options: &TapFdOptions) -> DeviceResult {
++fn create_tap_net_device(
++ cfg: &Config,
++ tap_fd: RawDescriptor,
++ options: &TapFdOption,
++) -> DeviceResult {
// Safe because we ensure that we get a unique handle to the fd.
let tap = unsafe {
Tap::from_raw_descriptor(
-@@ -691,7 +691,7 @@ fn create_tap_net_device(cfg: &Config, tap_fd: RawDescriptor) -> DeviceResult {
+@@ -779,7 +783,8 @@ fn create_tap_net_device(cfg: &Config, tap_fd: RawDescriptor) -> DeviceResult {
vq_pairs = 1;
}
let features = virtio::base_features(cfg.protected_vm);
- let dev = virtio::Net::from(features, tap, vq_pairs).map_err(Error::NetDeviceNew)?;
-+ let dev = virtio::Net::with_tap(features, tap, vq_pairs, options.mac).map_err(Error::NetDeviceNew)?;
++ let dev =
++ virtio::Net::with_tap(features, tap, vq_pairs, options.mac).map_err(Error::NetDeviceNew)?;
Ok(VirtioDeviceStub {
dev: Box::new(dev),
-@@ -725,7 +725,7 @@ fn create_net_device(
+@@ -814,7 +819,7 @@ fn create_net_device(
.map_err(Error::VhostNetDeviceNew)?;
Box::new(dev) as Box<dyn VirtioDevice>
} else {
@@ -150,8 +165,8 @@ index f452fef3f..42c07df4f 100644
.map_err(Error::NetDeviceNew)?;
Box::new(dev) as Box<dyn VirtioDevice>
};
-@@ -1311,8 +1311,8 @@ fn create_virtio_devices(
- devs.push(create_balloon_device(cfg, balloon_device_socket)?);
+@@ -1445,8 +1450,8 @@ fn create_virtio_devices(
+ devs.push(create_balloon_device(cfg, balloon_device_tube)?);
// We checked above that if the IP is defined, then the netmask is, too.
- for tap_fd in &cfg.tap_fd {
@@ -162,19 +177,29 @@ index f452fef3f..42c07df4f 100644
if let (Some(host_ip), Some(netmask), Some(mac_address)) =
diff --git a/src/main.rs b/src/main.rs
-index 5d02af02f..f8bc0d14e 100644
+index ab62f2543..e1188a86c 100644
--- a/src/main.rs
+++ b/src/main.rs
-@@ -28,7 +28,7 @@ use base::{
+@@ -20,13 +20,15 @@ use arch::{
+ set_default_serial_parameters, Pstore, SerialHardware, SerialParameters, SerialType,
+ VcpuAffinity,
};
+-use base::{debug, error, getpid, info, kill_process_group, reap_child, syslog, warn};
++use base::{
++ debug, error, getpid, info, kill_process_group, reap_child, syslog, warn, RawDescriptor,
++};
+ #[cfg(feature = "direct")]
+ use crosvm::DirectIoOption;
use crosvm::{
argument::{self, print_help, set_arguments, Argument},
- platform, BindMount, Config, DiskOption, Executable, GidMap, SharedDir, TouchDeviceOption,
-+ platform, BindMount, Config, DiskOption, Executable, GidMap, SharedDir, TapFdOptions, TouchDeviceOption,
- DISK_ID_LEN,
+- VhostUserFsOption, VhostUserOption, DISK_ID_LEN,
++ platform, BindMount, Config, DiskOption, Executable, GidMap, SharedDir, TapFdOption,
++ TouchDeviceOption, VhostUserFsOption, VhostUserOption, DISK_ID_LEN,
};
#[cfg(feature = "gpu")]
-@@ -1319,17 +1319,52 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
+ use devices::virtio::gpu::{GpuMode, GpuParameters};
+@@ -1460,17 +1462,55 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
}
"vhost-net" => cfg.vhost_net = true,
"tap-fd" => {
@@ -183,21 +208,20 @@ index 5d02af02f..f8bc0d14e 100644
- .unwrap()
- .parse()
- .map_err(|_| argument::Error::InvalidValue {
-- value: value.unwrap().to_owned(),
-- expected: String::from(
-- "this value for `tap-fd` must be an unsigned integer",
-- ),
-- })?,
-- );
+ let mut components = value.unwrap().split(',');
+
-+ let fd: RawDescriptor = components
-+ .next()
-+ .and_then(|x| x.parse().ok())
-+ .ok_or_else(|| argument::Error::InvalidValue {
-+ value: value.unwrap().to_owned(),
-+ expected: String::from("this value for `tap-fd` must be an unsigned integer"),
-+ })?;
++ let fd: RawDescriptor =
++ components
++ .next()
++ .and_then(|x| x.parse().ok())
++ .ok_or_else(|| argument::Error::InvalidValue {
+ value: value.unwrap().to_owned(),
+ expected: String::from(
+ "this value for `tap-fd` must be an unsigned integer",
+ ),
+- })?,
+- );
++ })?;
+
+ let mut mac = None;
+ for c in components {
@@ -234,11 +258,11 @@ index 5d02af02f..f8bc0d14e 100644
+ name
+ )));
+ }
-+ cfg.tap_fd.insert(fd, TapFdOptions { mac });
++ cfg.tap_fd.insert(fd, TapFdOption { mac });
}
#[cfg(feature = "gpu")]
"gpu" => {
-@@ -1644,8 +1679,8 @@ writeback=BOOL - Indicates whether the VM can use writeback caching (default: fa
+@@ -1907,8 +1947,8 @@ writeback=BOOL - Indicates whether the VM can use writeback caching (default: fa
Argument::value("plugin-gid-map-file", "PATH", "Path to the file listing supplemental GIDs that should be mapped in plugin jail. Can be given more than once."),
Argument::flag("vhost-net", "Use vhost for networking."),
Argument::value("tap-fd",
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 681526356ea..f8b6b13e694 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -11,10 +11,11 @@ let
getSrc = path: fetchFromGitiles upstreamInfo.components.${path};
srcs = lib.genAttrs [
- "src/platform/crosvm"
- "src/third_party/adhd"
"src/aosp/external/minijail"
+ "src/platform/crosvm"
"src/platform2"
+ "src/third_party/adhd"
+ "src/third_party/rust-vmm/vhost"
] getSrc;
in
@@ -39,14 +40,12 @@ in
sourceRoot = "src/platform/crosvm";
- cargoPatches = [ ./Regenerate-Cargo.lock.patch ];
-
patches = [
./default-seccomp-policy-dir.diff
./VIRTIO_NET_F_MAC.patch
];
- cargoSha256 = "0rrhgchrf6ac5393rxlkff0kd3xs7xixxshcdpag3lxjgg0j62af";
+ cargoSha256 = "1hw9r7vggvn8p0sy4k0i2ijpyk0yb11qww6s6d6wdfvrl1ksbapl";
nativeBuildInputs = [ pkgconfig wayland ];
@@ -55,9 +54,6 @@ in
postPatch = ''
sed -i "s|/usr/share/policy/crosvm/|$out/share/policy/|g" \
seccomp/*/*.policy
-
- # No /dev/log in the sandbox.
- sed -i '/^[[:space:]]*syslog::init().unwrap();$/d' tests/boot.rs
'';
preBuild = ''
@@ -69,9 +65,6 @@ in
cp seccomp/${arch}/* $out/share/policy/
'';
- # Boot test often hangs on AMD.
- doCheck = !stdenv.buildPlatform.isx86_64;
-
CROSVM_CARGO_TEST_KERNEL_BINARY =
lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform)
"${linux}/${stdenv.hostPlatform.platform.kernelTarget}";
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index a2e093c2e9e..5852d4a3069 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -24,6 +24,7 @@ component_paths = [
'src/third_party/libqmi',
'src/third_party/modemmanager-next',
'src/third_party/modp_b64',
+ 'src/third_party/rust-vmm/vhost',
]
git_root = 'https://chromium.googlesource.com/'
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 4a4101b37d7..f23948d9cb4 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -61,6 +61,12 @@
"url": "https://chromium.googlesource.com/aosp/platform/external/modp_b64",
"rev": "269b6fb8401617b85e2dff7ae8a7b0f97613e2cd",
"sha256": "1mc5w70svgj7rq49r6lxkw9ix6q09dxrw0lamx3hn8anq5q8y532"
+ },
+ "src/third_party/rust-vmm/vhost": {
+ "name": "vhost",
+ "url": "https://chromium.googlesource.com/chromiumos/third_party/rust-vmm/vhost",
+ "rev": "98298cb96972c20e05bffed58861456b48328d43",
+ "sha256": "0ym5cmnaifn3ywcidvqmbswmsxqi0zw6gx88gfqfq0p5jis8vjhi"
}
}
}
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-03 9:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 9:11 [PATCH nixpkgs 1/4] kernelPatches: drop export_kernel_fpu_functions Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 2/4] chromiumOSPackages: 89.13729.0.0-rc1 -> 91.13904.0.0-rc2 Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 3/4] chromiumOSPackages: rebase platform2 packages Alyssa Ross
2021-06-03 9:11 ` [PATCH nixpkgs 4/4] crosvm: fix build Alyssa Ross
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).