From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH]: PVH: specify xen features strings cleany for PVH Date: Wed, 23 Jan 2013 08:22:47 +0000 Message-ID: <50FFABE702000078000B88E1@nat28.tlf.novell.com> References: <20130118173503.71de0603@mantra.us.oracle.com> <50FD3D6202000078000B7CE4@nat28.tlf.novell.com> <20130122151241.7ed034f4@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130122151241.7ed034f4@mantra.us.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: Konrad Rzeszutek Wilk , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 23.01.13 at 00:12, Mukesh Rathor wrote: > 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|h > vm_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|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); > > > Let me know what you prefer, whats right above, or what I had originally > last week. I can't figure any other way. I continue to think that the cleanest is to use something like ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .ascii "!writable_page_tables|pae_pgdir_above_4gb"; .asciz PVH_FEATURES_STR); Jan