From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66D34C8303F for ; Tue, 26 Aug 2025 00:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kzd+IWu4miHr9qXbK92JAK2w3KhQUyOxbITQL0gzAIU=; b=prjRYIetn8Ehqh6VUxUnL6adnw uxd7T9egW/yK6yoV7vwH992/Xn7o0vGf13LWIx6mZtZ/VnbNpTWxtvRUidWirloD6C8XzHjSs3QV0 kKHNgsPjFxvPh7rEpQQbURQDpWHf2+jNZ+NXQ6bv5guq/OH6IXJVRJtlG2cdh5gIuqqgM+WD0sQFr IgdESOHSxKcaypkdFelLjukns6s/U8P/HaSLSrlfacpvN6jtsed6QZD+rnJUz6JpQPLC1nxy1o8a3 eXW/5cDIuaacTXhDCdf8PNCkfI6sBw5JehHSeYSJ1Ax/CoqpkzaCTRVPa7PmGvgwdvL0kxjctA8UA dEosZquw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqhWz-0000000ACVz-38CF; Tue, 26 Aug 2025 00:27:21 +0000 Received: from mail-pg1-x549.google.com ([2607:f8b0:4864:20::549]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqhWx-0000000ACV2-1x87 for kvm-riscv@lists.infradead.org; Tue, 26 Aug 2025 00:27:20 +0000 Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-b49da0156bdso3036167a12.1 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=lists.infradead.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=2zg5qTi86OMXtxUePXkzOJeDylIRi+CibX6YG/2IEujUFFX03j64NtX18W34AqrvDR OX7q2+vEpAsQKSw4xNZnZHCuJ+B478d5L+tCdcxBumYjkrJQvDMiuW7PnaxQhCUP7boI ZrPnnvQyqO1NjSO5mXwpFU9U75GIyA00fDGe/jHBM7oBNCPQyTNsbBlF6tI6+rFSqL8N lOQr3H5QlNC9GL+n/MT+62VBIJ9njWfn4NMofZImwUMdZ/B0+SMict7n7T4yAo6F2iAr QUsOm6tugl+CO7IdIzdC69oKS++NEpTzr8Bmo3jPzzLbow4qy2I9FSuUQJka9s0kEgis KgiA== 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=iWKP9Q0ielq5/IlAAxWX81MTgiHHH9pvMbPAbXEvv9bYsOdryCblwrPPQjIIZBh/Nb kczKxHy1AQrSijwNZ0MpS1az9wjGqbscULXUASPtI+7XJcF3Bj57XaVZ0cC2JeB8IU2W WmU46fiCLr/7q4OPfAX/h67c3jymoNYKhlMfPzp4+NS4I4XVkcHkjiu48HLjEymOIsKE ziTlsfwt/TVTGaqjSR79QVBaQqvCHX66CgziFCWIcAgwcmYsgUqijexJbWmjdIGjGgZj 5oWbsaUtbVDw8eHng4RqwpVtsJuTE9iZB+UY7jimcTBzf63W9YxfHKBUgggQ9pA/tQ1R 8qDQ== X-Forwarded-Encrypted: i=1; AJvYcCVabN2xb2xP7L8NKJ4tEmbIqPKct9U0IZHKZz06qqBbP9UPhZVLppkaUy/gRos+N1+2Fm62XldFHjc=@lists.infradead.org X-Gm-Message-State: AOJu0YyMgXbF6kDuLdEHlk9hPBijztpnJuw2w1Xf5CWctOsly1J+29h8 DSnicdPGVnf0OB9HZCUs1kYDnKXSo/8L9kmHScDW950qSy3QFs8qYoyvc7gXnGf3+iXutdRwJQz b74bZlA== 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> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250825_172719_510299_32DB1DA5 X-CRM114-Status: GOOD ( 21.48 ) X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+kvm-riscv=archiver.kernel.org@lists.infradead.org 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. -- kvm-riscv mailing list kvm-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kvm-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (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 08C61221F26 for ; Tue, 26 Aug 2025 00:27:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756168042; cv=none; b=sC5aomd0d2bW2+zwuQaxSkLUA6DD7lYfZS+2gStDS4ijhqUkKVgUcbOfI8GHfTfb2+60QCLgZHg7BFCmX2rhn5xZ/WjSurkPPJMXA/+t8fTn0v6PvbKgJFyAedzZFiGtmroWRzbzf9bM2Tb5hcSgBVeYvTc2plmwgq4M2BEGDD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756168042; c=relaxed/simple; bh=5L/BYqW9WfoHeTEgYYwzNBfWpjlpn5EeY5J3QpRZyJ0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=bR0s+nqnck2jpZEmzUc2dAVprp53phpZOSSQxKkJflePF0ZeigmT647diItH9gPotyJWlIySxi8thFX1DFMN4351tEne98VSijhLb1H5sZvdjV8/dfVr3ByCgqIczyX2/DXCkikQ1zVW0pWfgb2T07YQpDNBEFtHFLQC48jbbBg= 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.202 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-f202.google.com with SMTP id 41be03b00d2f7-b49d8b818d2so3100834a12.3 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=hS1gwTVVvE58BNK/UQv25UPpQRvYq80sJbJwz8FXepDSCGS/7I0Z13/jmfAjVw717r PlVsL8EG+L/jKIxncTsNFOfnXwGFQK+8HiHRxosa6SXhTX2BsM9Qchcaxa7oXu3hcyA4 9L7COmY2+vxwzuKoNPTpRtDF1WUOyCRszSbaQh/k+YafH/yKaS24FHtZV/Z4JG4OsQh4 BV4fAvUoQ48YwWuJG9AMptAWgUoTYU+SnLxg4rQiUc29KGzg3pyycmqJ3flXqIx7Jmzw 8/X4EwiRaXUkR6JMr8T0PObEOv6Ms/aX23hvVTxNUBdkQAvi7GMu7qj7lG83vJGAxfCN sSCw== X-Forwarded-Encrypted: i=1; AJvYcCUmU6h68qFq0gsUab9OsDeYk0r99oPfiUD2jkzVcFpXhXNREMYPi6sUGAc9DU7rd5+bPhg=@vger.kernel.org X-Gm-Message-State: AOJu0YzSqsGrd4NdfCWOT/pX+mZ1jXloaLIccs5phAMuFbadhMN7sGDW rBr4JndzgzgFKJBepSrOSAbSt0iZwP/QN4h7g1yvB51o2k5nhrmpuFuMkDBYlvz1qfR8l6UZO+G vDAiR8g== 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: kvm@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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD402CA0FE7 for ; Tue, 26 Aug 2025 01:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=CiYUSnu2hkSgYWIduDbWDwUJgjgrHnGkkkYrkLEMXNk=; b=YoRUv9hMIEAFmszo2OpITpmr3A H+w+UpwnJ0MvYVqyM0VaGrogp/pRVkzS39rA2Rk7yin0zFWyGTFnvDS4K6lLpk7FDocJoD8Y4LLz7 kNEQgIGSrzxRFWr8WO6UL87B4GAzBC6vZmxSTIyFMlYl+ri8m1t6TLcDhqgCDKW/dMVpYp76xOogb msR0DwyEq+gB0dTV7NQEPq6AJX/oOIJa/dTp2oR9x+yssq9pDp3kc/7BZSAVq8ScD0QQDJGMQYeMZ 6LMa0TwwhOlzAUs7ze9QA+6dtxoOZ681u/t8jxSdM0ISuDAijmSShEHcfZlQo1DWbSG9dLtZsxJp2 Nm73nXEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqidX-0000000AIGu-2LX7; Tue, 26 Aug 2025 01:38:11 +0000 Received: from mail-pf1-x44a.google.com ([2607:f8b0:4864:20::44a]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqhWx-0000000ACV1-3meI for linux-riscv@lists.infradead.org; Tue, 26 Aug 2025 00:27:21 +0000 Received: by mail-pf1-x44a.google.com with SMTP id d2e1a72fcca58-76e2eb6d2baso9585414b3a.3 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=lists.infradead.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=2zg5qTi86OMXtxUePXkzOJeDylIRi+CibX6YG/2IEujUFFX03j64NtX18W34AqrvDR OX7q2+vEpAsQKSw4xNZnZHCuJ+B478d5L+tCdcxBumYjkrJQvDMiuW7PnaxQhCUP7boI ZrPnnvQyqO1NjSO5mXwpFU9U75GIyA00fDGe/jHBM7oBNCPQyTNsbBlF6tI6+rFSqL8N lOQr3H5QlNC9GL+n/MT+62VBIJ9njWfn4NMofZImwUMdZ/B0+SMict7n7T4yAo6F2iAr QUsOm6tugl+CO7IdIzdC69oKS++NEpTzr8Bmo3jPzzLbow4qy2I9FSuUQJka9s0kEgis KgiA== 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=qwcDIOoBxLKfdIb1tDT1Ex1I75vQledu/ofeuJMiqL6YWotVw4DneJ09WVWs9nnqk0 4gEg+N+Y8PfzStRmY8LXLyzJlMmjbmlvZ6ttGXgS0HICgY4qMVLzTRHef5Y/94oZynqg LB3rQ+b+sgno6xOSLXoDmZ+dmPvm6XVOedagpvJ30IzH7dSQZn20RCUAvGMTgYmfleS+ aIQjPqFD0s3+Seh0mLlD1+6ONjnrAFigxWXWmxJQP9E2Sg/I9DGrbmI8imUHH0J0L+GN IBxoIYHFyjdkykVkrW9i/WmHdrDQfwnADYPSo1hBSmG31yHJYHuCCciSL/Cc9uZUnAJu Xkcg== X-Forwarded-Encrypted: i=1; AJvYcCVLwyrpwvcO91a+lk6lgUpvtuUKjUdxCZyq7mY8ucaQHa4lWKbg7j87OcWs6i/O77vFwR9gWOsFAf+oLQ==@lists.infradead.org X-Gm-Message-State: AOJu0Yz4cNnYw6Kw6LfcyjFq0tvNXjsJO1asFKl31t/PiATC7kTmjxxE Fs2Xk8Z9/2rxyYwlVzypTeXyx5lSQuXZw2NyTByheHRDFTKc1KahEanUZmUqLLyslhKTEd8h+Pv v8cI/ZQ== 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> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250825_172719_932434_96509D55 X-CRM114-Status: GOOD ( 21.51 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv