xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	Anthony PERARD <anthony.perard@gmail.com>,
	Keir Fraser <keir.xen@gmail.com>,
	Jiageng Yu <yujiageng734@gmail.com>,
	Samuel@rcsinet13.oracle.com,
	Thibault <samuel.thibault@ens-lyon.org>,
	Konrad@rcsinet13.oracle.com
Subject: Re: Re: Linux Stubdom Problem
Date: Wed, 9 Nov 2011 12:05:38 -0500	[thread overview]
Message-ID: <20111109170538.GA987@phenom.dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1111081412270.3519@kaball-desktop>

> The real fix should something along these lines:
> 
> 
> 
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 3dd53f9..f2fadfc 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -422,7 +422,7 @@ static pteval_t xen_pte_val(pte_t pte)
>  		pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT;
>  	}
>  
> -	if (xen_initial_domain() && (pteval & _PAGE_IOMAP))
> +	if (pteval & _PAGE_IOMAP)
>  		return pteval;
>  
>  	return pte_mfn_to_pfn(pteval);
> @@ -483,8 +483,7 @@ static pte_t xen_make_pte(pteval_t pte)
>  	 * mappings are just dummy local mappings to keep other
>  	 * parts of the kernel happy.
>  	 */
> -	if (unlikely(pte & _PAGE_IOMAP) &&
> -	    (xen_initial_domain() || addr >= ISA_END_ADDRESS)) {
> +	if (unlikely(pte & _PAGE_IOMAP)) {
>  		pte = iomap_pte(pte);
>  	} else {
>  		pte &= ~_PAGE_IOMAP;
> ---
> 
> Could you please confirm whether this patch fixes your problem?
> 
> Konrad, do you know if this could have any unintended consequences?
> I don't think it can be a problem security wise because Xen is going to
> do all the permission checks anyway.
> The only problem I can see is if a domU is going to call xen_make_pte
> with _PAGE_IOMAP and a pfn->mfn translation is supposed to happen.

I am not sure. I think I tried this at some point but ran in some problems, but
I can't recall which ones. Let me stick this in my #testing branch and see how it
fares with Dom0/DomU/DomU PCI/ etc.

  parent reply	other threads:[~2011-11-09 17:05 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 16:54 Linux Stubdom Problem Jiageng Yu
2011-07-21 17:08 ` iommu=force-hpdl385g7 boot option as workaround for missing IOMMU support in BIOS of HP DL385 g7 Mark Schneider
2011-07-21 17:18 ` Linux Stubdom Problem Stefano Stabellini
2011-07-25 16:45   ` Jiageng Yu
2011-07-26 17:50     ` Jiageng Yu
2011-07-27 11:26       ` Stefano Stabellini
2011-07-27 12:56         ` Jiageng Yu
2011-07-27 13:34           ` Stefano Stabellini
2011-07-28 15:34             ` Jiageng Yu
2011-07-28 17:01               ` Jiageng Yu
2011-07-29 14:29                 ` Stefano Stabellini
2011-07-29 14:51                   ` Jiageng Yu
2011-07-29 15:04                     ` Stefano Stabellini
2011-07-29 15:09                       ` Jiageng Yu
2011-07-29 15:18                         ` Stefano Stabellini
2011-07-29 15:16                           ` Jiageng Yu
2011-07-29 15:28                             ` Stefano Stabellini
2011-08-12 16:22                               ` Jiageng Yu
2011-08-15 12:46                                 ` Jiageng Yu
2011-08-18 23:39                                   ` Stefano Stabellini
2011-08-22 15:24                                     ` Jiageng Yu
2011-08-22 19:36                                       ` Stefano Stabellini
2011-08-22 20:16                                         ` Keir Fraser
2011-08-23  9:39                                         ` Jiageng Yu
2011-08-23 14:38                                           ` Stefano Stabellini
2011-08-23 10:07                                         ` Tim Deegan
2011-08-23 12:59                                           ` Stefano Stabellini
2011-08-26 16:12                                             ` Stefano Stabellini
2011-08-27 13:06                                               ` Tim Deegan
2011-08-29 12:27                                                 ` Stefano Stabellini
2011-08-29 13:18                                                   ` Tim Deegan
2011-08-29 16:03                                                     ` Stefano Stabellini
2011-08-31  6:02                                                       ` Keir Fraser
2011-09-01 17:12                                                         ` Jiageng Yu
2011-09-01 17:27                                                           ` Tim Deegan
2011-09-02  2:32                                                             ` Jiageng Yu
2011-09-02 11:03                                                               ` Tim Deegan
2011-09-02 13:09                                                                 ` Stefano Stabellini
2011-09-02 13:11                                                                   ` Keir Fraser
2011-09-14 13:38                                                                     ` Jiageng Yu
2011-09-15 11:13                                                                       ` Stefano Stabellini
2011-10-27 14:56                                                                         ` Jiageng Yu
2011-11-08 17:05                                                                           ` Stefano Stabellini
2011-11-09  8:59                                                                             ` Jiageng Yu
2011-11-09 13:47                                                                               ` Stefano Stabellini
2011-11-09 14:30                                                                                 ` Jiageng Yu
2011-11-10 10:19                                                                                   ` Stefano Stabellini
2011-11-17 15:18                                                                                     ` Jiageng Yu
2011-11-18 11:21                                                                                       ` Stefano Stabellini
2011-11-09 17:05                                                                             ` Konrad Rzeszutek Wilk [this message]
2011-11-10 10:10                                                                               ` Stefano Stabellini
2011-11-04 14:00                                                                         ` Jiageng Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111109170538.GA987@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Konrad@rcsinet13.oracle.com \
    --cc=Samuel@rcsinet13.oracle.com \
    --cc=anthony.perard@gmail.com \
    --cc=jeremy@goop.org \
    --cc=keir.xen@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=yujiageng734@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).