From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: jgross@suse.com, keir@xen.org, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, ross.philipson@citrix.com,
roy.franz@linaro.org, ning.sun@intel.com, jbeulich@suse.com,
xen-devel@lists.xenproject.org, qiaowei.ren@intel.com,
richard.l.maliszewski@intel.com, gang.wei@intel.com,
fu.wei@linaro.org
Subject: Re: [PATCH for-xen-4.5 v3 04/16] x86: Introduce MultiBoot Data (MBD) type
Date: Mon, 13 Oct 2014 11:21:46 +0100 [thread overview]
Message-ID: <543BA7BA.6080804@citrix.com> (raw)
In-Reply-To: <20141010114701.GN3460@olila.local.net-space.pl>
On 10/10/14 12:47, Daniel Kiper wrote:
>
>>> + : "+D" (s), "+c" (bytes) : "a" (0));
>>> +}
>>> +
>>> static u32 copy_struct(u32 src, u32 bytes)
>>> {
>>> u32 dst, dst_asm;
>>> @@ -77,41 +87,56 @@ static u32 copy_string(u32 src)
>>> return copy_struct(src, p - (char *)src + 1);
>>> }
>>>
>>> -multiboot_info_t *reloc(multiboot_info_t *mbi_old)
>>> +static mbd_t *mb_mbd(mbd_t *mbd, multiboot_info_t *mbi)
>>> {
>>> - multiboot_info_t *mbi = (multiboot_info_t *)copy_struct((u32)mbi_old, sizeof(*mbi));
>>> - int i;
>>> + boot_module_t *mbd_mods;
>>> + module_t *mbi_mods;
>>> + u32 i;
>>> +
>>> + if ( mbi->flags & MBI_LOADERNAME )
>>> + mbd->boot_loader_name = copy_string(mbi->boot_loader_name);
>>>
>>> if ( mbi->flags & MBI_CMDLINE )
>>> - mbi->cmdline = copy_string(mbi->cmdline);
>>> + mbd->cmdline = copy_string(mbi->cmdline);
>>> +
>>> + if ( mbi->flags & MBI_MEMLIMITS )
>>> + {
>>> + mbd->mem_lower = mbi->mem_lower;
>>> + mbd->mem_upper = mbi->mem_upper;
>>> + }
>> Now I am completely confused. here you set mbd from mbi, but lower in
>> init_mbi, you set mbi from mbd. What is the intended dataflow?
> We need mbi together with boot_info to make smooth transition from mbi
> to boot_info possible. Patch #10 completely removes mbi from Xen main code.
> I mentioned about that in commit message.
That is perhaps all well and fine, but my initial point still stands.
In this patch alone, you set mbd here from mbi, but later in
__init_mbi(), initialise mbi from mbd.
I can't spot anywhere else which initialises either of the structures
with values, so I can only assume they are both 0's (or even
uninitialised) all the way through the boot process.
~Andrew
next prev parent reply other threads:[~2014-10-13 10:21 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 17:52 [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 01/16] x86/boot/reloc: Remove redundant blank characters and reformat comments a bit Daniel Kiper
2014-10-09 9:26 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 02/16] x86/boot/reloc: Move typedef and include to beginning of file Daniel Kiper
2014-10-09 9:40 ` Andrew Cooper
2014-10-10 8:50 ` Jan Beulich
2014-10-10 13:17 ` Daniel Kiper
2014-10-10 13:33 ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 03/16] x86/boot/reloc: Create generic alloc and copy functions Daniel Kiper
2014-10-09 9:45 ` Andrew Cooper
2014-10-13 15:00 ` Daniel Kiper
2014-10-13 15:02 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 04/16] x86: Introduce MultiBoot Data (MBD) type Daniel Kiper
2014-10-09 10:28 ` Andrew Cooper
2014-10-10 11:47 ` Daniel Kiper
2014-10-10 12:48 ` Jan Beulich
2014-10-13 10:21 ` Andrew Cooper [this message]
2014-10-13 15:14 ` Daniel Kiper
2014-10-14 15:27 ` Jan Beulich
2014-10-14 16:03 ` Daniel Kiper
2014-10-14 16:26 ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 05/16] x86/efi: Add place_string_u32() function Daniel Kiper
2014-10-09 10:30 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 06/16] x86: Introduce boot_info structure Daniel Kiper
2014-10-09 10:48 ` Andrew Cooper
2014-10-10 13:55 ` Stefano Stabellini
2014-10-10 20:44 ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 07/16] x86: Move boot_loader_name from mbi to boot_info Daniel Kiper
2014-10-09 10:53 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 08/16] x86: Move cmdline " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 09/16] x86: Move legacy BIOS memory map stuff " Daniel Kiper
2014-10-10 14:02 ` Stefano Stabellini
2014-10-10 20:26 ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 10/16] x86: Move modules data from mbi to boot_info and remove mbi Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 11/16] x86: Move EFI memory map stuff to boot_info Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 12/16] x86: Move MPS, ACPI and SMBIOS data " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 13/16] x86: Move video " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 14/16] x86: Move HDD " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 15/16] x86/boot: Use %ecx instead of %eax Daniel Kiper
2014-10-09 11:02 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 16/16] xen/x86: Add multiboot2 protocol support Daniel Kiper
2014-10-09 11:20 ` Andrew Cooper
2014-10-10 8:21 ` Jan Beulich
2014-10-10 8:23 ` [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Jan Beulich
2014-10-10 11:07 ` Daniel Kiper
2014-10-10 12:25 ` Jan Beulich
2014-10-10 13:03 ` Daniel Kiper
2014-10-16 8:13 ` Jan Beulich
2014-10-16 12:58 ` Daniel Kiper
2014-10-16 13:41 ` Jan Beulich
2014-10-16 15:33 ` Daniel Kiper
2014-10-16 15:42 ` Jan Beulich
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=543BA7BA.6080804@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=daniel.kiper@oracle.com \
--cc=fu.wei@linaro.org \
--cc=gang.wei@intel.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=keir@xen.org \
--cc=ning.sun@intel.com \
--cc=qiaowei.ren@intel.com \
--cc=richard.l.maliszewski@intel.com \
--cc=ross.philipson@citrix.com \
--cc=roy.franz@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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.