Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226040/?format=api
{ "id": 2226040, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226040/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422023239.1171963-14-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-14-mrathor@linux.microsoft.com>", "list_archive_url": null, "date": "2026-04-22T02:32:39", "name": "[V1,13/13] mshv: pin all ram mem regions if partition has device passthru", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "32505329429c4945f21b6edf3c02a32ea539ae66", "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-14-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/2226040/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226040/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52907-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=IZXylSwM;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52907-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=\"IZXylSwM\"", "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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\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 4g0kF65FH8z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 12:48:42 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 8DCBB30AC615\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 02:35:58 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 43E2139182A;\n\tWed, 22 Apr 2026 02:34:18 +0000 (UTC)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0019F383C85;\n\tWed, 22 Apr 2026 02:33:59 +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 3A9B320B6F0C;\n\tTue, 21 Apr 2026 19:33:59 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776825253; cv=none;\n b=YrkOHnj9FOwwj7nw1CZp1Ld1uOFV79TLwKrKvxw2yMS4snepUxemD0bTTZQCVm3s/Ek+NAITKlqKCi2+T6bokfCqTMN9NBuUwh1bzdvT1ib5Z9HAcVmS1Uif1aqHSF6TAtL5APR0+DZkBgCtau6qaRFdi1Y6j7ZmJVcdwPWwv/U=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776825253; c=relaxed/simple;\n\tbh=DeXjz0SRhQLAqrfm4RH5YKzrqZmSYmsxnp314WPB2yE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=W+DIVA2CQe5ZfBkp8UuPf8fgbsAgd4l4lbi7+JpF88xYeogFXluiaDBPRbSjqjRG4/yMZM0plvQ5Ec6/tGGhmKDJklqYOAD9elCNsqByhNe+YrY4mIseMQlTgbPOhl5i8N8riH2m5ohzOLP9LQvDDAMjmWG0aIEno7aZfWtG6B0=", "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=IZXylSwM;\n arc=none smtp.client-ip=13.77.154.182", "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 3A9B320B6F0C", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n\ts=default; t=1776825240;\n\tbh=y1jx/hTTfAyQ3CCJQjV0+0ow1B+C2JnMqOep7R/bNGA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=IZXylSwMUWnVpnK/zPOW1AocwdVaoMN1VvQgjP8RPfybnucqhnKEM2kR91gSL6erO\n\t GLdPDi6Ja3KA6eP6YyMcrj0hGsvermCipK5rA4kVfM37cx1oLOZby0eON+S6iBFfNM\n\t oML8I9tJJp7BjXpoDnF2iMxzXoEqvXYFsiVMOzGs=", "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 13/13] mshv: pin all ram mem regions if partition has\n device passthru", "Date": "Tue, 21 Apr 2026 19:32:39 -0700", "Message-ID": "<20260422023239.1171963-14-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": "Given the sporadic errors, mostly from high end devices, when regions are\nnot pinned and a PCI device is passthru'd to a VM, for now, force all\nregions for the VM to be pinned. Even tho VFIO may pin them, the regions\nwould still be marked movable, so do it upfront in mshv.\n\nSigned-off-by: Mukesh R <mrathor@linux.microsoft.com>\n---\n drivers/hv/mshv_root.h | 6 ++++++\n drivers/hv/mshv_root_main.c | 5 ++++-\n 2 files changed, 10 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/hv/mshv_root.h b/drivers/hv/mshv_root.h\nindex b9880d0bdc4d..32260df84f86 100644\n--- a/drivers/hv/mshv_root.h\n+++ b/drivers/hv/mshv_root.h\n@@ -141,6 +141,7 @@ struct mshv_partition {\n \tpid_t pt_vmm_tgid;\n \tbool import_completed;\n \tbool pt_initialized;\n+\tbool pt_regions_pinned;\n #if IS_ENABLED(CONFIG_DEBUG_FS)\n \tstruct dentry *pt_stats_dentry;\n \tstruct dentry *pt_vp_dentry;\n@@ -277,6 +278,11 @@ static inline bool mshv_partition_encrypted(struct mshv_partition *partition)\n \treturn partition->isolation_type == HV_PARTITION_ISOLATION_TYPE_SNP;\n }\n \n+static inline bool mshv_pt_regions_pinned(struct mshv_partition *pt)\n+{\n+\treturn pt->pt_regions_pinned || mshv_partition_encrypted(pt);\n+}\n+\n struct mshv_partition *mshv_partition_get(struct mshv_partition *partition);\n void mshv_partition_put(struct mshv_partition *partition);\n struct mshv_partition *mshv_partition_find(u64 partition_id) __must_hold(RCU);\ndiff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c\nindex a7864463961b..251cf88a2b0b 100644\n--- a/drivers/hv/mshv_root_main.c\n+++ b/drivers/hv/mshv_root_main.c\n@@ -1333,7 +1333,7 @@ static int mshv_partition_create_region(struct mshv_partition *partition,\n \n \tif (is_mmio)\n \t\trg->mreg_type = MSHV_REGION_TYPE_MMIO;\n-\telse if (mshv_partition_encrypted(partition) ||\n+\telse if (mshv_pt_regions_pinned(partition) ||\n \t\t !mshv_region_movable_init(rg))\n \t\trg->mreg_type = MSHV_REGION_TYPE_MEM_PINNED;\n \telse\n@@ -1406,6 +1406,9 @@ static int mshv_prepare_pinned_region(struct mshv_mem_region *region)\n \t\tgoto err_out;\n \t}\n \n+\t/* For now, all regions must be pinned if there is device passthru. */\n+\tpartition->pt_regions_pinned = true;\n+\n \treturn 0;\n \n invalidate_region:\n", "prefixes": [ "V1", "13/13" ] }