All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Wei Liu" <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 5/9] x86: relocate pvh_info
Date: Fri, 19 Jan 2018 04:48:07 -0700	[thread overview]
Message-ID: <5A61E90702000078001A0562@prv-mh.provo.novell.com> (raw)
In-Reply-To: <20180119105353.urn7doxvyir27l46@MacBook-Pro-de-Roger.local>

>>> On 19.01.18 at 11:53, <roger.pau@citrix.com> wrote:
> On Thu, Jan 18, 2018 at 06:16:48PM +0000, Wei Liu wrote:
>> diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
>> index 0f652cea11..2f94c286d5 100644
>> --- a/xen/arch/x86/boot/head.S
>> +++ b/xen/arch/x86/boot/head.S
>> @@ -414,6 +414,7 @@ __pvh_start:
>>  
>>          /* Set trampoline_phys to use mfn 1 to avoid having a mapping at VA 
> 0 */
>>          movw    $0x1000, sym_esi(trampoline_phys)
>> +        xor     %eax, %eax /* Needed by reloc.c */
> 
> I would rather do:
> 
> movl $XEN_HVM_START_MAGIC_VALUE,%eax
> 
> Or:
> 
> mov (%ebx),%eax
> 
> So that...
> 
>> -multiboot_info_t __stdcall *reloc(u32 mb_magic, u32 mbi_in, u32 trampoline)
>> +void __stdcall *reloc(u32 magic, u32 in, u32 trampoline)
>>  {
>>      alloc = trampoline;
>>  
>> -    if ( mb_magic == MULTIBOOT2_BOOTLOADER_MAGIC )
>> -        return mbi2_reloc(mbi_in);
>> +#ifdef CONFIG_PVH_GUEST
>> +    if ( magic == 0 )
> 
> ... here you can do magic == XEN_HVM_START_MAGIC_VALUE.
> 
>> +        return pvh_info_reloc(in);
>> +    else
>> +#endif
>> +    if ( magic == MULTIBOOT2_BOOTLOADER_MAGIC )
>> +        return mbi2_reloc(in);
>>      else
>> -        return mbi_reloc(mbi_in);
>> +        return mbi_reloc(in);
> 
> A 'switch ( magic )' would be better here IMHO.

Ah, indeed, that's better.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-01-19 11:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 18:16 [PATCH 0/9] Fix and improvements to pvshim Wei Liu
2018-01-18 18:16 ` [PATCH 1/9] Update shim.config Wei Liu
2018-01-18 18:26   ` Andrew Cooper
2018-01-18 18:28     ` Wei Liu
2018-01-18 18:30       ` Andrew Cooper
2018-01-19 10:16         ` Roger Pau Monné
2018-01-18 18:16 ` [PATCH 2/9] libxl: remove whitespaces introduced in 62982da926 Wei Liu
2018-01-19 10:18   ` Roger Pau Monné
2018-01-18 18:16 ` [PATCH 3/9] x86/guest: clean up guest/xen.h Wei Liu
2018-01-18 18:26   ` Andrew Cooper
2018-01-19 10:21   ` Roger Pau Monné
2018-01-19 12:22     ` Wei Liu
2018-01-19 12:29       ` Roger Pau Monné
2018-01-19 12:34         ` Wei Liu
2018-01-18 18:16 ` [PATCH 4/9] Remove sched=null from shim cmdline and doc Wei Liu
2018-01-18 18:27   ` Andrew Cooper
2018-01-19 10:28   ` Roger Pau Monné
2018-01-19 11:40     ` Wei Liu
2018-01-18 18:16 ` [PATCH 5/9] x86: relocate pvh_info Wei Liu
2018-01-19 10:07   ` Jan Beulich
2018-01-19 10:10   ` Andrew Cooper
2018-01-19 10:20     ` Jan Beulich
2018-01-19 10:53   ` Roger Pau Monné
2018-01-19 11:48     ` Jan Beulich [this message]
2018-01-18 18:16 ` [PATCH 6/9] Revert "x86/boot: Map more than the first 16MB" Wei Liu
2018-01-19 10:07   ` Jan Beulich
2018-01-18 18:16 ` [PATCH 7/9] libxl: lower shim related message to level info Wei Liu
2018-01-19 10:57   ` Roger Pau Monné
2018-01-18 18:16 ` [PATCH 8/9] xen/consoled: discard NUL from guest Wei Liu
2018-01-19 11:03   ` Roger Pau Monné
2018-01-19 15:25     ` Wei Liu
2018-01-18 18:16 ` [PATCH 9/9] x86/shim: pass through vcpu runstate to L0 Xen Wei Liu
2018-01-19 11:18   ` Roger Pau Monné
2018-01-19 15:18     ` Wei Liu

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=5A61E90702000078001A0562@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@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.