xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* identify a Xen PV domU to fix devmem_is_allowed
@ 2016-02-29 10:28 Olaf Hering
  2016-02-29 15:10 ` Konrad Rzeszutek Wilk
  2016-03-01 15:29 ` David Vrabel
  0 siblings, 2 replies; 16+ messages in thread
From: Olaf Hering @ 2016-02-29 10:28 UTC (permalink / raw)
  To: xen-devel

What is the correct way to identify a Xen PV domU in the kenrel?
devmem_is_allowed() used to disable access to pages < 256 in domU.
With pvops this check was removed, or never ported forward.

Would this change be the correct fix?

+++ b/arch/x86/mm/init.c
@@ -637,7 +637,7 @@ void __init init_mem_mapping(void)
 int devmem_is_allowed(unsigned long pagenr)
 {
        if (pagenr < 256)
-               return 1;
+               return !xen_pv_domain();
        if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
                return 0;
        if (!page_is_ram(pagenr))

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-06-06 21:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 10:28 identify a Xen PV domU to fix devmem_is_allowed Olaf Hering
2016-02-29 15:10 ` Konrad Rzeszutek Wilk
2016-02-29 15:29   ` Olaf Hering
2016-02-29 18:32     ` Boris Ostrovsky
2016-03-01 15:14       ` Olaf Hering
2016-03-01 10:38   ` Jan Beulich
2016-03-01 14:34     ` Konrad Rzeszutek Wilk
2016-03-01 14:45       ` Boris Ostrovsky
2016-03-15 16:57         ` Olaf Hering
2016-03-15 18:56           ` Boris Ostrovsky
2016-03-21 21:29           ` Boris Ostrovsky
2016-03-22 18:37             ` Boris Ostrovsky
2016-03-23  8:28               ` Olaf Hering
2016-06-06 21:17               ` Olaf Hering
2016-03-01 16:23   ` Olaf Hering
2016-03-01 15:29 ` David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).