All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Don Slutz <dslutz@verizon.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] x86: map portion of kexec crash area that is within the direct map area
Date: Wed, 8 Jan 2014 17:57:43 +0000	[thread overview]
Message-ID: <52CD9197.50305@citrix.com> (raw)
In-Reply-To: <52CD8D1A0200007800111981@nat28.tlf.novell.com>

On 08/01/14 16:38, Jan Beulich wrote:
>>>> On 08.01.14 at 16:56, David Vrabel <david.vrabel@citrix.com> wrote:
>> +    if ( kexec_crash_area.size )
> 
> Wouldn't this better also include a kexec_crash_area.start range
> check?

It's a "if there is a crash area" check.  It seems fine as-is to me.

>> +    {
>> +        unsigned long s = PFN_DOWN(kexec_crash_area.start);
>> +        unsigned long e = min(s + PFN_UP(kexec_crash_area.size),
>> +                              PFN_UP(__pa(HYPERVISOR_VIRT_END - 1)));
>> +
>> +        map_pages_to_xen((unsigned long)__va(kexec_crash_area.start),
>> +                         s, e - s, PAGE_HYPERVISOR);
> 
> map_pages_to_xen() doesn't tolerate a huge count resulting when
> e < s (which is possible due to the min() above).

Yes, you're right.  This needs to be:

   if ( e > s )
       map_pages_to_xen(...)

David

  reply	other threads:[~2014-01-08 17:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 15:56 x86: fix kexec crash regression David Vrabel
2014-01-08 15:56 ` [PATCH 1/2] Revert "kexec/x86: do not map crash kernel area" David Vrabel
2014-01-08 16:27   ` Jan Beulich
2014-01-08 16:34     ` Ian Campbell
2014-01-08 16:40       ` Jan Beulich
2014-01-08 15:56 ` [PATCH 2/2] x86: map portion of kexec crash area that is within the direct map area David Vrabel
2014-01-08 16:38   ` Jan Beulich
2014-01-08 17:57     ` David Vrabel [this message]
2014-01-08 16:00 ` x86: fix kexec crash regression Andrew Cooper

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=52CD9197.50305@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=dslutz@verizon.com \
    --cc=xen-devel@lists.xen.org \
    /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 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.