From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH]: PVH: specify xen features strings cleany for PVH Date: Wed, 23 Jan 2013 14:43:47 -0800 Message-ID: <20130123144347.78ba0a3f@mantra.us.oracle.com> References: <20130118173503.71de0603@mantra.us.oracle.com> <50FD3D6202000078000B7CE4@nat28.tlf.novell.com> <20130122151241.7ed034f4@mantra.us.oracle.com> <50FFABE702000078000B88E1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50FFABE702000078000B88E1@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Konrad Rzeszutek Wilk , xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 23 Jan 2013 08:22:47 +0000 "Jan Beulich" wrote: > >>> On 23.01.13 at 00:12, Mukesh Rathor > >>> wrote: > > On Mon, 21 Jan 2013 12:06:42 +0000 > > "Jan Beulich" 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 \. Signed-off-by: Mukesh Rathor 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 #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|hvm_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,