Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226031/?format=api
{ "id": 2226031, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226031/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422023239.1171963-10-mrathor@linux.microsoft.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.2/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260422023239.1171963-10-mrathor@linux.microsoft.com>", "list_archive_url": null, "date": "2026-04-22T02:32:35", "name": "[V1,09/13] mshv: Import data structs around device passthru from hyperv headers", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "09347266acc2a554898b3495ab582e4779a6ef50", "submitter": { "id": 91512, "url": "http://patchwork.ozlabs.org/api/1.2/people/91512/?format=api", "name": "Mukesh R", "email": "mrathor@linux.microsoft.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422023239.1171963-10-mrathor@linux.microsoft.com/mbox/", "series": [ { "id": 500915, "url": "http://patchwork.ozlabs.org/api/1.2/series/500915/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500915", "date": "2026-04-22T02:32:26", "name": "PCI passthru on Hyper-V (Part I)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500915/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226031/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226031/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52903-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com\n header.a=rsa-sha256 header.s=default header.b=KSXqriht;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-52903-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.microsoft.com\n header.i=@linux.microsoft.com header.b=\"KSXqriht\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=13.77.154.182", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.microsoft.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.microsoft.com" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0k1w3KxPz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:39:00 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id F14F4302257F\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 02:35:01 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 24AA5390200;\n\tWed, 22 Apr 2026 02:34:09 +0000 (UTC)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 17E2437F75B;\n\tWed, 22 Apr 2026 02:33:53 +0000 (UTC)", "from mrdev.corp.microsoft.com\n (192-184-212-33.fiber.dynamic.sonic.net [192.184.212.33])\n\tby linux.microsoft.com (Postfix) with ESMTPSA id ED9A020B6F21;\n\tTue, 21 Apr 2026 19:33:48 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776825243; cv=none;\n b=Zeu/kspUik3w7j9TidQSQPvibPFQ2ieXAAHPIRm46KiCuRpUTGgprwrZBH8vZ5sDHTFhLdaGRpvW+gvvsYnR5zrHZR2OjNPbb+ywcsp0Y1ebxOslTCLktX6KKC2Y+D87h3LnZwWNcudn7YSkd7spY2U+kFQcTVnzrXwqMqfhnNY=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776825243; c=relaxed/simple;\n\tbh=i0VTBJ+JnPrBDXBmboabc0DGz729xEaksDvoWqta6X8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=IeEONEXlbnW4DUH5Ik1BKqxENGx5BcEeIXf9HpQmZmKExkb7I5uWMn5QcB3+LDP9JUZE0QYcCCWm5izcNKULlZ4lUQ579DUNZcRfwb/KkhES7VSeeFAi0OhHtDDKNyyTWp7lUF1qugb4tpo5i7i09SuMEIXIzt496+X2udcUbSA=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.microsoft.com;\n spf=pass smtp.mailfrom=linux.microsoft.com;\n dkim=pass (1024-bit key) header.d=linux.microsoft.com\n header.i=@linux.microsoft.com header.b=KSXqriht;\n arc=none smtp.client-ip=13.77.154.182", "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com ED9A020B6F21", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n\ts=default; t=1776825229;\n\tbh=0bjgMj0k5nPoMwets23GFJzSwvZMJJftuqSY4+V25iQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=KSXqrihtAgVG9XWdFdwCwru9n3hQ4behZV7iMeZ+4xukeURssOqspE+157qhVzqtE\n\t FcWf0Kqa9z1IMmlXd0RXAk5UDgU6m+Krr21XJYtyiHUD3hPw94cm3d4ANawOaG/guA\n\t k8Sc0Ahq2V7Pyqtx95aCFFwz+95MqfwUe9gjoEwc=", "From": "Mukesh R <mrathor@linux.microsoft.com>", "To": "hpa@zytor.com,\n\trobin.murphy@arm.com,\n\trobh@kernel.org,\n\twei.liu@kernel.org,\n\tmrathor@linux.microsoft.com,\n\tmhklinux@outlook.com,\n\tmuislam@microsoft.com,\n\tnamjain@linux.microsoft.com,\n\tmagnuskulke@linux.microsoft.com,\n\tanbelski@linux.microsoft.com,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-hyperv@vger.kernel.org,\n\tiommu@lists.linux.dev,\n\tlinux-pci@vger.kernel.org,\n\tlinux-arch@vger.kernel.org", "Cc": "kys@microsoft.com,\n\thaiyangz@microsoft.com,\n\tdecui@microsoft.com,\n\tlongli@microsoft.com,\n\ttglx@kernel.org,\n\tmingo@redhat.com,\n\tbp@alien8.de,\n\tdave.hansen@linux.intel.com,\n\tx86@kernel.org,\n\tjoro@8bytes.org,\n\twill@kernel.org,\n\tlpieralisi@kernel.org,\n\tkwilczynski@kernel.org,\n\tbhelgaas@google.com,\n\tarnd@arndb.de", "Subject": "[PATCH V1 09/13] mshv: Import data structs around device passthru\n from hyperv headers", "Date": "Tue, 21 Apr 2026 19:32:35 -0700", "Message-ID": "<20260422023239.1171963-10-mrathor@linux.microsoft.com>", "X-Mailer": "git-send-email 2.51.2.vfs.0.1", "In-Reply-To": "<20260422023239.1171963-1-mrathor@linux.microsoft.com>", "References": "<20260422023239.1171963-1-mrathor@linux.microsoft.com>", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "Copy/import from Hyper-V public headers, definitions and declarations that\nare related to attaching and detaching of device domains, and building\ndevice ids for those purposes.\n\nSigned-off-by: Mukesh R <mrathor@linux.microsoft.com>\n---\n include/hyperv/hvgdk_mini.h | 11 ++++\n include/hyperv/hvhdk_mini.h | 112 ++++++++++++++++++++++++++++++++++++\n 2 files changed, 123 insertions(+)", "diff": "diff --git a/include/hyperv/hvgdk_mini.h b/include/hyperv/hvgdk_mini.h\nindex 6a4e8b9d570f..da622fb06440 100644\n--- a/include/hyperv/hvgdk_mini.h\n+++ b/include/hyperv/hvgdk_mini.h\n@@ -326,6 +326,9 @@ union hv_hypervisor_version_info {\n /* stimer Direct Mode is available */\n #define HV_STIMER_DIRECT_MODE_AVAILABLE\t\t\tBIT(19)\n \n+#define HV_DEVICE_DOMAIN_AVAILABLE\t\t\tBIT(24)\n+#define HV_S1_DEVICE_DOMAIN_AVAILABLE\t\t\tBIT(25)\n+\n /*\n * Implementation recommendations. Indicates which behaviors the hypervisor\n * recommends the OS implement for optimal performance.\n@@ -475,6 +478,8 @@ union hv_vp_assist_msr_contents {\t /* HV_REGISTER_VP_ASSIST_PAGE */\n #define HVCALL_MAP_DEVICE_INTERRUPT\t\t\t0x007c\n #define HVCALL_UNMAP_DEVICE_INTERRUPT\t\t\t0x007d\n #define HVCALL_RETARGET_INTERRUPT\t\t\t0x007e\n+#define HVCALL_ATTACH_DEVICE 0x0082\n+#define HVCALL_DETACH_DEVICE 0x0083\n #define HVCALL_NOTIFY_PARTITION_EVENT 0x0087\n #define HVCALL_ENTER_SLEEP_STATE\t\t\t0x0084\n #define HVCALL_NOTIFY_PORT_RING_EMPTY\t\t\t0x008b\n@@ -486,9 +491,15 @@ union hv_vp_assist_msr_contents {\t /* HV_REGISTER_VP_ASSIST_PAGE */\n #define HVCALL_GET_VP_INDEX_FROM_APIC_ID\t\t0x009a\n #define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE\t0x00af\n #define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_LIST\t0x00b0\n+#define HVCALL_CREATE_DEVICE_DOMAIN 0x00b1\n+#define HVCALL_ATTACH_DEVICE_DOMAIN 0x00b2\n+#define HVCALL_MAP_DEVICE_GPA_PAGES 0x00b3\n+#define HVCALL_UNMAP_DEVICE_GPA_PAGES 0x00b4\n #define HVCALL_SIGNAL_EVENT_DIRECT\t\t\t0x00c0\n #define HVCALL_POST_MESSAGE_DIRECT\t\t\t0x00c1\n #define HVCALL_DISPATCH_VP\t\t\t\t0x00c2\n+#define HVCALL_DETACH_DEVICE_DOMAIN 0x00c4\n+#define HVCALL_DELETE_DEVICE_DOMAIN 0x00c5\n #define HVCALL_GET_GPA_PAGES_ACCESS_STATES\t\t0x00c9\n #define HVCALL_ACQUIRE_SPARSE_SPA_PAGE_HOST_ACCESS\t0x00d7\n #define HVCALL_RELEASE_SPARSE_SPA_PAGE_HOST_ACCESS\t0x00d8\ndiff --git a/include/hyperv/hvhdk_mini.h b/include/hyperv/hvhdk_mini.h\nindex b4cb2fa26e9b..60425052a799 100644\n--- a/include/hyperv/hvhdk_mini.h\n+++ b/include/hyperv/hvhdk_mini.h\n@@ -468,6 +468,32 @@ struct hv_send_ipi_ex { /* HV_INPUT_SEND_SYNTHETIC_CLUSTER_IPI_EX */\n \tstruct hv_vpset vp_set;\n } __packed;\n \n+union hv_attdev_flags {\t\t/* HV_ATTACH_DEVICE_FLAGS */\n+\tstruct {\n+\t\tu32 logical_id : 1;\n+\t\tu32 resvd0 : 1;\n+\t\tu32 ats_enabled : 1;\n+\t\tu32 virt_func : 1;\n+\t\tu32 shared_irq_child : 1;\n+\t\tu32 virt_dev : 1;\n+\t\tu32 ats_supported : 1;\n+\t\tu32 small_irt : 1;\n+\t\tu32 resvd : 24;\n+\t} __packed;\n+\tu32 as_uint32;\n+};\n+\n+union hv_dev_pci_caps {\t\t/* HV_DEVICE_PCI_CAPABILITIES */\n+\tstruct {\n+\t\tu32 max_pasid_width : 5;\n+\t\tu32 invalidate_qdepth : 5;\n+\t\tu32 global_inval : 1;\n+\t\tu32 prg_response_req : 1;\n+\t\tu32 resvd : 20;\n+\t} __packed;\n+\tu32 as_uint32;\n+};\n+\n typedef u16 hv_pci_rid;\t\t/* HV_PCI_RID */\n typedef u16 hv_pci_segment;\t/* HV_PCI_SEGMENT */\n typedef u64 hv_logical_device_id;\n@@ -547,4 +573,90 @@ union hv_device_id {\t\t/* HV_DEVICE_ID */\n \t} acpi;\n } __packed;\n \n+struct hv_input_attach_device { /* HV_INPUT_ATTACH_DEVICE */\n+\tu64 partition_id;\n+\tunion hv_device_id device_id;\n+\tunion hv_attdev_flags attdev_flags;\n+\tu8 attdev_vtl;\n+\tu8 rsvd0;\n+\tu16 rsvd1;\n+\tu64 logical_devid;\n+\tunion hv_dev_pci_caps dev_pcicaps;\n+\tu16 pf_pci_rid;\n+\tu16 resvd2;\n+} __packed;\n+\n+struct hv_input_detach_device {\t\t/* HV_INPUT_DETACH_DEVICE */\n+\tu64 partition_id;\n+\tu64 logical_devid;\n+} __packed;\n+\n+\n+/* 3 domain types: stage 1, stage 2, and SOC */\n+#define HV_DEVICE_DOMAIN_TYPE_S2 0 /* HV_DEVICE_DOMAIN_ID_TYPE_S2 */\n+#define HV_DEVICE_DOMAIN_TYPE_S1 1 /* HV_DEVICE_DOMAIN_ID_TYPE_S1 */\n+#define HV_DEVICE_DOMAIN_TYPE_SOC 2 /* HV_DEVICE_DOMAIN_ID_TYPE_SOC */\n+\n+/* ID for stage 2 default domain and NULL domain */\n+#define HV_DEVICE_DOMAIN_ID_S2_DEFAULT 0\n+#define HV_DEVICE_DOMAIN_ID_S2_NULL 0xFFFFFFFFULL\n+\n+union hv_device_domain_id {\n+\tu64 as_uint64;\n+\tstruct {\n+\t\tu32 type : 4;\n+\t\tu32 reserved : 28;\n+\t\tu32 id;\n+\t};\n+} __packed;\n+\n+struct hv_input_device_domain { /* HV_INPUT_DEVICE_DOMAIN */\n+\tu64 partition_id;\n+\tunion hv_input_vtl owner_vtl;\n+\tu8 padding[7];\n+\tunion hv_device_domain_id domain_id;\n+} __packed;\n+\n+union hv_create_device_domain_flags {\t/* HV_CREATE_DEVICE_DOMAIN_FLAGS */\n+\tu32 as_uint32;\n+\tstruct {\n+\t\tu32 forward_progress_required : 1;\n+\t\tu32 inherit_owning_vtl : 1;\n+\t\tu32 reserved : 30;\n+\t} __packed;\n+} __packed;\n+\n+struct hv_input_create_device_domain {\t/* HV_INPUT_CREATE_DEVICE_DOMAIN */\n+\tstruct hv_input_device_domain device_domain;\n+\tunion hv_create_device_domain_flags create_device_domain_flags;\n+} __packed;\n+\n+struct hv_input_delete_device_domain {\t/* HV_INPUT_DELETE_DEVICE_DOMAIN */\n+\tstruct hv_input_device_domain device_domain;\n+} __packed;\n+\n+struct hv_input_attach_device_domain {\t/* HV_INPUT_ATTACH_DEVICE_DOMAIN */\n+\tstruct hv_input_device_domain device_domain;\n+\tunion hv_device_id device_id;\n+} __packed;\n+\n+struct hv_input_detach_device_domain {\t/* HV_INPUT_DETACH_DEVICE_DOMAIN */\n+\tu64 partition_id;\n+\tunion hv_device_id device_id;\n+} __packed;\n+\n+struct hv_input_map_device_gpa_pages {\t/* HV_INPUT_MAP_DEVICE_GPA_PAGES */\n+\tstruct hv_input_device_domain device_domain;\n+\tunion hv_input_vtl target_vtl;\n+\tu8 padding[3];\n+\tu32 map_flags;\n+\tu64 target_device_va_base;\n+\tu64 gpa_page_list[];\n+} __packed;\n+\n+struct hv_input_unmap_device_gpa_pages { /* HV_INPUT_UNMAP_DEVICE_GPA_PAGES */\n+\tstruct hv_input_device_domain device_domain;\n+\tu64 target_device_va_base;\n+} __packed;\n+\n #endif /* _HV_HVHDK_MINI_H */\n", "prefixes": [ "V1", "09/13" ] }