All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] IOMMU: adjustments after ""IOMMU: make DMA containment of quarantined devices optional""
@ 2021-07-07 13:20 Jan Beulich
  2021-07-07 13:21 ` [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page" Jan Beulich
  2021-07-07 13:22 ` [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default Jan Beulich
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2021-07-07 13:20 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant, Andrew Cooper

Andrew has spotted a bug, and I've noticed that a changelog entry
might be a good idea.

1: IOMMU: correct parsing of "quarantine=scratch-page"
2: CHANGELOG: record changed PCI device quarantining default

Jan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page"
  2021-07-07 13:20 [PATCH 0/2] IOMMU: adjustments after ""IOMMU: make DMA containment of quarantined devices optional"" Jan Beulich
@ 2021-07-07 13:21 ` Jan Beulich
  2021-07-12 18:34   ` Paul Durrant
  2021-07-07 13:22 ` [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default Jan Beulich
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2021-07-07 13:21 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant, Andrew Cooper

During the multiple renames of the sub-option I apparently forgot to
update the left side of the &&, and this pretty consistently.

Fixes: 980d6acf1517 ("IOMMU: make DMA containment of quarantined devices optional")

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -82,7 +82,7 @@ static int __init parse_iommu_param(cons
 #ifdef CONFIG_HAS_PCI
         else if ( (val = parse_boolean("quarantine", s, ss)) >= 0 )
             iommu_quarantine = val;
-        else if ( ss == s + 15 && !strncmp(s, "quarantine=scratch-page", 23) )
+        else if ( ss == s + 23 && !strncmp(s, "quarantine=scratch-page", 23) )
             iommu_quarantine = IOMMU_quarantine_scratch_page;
 #endif
 #ifdef CONFIG_X86



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default
  2021-07-07 13:20 [PATCH 0/2] IOMMU: adjustments after ""IOMMU: make DMA containment of quarantined devices optional"" Jan Beulich
  2021-07-07 13:21 ` [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page" Jan Beulich
@ 2021-07-07 13:22 ` Jan Beulich
  2021-07-12 18:35   ` Paul Durrant
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2021-07-07 13:22 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant, Andrew Cooper

This amends commit 980d6acf1517 ("IOMMU: make DMA containment of
quarantined devices optional").

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,13 @@ The format is based on [Keep a Changelog
  - XENSTORED_ROOTDIR environment variable from configuartion files and
    initscripts, due to being unused.
 
+### Changed
+ - Quarantining of passed-through PCI devices no longer defaults to directing I/O to a scratch
+   page, matching original post-XSA-302 behavior (albeit the change was also backported, first
+   appearing in 4.12.2 and 4.11.4). Prior (4.13...4.15-like) behavior can be arranged for
+   either by enabling the IOMMU_QUARANTINE_SCRATCH_PAGE setting at build (configuration) time
+   or by passing "iommu=quarantine=scratch-page" on the hypervisor command line.
+
 ## [4.15.0 UNRELEASED](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.15.0) - TBD
 
 ### Added / support upgraded



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page"
  2021-07-07 13:21 ` [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page" Jan Beulich
@ 2021-07-12 18:34   ` Paul Durrant
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Durrant @ 2021-07-12 18:34 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Andrew Cooper

On 07/07/2021 14:21, Jan Beulich wrote:
> During the multiple renames of the sub-option I apparently forgot to
> update the left side of the &&, and this pretty consistently.
> 
> Fixes: 980d6acf1517 ("IOMMU: make DMA containment of quarantined devices optional")
> 
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul@xen.org>

> 
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -82,7 +82,7 @@ static int __init parse_iommu_param(cons
>   #ifdef CONFIG_HAS_PCI
>           else if ( (val = parse_boolean("quarantine", s, ss)) >= 0 )
>               iommu_quarantine = val;
> -        else if ( ss == s + 15 && !strncmp(s, "quarantine=scratch-page", 23) )
> +        else if ( ss == s + 23 && !strncmp(s, "quarantine=scratch-page", 23) )
>               iommu_quarantine = IOMMU_quarantine_scratch_page;
>   #endif
>   #ifdef CONFIG_X86
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default
  2021-07-07 13:22 ` [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default Jan Beulich
@ 2021-07-12 18:35   ` Paul Durrant
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Durrant @ 2021-07-12 18:35 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Andrew Cooper

On 07/07/2021 14:22, Jan Beulich wrote:
> This amends commit 980d6acf1517 ("IOMMU: make DMA containment of
> quarantined devices optional").
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul@xen.org>

> 
> --- a/CHANGELOG.md
> +++ b/CHANGELOG.md
> @@ -10,6 +10,13 @@ The format is based on [Keep a Changelog
>    - XENSTORED_ROOTDIR environment variable from configuartion files and
>      initscripts, due to being unused.
>   
> +### Changed
> + - Quarantining of passed-through PCI devices no longer defaults to directing I/O to a scratch
> +   page, matching original post-XSA-302 behavior (albeit the change was also backported, first
> +   appearing in 4.12.2 and 4.11.4). Prior (4.13...4.15-like) behavior can be arranged for
> +   either by enabling the IOMMU_QUARANTINE_SCRATCH_PAGE setting at build (configuration) time
> +   or by passing "iommu=quarantine=scratch-page" on the hypervisor command line.
> +
>   ## [4.15.0 UNRELEASED](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.15.0) - TBD
>   
>   ### Added / support upgraded
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-12 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 13:20 [PATCH 0/2] IOMMU: adjustments after ""IOMMU: make DMA containment of quarantined devices optional"" Jan Beulich
2021-07-07 13:21 ` [PATCH 1/2] IOMMU: correct parsing of "quarantine=scratch-page" Jan Beulich
2021-07-12 18:34   ` Paul Durrant
2021-07-07 13:22 ` [PATCH 2/2] CHANGELOG: record changed PCI device quarantining default Jan Beulich
2021-07-12 18:35   ` Paul Durrant

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.