All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/altp2m: treat view 0 as the hostp2m in p2m_get_mem_access()
@ 2019-04-03  8:56 Razvan Cojocaru
  2019-04-03 13:24 ` Tamas K Lengyel
  0 siblings, 1 reply; 2+ messages in thread
From: Razvan Cojocaru @ 2019-04-03  8:56 UTC (permalink / raw)
  To: xen-devel
  Cc: tamas, wei.liu2, Razvan Cojocaru, george.dunlap, andrew.cooper3,
	jbeulich, roger.pau

p2m_set_mem_access() (and other places) treat view 0 as the
hostp2m, but p2m_get_mem_access() does not. Correct that
inconsistency.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
---
 xen/arch/x86/mm/mem_access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c
index 56c06a4..a144bb0 100644
--- a/xen/arch/x86/mm/mem_access.c
+++ b/xen/arch/x86/mm/mem_access.c
@@ -505,7 +505,7 @@ int p2m_get_mem_access(struct domain *d, gfn_t gfn, xenmem_access_t *access,
         if ( altp2m_idx )
             return -EINVAL;
     }
-    else
+    else if ( altp2m_idx ) /* altp2m view 0 is treated as the hostp2m */
     {
         if ( altp2m_idx >= MAX_ALTP2M ||
              d->arch.altp2m_eptp[altp2m_idx] == mfn_x(INVALID_MFN) )
-- 
2.7.4


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

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

* Re: [PATCH] x86/altp2m: treat view 0 as the hostp2m in p2m_get_mem_access()
  2019-04-03  8:56 [PATCH] x86/altp2m: treat view 0 as the hostp2m in p2m_get_mem_access() Razvan Cojocaru
@ 2019-04-03 13:24 ` Tamas K Lengyel
  0 siblings, 0 replies; 2+ messages in thread
From: Tamas K Lengyel @ 2019-04-03 13:24 UTC (permalink / raw)
  To: Razvan Cojocaru
  Cc: Wei Liu, George Dunlap, Andrew Cooper, Jan Beulich, Xen-devel,
	Roger Pau Monné

On Wed, Apr 3, 2019 at 2:56 AM Razvan Cojocaru
<rcojocaru@bitdefender.com> wrote:
>
> p2m_set_mem_access() (and other places) treat view 0 as the
> hostp2m, but p2m_get_mem_access() does not. Correct that
> inconsistency.
>
> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>

Acked-by: Tamas K Lengyel <tamas@tklengyel.com>

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

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

end of thread, other threads:[~2019-04-03 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  8:56 [PATCH] x86/altp2m: treat view 0 as the hostp2m in p2m_get_mem_access() Razvan Cojocaru
2019-04-03 13:24 ` Tamas K Lengyel

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.