From d23025b5756705e8d7090da45703186525c260a5 Mon Sep 17 00:00:00 2001 From: Arch Linux Technical User <65091038+archlinux-github@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:01:55 +0100 Subject: [PATCH 01/12] archlinux: Release 2025.12.01.153427 (#13804) This is an automated release [1]. [1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml --- distributions/DistributionInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributions/DistributionInfo.json b/distributions/DistributionInfo.json index c68dd67df..812eed122 100644 --- a/distributions/DistributionInfo.json +++ b/distributions/DistributionInfo.json @@ -166,8 +166,8 @@ "FriendlyName": "Arch Linux", "Default": true, "Amd64Url": { - "Url": "https://fastly.mirror.pkgbuild.com/wsl/2025.11.01.150831/archlinux-2025.11.01.150831.wsl", - "Sha256": "9dbac892c38c94fd22a8988eff4e072778f3f445378d33a81474a2b88cb04562" + "Url": "https://fastly.mirror.pkgbuild.com/wsl/2025.12.01.153427/archlinux-2025.12.01.153427.wsl", + "Sha256": "8dfe92910a188f191b0af2972bd4bda661178b769ce820a8921e8b7aeae9a517" } } ], From 0f07dae96da6dd45842ff5b3901c1b9e63909d84 Mon Sep 17 00:00:00 2001 From: Scott Bradnick <84082961+sbradnick@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:02:29 -0500 Subject: [PATCH 02/12] Update SLE15SP7 [QU2] and SLE16.0 [QU0] (#13808) --- distributions/DistributionInfo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distributions/DistributionInfo.json b/distributions/DistributionInfo.json index 812eed122..0596ec54a 100644 --- a/distributions/DistributionInfo.json +++ b/distributions/DistributionInfo.json @@ -62,8 +62,8 @@ "FriendlyName": "SUSE Linux Enterprise 15 SP7", "Default": false, "Amd64Url": { - "Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20250903.0/SUSE-Linux-Enterprise-15-SP7-15.7.x86_64-27.32-Build27.32.wsl", - "Sha256": "0x1e53279af609b9d67b108bc31f1318c3317338595298ef8dfbf7a5728ab8a093" + "Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20251201.0/SUSE-Linux-Enterprise-15-SP7-15.7.x86_64-30.1-Build30.1.wsl", + "Sha256": "0x60924e13286ed15bdcf9069e3a24d3394fb858954de3bdfcb1ea576900b81b2e" } }, { @@ -71,8 +71,8 @@ "FriendlyName": "SUSE Linux Enterprise 16.0", "Default": true, "Amd64Url": { - "Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20251104.0/SUSE-Linux-Enterprise-16.0-16.0.x86_64-1.3-Build1.3.wsl", - "Sha256": "0xb91f901ba96910fa65218ef0e6aaae7b9980bd11fed63cb3507878aa8915d726" + "Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20251201.0/SUSE-Linux-Enterprise-16.0-16.0.x86_64-1.9-Build1.9.wsl", + "Sha256": "0xf0fc07ed3543d3dc24cfb35b4194bbecf98485cefdd720c521034ac1c54bffd3" } } ], From 82e54b12a8af3bf32da0788c01633fde2336923a Mon Sep 17 00:00:00 2001 From: Blue Date: Mon, 1 Dec 2025 22:00:43 +0000 Subject: [PATCH 03/12] Notice change from build: 134917819 (#13809) Co-authored-by: WSL notice --- NOTICE.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/NOTICE.txt b/NOTICE.txt index 24abab47e..564f12574 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -636,6 +636,39 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--------------------------------------------------------- + +--------------------------------------------------------- + +Microsoft.NETCore.App.Runtime.win-arm64 10.0.0 - MIT + + + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + --------------------------------------------------------- --------------------------------------------------------- From 0f6f3c1e02cc4c7f9c6c8edef93a339eef508f56 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Mon, 1 Dec 2025 21:17:28 -0800 Subject: [PATCH 04/12] test: improve test logging infra (#13811) Co-authored-by: Ben Hillis --- test/linux/unit_tests/unittests.c | 4 ++-- test/windows/Common.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/linux/unit_tests/unittests.c b/test/linux/unit_tests/unittests.c index e52357df0..c2e0970e6 100644 --- a/test/linux/unit_tests/unittests.c +++ b/test/linux/unit_tests/unittests.c @@ -103,11 +103,11 @@ int main(int Argc, char* Argv[], char** Envp) if (LXT_SUCCESS(Result)) { - LxtLogPassed("%s", false, LxtTests[Itr].Name); + LxtLogPassed("%s", LxtTests[Itr].Name); } else { - LxtLogError("%s", false, LxtTests[Itr].Name); + LxtLogError("%s", LxtTests[Itr].Name); } goto ErrorExit; diff --git a/test/windows/Common.cpp b/test/windows/Common.cpp index 2c30e7f38..3c394662f 100644 --- a/test/windows/Common.cpp +++ b/test/windows/Common.cpp @@ -1907,7 +1907,8 @@ Return Value: } LaunchArguments += CommandLine; - LogInfo("Test process exited with: %lu", LxsstuLaunchWsl(LaunchArguments.c_str())); + DWORD ExitCode = LxsstuLaunchWsl(LaunchArguments.c_str()); + LogInfo("Test process exited with: %lu", ExitCode); // // Parse the contents of the linux log(s) files and relog. @@ -1917,9 +1918,11 @@ Return Value: { THROW_IF_NTSTATUS_FAILED(LxsstuParseLinuxLogFiles(LogFileName, &TestPassed)); - THROW_HR_IF(E_FAIL, !TestPassed); + VERIFY_IS_TRUE(TestPassed); } + VERIFY_ARE_EQUAL(0, ExitCode); + return; } From 4637f3758f300d932a6f3659867603a3ddec8559 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Mon, 1 Dec 2025 21:18:09 -0800 Subject: [PATCH 05/12] virtio networking: fix two minor issues (#13810) * virtio networking: fix two minor issues * Update src/windows/common/VirtioNetworking.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Hillis Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/windows/common/NatNetworking.cpp | 17 ++------- src/windows/common/VirtioNetworking.cpp | 35 ++++++++++--------- src/windows/common/VirtioNetworking.h | 2 +- .../common/WslCoreNetworkingSupport.cpp | 22 ++++++++++++ src/windows/common/WslCoreNetworkingSupport.h | 5 +++ 5 files changed, 49 insertions(+), 32 deletions(-) diff --git a/src/windows/common/NatNetworking.cpp b/src/windows/common/NatNetworking.cpp index dbad2a208..1be004987 100644 --- a/src/windows/common/NatNetworking.cpp +++ b/src/windows/common/NatNetworking.cpp @@ -506,23 +506,12 @@ CATCH_LOG() void NatNetworking::UpdateMtu() { - unique_interface_table interfaceTable{}; - THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable)); - - ULONG minMtu = ULONG_MAX; - for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++) - { - const auto& ipInterface = interfaceTable.get()->Table[index]; - if (ipInterface.Connected) - { - minMtu = std::min(ipInterface.NlMtu, minMtu); - } - } + const auto minMtu = GetMinimumConnectedInterfaceMtu(); // Only send the update if the MTU changed. - if (minMtu != ULONG_MAX && minMtu != m_networkMtu) + if (minMtu && minMtu.value() != m_networkMtu) { - m_networkMtu = minMtu; + m_networkMtu = minMtu.value(); hns::ModifyGuestEndpointSettingRequest notification{}; notification.ResourceType = hns::GuestEndpointResourceType::Interface; diff --git a/src/windows/common/VirtioNetworking.cpp b/src/windows/common/VirtioNetworking.cpp index cb6924491..a63369693 100644 --- a/src/windows/common/VirtioNetworking.cpp +++ b/src/windows/common/VirtioNetworking.cpp @@ -22,6 +22,14 @@ VirtioNetworking::VirtioNetworking( { } +VirtioNetworking::~VirtioNetworking() +{ + // Unregister the network notification callback to prevent it from using the GNS channel. + m_networkNotifyHandle.reset(); + // Stop the GNS channel to unblock any stuck communications with the guest. + m_gnsChannel.Stop(); +} + void VirtioNetworking::Initialize() try { @@ -271,32 +279,25 @@ void VirtioNetworking::UpdateDns(hns::DNS&& dnsSettings) void VirtioNetworking::UpdateMtu() { - unique_interface_table interfaceTable{}; - THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable)); - - ULONG minMtu = ULONG_MAX; - for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++) - { - const auto& ipInterface = interfaceTable.get()->Table[index]; - if (ipInterface.Connected) - { - minMtu = std::min(ipInterface.NlMtu, minMtu); - } - } + const auto minMtu = GetMinimumConnectedInterfaceMtu(); // Only send the update if the MTU changed. - if (minMtu != ULONG_MAX && minMtu != m_networkMtu) + if (minMtu && minMtu.value() != m_networkMtu) { + m_networkMtu = minMtu.value(); + hns::ModifyGuestEndpointSettingRequest notification{}; notification.ResourceType = hns::GuestEndpointResourceType::Interface; notification.RequestType = hns::ModifyRequestType::Update; - notification.Settings.NlMtu = m_networkMtu; notification.Settings.Connected = true; + notification.Settings.NlMtu = m_networkMtu; - WSL_LOG("VirtioNetworking::UpdateMtu", TraceLoggingValue(m_networkMtu, "VirtioMtu")); + WSL_LOG( + "VirtioNetworking::UpdateMtu", + TraceLoggingValue(m_adapterId, "endpointId"), + TraceLoggingValue(m_networkMtu, "virtioMtu")); - // TODO: Why was this commented ? - // m_gnsChannel.SendHnsNotification(ToJsonW(notification).c_str(), m_endpointId); + m_gnsChannel.SendHnsNotification(ToJsonW(notification).c_str(), m_adapterId); } } diff --git a/src/windows/common/VirtioNetworking.h b/src/windows/common/VirtioNetworking.h index 629afb2d5..b32b5454f 100644 --- a/src/windows/common/VirtioNetworking.h +++ b/src/windows/common/VirtioNetworking.h @@ -14,7 +14,7 @@ class VirtioNetworking : public INetworkingEngine { public: VirtioNetworking(GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr guestDeviceManager, wil::shared_handle userToken); - ~VirtioNetworking() = default; + ~VirtioNetworking(); // Note: This class cannot be moved because m_networkNotifyHandle captures a 'this' pointer. VirtioNetworking(const VirtioNetworking&) = delete; diff --git a/src/windows/common/WslCoreNetworkingSupport.cpp b/src/windows/common/WslCoreNetworkingSupport.cpp index a88457981..d4fd0d943 100644 --- a/src/windows/common/WslCoreNetworkingSupport.cpp +++ b/src/windows/common/WslCoreNetworkingSupport.cpp @@ -248,3 +248,25 @@ wsl::core::networking::EphemeralHcnEndpoint wsl::core::networking::CreateEphemer return endpoint; } + +std::optional wsl::core::networking::GetMinimumConnectedInterfaceMtu() noexcept +{ + std::optional minMtu{}; + try + { + unique_interface_table interfaceTable{}; + THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable)); + + for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++) + { + const auto& ipInterface = interfaceTable.get()->Table[index]; + if (ipInterface.Connected) + { + minMtu = std::min(minMtu.value_or(ipInterface.NlMtu), ipInterface.NlMtu); + } + } + } + CATCH_LOG() + + return minMtu; +} diff --git a/src/windows/common/WslCoreNetworkingSupport.h b/src/windows/common/WslCoreNetworkingSupport.h index ff6ac7669..f66a74234 100644 --- a/src/windows/common/WslCoreNetworkingSupport.h +++ b/src/windows/common/WslCoreNetworkingSupport.h @@ -456,6 +456,11 @@ std::vector EnumerateConnect bool IsMetered(ABI::Windows::Networking::Connectivity::NetworkCostType cost) noexcept; +/// +/// Gets the minimum MTU across all connected network interfaces. +/// +std::optional GetMinimumConnectedInterfaceMtu() noexcept; + /// /// This instance acts as an IP_ADAPTER_ADDRESS pointer. /// From 8f744fc1889fa0d876e6b16565da6eb5e1a84d64 Mon Sep 17 00:00:00 2001 From: Mitchell Levy <46305051+chessturo@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:50:16 -0800 Subject: [PATCH 06/12] Update Microsoft.WSL.Kernel to 6.6.114.1 (#13812) See https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-6.6.114.1 --- packages.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.config b/packages.config index a67f7dd09..7b76573d0 100644 --- a/packages.config +++ b/packages.config @@ -19,7 +19,7 @@ - + From 2844e4a8622ae7d43001ca159821fa6f5bcd7eeb Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Tue, 2 Dec 2025 12:46:26 -0800 Subject: [PATCH 07/12] test: minor updates to improve virtiofs pass rate (#13815) Co-authored-by: Ben Hillis --- test/linux/unit_tests/drvfs.c | 37 +++++++++++++++------- test/linux/unit_tests/lxtfs.c | 5 ++- test/windows/DrvFsTests.cpp | 59 +++++++++++++++++++++-------------- 3 files changed, 64 insertions(+), 37 deletions(-) diff --git a/test/linux/unit_tests/drvfs.c b/test/linux/unit_tests/drvfs.c index bde26a956..bceb9cc47 100644 --- a/test/linux/unit_tests/drvfs.c +++ b/test/linux/unit_tests/drvfs.c @@ -1417,6 +1417,13 @@ Return Value: int Result; + if (g_LxtFsInfo.FsType == LxtFsTypeVirtioFs) + { + LxtLogInfo("TODO: debug this test on virtiofs."); + Result = 0; + goto ErrorExit; + } + LxtCheckResult(LxtFsDeleteLoopCommon(DRVFS_DELETELOOP_PREFIX)); ErrorExit: @@ -1951,12 +1958,12 @@ Return Value: // // Fstat should still work after unlink. // - // N.B. This currently doesn't work on plan 9. + // N.B. This currently doesn't work on plan9 or virtiofs. // LxtCheckErrnoZeroSuccess(unlink(DRVFS_BASIC_PREFIX "/testfile")); LxtCheckErrnoFailure(stat(DRVFS_BASIC_PREFIX "/testfile", &Stat2), ENOENT); - if (g_LxtFsInfo.FsType != LxtFsTypePlan9) + if (g_LxtFsInfo.FsType != LxtFsTypePlan9 && g_LxtFsInfo.FsType != LxtFsTypeVirtioFs) { LxtCheckErrnoZeroSuccess(fstat(Fd, &Stat2)); @@ -2143,9 +2150,9 @@ Return Value: Dir = NULL; - if (g_LxtFsInfo.FsType == LxtFsTypePlan9) + if (g_LxtFsInfo.FsType == LxtFsTypePlan9 || g_LxtFsInfo.FsType == LxtFsTypeVirtioFs) { - LxtLogInfo("This test is not relevant in VM mode."); + LxtLogInfo("This test is not relevant for plan9 or virtiofs."); Result = 0; goto ErrorExit; } @@ -3171,12 +3178,12 @@ Return Value: Fd2 = -1; // - // This functionality is not supported on Plan 9. + // This functionality is not supported on Plan 9 or virtiofs. // - if (g_LxtFsInfo.FsType == LxtFsTypePlan9) + if (g_LxtFsInfo.FsType == LxtFsTypePlan9 || g_LxtFsInfo.FsType == LxtFsTypeVirtioFs) { - LxtLogInfo("This test is not supported in VM mode."); + LxtLogInfo("This test is not supported for plan9 or virtiofs."); Result = 0; goto ErrorExit; } @@ -3248,6 +3255,7 @@ Return Value: bool FileLinkFound; bool JunctionFound; void* Mapping; + void* MapResult; void* PointerResult; bool RelativeLinkFound; int Result; @@ -3261,7 +3269,7 @@ Return Value: DirFd = -1; Fd = -1; - Mapping = NULL; + Mapping = MAP_FAILED; LxtCheckNullErrno(Dir = opendir(DRVFS_REPARSE_PREFIX)); errno = 0; AbsoluteLinkFound = false; @@ -3460,11 +3468,18 @@ Return Value: // is what execve uses. // - LxtCheckNullErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_SHARED, Fd, 0)); - LxtCheckMemoryEqual(Mapping, "MZ", 2); + if (g_LxtFsInfo.FsType != LxtFsTypeVirtioFs) + { + LxtCheckMapErrno(Mapping = mmap(NULL, 2, PROT_READ, MAP_SHARED, Fd, 0)); + LxtCheckMemoryEqual(Mapping, "MZ", 2); + } + else + { + LxtLogInfo("TODO: debug virtiofs handling of app exec links"); + } ErrorExit: - if (Mapping != NULL) + if (Mapping != MAP_FAILED) { munmap(Mapping, 2); } diff --git a/test/linux/unit_tests/lxtfs.c b/test/linux/unit_tests/lxtfs.c index ee5fd4730..041e484e2 100644 --- a/test/linux/unit_tests/lxtfs.c +++ b/test/linux/unit_tests/lxtfs.c @@ -3350,7 +3350,6 @@ Return Value: FullExpectedTime = (Expected->tv_sec * FS_NS_PER_SEC) + Expected->tv_nsec; if ((FullTime <= FullExpectedTime) && (FullTime >= (FullExpectedTime - (AllowedVarianceSeconds * FS_NS_PER_SEC)))) { - return true; } @@ -3359,9 +3358,9 @@ Return Value: // the host and guest. // - if ((g_LxtFsInfo.FsType == LxtFsTypePlan9) && (FullTime <= (FullExpectedTime + (AllowedVarianceSeconds * FS_NS_PER_SEC)))) + if (((g_LxtFsInfo.FsType == LxtFsTypePlan9) || (g_LxtFsInfo.FsType == LxtFsTypeVirtioFs)) && + (FullTime <= (FullExpectedTime + (AllowedVarianceSeconds * FS_NS_PER_SEC)))) { - return true; } diff --git a/test/windows/DrvFsTests.cpp b/test/windows/DrvFsTests.cpp index 792714cc1..5ba9789be 100644 --- a/test/windows/DrvFsTests.cpp +++ b/test/windows/DrvFsTests.cpp @@ -135,12 +135,6 @@ class DrvFsTests Logfile << TestMode; VERIFY_NO_THROW(LxsstuRunTest(Command.str().c_str(), Logfile.str().c_str())); - if (DrvFsMode.has_value() && DrvFsMode.value() == DrvFsMode::VirtioFs) - { - LogSkipped("TODO: debug test for virtiofs"); - return; - } - // // Check that the read-only attribute has been changed. // @@ -173,8 +167,15 @@ class DrvFsTests VERIFY_NO_THROW(VerifyDrvFsSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\ntlink7", L"ntlink2", true)); VERIFY_NO_THROW(VerifyDrvFsSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\ntlink8", L"foo\uf03abar", false)); - VERIFY_NO_THROW(VerifyDrvFsLxSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\lxlink1")); - VERIFY_NO_THROW(VerifyDrvFsLxSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\lxlink2")); + if (DrvFsMode.has_value() && DrvFsMode.value() == DrvFsMode::VirtioFs) + { + LogInfo("TODO: debug VerifyDrvFsLxSymlink variations on virtiofs"); + } + else + { + VERIFY_NO_THROW(VerifyDrvFsLxSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\lxlink1")); + VERIFY_NO_THROW(VerifyDrvFsLxSymlink(LXSST_DRVFS_SYMLINK_TEST_DIR "\\lxlink2")); + } // Since target resolution is done on the Windows side in Plan 9, it is able to create an NT // link if the target path traverses an existing NT link (this is actually better than WSL 1). @@ -228,10 +229,16 @@ class DrvFsTests VERIFY_NO_THROW(DrvFsCommon(LX_DRVFS_DISABLE_NONE, Mode)); } - void DrvFsFat() const + void DrvFsFat(DrvFsMode Mode) { SKIP_TEST_ARM64(); + if (Mode == DrvFsMode::VirtioFs) + { + LogSkipped("VirtioFS currently only supports mounting full drives"); + return; + } + constexpr auto MountPoint = "C:\\lxss_fat"; constexpr auto VhdPath = "C:\\lxss_fat.vhdx"; auto Cleanup = wil::scope_exit([MountPoint, VhdPath] { DeleteVolume(MountPoint, VhdPath); }); @@ -241,10 +248,16 @@ class DrvFsTests LxsstuRunTest((L"bash -c '" + SkipUnstableTestEnvVar + L" /data/test/wsl_unit_tests drvfs -m 3'").c_str(), L"drvfs3")); } - void DrvFsSmb() const + void DrvFsSmb(DrvFsMode Mode) { SKIP_TEST_ARM64(); + if (Mode == DrvFsMode::VirtioFs) + { + LogSkipped("TODO: debug virtiofs handling of //localhost/C$ style paths"); + return; + } + VERIFY_NO_THROW( LxsstuRunTest((L"bash -c '" + SkipUnstableTestEnvVar + L" /data/test/wsl_unit_tests drvfs -m 4'").c_str(), L"drvfs4")); } @@ -312,20 +325,20 @@ class DrvFsTests { SKIP_TEST_ARM64(); - if (Mode == DrvFsMode::VirtioFs) - { - LogSkipped("TODO: debug test for virtiofs"); - return; - } - VERIFY_NO_THROW(LxsstuRunTest(L"/data/test/wsl_unit_tests xattr drvfs", L"xattr_drvfs")); } - void DrvFsReFs() const + void DrvFsReFs(DrvFsMode Mode) { SKIP_TEST_ARM64(); WSL_TEST_VERSION_REQUIRED(wsl::windows::common::helpers::WindowsBuildNumbers::Germanium); + if (Mode == DrvFsMode::VirtioFs) + { + LogSkipped("VirtioFS currently only supports mounting full drives"); + return; + } + constexpr auto MountPoint = "C:\\lxss_refs"; constexpr auto VhdPath = "C:\\lxss_refs.vhdx"; auto Cleanup = wil::scope_exit([MountPoint, VhdPath] { DeleteVolume(MountPoint, VhdPath); }); @@ -1072,13 +1085,13 @@ class WSL1 : public DrvFsTests TEST_METHOD(DrvFsFat) { WSL1_TEST_ONLY(); - DrvFsTests::DrvFsFat(); + DrvFsTests::DrvFsFat(DrvFsMode::WSL1); } TEST_METHOD(DrvFsSmb) { WSL1_TEST_ONLY(); - DrvFsTests::DrvFsSmb(); + DrvFsTests::DrvFsSmb(DrvFsMode::WSL1); } TEST_METHOD(DrvFsMetadata) @@ -1108,8 +1121,8 @@ class WSL1 : public DrvFsTests else \ { \ VERIFY_ARE_EQUAL(LxsstuInitialize(FALSE), TRUE); \ - VERIFY_ARE_EQUAL(LxsstuLaunchWsl(LXSST_TESTS_INSTALL_COMMAND_LINE), 0); \ m_config.reset(new WslConfigChange(LxssGenerateTestConfig({.drvFsMode = DrvFsMode::##_mode##}))); \ + VERIFY_ARE_EQUAL(LxsstuLaunchWsl(LXSST_TESTS_INSTALL_COMMAND_LINE), 0); \ } \ \ return true; \ @@ -1147,13 +1160,13 @@ class WSL1 : public DrvFsTests TEST_METHOD(DrvFsFat) \ { \ WSL2_TEST_ONLY(); \ - DrvFsTests::DrvFsFat(); \ + DrvFsTests::DrvFsFat(DrvFsMode::##_mode##); \ } \ \ TEST_METHOD(DrvFsSmb) \ { \ WSL2_TEST_ONLY(); \ - DrvFsTests::DrvFsSmb(); \ + DrvFsTests::DrvFsSmb(DrvFsMode::##_mode##); \ } \ \ TEST_METHOD(DrvFsMetadata) \ @@ -1195,7 +1208,7 @@ class WSL1 : public DrvFsTests TEST_METHOD(DrvFsReFs) \ { \ WSL2_TEST_ONLY(); \ - DrvFsTests::DrvFsReFs(); \ + DrvFsTests::DrvFsReFs(DrvFsMode::##_mode##); \ } \ } From c64eb180d826cbc0ea25cb21418ee99601f08021 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Tue, 2 Dec 2025 20:05:14 -0800 Subject: [PATCH 08/12] Remove lxutil.dll dependency and update Microsoft.WSL.DeviceHost to version 1.0.0-20251201.1 (#13633) Co-authored-by: Ben Hillis --- .pipelines/build-stage.yml | 2 +- CMakeLists.txt | 5 ----- msipackage/package.wix.in | 1 - packages.config | 4 +--- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.pipelines/build-stage.yml b/.pipelines/build-stage.yml index d1e546709..de7ab37af 100644 --- a/.pipelines/build-stage.yml +++ b/.pipelines/build-stage.yml @@ -24,7 +24,7 @@ parameters: type: object default: - target: "wsl;libwsl;wslg;wslservice;wslhost;wslrelay;wslinstaller;wslinstall;initramfs;wslserviceproxystub;wslsettings;wslinstallerproxystub;testplugin" - pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings.dll,wslsettings.exe,wslinstallerproxystub.dll,wsldevicehost.dll,lxutil.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll" + pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings.dll,wslsettings.exe,wslinstallerproxystub.dll,wsldevicehost.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll" - target: "msixgluepackage" pattern: "gluepackage.msix" - target: "msipackage" diff --git a/CMakeLists.txt b/CMakeLists.txt index b8ec0a7a3..664abc1bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,13 +74,11 @@ find_nuget_package(Wix WIX /tools/net6.0/any) if (${TARGET_PLATFORM} STREQUAL "x64") find_nuget_package(Microsoft.DXCore.Linux.amd64fre DXCORE /build/native) find_nuget_package(Microsoft.WSL.Dependencies.amd64fre WSLDEPS /build/native) - find_nuget_package(Microsoft.WSL.LxUtil.amd64fre LXUTIL /build/native) endif() if (${TARGET_PLATFORM} STREQUAL "arm64") find_nuget_package(Microsoft.DXCore.Linux.arm64fre DXCORE /build/native) find_nuget_package(Microsoft.WSL.Dependencies.arm64fre WSLDEPS /build/native) - find_nuget_package(Microsoft.WSL.LxUtil.arm64fre LXUTIL /build/native) endif() # Wsl Settings packages @@ -152,7 +150,6 @@ file(MAKE_DIRECTORY ${GENERATED_DIR}) set(PACKAGE_CERTIFICATE ${GENERATED_DIR}/dev-cert.pfx) file(CREATE_LINK ${WSL_DEVICE_HOST_SOURCE_DIR}/bin/${TARGET_PLATFORM}/wsldevicehost.dll ${BIN}/wsldevicehost.dll) -file(CREATE_LINK ${LXUTIL_SOURCE_DIR}/bin/lxutil.dll ${BIN}/lxutil.dll) file(CREATE_LINK ${WSLG_SOURCE_DIR}/${TARGET_PLATFORM}/${WSLG_TS_PLUGIN_DLL} ${BIN}/${WSLG_TS_PLUGIN_DLL}) file(CREATE_LINK ${WSLDEPS_SOURCE_DIR}/bin/wsldeps.dll ${BIN}/wsldeps.dll) @@ -203,7 +200,6 @@ add_compile_definitions(UNICODE WSL_DEVICE_HOST_VERSION="${WSL_DEVICE_HOST_VERSION}" COMMIT_HASH="${COMMIT_HASH}" WSL_PACKAGE_VERSION="${PACKAGE_VERSION}" - LXUTIL_VERSION="${LXUTIL_VERSION}" MSRDC_VERSION="${MSRDC_VERSION}" DIRECT3D_VERSION="${DIRECT3D_VERSION}" DXCORE_VERSION="${DXCORE_VERSION}" @@ -235,7 +231,6 @@ endif() # Common link libraries link_directories(${WSLDEPS_SOURCE_DIR}/lib/) -link_directories(${LXUTIL_SOURCE_DIR}/lib/) set(COMMON_LINK_LIBRARIES ws2_32.lib Userenv.lib diff --git a/msipackage/package.wix.in b/msipackage/package.wix.in index bacededb0..732234d5b 100644 --- a/msipackage/package.wix.in +++ b/msipackage/package.wix.in @@ -242,7 +242,6 @@ - diff --git a/packages.config b/packages.config index 7b76573d0..8b82ca541 100644 --- a/packages.config +++ b/packages.config @@ -18,11 +18,9 @@ - + - - From 1390e644fbd300f18732e1cdb5eebb164e5c10a2 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Wed, 3 Dec 2025 18:55:25 -0800 Subject: [PATCH 09/12] cleanup: add handling for product-specific virtio networking class IDs. (#13822) --- packages.config | 2 +- src/windows/common/GuestDeviceManager.cpp | 2 +- src/windows/common/GuestDeviceManager.h | 11 +++++------ src/windows/common/VirtioNetworking.cpp | 21 ++++++++++----------- src/windows/common/VirtioNetworking.h | 10 +++------- src/windows/service/exe/WslCoreVm.cpp | 18 ++++++++++-------- src/windows/service/exe/WslCoreVm.h | 5 ----- 7 files changed, 30 insertions(+), 39 deletions(-) diff --git a/packages.config b/packages.config index 8b82ca541..a14dd52b6 100644 --- a/packages.config +++ b/packages.config @@ -18,7 +18,7 @@ - + diff --git a/src/windows/common/GuestDeviceManager.cpp b/src/windows/common/GuestDeviceManager.cpp index 475e7fcab..6b23a3b55 100644 --- a/src/windows/common/GuestDeviceManager.cpp +++ b/src/windows/common/GuestDeviceManager.cpp @@ -70,7 +70,7 @@ void GuestDeviceManager::AddSharedMemoryDevice(_In_ const GUID& ImplementationCl static constexpr auto VIRTIO_FS_FLAGS_SHMEM_SIZE_SHIFT = 16; UINT32 flags = (SizeMb << VIRTIO_FS_FLAGS_SHMEM_SIZE_SHIFT); WI_SetFlag(flags, VIRTIO_FS_FLAGS_TYPE_SECTIONS); - (void)AddHdvShareWithOptions(VIRTIO_VIRTIOFS_DEVICE_ID, ImplementationClsid, Tag, {}, objectLifetime.Path.c_str(), flags, UserToken); + (void)AddHdvShareWithOptions(VIRTIO_FS_DEVICE_ID, ImplementationClsid, Tag, {}, objectLifetime.Path.c_str(), flags, UserToken); m_objectDirectories.emplace_back(std::move(objectLifetime)); } diff --git a/src/windows/common/GuestDeviceManager.h b/src/windows/common/GuestDeviceManager.h index f1afa9945..53de3c6ed 100644 --- a/src/windows/common/GuestDeviceManager.h +++ b/src/windows/common/GuestDeviceManager.h @@ -8,14 +8,13 @@ #define VIRTIO_FS_FLAGS_TYPE_FILES 0x8000 #define VIRTIO_FS_FLAGS_TYPE_SECTIONS 0x4000 -// {872270E1-A899-4AF6-B454-7193634435AD} -DEFINE_GUID(VIRTIO_VIRTIOFS_DEVICE_ID, 0x872270E1, 0xA899, 0x4AF6, 0xB4, 0x54, 0x71, 0x93, 0x63, 0x44, 0x35, 0xAD); - -// {ABB755FC-1B86-4255-83E2-E5787ABCF6C2} -DEFINE_GUID(VIRTIO_PMEM_CLASS_ID, 0xABB755FC, 0x1B86, 0x4255, 0x83, 0xe2, 0xe5, 0x78, 0x7a, 0xbc, 0xf6, 0xc2); - inline const std::wstring c_defaultDeviceTag = L"default"; +// These device types are implemented by the external wsldevicehost vdev. +DEFINE_GUID(VIRTIO_FS_DEVICE_ID, 0x872270E1, 0xA899, 0x4AF6, 0xB4, 0x54, 0x71, 0x93, 0x63, 0x44, 0x35, 0xAD); // {872270E1-A899-4AF6-B454-7193634435AD} +DEFINE_GUID(VIRTIO_NET_DEVICE_ID, 0xF07010D0, 0x0EA9, 0x447F, 0x88, 0xEF, 0xBD, 0x95, 0x2A, 0x4D, 0x2F, 0x14); // {F07010D0-0EA9-447F-88EF-BD952A4D2F14} +DEFINE_GUID(VIRTIO_PMEM_DEVICE_ID, 0xEDBB24BB, 0x5E19, 0x40F4, 0x8A, 0x0F, 0x82, 0x24, 0x31, 0x30, 0x64, 0xFD); // {EDBB24BB-5E19-40F4-8A0F-8224313064FD} + // // Provides synchronized access to guest device operations. // diff --git a/src/windows/common/VirtioNetworking.cpp b/src/windows/common/VirtioNetworking.cpp index a63369693..cd5974d6c 100644 --- a/src/windows/common/VirtioNetworking.cpp +++ b/src/windows/common/VirtioNetworking.cpp @@ -14,11 +14,12 @@ using wsl::core::VirtioNetworking; static constexpr auto c_loopbackDeviceName = TEXT(LX_INIT_LOOPBACK_DEVICE_NAME); VirtioNetworking::VirtioNetworking( - GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr guestDeviceManager, wil::shared_handle userToken) : + GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr guestDeviceManager, GUID classId, wil::shared_handle userToken) : m_guestDeviceManager(std::move(guestDeviceManager)), m_userToken(std::move(userToken)), m_gnsChannel(std::move(gnsChannel)), - m_enableLocalhostRelay(enableLocalhostRelay) + m_enableLocalhostRelay(enableLocalhostRelay), + m_virtioNetworkClsid(classId) { } @@ -31,7 +32,6 @@ VirtioNetworking::~VirtioNetworking() } void VirtioNetworking::Initialize() -try { m_networkSettings = GetHostEndpointSettings(); @@ -80,7 +80,7 @@ try // Add virtio net adapter to guest m_adapterId = m_guestDeviceManager->AddGuestDevice( - c_virtioNetworkDeviceId, c_virtioNetworkClsid, L"eth0", nullptr, device_options.str().c_str(), 0, m_userToken.get()); + VIRTIO_NET_DEVICE_ID, m_virtioNetworkClsid, L"eth0", nullptr, device_options.str().c_str(), 0, m_userToken.get()); hns::HNSEndpoint endpointProperties; endpointProperties.ID = m_adapterId; @@ -122,13 +122,12 @@ try THROW_IF_WIN32_ERROR(NotifyNetworkConnectivityHintChange(&VirtioNetworking::OnNetworkConnectivityChange, this, true, &m_networkNotifyHandle)); } -CATCH_LOG() void VirtioNetworking::SetupLoopbackDevice() { m_localhostAdapterId = m_guestDeviceManager->AddGuestDevice( - c_virtioNetworkDeviceId, - c_virtioNetworkClsid, + VIRTIO_NET_DEVICE_ID, + m_virtioNetworkClsid, c_loopbackDeviceName, nullptr, L"client_ip=127.0.0.1;client_mac=00:11:22:33:44:55", @@ -196,13 +195,13 @@ HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int localAddr.Ipv6.sin6_port = addr.Ipv6.sin6_port; } } - result = ModifyOpenPorts(c_virtioNetworkClsid, c_loopbackDeviceName, localAddr, protocol, allocate); + result = ModifyOpenPorts(c_loopbackDeviceName, localAddr, protocol, allocate); LOG_HR_IF_MSG(E_FAIL, result != S_OK, "Failure adding localhost relay port %d", localAddr.Ipv4.sin_port); } if (!loopback) { - const int localResult = ModifyOpenPorts(c_virtioNetworkClsid, L"eth0", addr, protocol, allocate); + const int localResult = ModifyOpenPorts(L"eth0", addr, protocol, allocate); LOG_HR_IF_MSG(E_FAIL, localResult != S_OK, "Failure adding relay port %d", addr.Ipv4.sin_port); if (result == 0) { @@ -213,7 +212,7 @@ HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int return result; } -int VirtioNetworking::ModifyOpenPorts(_In_ const GUID& clsid, _In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const +int VirtioNetworking::ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const { if (protocol != IPPROTO_TCP && protocol != IPPROTO_UDP) { @@ -229,7 +228,7 @@ int VirtioNetworking::ModifyOpenPorts(_In_ const GUID& clsid, _In_ PCWSTR tag, _ } auto lock = m_lock.lock_exclusive(); - const auto server = m_guestDeviceManager->GetRemoteFileSystem(clsid, c_defaultDeviceTag); + const auto server = m_guestDeviceManager->GetRemoteFileSystem(m_virtioNetworkClsid, c_defaultDeviceTag); if (server) { std::wstring portString = std::format(L"tag={};port_number={}", tag, addr.Ipv4.sin_port); diff --git a/src/windows/common/VirtioNetworking.h b/src/windows/common/VirtioNetworking.h index b32b5454f..91d0c7bf8 100644 --- a/src/windows/common/VirtioNetworking.h +++ b/src/windows/common/VirtioNetworking.h @@ -13,7 +13,7 @@ namespace wsl::core { class VirtioNetworking : public INetworkingEngine { public: - VirtioNetworking(GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr guestDeviceManager, wil::shared_handle userToken); + VirtioNetworking(GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr guestDeviceManager, GUID classId, wil::shared_handle userToken); ~VirtioNetworking(); // Note: This class cannot be moved because m_networkNotifyHandle captures a 'this' pointer. @@ -35,7 +35,7 @@ class VirtioNetworking : public INetworkingEngine static std::optional FindVirtioInterfaceLuid(const SOCKADDR_INET& virtioAddress, const NL_NETWORK_CONNECTIVITY_HINT& currentConnectivityHint); HRESULT HandlePortNotification(const SOCKADDR_INET& addr, int protocol, bool allocate) const noexcept; - int ModifyOpenPorts(_In_ const GUID& clsid, _In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const; + int ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const; void RefreshGuestConnection(NL_NETWORK_CONNECTIVITY_HINT hint) noexcept; void SetupLoopbackDevice(); void UpdateDns(wsl::shared::hns::DNS&& dnsSettings); @@ -51,6 +51,7 @@ class VirtioNetworking : public INetworkingEngine bool m_enableLocalhostRelay; GUID m_localhostAdapterId; GUID m_adapterId; + GUID m_virtioNetworkClsid; std::optional m_interfaceLuid; ULONG m_networkMtu = 0; @@ -58,11 +59,6 @@ class VirtioNetworking : public INetworkingEngine // Note: this field must be destroyed first to stop the callbacks before any other field is destroyed. networking::unique_notify_handle m_networkNotifyHandle; - - // 16479D2E-F0C3-4DBA-BF7A-04FFF0892B07 - static constexpr GUID c_virtioNetworkClsid = {0x16479D2E, 0xF0C3, 0x4DBA, {0xBF, 0x7A, 0x04, 0xFF, 0xF0, 0x89, 0x2B, 0x07}}; - // F07010D0-0EA9-447F-88EF-BD952A4D2F14 - static constexpr GUID c_virtioNetworkDeviceId = {0xF07010D0, 0x0EA9, 0x447F, {0x88, 0xEF, 0xBD, 0x95, 0x2A, 0x4D, 0x2F, 0x14}}; }; } // namespace wsl::core diff --git a/src/windows/service/exe/WslCoreVm.cpp b/src/windows/service/exe/WslCoreVm.cpp index 931e392ae..fdf42c86b 100644 --- a/src/windows/service/exe/WslCoreVm.cpp +++ b/src/windows/service/exe/WslCoreVm.cpp @@ -39,10 +39,6 @@ using namespace std::string_literals; // Start of unaddressable memory if guest only supports the minimum 36-bit addressing. #define MAX_36_BIT_PAGE_IN_MB (0x1000000000 / _1MB) -// This device type is implemented by the external virtio-pmem vdev. -// {EDBB24BB-5E19-40F4-8A0F-8224313064FD} -DEFINE_GUID(VIRTIO_PMEM_DEVICE_ID, 0xEDBB24BB, 0x5E19, 0x40F4, 0x8A, 0x0F, 0x82, 0x24, 0x31, 0x30, 0x64, 0xFD); - // Version numbers for various functionality that was backported. #define NICKEL_BUILD_FLOOR 22350 #define VIRTIO_SERIAL_CONSOLE_COBALT_RELEASE_UBR 40 @@ -53,6 +49,12 @@ DEFINE_GUID(VIRTIO_PMEM_DEVICE_ID, 0xEDBB24BB, 0x5E19, 0x40F4, 0x8A, 0x0F, 0x82, #define WSLG_SHARED_MEMORY_SIZE_MB 8192 #define PAGE_SIZE 0x1000 +// WSL-specific virtio device class IDs. +DEFINE_GUID(VIRTIO_FS_ADMIN_CLASS_ID, 0x7E6AD219, 0xD1B3, 0x42D5, 0xB8, 0xEE, 0xD9, 0x63, 0x24, 0xE6, 0x4F, 0xF6); // {7E6AD219-D1B3-42D5-B8EE-D96324E64FF6} +DEFINE_GUID(VIRTIO_FS_CLASS_ID, 0x60285AE6, 0xAAF3, 0x4456, 0xB4, 0x44, 0xA6, 0xC2, 0xD0, 0xDE, 0xDA, 0x38); // {60285AE6-AAF3-4456-B444-A6C2D0DEDA38} +DEFINE_GUID(VIRTIO_NET_CLASS_ID, 0x16479D2E, 0xF0C3, 0x4DBA, 0xBF, 0x7A, 0x04, 0xFF, 0xF0, 0x89, 0x2B, 0x07); // {16479D2E-F0C3-4DBA-BF7A-04FFF0892B07} +DEFINE_GUID(VIRTIO_PMEM_CLASS_ID, 0xABB755FC, 0x1B86, 0x4255, 0x83, 0xE2, 0xE5, 0x78, 0x7A, 0xBC, 0xF6, 0xC2); // {ABB755FC-1B86-4255-83E2-E5787ABCF6C2} + static constexpr size_t c_bootEntropy = 0x1000; static constexpr auto c_localDevicesKey = L"SOFTWARE\\Microsoft\\Terminal Server Client\\LocalDevices"; static constexpr std::pair c_schemaVersionNickel{2, 7}; @@ -596,7 +598,7 @@ void WslCoreVm::Initialize(const GUID& VmId, const wil::shared_handle& UserToken else if (m_vmConfig.NetworkingMode == NetworkingMode::VirtioProxy) { m_networkingEngine = std::make_unique( - std::move(gnsChannel), m_vmConfig.EnableLocalhostRelay, m_guestDeviceManager, m_userToken); + std::move(gnsChannel), m_vmConfig.EnableLocalhostRelay, m_guestDeviceManager, VIRTIO_NET_CLASS_ID, m_userToken); } else if (m_vmConfig.NetworkingMode == NetworkingMode::Bridged) { @@ -1792,7 +1794,7 @@ void WslCoreVm::InitializeGuest() try { m_guestDeviceManager->AddSharedMemoryDevice( - c_virtiofsClassId, L"wslg", L"wslg", WSLG_SHARED_MEMORY_SIZE_MB, m_userToken.get()); + VIRTIO_FS_CLASS_ID, L"wslg", L"wslg", WSLG_SHARED_MEMORY_SIZE_MB, m_userToken.get()); m_sharedMemoryRoot = std::format(L"WSL\\{}\\wslg", m_machineId); } CATCH_LOG() @@ -2145,8 +2147,8 @@ std::wstring WslCoreVm::AddVirtioFsShare(_In_ bool Admin, _In_ PCWSTR Path, _In_ WI_ASSERT(!FindVirtioFsShare(tag.c_str(), Admin)); (void)m_guestDeviceManager->AddGuestDevice( - VIRTIO_VIRTIOFS_DEVICE_ID, - Admin ? c_virtiofsAdminClassId : c_virtiofsClassId, + VIRTIO_FS_DEVICE_ID, + Admin ? VIRTIO_FS_ADMIN_CLASS_ID : VIRTIO_FS_CLASS_ID, tag.c_str(), key.OptionsString().c_str(), sharePath.c_str(), diff --git a/src/windows/service/exe/WslCoreVm.h b/src/windows/service/exe/WslCoreVm.h index 4c21672f5..324eabea2 100644 --- a/src/windows/service/exe/WslCoreVm.h +++ b/src/windows/service/exe/WslCoreVm.h @@ -40,11 +40,6 @@ inline constexpr auto c_optionsValueName = L"Options"; inline constexpr auto c_typeValueName = L"Type"; inline constexpr auto c_mountNameValueName = L"Name"; -static constexpr GUID c_virtiofsAdminClassId = {0x7e6ad219, 0xd1b3, 0x42d5, {0xb8, 0xee, 0xd9, 0x63, 0x24, 0xe6, 0x4f, 0xf6}}; - -// {60285AE6-AAF3-4456-B444-A6C2D0DEDA38} -static constexpr GUID c_virtiofsClassId = {0x60285ae6, 0xaaf3, 0x4456, {0xb4, 0x44, 0xa6, 0xc2, 0xd0, 0xde, 0xda, 0x38}}; - namespace wrl = Microsoft::WRL; /// From caf38dcad2b52dce25686f6dd8c9bafe6ab54573 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Thu, 4 Dec 2025 20:29:11 -0800 Subject: [PATCH 10/12] wslsettings: ensure text in the oobe window properly wraps (#13823) Co-authored-by: Ben Hillis --- .../wslsettings/Views/OOBE/DistroManagementPage.xaml | 6 +++--- src/windows/wslsettings/Views/OOBE/GUIAppsPage.xaml | 2 +- .../wslsettings/Views/OOBE/NetworkingIntegrationPage.xaml | 2 +- .../wslsettings/Views/OOBE/VSCodeIntegrationPage.xaml | 4 ++-- .../Views/OOBE/WorkingAcrossFileSystemsPage.xaml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/windows/wslsettings/Views/OOBE/DistroManagementPage.xaml b/src/windows/wslsettings/Views/OOBE/DistroManagementPage.xaml index 8a5e57ee1..d0e6474d5 100644 --- a/src/windows/wslsettings/Views/OOBE/DistroManagementPage.xaml +++ b/src/windows/wslsettings/Views/OOBE/DistroManagementPage.xaml @@ -10,11 +10,11 @@ - + - + - + diff --git a/src/windows/wslsettings/Views/OOBE/GUIAppsPage.xaml b/src/windows/wslsettings/Views/OOBE/GUIAppsPage.xaml index 96349af02..288f1c441 100644 --- a/src/windows/wslsettings/Views/OOBE/GUIAppsPage.xaml +++ b/src/windows/wslsettings/Views/OOBE/GUIAppsPage.xaml @@ -9,7 +9,7 @@ - + diff --git a/src/windows/wslsettings/Views/OOBE/NetworkingIntegrationPage.xaml b/src/windows/wslsettings/Views/OOBE/NetworkingIntegrationPage.xaml index 1102f0286..2a170cbad 100644 --- a/src/windows/wslsettings/Views/OOBE/NetworkingIntegrationPage.xaml +++ b/src/windows/wslsettings/Views/OOBE/NetworkingIntegrationPage.xaml @@ -12,7 +12,7 @@ - + diff --git a/src/windows/wslsettings/Views/OOBE/VSCodeIntegrationPage.xaml b/src/windows/wslsettings/Views/OOBE/VSCodeIntegrationPage.xaml index e5b4d2302..d109d980e 100644 --- a/src/windows/wslsettings/Views/OOBE/VSCodeIntegrationPage.xaml +++ b/src/windows/wslsettings/Views/OOBE/VSCodeIntegrationPage.xaml @@ -10,9 +10,9 @@ - + - + diff --git a/src/windows/wslsettings/Views/OOBE/WorkingAcrossFileSystemsPage.xaml b/src/windows/wslsettings/Views/OOBE/WorkingAcrossFileSystemsPage.xaml index 1f4f37df4..3eda0cd78 100644 --- a/src/windows/wslsettings/Views/OOBE/WorkingAcrossFileSystemsPage.xaml +++ b/src/windows/wslsettings/Views/OOBE/WorkingAcrossFileSystemsPage.xaml @@ -10,11 +10,11 @@ - + - + - + From 7741740f871fca8731c4987c5ae44e76d02a65d3 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Fri, 5 Dec 2025 15:06:38 -0800 Subject: [PATCH 11/12] Add back WSL2_VM_ID environment varialbe to the system distro. (#13835) Co-authored-by: Ben Hillis --- src/linux/init/init.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/linux/init/init.cpp b/src/linux/init/init.cpp index 0611dda72..98940039f 100644 --- a/src/linux/init/init.cpp +++ b/src/linux/init/init.cpp @@ -2258,7 +2258,16 @@ Return Value: if (Value != nullptr) { Config.VmId = Value; - unsetenv(LX_WSL2_VM_ID_ENV); + + // + // Unset the environment variable for user distros. + // + + Value = getenv(LX_WSL2_SHARED_MEMORY_OB_DIRECTORY); + if (!Value) + { + unsetenv(LX_WSL2_VM_ID_ENV); + } } // From 49864b525e644a3ed4c42ffdcddb70df1f8b9d75 Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Fri, 5 Dec 2025 15:20:15 -0800 Subject: [PATCH 12/12] CI: Switch away from -dev versions of MS-RDX-MRO.windows-store-publish tasks (#13841) Co-authored-by: Ben Hillis --- .pipelines/flight-stage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/flight-stage.yml b/.pipelines/flight-stage.yml index d60f03a11..c832ac4f1 100644 --- a/.pipelines/flight-stage.yml +++ b/.pipelines/flight-stage.yml @@ -67,7 +67,7 @@ stages: displayName: Copy AppxUpload artifact # creates a submission package that is published to the store; containers store page information and the WSL appxupload - - task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3 + - task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3 displayName: 'Creating StoreBroker Payload' inputs: serviceEndpoint: 'AzureConnection-StoreBroker-WIF' @@ -88,7 +88,7 @@ stages: displayName: Copy StoreBrokerPayload to drop # submit the package flight to the WSL SelfHost Flight Group - - task: MS-RDX-MRO.windows-store-publish-dev.flight-task.store-flight@3 + - task: MS-RDX-MRO.windows-store-publish.flight-task.store-flight@3 displayName: 'Flight StoreBroker Package to Partner Center - WSL SelfHost Flight Group' condition: and(succeeded(), eq('${{ parameters.publishPackage }}', true)) inputs: