[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/5] x86/ioapic: fix edge triggered interrupt migration
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 18 Jul 2023 14:43:29 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z8iSW6BR8tHSaCafmxrsbjXhx+JZIcoHj9dYYbMKwRI=; b=SmFaQVtNEEt29pRrh2qHWoyZ+qU6s07AJhomnMWseWEbSaH5VWRuae1DaEWLmR3jOGAp0ybdmYJYX7JroyRGE8zvswqdRlWPZRGeKK04HCVOnQU6UQ9gWZ51iXC/Om4GcKFQ9M9yALhua8+daT1WDadAgaxxcAqayhlxGQftOjBzPVnhOuCev99T/g4w6D9NSZObClh2g89SbVkGrbuB7sz5FYp81DIWuNFiCZSpIvc1n/ovqqFsSfOJ7elMuDmMo0gBrY3gwc6Z7QxaiKbfsCujMu7uZr2SOXZqAsWQzyF+lsjwW6XMcjFz69RbllGKzgaRhgcvjygCnndsYAiUuQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PgQeRyj5g3hI/hDuASni94BQhm8KSAjYmXS00Yg3BdxpMDHr4IUgVpG50r2S11EwTCA0PrehX75qkLNRLs/wbbstON+OkyDXIP1cyvVur/Jri4V4egRMibcmUiybVl/ZDmCPo60N1lLwRREvGGpYVpV4IIDyJBsie2UJ/I6AtAH32iEbQWcGtCrRzdErHjXzPsIbnHokEcOylmoNWbVollXUXXAaJLze326+j5+kWRN9Ni4GQKuTcrqsLV14/l8dJ1ofurVZaVYanObxopei2zHJLNEYV3II6ZadM8BT7koVNvltKLYT/NphXE9dlXELEA62wLkDhZCrGIZg6PazYw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
- Delivery-date: Tue, 18 Jul 2023 12:44:15 +0000
- Ironport-data: A9a23:wkaqTKyd+6DxPzho8PN6t+f1xyrEfRIJ4+MujC+fZmUNrF6WrkUEy 2tKUGyEbv+KNGH0cogkOdy29RhQsZfQnd42SAVq/CAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRhPKAT5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KVpJq dkkLgIQUjeg2v2J8IOkVfhriMt2eaEHPKtH0p1h5RfwKK98BLzmHeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjmVlVMvuFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE37aSx3KhAttNfFG+3twxqlC0w1QxMQ8La1qrhsLp1WOSa90Kf iT4/QJr98De7neDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZDYtE7sM49RRQxy 0SE2djuAFRHr7m9WX+bsLCOoluaOiULLGlEeS4NSyME5cXupMc4iRenZs5qDaqdntDzXzbqz Fi3QDMWgrwSiYsH0vu99FWe2Ta0/MGWEEgy+xndWX+j4kVhfom5aoe06F/dq/FdMIKeSVrHt 38B8ySD0N0z4Vi2vHTlaI0w8HuBvp5p7BW0bYZTIqQc
- Ironport-hdrordr: A9a23:jNv+VqBYHB6d1iblHemG55DYdb4zR+YMi2TDj3oBLSC8cqSj+/ xG785rsiMc6QxhIE3I/OrqBEDuexPhHPJOi7X5eI3SOTUO21HYV72Kj7GSoAEIcheWntK1l5 0QEZSWY+eeMbEOt6fHCX6DferIruPrzEniv5a5854kd3ASV51d
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hello,
Following series attempts to solve the issue with IO-APIC edge triggered
interrupts seeing an inconsistent IRTE when injected while being
migrated.
It's been simplified a bit from the original RFC, and does make the
logic in the IOMMU RTE update handlers cleaner, as those get passed the
full RTE.
When not using interrupt remapping the logic is left as-is. One further
change would be to mask edge triggered interrupts, as destination and
vector cannot be changed atomically when dealing with plain IO-APIC
RTEs.
Last patch has also been adjusted in order to always to atomic IRTE
updates on AMD.
Thanks, Roger.
Roger Pau Monne (5):
x86/ioapic: add a raw field to RTE struct
x86/ioapic: RTE modifications must use ioapic_write_entry
iommu/vtd: rename io_apic_read_remap_rte() local variable
x86/iommu: pass full IO-APIC RTE for remapping table update
amd/iommu: force atomic updates of remapping entries
xen/arch/x86/include/asm/io_apic.h | 65 +++++-----
xen/arch/x86/include/asm/iommu.h | 3 +-
xen/arch/x86/io_apic.c | 40 +++---
xen/drivers/passthrough/amd/iommu.h | 2 +-
xen/drivers/passthrough/amd/iommu_init.c | 10 ++
xen/drivers/passthrough/amd/iommu_intr.c | 155 +++--------------------
xen/drivers/passthrough/vtd/extern.h | 2 +-
xen/drivers/passthrough/vtd/intremap.c | 131 ++++++++++---------
xen/drivers/passthrough/x86/iommu.c | 4 +-
xen/include/xen/iommu.h | 3 +-
10 files changed, 156 insertions(+), 259 deletions(-)
--
2.41.0
|