Skip to contentSkip to conversation

x86: reverse FW_CFG_MAX_ENTRY and FW_CFG_MAX_RAM

PATCH In review Nadav Amit 3 participants 4 messages Jul 11, 2020 – Jul 13, 2020 KVM

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH 1/1 x86: reverse FW_CFG_MAX_ENTRY and FW_CFG_MAX_RAM

FW_CFG_MAX_ENTRY should obviously be the last entry.

---
 lib/x86/fwcfg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/x86/fwcfg.h +2 -2
index 64d4c6e..8095d8a 100644
@@ -20,8 +20,8 @@
 #define FW_CFG_NUMA             0x0d
 #define FW_CFG_BOOT_MENU        0x0e
 #define FW_CFG_MAX_CPUS         0x0f
-#define FW_CFG_MAX_ENTRY        0x10
-#define FW_CFG_MAX_RAM		0x11
+#define FW_CFG_MAX_RAM		0x10
+#define FW_CFG_MAX_ENTRY        0x11
 
 #define FW_CFG_WRITE_CHANNEL    0x4000
 #define FW_CFG_ARCH_LOCAL       0x8000
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Nadav Amit

FW_CFG_MAX_ENTRY should obviously be the last entry.

---
 lib/x86/fwcfg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/x86/fwcfg.h +0 -0
index 64d4c6e..8095d8a 100644

lib/x86/fwcfg.h line 24

Quoted 7 lines
lib/x86/fwcfg.h +2 -2
@@ -20,8 +20,8 @@
 #define FW_CFG_NUMA             0x0d
 #define FW_CFG_BOOT_MENU        0x0e
 #define FW_CFG_MAX_CPUS         0x0f
-#define FW_CFG_MAX_ENTRY        0x10
-#define FW_CFG_MAX_RAM		0x11
+#define FW_CFG_MAX_RAM		0x10
+#define FW_CFG_MAX_ENTRY        0x11

That should hopefully also fix the problem with Clang that I've just seen:

https://gitlab.com/huth/kvm-unit-tests/-/jobs/635782173#L1372

author
#2 lore raw
Quoted 25 lines · Thomas Huth
Quoted 12 lines · Nadav Amit

FW_CFG_MAX_ENTRY should obviously be the last entry.

---
lib/x86/fwcfg.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
lib/x86/fwcfg.h +0 -0
index 64d4c6e..8095d8a 100644

lib/x86/fwcfg.h line 24

Quoted 7 lines
lib/x86/fwcfg.h +2 -2
@@ -20,8 +20,8 @@
 #define FW_CFG_NUMA             0x0d
 #define FW_CFG_BOOT_MENU        0x0e
 #define FW_CFG_MAX_CPUS         0x0f
-#define FW_CFG_MAX_ENTRY        0x10
-#define FW_CFG_MAX_RAM		0x11
+#define FW_CFG_MAX_RAM		0x10
+#define FW_CFG_MAX_ENTRY        0x11

That should hopefully also fix the problem with Clang that I've just seen:

Quoted 3 lines

https://gitlab.com/huth/kvm-unit-tests/-/jobs/635782173#L1372

Indeed. Sorry for that. It happened since I cut some corners due to the long cycles of rebooting and testing bare-metal machine (bad excuse).

Reviewed-by on v1 1/1
#3 lore raw
In reply to Nadav Amit
Quoted 12 lines · Nadav Amit

FW_CFG_MAX_ENTRY should obviously be the last entry.

---
  lib/x86/fwcfg.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
lib/x86/fwcfg.h +0 -0
index 64d4c6e..8095d8a 100644

lib/x86/fwcfg.h line 27

Quoted 10 lines
lib/x86/fwcfg.h +2 -2
@@ -20,8 +20,8 @@
  #define FW_CFG_NUMA             0x0d
  #define FW_CFG_BOOT_MENU        0x0e
  #define FW_CFG_MAX_CPUS         0x0f
-#define FW_CFG_MAX_ENTRY        0x10
-#define FW_CFG_MAX_RAM		0x11
+#define FW_CFG_MAX_RAM		0x10
+#define FW_CFG_MAX_ENTRY        0x11
 
  #define FW_CFG_WRITE_CHANNEL    0x4000
  #define FW_CFG_ARCH_LOCAL       0x8000