Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2663959lqo; Mon, 20 May 2024 12:25:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfHZBKsK/wwmufcD5GgArj04EXBmFd8ky6vklXHFhH9ZVlWRbV34iw/utRW9WuUgvGXSqpLzK/XthRiG/sTKpvAxXqyESWrHPlFz0VWg== X-Google-Smtp-Source: AGHT+IH/fEh6tqSCwwldVVZ0HUSGaO9gZIIE18M8M6vXEq1RAmkFw97DDHlWGR+0Pm0jCeYKwwFv X-Received: by 2002:a17:902:da85:b0:1f2:f7ff:96af with SMTP id d9443c01a7336-1f2f7ff971cmr57693335ad.69.1716233154201; Mon, 20 May 2024 12:25:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716233154; cv=pass; d=google.com; s=arc-20160816; b=af3ENnCe1u4eP4j0FbujnUqpnL0jMh9b99RKg1e7xhOfSNwU/rCxMij82iy6Gns+k3 DdJ6Ck5wvck0bVDAtltGG+TFRXIKHZdaCCPDsXvZGkc/Bd6nhM10i5h1Yy3SXKFxQZtP zjmjlkeOTGf3U1pV9YeILBuvbCga1IcUtWa1jWPxFltMSLl4k5ZV0g0QJQI0S/EUB2lt j76DB5kreml/gqRcwQBovLpctPVVoRmJKnSZVRHYjWnUWmfO38uPVXO27LQf29sU3SHP MF2fsK9G4py/VkkqESZuqjjj1dI/30YBW3mxDIY7wIeblEvol3xdDRVDmRILlFoiMx30 6oww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=MBxWBiadl4sTqBaO3ScFCEQXblE9CV7k2QIVsB3rijA=; fh=JlyhschuUvFN/tyKV2XT0NVH5E9sVN0juBCczRHdEHs=; b=hy7fjShBwqUyMAbyibfzm4dxbZ7L05oCpg2rdBQk+EBBPfnGB2zPCdfGrpdA46w1fz OvpPa7XJ8FQB8+Nc87V8MepqUjsggst3BkQjV7wQsSC4vj73HTKJ6Pz13fA57ua/ORkh T3rgU8eOnY8zlA+lyt/BbcPKhL7fGFJggySM0hARp8B8CNqFHNc2o1QQBFPL7KsOv7NP +rqJ433GtwUbuOW1KLcG+mdd8eS172bzsTcX1PbbPuFKoL7Ib2fmDZfzJA24PgCeZvq5 m7Xagyj0TAdnZwOBBqd6hgGi+TjaZaTJWltzkqvuxUriv6TfbMEJQg9YZybnkUXzdNJp Supg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WQl4upsy; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-184109-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f2f98859a1si31609265ad.270.2024.05.20.12.25.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 12:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184109-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WQl4upsy; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-184109-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 50042281376 for ; Mon, 20 May 2024 19:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A73201386BF; Mon, 20 May 2024 19:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="WQl4upsy" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74A44137C41; Mon, 20 May 2024 19:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716233139; cv=none; b=A7HarkYwzujTRUhLYFhsBragZujmKrAk6USA6pL4O95xcdJTXjkq11H/9fIt/LT8LU085Lgg2GHRII8/0Ok3Hz2Ag67YIAI776CdCgpdeJL/kjOmfUsuf8YcVR8gtdUvnetiswh4GrZXfzvDD4usO8JawQip2TEPTeYlyav9urw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716233139; c=relaxed/simple; bh=5LBXzjzDAPTZBUaBcHE7waTQatRc3TVSXvGyu/MVk7A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tbJenvo1Zs01+zFb/rrMI5f5vvETSkH7nPGmwngr19Iu1kZt7+Md9NHBhvcO0BhAVWFAW/AJHrOpQAJbdW1dxxmlmYwV8cB3vs5qKh38WR8HPpY+A9P3TtI1zLVIcnhLvla9jv2vLlMH/XMx4G1L6ewKKpA4xCTF87ci9blhvAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=WQl4upsy; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from [10.137.186.190] (unknown [131.107.159.62]) by linux.microsoft.com (Postfix) with ESMTPSA id 86661205421D; Mon, 20 May 2024 12:25:36 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 86661205421D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1716233136; bh=MBxWBiadl4sTqBaO3ScFCEQXblE9CV7k2QIVsB3rijA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WQl4upsytkSNzZMYUQzV1c6k/uK8n/Tv1YX48+vP5jmz2O1aGpKlw9raxHIiMiZ5P B+wcmw0OFEA5NIqDtjca44j/FSezEkjxTUQXuuyOj2+auBaDgpuqexIy8PMHYe2WgC 1SS0WAGK5pORppu92rp4lKsTZ8uMRlKBEdno0aPU= Message-ID: Date: Mon, 20 May 2024 12:25:35 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/6] drivers/hv/vmbus: Get the irq number from DeviceTree To: Rob Herring Cc: arnd@arndb.de, bhelgaas@google.com, bp@alien8.de, catalin.marinas@arm.com, dave.hansen@linux.intel.com, decui@microsoft.com, haiyangz@microsoft.com, hpa@zytor.com, kw@linux.com, kys@microsoft.com, lenb@kernel.org, lpieralisi@kernel.org, mingo@redhat.com, mhklinux@outlook.com, rafael@kernel.org, tglx@linutronix.de, wei.liu@kernel.org, will@kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, ssengar@microsoft.com, sunilmut@microsoft.com, vdso@hexbites.dev References: <20240514224508.212318-1-romank@linux.microsoft.com> <20240514224508.212318-6-romank@linux.microsoft.com> Content-Language: en-US From: Roman Kisel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/17/2024 10:14 AM, Rob Herring wrote: > On Tue, May 14, 2024 at 5:45 PM Roman Kisel wrote: >> >> The vmbus driver uses ACPI for interrupt assignment on >> arm64 hence it won't function in the VTL mode where only >> DeviceTree can be used. >> >> Update the vmbus driver to discover interrupt configuration >> via DeviceTree. >> >> Signed-off-by: Roman Kisel >> --- >> drivers/hv/vmbus_drv.c | 37 +++++++++++++++++++++++++++++++++++++ >> 1 file changed, 37 insertions(+) >> >> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c >> index e25223cee3ab..52f01bd1c947 100644 >> --- a/drivers/hv/vmbus_drv.c >> +++ b/drivers/hv/vmbus_drv.c >> @@ -36,6 +36,7 @@ >> #include >> #include >> #include >> +#include > > If you are using this header in a driver, you are doing it wrong. We > have common functions which work on both ACPI or DT, so use them if > you have a need to support both. > Understood, thank you! I'll look more for the examples. If you happen to have in mind the place where the idiomatic/more preferred approach is used, please let me know, would owe you a great debt of gratitude. > Though my first question on a binding will be the same as on every > 'hypervisor binding'. Why can't you make your hypervisor interfaces > discoverable? It's all s/w, not some h/w device which is fixed. > I've taken a look at the related art. AWS's Firecracker, Intel's Cloud Hypervisor, Google's CrosVM, QEmu allow the guest use the well-established battle-tested generic approaches (ACPI, DeviceTree/OpenFirmware) of describing the virtual hardware and its resources rather than making the guest use their own specific interfaces. That holds true for the s/w devices like "vcpu-stall-detector" and VirtIO that do not have counterparts built as hardware, too. Here, the guest needs to set up VMBus (the intra-partition communication transport) to be able to talk to the host partition. Receiving a message needs an interrupt service routine attached to the interrupt injected into the guest virtual processor, and DeviceTree lets provide the interrupt number. If a custom interface were used here, it'd look less expected due to others relying on ACPI and DT for configuring virtual devices and busses. A specialized interface would add more code (new code) instead of relying on the approach that is widely used. > Rob -- Thank you, Roman