From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A8112222AF for ; Tue, 26 Aug 2025 00:27:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756168041; cv=none; b=jMBehT0uigBfXO86WGHRoWYA0x/S0aXUmqtbvd7Di0XbX0HefVwLHeM3Sn5Bb2TvQvNsFYYzztEU5Vcf8j+x46OY3Kdm8NTb5uflZ53N1j3xQTFupdhby53taXwLewzlfqsV4byRfV5OxP4qRo4GLkrG43YueOyea+e5hpd/GrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756168041; c=relaxed/simple; bh=5L/BYqW9WfoHeTEgYYwzNBfWpjlpn5EeY5J3QpRZyJ0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=UfiL+pOE1LRf27ELFGZiVsFHeJGBa/pzLZddePR85istUB7PYgSFwz491Zx+JciqlCN62+v0jWzoOvu5cnGvIljzxoS0Z5eKZITSeK97HpbMuC3+ByDzkY+CXtRoQWWDFThO3JtxbK/bCqPmWPb9Uwh4EmIeWh+nrAvH4S+gHv4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=n4b7hxDj; arc=none smtp.client-ip=209.85.215.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="n4b7hxDj" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-b47174c65b0so8618864a12.2 for ; Mon, 25 Aug 2025 17:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756168038; x=1756772838; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=U4ctZNwYJMz9+Hk7ge9l8ZiYDw45Y30bqY3Iaj5/gqE=; b=n4b7hxDjBfsYt0uo0RfIS9dGgRYXS/+wwLACNSNY+Xm9lRam3a5GDARVarSgxrejel ktbfj0bz9umQd6oMlGqcS3rqPytnbUyaDxIggjuaF8bL8hv/A40g9pBFTOvlHYwKM5Ye FxgbdtsR6k08cF5FGqqAGN2DrfqEiX5yTq5KYTr3KtyF/oK/a90OzE89CgoWctTwHUaP Uu1DpinhMouJHp+P8+644CuXLhLdlBAGUVCmE6Az0O88+HOt04WcLJNMgxd3FIE65UVF 98e8o9ohfeVYsJtqmQUPRLONp8wjpwWffrh2jt4wXAPV/pELpXeGUumV5FkHKeJ+hbJh BR3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756168038; x=1756772838; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=U4ctZNwYJMz9+Hk7ge9l8ZiYDw45Y30bqY3Iaj5/gqE=; b=mw8lErReGyurqGD2Lkp0aNwyMW2gHmRkPwsoCFksgTHanj8IojRywYsra0wUADqt2E qE4b8QXRClzSDf3L3/BWpK6yqoOkHEpjYWkc2JJ8FiWwQ1hxkGVfbinE+WwuKkEQKXtb rU6PWGAsM3L8ziF+NdWKgbhH2ZWUMAzgtlBF7D2IORTvCHAcn8p/Yhn8XzAxZy9kLBkK hrLKEBEcJ4yYl8plU1g4uv3k2lMwGtpaiAU6PqooSV0iNV2MKIaRjLxVpV6+ZLZXIRdl C38JOgZVYpnxCkU36jteZzxFTn1k1fe+XJwrcp7Soo0OLErkII4AX/e7VSbDasmLLleN KzfA== X-Forwarded-Encrypted: i=1; AJvYcCX72z9eZpT2AxdnRPNHgz/1V59Oa029QkMwvb3EiTZpcFVvZWdBkqRrDWbOowxsY/2Hvp0=@vger.kernel.org X-Gm-Message-State: AOJu0YzuPvcegny6e1khBz8qJpZ6lGGhB3A1t2Ei3UN1WR+dQnClvawD A12fhbsLLKgk5SDNKD0VBzFjUHo7rpgMpi/LSceHvz32NqM2aFgrxF1n5jzUdvLZXTbqXM4BRh9 LNvv9wQ== X-Google-Smtp-Source: AGHT+IFw5Mjf6HTcAUWU+u7CL/B6QAA0945o29LTS2VrhL4i1mL+9cXlmfjB4AEyc0iYoyyJlQoJr1vqexM= X-Received: from pjbsp15.prod.google.com ([2002:a17:90b:52cf:b0:30a:7da4:f075]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:a105:b0:230:8b26:9d47 with SMTP id adf61e73a8af0-24340ab318emr21164734637.10.1756168038330; Mon, 25 Aug 2025 17:27:18 -0700 (PDT) Date: Mon, 25 Aug 2025 17:27:16 -0700 In-Reply-To: <3188ca61-2591-4576-9777-1671689b7235@linux.microsoft.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250825200622.3759571-1-seanjc@google.com> <3188ca61-2591-4576-9777-1671689b7235@linux.microsoft.com> Message-ID: Subject: Re: [PATCH 0/5] Drivers: hv: Fix NEED_RESCHED_LAZY and use common APIs From: Sean Christopherson To: Nuno Das Neves Cc: Marc Zyngier , Oliver Upton , Catalin Marinas , Will Deacon , Tianrui Zhao , Bibo Mao , Huacai Chen , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Peter Zijlstra , Andy Lutomirski , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-hyperv@vger.kernel.org, rcu@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Mon, Aug 25, 2025, Nuno Das Neves wrote: > On 8/25/2025 1:06 PM, Sean Christopherson wrote: > > Fix a bug where MSHV root partitions don't honor NEED_RESCHED_LAZY, and then > > deduplicate the TIF related MSHV code by turning the "kvm" entry APIs into > > more generic "virt" APIs (which ideally would have been done when MSHV root > > support was added). > > > > Assuming all is well, maybe this could go through the tip tree? > > > > The Hyper-V stuff and non-x86 architectures are compile-tested only. > > > > Thanks Sean, I can test the root partition changes. > > A similar change will be needed in mshv_vtl_main.c since it also calls > mshv_do_pre_guest_mode_work() (hence the "common" in mshv_common.c). Oof, more dependencies. I suppose the easiest thing would be to send a series against git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git queue and then route everything through there? Alternatively, frontload the MSHV fixes (which I'll do regardless) and take those through hyperv and the rest through the tip tree? That seems like an absurd amount of juggling though, especially if we want to get the cleanups into 6.18. And if none of these lands, it's MSHV that'll suffer the most, so betting it all on the hyperv tree doesn't seem terrible. > Also, is it possible to make all the mshv driver changes in a single patch? It's certainly possible, but I'd prefer not do to that. > It seems like it would be cleaner than refactoring it in patches 1 & 2 and > then deleting all the refactored code in patch 5. Only if you don't care about backporting fixes, bisection, or maintaining code. E.g. if checking NEED_RESCHED_LAZY somehow causes issues, it would be really nice for that to bisect to exactly that patch, not a patch that also switches to a completely different set of APIs. And if someone is wants the fixes in a pre-6.18 kernel, they don't need to backport all of the KVM and entry code changes just to get the fix. As for the maintenance headache, see above.