All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Keir Fraser <keir@xen.org>,
	xen-devel@lists.xen.org, Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v3 09/16] hvmloader: Check modules whereabouts
Date: Thu, 3 Mar 2016 16:34:30 +0000	[thread overview]
Message-ID: <56D86796.8050605@citrix.com> (raw)
In-Reply-To: <20160303160049.GH7532@perard.uk.xensource.com>

On 03/03/16 16:00, Anthony PERARD wrote:
> On Mon, Feb 29, 2016 at 09:58:29AM -0700, Jan Beulich wrote:
>>>>> On 25.02.16 at 15:56, <anthony.perard@citrix.com> wrote:
>>> --- a/tools/firmware/hvmloader/hvmloader.c
>>> +++ b/tools/firmware/hvmloader/hvmloader.c
>>> @@ -303,6 +303,15 @@ int main(void)
>>>  
>>>      smp_initialise();
>>>  
>>> +    /* Check that tests does not use memory where modules are stored */
>>> +    BUG_ON( ((uint32_t)hvm_start_info + sizeof(struct hvm_start_info)) >= 4 << 20 );
>>> +    for ( unsigned i = 0; i < hvm_start_info->nr_modules; i++ )
>>> +    {
>>> +        const struct hvm_modlist_entry *modlist =
>>> +            (struct hvm_modlist_entry *)hvm_start_info->modlist_paddr;
>>> +        if ( modlist[i].size )
>>> +            BUG_ON( modlist[i].paddr + modlist[i].size >= 4ul << 20 );
>>> +    }
>> First of all both checks should use > instead of >=. And then
>> expecting all modules to live below 4Mb doesn't seem very
>> reasonable.
> Yes, and this can be an issue with OVMF, it's a 2MB binary. I'm not sure
> what to do about this, should I ignore perform_tests() if it going to
> clear the memory used by the modules?
>
> I should probably check that the modules are outside the memory region that
> is going to be used by perform_tests(), instead of just checking that they
> are bellow 4MB.

Now that I have published my Xen Test Framework, these hvmloader tests
should be moved across and removed entirely from hvmloader.  This was
one of the original intentions.

~Andrew

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

  parent reply	other threads:[~2016-03-03 16:34 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 14:55 [PATCH v3 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Anthony PERARD
2016-02-25 14:55 ` [PATCH v3 01/16] libxc: Rework extra module initialisation Anthony PERARD
2016-03-01 11:51   ` Wei Liu
2016-03-03 16:27     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 02/16] libxc: Load BIOS and ACPI table into guest memory Anthony PERARD
2016-03-01 11:51   ` Wei Liu
2016-03-03 16:57     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 03/16] configure: #define SEABIOS_PATH and OVMF_PATH Anthony PERARD
2016-03-01 11:51   ` Wei Liu
2016-03-03 17:03     ` Anthony PERARD
2016-03-08 15:55       ` Wei Liu
2016-02-25 14:56 ` [PATCH v3 04/16] firmware/makefile: install BIOS and ACPI blob Anthony PERARD
2016-02-29 16:31   ` Jan Beulich
2016-03-03 15:44     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 05/16] libxl: Load guest BIOS from file Anthony PERARD
2016-03-01 11:51   ` Wei Liu
2016-03-03 17:16     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 06/16] libxl: Load guest ACPI table " Anthony PERARD
2016-03-01 11:51   ` Wei Liu
2016-03-03 17:12     ` Anthony PERARD
2016-03-08 15:55       ` Wei Liu
2016-02-25 14:56 ` [PATCH v3 07/16] hvmloader: Grab the hvm_start_info pointer Anthony PERARD
2016-02-29 16:37   ` Jan Beulich
2016-02-29 16:48     ` Jan Beulich
2016-02-25 14:56 ` [PATCH v3 08/16] hvmloader: Locate the BIOS blob Anthony PERARD
2016-02-29 16:56   ` Jan Beulich
2016-03-03 16:21     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 09/16] hvmloader: Check modules whereabouts Anthony PERARD
2016-02-29 16:58   ` Jan Beulich
2016-03-03 16:00     ` Anthony PERARD
2016-03-03 16:18       ` Jan Beulich
2016-03-03 16:34       ` Andrew Cooper [this message]
2016-02-25 14:56 ` [PATCH v3 10/16] hvmloader: Load SeaBIOS from hvm_start_info modules Anthony PERARD
2016-02-29 17:02   ` Jan Beulich
2016-03-03 16:15     ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 11/16] hvmloader: Load OVMF from modules Anthony PERARD
2016-03-01 16:03   ` Jan Beulich
2016-03-03 17:39     ` Anthony PERARD
2016-03-05 18:05       ` Wei Liu
2016-02-25 14:56 ` [PATCH v3 12/16] hvmloader: Specific bios_load function required Anthony PERARD
2016-03-01 16:07   ` Jan Beulich
2016-02-25 14:56 ` [PATCH v3 13/16] hvmloader: Load ACPI tables from hvm_start_info module Anthony PERARD
2016-03-01 16:17   ` Jan Beulich
2016-03-03 17:59     ` Anthony PERARD
2016-03-04  8:39       ` Jan Beulich
2016-03-08 11:15         ` Anthony PERARD
2016-02-25 14:56 ` [PATCH v3 14/16] hvmloader: Compile out the qemu-xen ACPI tables Anthony PERARD
2016-03-01 16:19   ` Jan Beulich
2016-02-25 14:56 ` [PATCH v3 15/16] hvmloader: Always build-in SeaBIOS and OVMF loader Anthony PERARD
2016-03-01 16:20   ` Jan Beulich
2016-02-25 14:56 ` [PATCH v3 16/16] hvmloader: do not depend on SEABIOS_PATH or OVMF_PATH Anthony PERARD
2016-03-01 16:24   ` Jan Beulich
2016-03-03 11:38   ` Wei Liu
2016-02-25 16:16 ` [PATCH v3 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Boris Ostrovsky
2016-02-25 16:43   ` Anthony PERARD
2016-03-03 18:03 ` Anthony PERARD
2016-03-04 10:57   ` Andrew Cooper
2016-03-08 11:21     ` Anthony PERARD

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=56D86796.8050605@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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.