All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 1/5] iommu: need_iommu set early
@ 2015-02-13 18:51 Elena Ufimtseva
  2015-02-13 21:48 ` Andrew Cooper
  2015-02-17 12:46 ` Jan Beulich
  0 siblings, 2 replies; 4+ messages in thread
From: Elena Ufimtseva @ 2015-02-13 18:51 UTC (permalink / raw)
  To: xen-devel
  Cc: kevin.tian, tim, jbeulich, yang.z.zhang, boris.ostrovsky, roger.pau

Set need_iommu for dom0 early so pvh specific functions
in construct_dom0 can pass this check.
See example in p2m-ept.c ept_set_entry.

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
---
 xen/arch/x86/domain_build.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 4380b57..a7bc2a4 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -1525,6 +1525,7 @@ int __init construct_dom0(
 
     if ( is_pvh_domain(d) )
     {
+        d->need_iommu = 1;
         /* finally, fixup the page table, replacing mfns with pfns */
         pvh_fixup_page_tables_for_hap(v, v_start, v_end);
 
-- 
1.7.10.4

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

* Re: [PATCH RFC 1/5] iommu: need_iommu set early
  2015-02-13 18:51 [PATCH RFC 1/5] iommu: need_iommu set early Elena Ufimtseva
@ 2015-02-13 21:48 ` Andrew Cooper
  2015-02-17 12:46 ` Jan Beulich
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2015-02-13 21:48 UTC (permalink / raw)
  To: Elena Ufimtseva, xen-devel
  Cc: kevin.tian, tim, jbeulich, yang.z.zhang, boris.ostrovsky, roger.pau

On 13/02/15 18:51, Elena Ufimtseva wrote:
> Set need_iommu for dom0 early so pvh specific functions
> in construct_dom0 can pass this check.
> See example in p2m-ept.c ept_set_entry.
>
> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  xen/arch/x86/domain_build.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
> index 4380b57..a7bc2a4 100644
> --- a/xen/arch/x86/domain_build.c
> +++ b/xen/arch/x86/domain_build.c
> @@ -1525,6 +1525,7 @@ int __init construct_dom0(
>  
>      if ( is_pvh_domain(d) )
>      {
> +        d->need_iommu = 1;
>          /* finally, fixup the page table, replacing mfns with pfns */
>          pvh_fixup_page_tables_for_hap(v, v_start, v_end);
>  

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

* Re: [PATCH RFC 1/5] iommu: need_iommu set early
  2015-02-13 18:51 [PATCH RFC 1/5] iommu: need_iommu set early Elena Ufimtseva
  2015-02-13 21:48 ` Andrew Cooper
@ 2015-02-17 12:46 ` Jan Beulich
  2015-02-17 19:48   ` Elena Ufimtseva
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2015-02-17 12:46 UTC (permalink / raw)
  To: Elena Ufimtseva
  Cc: kevin.tian, tim, xen-devel, yang.z.zhang, boris.ostrovsky, roger.pau

>>> On 13.02.15 at 19:51, <elena.ufimtseva@oracle.com> wrote:
> Set need_iommu for dom0 early so pvh specific functions
> in construct_dom0 can pass this check.
> See example in p2m-ept.c ept_set_entry.
> 
> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>

Having gone through the rest of this series, I can't see the relation
and I also can't see why this would be needed all of the sudden. I
was considering to apply this on its own, but without a proper
explanation of why it's needed I don't think I should.

Jan

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

* Re: [PATCH RFC 1/5] iommu: need_iommu set early
  2015-02-17 12:46 ` Jan Beulich
@ 2015-02-17 19:48   ` Elena Ufimtseva
  0 siblings, 0 replies; 4+ messages in thread
From: Elena Ufimtseva @ 2015-02-17 19:48 UTC (permalink / raw)
  To: Jan Beulich
  Cc: kevin.tian, tim, xen-devel, jbeulich, yang.z.zhang,
	boris.ostrovsky, roger.pau

On Tue, Feb 17, 2015 at 12:46:40PM +0000, Jan Beulich wrote:
> >>> On 13.02.15 at 19:51, <elena.ufimtseva@oracle.com> wrote:
> > Set need_iommu for dom0 early so pvh specific functions
> > in construct_dom0 can pass this check.
> > See example in p2m-ept.c ept_set_entry.
> > 
> > Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> 
> Having gone through the rest of this series, I can't see the relation
> and I also can't see why this would be needed all of the sudden. I
> was considering to apply this on its own, but without a proper
> explanation of why it's needed I don't think I should.

After analysing once more I can see that this change is needed
only with this patchset. If the command-line defined extra RMRRs are 
being mapped in hwdom_iommu_init, at that point the entries will be
mapped with iommu as need_iommu will be set to 1.

I will work on the changes regarding extr RMRRs and get rid of this
patch.

> 
> Jan

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

end of thread, other threads:[~2015-02-17 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 18:51 [PATCH RFC 1/5] iommu: need_iommu set early Elena Ufimtseva
2015-02-13 21:48 ` Andrew Cooper
2015-02-17 12:46 ` Jan Beulich
2015-02-17 19:48   ` Elena Ufimtseva

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.