Skip to contentSkip to conversation

: PVH: remove FEATURES_PVH macro

PATCH In review Mukesh Rathor 3 participants 5 messages Nov 15, 2012 – Nov 27, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : PVH: remove FEATURES_PVH macro

PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file

---
 arch/x86/xen/xen-head.S |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/xen/xen-head.S +5 -9
index 1a6bca1..340fd4e 100644
@@ -13,14 +13,6 @@
 #include <xen/interface/elfnote.h>
 #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"
-#else
-#define FEATURES_PVH /* Not supported */
-#endif
 
 	__INIT
 ENTRY(startup_xen)
@@ -104,7 +96,11 @@ 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)
+#ifdef CONFIG_XEN_X86_PVH
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "!writable_page_tables|pae_pgdir_above_4gb|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector")
+#else
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "!writable_page_tables|pae_pgdir_above_4gb")
+#endif
 	ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
 	ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 	ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 41 lines
Quoted 1 line
Quoted 1 line · Mukesh Rathor

PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file

---
 arch/x86/xen/xen-head.S |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/xen/xen-head.S +2 -9
index 1a6bca1..340fd4e 100644
@@ -13,14 +13,6 @@
 #include <xen/interface/elfnote.h>
 #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"
-#else
-#define FEATURES_PVH /* Not supported */
-#endif
 
 	__INIT
 ENTRY(startup_xen)
@@ -104,7 +96,11 @@ 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)
+#ifdef CONFIG_XEN_X86_PVH
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz 

"!writable_page_tables|pae_pgdir_above_4gb|writable_descriptor_tables|auto_tr anslated_physmap|supervisor_mode_kernel|hvm_callback_vector")

arch/x86/xen/xen-head.S +2 -0
+#else
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz 
Quoted 2 lines

"!writable_page_tables|pae_pgdir_above_4gb")
+#endif

Ugly. Can't you do this with a combination of .ascii and .asciz, keeping the macro above?

Jan

Quoted 11 lines
arch/x86/xen/xen-head.S +0 -0
 	ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
 	ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 	ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
Signature · 7 lines
1.7.2.3


_______________________________________________
Xen-devel mailing list
[email protected] 
http://lists.xen.org/xen-devel 
#2 lore raw
In reply to Mukesh Rathor
Quoted 41 lines
Quoted 1 line
Quoted 1 line · Mukesh Rathor

PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file

---
 arch/x86/xen/xen-head.S |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/xen/xen-head.S +2 -9
index 1a6bca1..340fd4e 100644
@@ -13,14 +13,6 @@
 #include <xen/interface/elfnote.h>
 #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"
-#else
-#define FEATURES_PVH /* Not supported */
-#endif
 
 	__INIT
 ENTRY(startup_xen)
@@ -104,7 +96,11 @@ 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)
+#ifdef CONFIG_XEN_X86_PVH
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz 

"!writable_page_tables|pae_pgdir_above_4gb|writable_descriptor_tables|auto_tr anslated_physmap|supervisor_mode_kernel|hvm_callback_vector")

arch/x86/xen/xen-head.S +2 -0
+#else
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz 
Quoted 2 lines

"!writable_page_tables|pae_pgdir_above_4gb")
+#endif

Ugly. Can't you do this with a combination of .ascii and .asciz, keeping the macro above?

Jan

Quoted 11 lines
arch/x86/xen/xen-head.S +0 -0
 	ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
 	ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 	ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
Signature · 7 lines
1.7.2.3


_______________________________________________
Xen-devel mailing list
[email protected] 
http://lists.xen.org/xen-devel 
#3 lore raw
In reply to Mukesh Rathor
Quoted 1 line · Mukesh Rathor

PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file

ping? Jan had a comment about it to keep the #ifdef at the top and combine ascii and asiz?

http://lists.xen.org/archives/html/xen-devel/2012-11/msg00676.html

Quoted 40 lines
---
 arch/x86/xen/xen-head.S |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/xen/xen-head.S +5 -9
index 1a6bca1..340fd4e 100644
@@ -13,14 +13,6 @@
 #include <xen/interface/elfnote.h>
 #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"
-#else
-#define FEATURES_PVH /* Not supported */
-#endif
 
 	__INIT
 ENTRY(startup_xen)
@@ -104,7 +96,11 @@ 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)
+#ifdef CONFIG_XEN_X86_PVH
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "!writable_page_tables|pae_pgdir_above_4gb|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector")
+#else
+        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "!writable_page_tables|pae_pgdir_above_4gb")
+#endif
 	ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
 	ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 	ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
Signature · 1 line
1.7.2.3
#4 lore raw
Quoted 7 lines · On Mon, 26 Nov 2012 14:54:00 -0500 Konrad Rzeszutek Wilk…
Quoted 3 lines · Mukesh Rathor

PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file

ping? Jan had a comment about it to keep the #ifdef at the top and combine ascii and asiz?

Ok, if you'd like that too, I'll look into it. I need to RTFM.

thanks
Mukesh