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: Tue, 22 Jan 2013 15:12:41 -0800 Message-ID: <20130122151241.7ed034f4@mantra.us.oracle.com> References: <20130118173503.71de0603@mantra.us.oracle.com> <50FD3D6202000078000B7CE4@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50FD3D6202000078000B7CE4@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 Mon, 21 Jan 2013 12:06:42 +0000 "Jan Beulich" wrote: > >>> On 19.01.13 at 02:35, Mukesh Rathor > >>> wrote: > > That's not really better. What I'd like you to do is keep the common > part common (i.e. not redundantly defined) and add the PVH-specific > bits (with what amounts to an empty string as the non-PVH > replacement) on top. Meaning you will likely want a mixture of > .ascii and .asciz. ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb"PVH_FEATURES_STR); Will put NULL char before PVH_FEATURES_STR, so we need: ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .ascii "!writable_page_tables|pae_pgdir_above_4gb"PVH_FEATURES_STR); This means PVH_FEATURES_STR has to be defined as: #define PVH_FEATURES_STR "|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector\0" because #define PVH_FEATURES_STR "|writable_descriptor_tables" \ "|auto_translated_physmap" ..... will put null char after writable_descriptor_tables. Putting .ascii above will not work either with concatenation later. 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|hvm_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); Let me know what you prefer, whats right above, or what I had originally last week. I can't figure any other way. Thanks, Mukesh