xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Gianni Tedesco <gianni.tedesco@citrix.com>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: Keir@citrix.com, Tim Deegan <Tim.Deegan@eu.citrix.com>,
	Fraser <keir.fraser@xen.org>, Keir Fraser <keir.xen@gmail.com>,
	Xen Devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH]: Allow tools to map arbitrarily large machphys_mfn_list on 32bit dom0
Date: Mon, 14 Mar 2011 15:55:47 +0000	[thread overview]
Message-ID: <4D7E489302000078000365B5@vpn.id2.novell.com> (raw)
In-Reply-To: <1300115967.17229.82.camel@qabil.uk.xensource.com>

>>> On 14.03.11 at 16:19, Gianni Tedesco <gianni.tedesco@citrix.com> wrote:
> 
> This permits suspend/resume to work with 32bit dom0/tools. AFAICT the
> limit to MACH2PHYS_COMPAT_NR_ENTRIES is redundant since that refers to a
> limit in 32bit guest compat mappings under 64bit hypervisors, not
> userspace where there may be gigabytes of useful virtual space available
> for this.
> 
> Suggested-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
> Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
> 
> diff -r 8b5cbccbc654 xen/arch/x86/x86_64/compat/mm.c
> --- a/xen/arch/x86/x86_64/compat/mm.c	Mon Mar 14 14:59:27 2011 +0000
> +++ b/xen/arch/x86/x86_64/compat/mm.c	Mon Mar 14 15:17:59 2011 +0000
> @@ -161,9 +161,7 @@ int compat_arch_memory_op(int op, XEN_GU
>          if ( copy_from_guest(&xmml, arg, 1) )
>              return -EFAULT;
>  
> -        limit = (unsigned long)(compat_machine_to_phys_mapping +
> -            min_t(unsigned long, max_page,
> -                  MACH2PHYS_COMPAT_NR_ENTRIES(current->domain)));
> +        limit = (unsigned long)(compat_machine_to_phys_mapping + max_page);

While doing this shouldn't hurt (except slightly for performance of
the hypercall), I don't see why it's useful: For slots past
MACH2PHYS_COMPAT_NR_ENTRIES(current->domain) you
wouldn't read non-null page table entries anyway (up to
RDWR_COMPAT_MPT_VIRT_END), so I don't see why the tools
couldn't equally well do with what we have currently (after all
they get told how many slots were filled).

Jan

>          if ( limit > RDWR_COMPAT_MPT_VIRT_END )
>              limit = RDWR_COMPAT_MPT_VIRT_END;
>          for ( i = 0, v = RDWR_COMPAT_MPT_VIRT_START, last_mfn = 0;

  reply	other threads:[~2011-03-14 15:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 18:52 xc: error: xc_machphys_mfn_list: 83 != 129 when suspending 32GB PV DomU Gianni Tedesco
2011-03-11 19:21 ` Keir Fraser
2011-03-14 10:20   ` Ian Campbell
2011-03-14 15:05     ` [PATCH]: Allow tools to map arbitrarily large machphys_mfn_list on 32bit dom0 Gianni Tedesco
2011-03-14 15:08       ` Keir Fraser
2011-03-14 15:11       ` Ian Campbell
2011-03-14 15:19         ` Gianni Tedesco
2011-03-14 15:55           ` Jan Beulich [this message]
2011-03-14 16:03             ` Ian Campbell
2011-03-14 16:22               ` Jan Beulich
2011-03-14 16:33                 ` Ian Campbell
2011-03-14 16:54                   ` Keir Fraser
2011-03-14 17:00                     ` Jan Beulich
2011-03-14 17:09                       ` Gianni Tedesco
2011-03-14 16:58                   ` Jan Beulich
2011-03-14 17:11                     ` Gianni Tedesco
2011-03-15 15:00                     ` Ian Campbell
2011-03-15 15:09                       ` Jan Beulich
2011-03-15 15:14                         ` Ian Campbell

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=4D7E489302000078000365B5@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Keir@citrix.com \
    --cc=Tim.Deegan@eu.citrix.com \
    --cc=gianni.tedesco@citrix.com \
    --cc=keir.fraser@xen.org \
    --cc=keir.xen@gmail.com \
    --cc=xen-devel@lists.xensource.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).