All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check
@ 2019-09-28  8:26 Roger Pau Monne
  2019-09-30  6:07 ` Jürgen Groß
  2019-09-30  7:52 ` Paul Durrant
  0 siblings, 2 replies; 4+ messages in thread
From: Roger Pau Monne @ 2019-09-28  8:26 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, Paul Durrant, Jan Beulich, Roger Pau Monne

Both a shadow and a HAP hwdom require an iommu and must be run in
strict mode. Change the HAP check into a hvm domain check.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/drivers/passthrough/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 8b550f909b..9ef5f376c5 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -154,7 +154,7 @@ custom_param("dom0-iommu", parse_dom0_iommu_param);
 
 static void __hwdom_init check_hwdom_reqs(struct domain *d)
 {
-    if ( iommu_hwdom_none || !hap_enabled(d) )
+    if ( iommu_hwdom_none || !is_hvm_domain(d) )
         return;
 
     iommu_hwdom_passthrough = false;
-- 
2.23.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check
  2019-09-28  8:26 [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check Roger Pau Monne
@ 2019-09-30  6:07 ` Jürgen Groß
  2019-09-30  7:52 ` Paul Durrant
  1 sibling, 0 replies; 4+ messages in thread
From: Jürgen Groß @ 2019-09-30  6:07 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Paul Durrant, Jan Beulich

On 28.09.19 10:26, Roger Pau Monne wrote:
> Both a shadow and a HAP hwdom require an iommu and must be run in
> strict mode. Change the HAP check into a hvm domain check.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check
  2019-09-28  8:26 [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check Roger Pau Monne
  2019-09-30  6:07 ` Jürgen Groß
@ 2019-09-30  7:52 ` Paul Durrant
  2019-09-30  9:00   ` Jan Beulich
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Durrant @ 2019-09-30  7:52 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Juergen Gross, Jan Beulich, Roger Pau Monne

> -----Original Message-----
> From: Roger Pau Monne <roger.pau@citrix.com>
> Sent: 28 September 2019 09:27
> To: xen-devel@lists.xenproject.org
> Cc: Roger Pau Monne <roger.pau@citrix.com>; Jan Beulich <jbeulich@suse.com>; Paul Durrant
> <Paul.Durrant@citrix.com>; Juergen Gross <jgross@suse.com>
> Subject: [PATCH] x86/iommu: fix hwdom iommu requirements check
> 
> Both a shadow and a HAP hwdom require an iommu and must be run in
> strict mode. Change the HAP check into a hvm domain check.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Yes, I completely forgot that it is legitimate for a PVH dom0 to operate in shadow mode.

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> ---
>  xen/drivers/passthrough/iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
> index 8b550f909b..9ef5f376c5 100644
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -154,7 +154,7 @@ custom_param("dom0-iommu", parse_dom0_iommu_param);
> 
>  static void __hwdom_init check_hwdom_reqs(struct domain *d)
>  {
> -    if ( iommu_hwdom_none || !hap_enabled(d) )
> +    if ( iommu_hwdom_none || !is_hvm_domain(d) )
>          return;
> 
>      iommu_hwdom_passthrough = false;
> --
> 2.23.0

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check
  2019-09-30  7:52 ` Paul Durrant
@ 2019-09-30  9:00   ` Jan Beulich
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2019-09-30  9:00 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Juergen Gross, xen-devel, Paul Durrant

On 30.09.2019 09:52, Paul Durrant wrote:
>> -----Original Message-----
>> From: Roger Pau Monne <roger.pau@citrix.com>
>> Sent: 28 September 2019 09:27
>> To: xen-devel@lists.xenproject.org
>> Cc: Roger Pau Monne <roger.pau@citrix.com>; Jan Beulich <jbeulich@suse.com>; Paul Durrant
>> <Paul.Durrant@citrix.com>; Juergen Gross <jgross@suse.com>
>> Subject: [PATCH] x86/iommu: fix hwdom iommu requirements check
>>
>> Both a shadow and a HAP hwdom require an iommu and must be run in
>> strict mode. Change the HAP check into a hvm domain check.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Yes, I completely forgot that it is legitimate for a PVH dom0 to operate in shadow mode.
> 
> Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-09-30  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-28  8:26 [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check Roger Pau Monne
2019-09-30  6:07 ` Jürgen Groß
2019-09-30  7:52 ` Paul Durrant
2019-09-30  9:00   ` Jan Beulich

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.