[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH]: PVH: specify xen features strings cleany for PVH



>>> On 23.01.13 at 23:43, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> On Wed, 23 Jan 2013 08:22:47 +0000
> "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
> 
>> >>> On 23.01.13 at 00:12, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>> >>> wrote:
>> > On Mon, 21 Jan 2013 12:06:42 +0000
>> > "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>> > 
>> > So, I think what I proposed earlier is the cleanest. Alternately:
>> > 
>> > #ifdef CONFIG_XEN_X86_PVH
>> > 
>> > #define PVH_FEATURES_STR  
>> > 
> "|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|h
>> > vm_callback_vector\0"
>> > 
>> > #else
>> > #define PVH_FEATURES_STR "\0"
>> > #endif
>> > 
>> > Then:
>> >         ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .ascii 
>> > "!writable_page_tables|pae_pgdir_above_4gb"PVH_FEATURES_STR);
>> > 
>> 
>> ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .ascii
>> "!writable_page_tables|pae_pgdir_above_4gb"; .asciz PVH_FEATURES_STR);
> 
> Not that different from what I have above since PVH_FEATURES_STR still
> has to be defined as null string for non PVH case. Anyways, below is
> the latest patch. Konard, kindly apply if Jan is OK.
> 
> Thanks,
> Mukesh
> 
> 
> PVH: Use .ascii and .asciz to define xen feature string. Note, the PVH
> string must be in a single line (not multiple lines with \) to keep the
> assembler from putting null char after each string before \.

This looks to be an incremental patch on top of something I
don't think I've seen - there's neither an embedded \0 nor any
redundancy being removed here, yet I'm sure that was so in the
prior patch, and these two were what I disliked most. So perhaps
sending out the original patch this one goes on top of was simply
never done?

Jan

> Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
> 
> diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
> index 1a6bca1..45226cb 100644
> --- a/arch/x86/xen/xen-head.S
> +++ b/arch/x86/xen/xen-head.S
> @@ -14,12 +14,11 @@
>  #include <asm/xen/interface.h>
>  
>  #ifdef CONFIG_XEN_X86_PVH
> -#define FEATURES_PVH "|writable_descriptor_tables" \
> -                  "|auto_translated_physmap" \
> -                  "|supervisor_mode_kernel" \
> -                  "|hvm_callback_vector"
> +
> +#define PVH_FEATURES_STR  
> "|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|h
> vm_callback_vector"
> +
>  #else
> -#define FEATURES_PVH /* Not supported */
> +#define PVH_FEATURES_STR  ""
>  #endif
>  
>       __INIT
> @@ -104,7 +103,7 @@ NEXT_HYPERCALL(arch_6)
>  #endif
>       ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          _ASM_PTR startup_xen)
>       ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
> -     ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz 
> "!writable_page_tables|pae_pgdir_above_4gb"FEATURES_PVH)
> +        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .ascii 
> "!writable_page_tables|pae_pgdir_above_4gb"; .asciz PVH_FEATURES_STR);
>       ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
>       ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
>       ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,




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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.