Skip to contentSkip to conversation

pc: compat macroses fixes/cleanups

PATCH In review Igor Mammedov 3 participants 11 messages Sep 19, 2016 – Sep 27, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover pc: compat macroses fixes/cleanups

Changes since v1:
- drop 'pc: fix regression introduced by adding 2.8 machine' it's not needed
- cleanup old style compat chaining
- add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type

ref to v1:
https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03140.html

Igor Mammedov (3):
pc: clean up COMPAT macroses chaining
target-i386: turn off CPU.l3-cache only for 2.7 and older machine
types
add stub HW_COMPAT_2_8 to PC_COMPAT_2_8

 include/hw/compat.h  |  2 ++
 include/hw/i386/pc.h | 10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/3 pc: clean up COMPAT macroses chaining

Since commit
bacc344c ("machine: add properties to compat_props incrementaly")
there is no need to chain per machine type compat macroses.

Clean up places where it was done anyway so it will be consistent and won't confuse contributors during addtion of new machine types.

---
 include/hw/i386/pc.h | 2 --
 1 file changed, 2 deletions(-)
include/hw/i386/pc.h +0 -2
index ab8e319..b0a61f3 100644
@@ -375,7 +375,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
 
 #define PC_COMPAT_2_7 \
-    PC_COMPAT_2_8 \
     HW_COMPAT_2_7
 
 #define PC_COMPAT_2_6 \
@@ -405,7 +404,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
     },
 
 #define PC_COMPAT_2_5 \
-    PC_COMPAT_2_6 \
     HW_COMPAT_2_5
 
 /* Helper for setting model-id for CPU models that changed model-id
Signature · 1 line
2.7.4
Reviewed-by on v2 1/3
#2 lore raw

Re: [Qemu-devel] [PATCH v2 1/3] pc: clean up COMPAT macroses chaining

Quoted 9 lines · Igor Mammedov

Since commit
bacc344c ("machine: add properties to compat_props incrementaly")
there is no need to chain per machine type compat macroses.

Clean up places where it was done anyway so it will be consistent and won't confuse contributors during addtion of new machine types.

Signature · 1 line
Eduardo
#3 lore raw

PATCH v2 2/3 target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

In reply to Igor Mammedov

commit (14c985cff target-i386: present virtual L3 cache info for vcpus) misplaced compat property putting it in new 2.8 machine type which would effectively to disable feature until 2.9 is released. Intent of commit probably should be to disable feature for 2.7 and older while allowing not yet released 2.8 to have feature enabled by default.

---
 include/hw/i386/pc.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/hw/i386/pc.h +3 -4
index b0a61f3..29a6c9b 100644
@@ -367,16 +367,15 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
 #define PC_COMPAT_2_8 \
+
+#define PC_COMPAT_2_7 \
+    HW_COMPAT_2_7 \
     {\
         .driver   = TYPE_X86_CPU,\
         .property = "l3-cache",\
         .value    = "off",\
     },
 
-
-#define PC_COMPAT_2_7 \
-    HW_COMPAT_2_7
-
 #define PC_COMPAT_2_6 \
     HW_COMPAT_2_6 \
     {\
Signature · 1 line
2.7.4
#4 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

Quoted 18 lines · Igor Mammedov

commit (14c985cff target-i386: present virtual L3 cache info for vcpus) misplaced compat property putting it in new 2.8 machine type which would effectively to disable feature until 2.9 is released. Intent of commit probably should be to disable feature for 2.7 and older while allowing not yet released 2.8 to have feature enabled by default.

---
 include/hw/i386/pc.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/hw/i386/pc.h +0 -0
index b0a61f3..29a6c9b 100644

include/hw/i386/pc.h int e820_get_num_entries(void); · line 369

Quoted 3 lines
include/hw/i386/pc.h +0 -0
@@ -367,16 +367,15 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
 #define PC_COMPAT_2_8 \

PC_COMPAT_2_8 isn't even used by any code (and shouldn't be used until we release QEMU 2.8). Let's just delete it by now?

Quoted 19 lines
include/hw/i386/pc.h +3 -4
+
+#define PC_COMPAT_2_7 \
+    HW_COMPAT_2_7 \
     {\
         .driver   = TYPE_X86_CPU,\
         .property = "l3-cache",\
         .value    = "off",\
     },
 
-
-#define PC_COMPAT_2_7 \
-    HW_COMPAT_2_7
-
 #define PC_COMPAT_2_6 \
     HW_COMPAT_2_6 \
     {\
Signature · 1 line
2.7.4
Signature · 1 line
Eduardo
#5 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

Quoted 21 lines · Eduardo Habkost
Quoted 20 lines · Igor Mammedov

commit (14c985cff target-i386: present virtual L3 cache info for vcpus) misplaced compat property putting it in new 2.8 machine type which would effectively to disable feature until 2.9 is released. Intent of commit probably should be to disable feature for 2.7 and older while allowing not yet released 2.8 to have feature enabled by default.

---
 include/hw/i386/pc.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/hw/i386/pc.h +0 -0
index b0a61f3..29a6c9b 100644
@@ -367,16 +367,15 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
Quoted 4 lines

include/hw/i386/pc.h int e820_get_num_entries(void); · line 369

Quoted 1 line
include/hw/i386/pc.h +0 -0
 #define PC_COMPAT_2_8 \

PC_COMPAT_2_8 isn't even used by any code (and shouldn't be used until we release QEMU 2.8). Let's just delete it by now?

it's unrelated to this patch though.

Quoted 22 lines
Quoted 19 lines
include/hw/i386/pc.h +3 -4
+
+#define PC_COMPAT_2_7 \
+    HW_COMPAT_2_7 \
     {\
         .driver   = TYPE_X86_CPU,\
         .property = "l3-cache",\
         .value    = "off",\
     },
 
-
-#define PC_COMPAT_2_7 \
-    HW_COMPAT_2_7
-
 #define PC_COMPAT_2_6 \
     HW_COMPAT_2_6 \
     {\
Signature · 1 line
2.7.4
Signature · 1 line
Eduardo
#6 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

In reply to Eduardo Habkost
Quoted 21 lines · On Mon, 19 Sep 2016 13:58:48 -0300 Eduardo Habkost <[email protected]> wrote:
Quoted 20 lines · Igor Mammedov

commit (14c985cff target-i386: present virtual L3 cache info for vcpus) misplaced compat property putting it in new 2.8 machine type which would effectively to disable feature until 2.9 is released. Intent of commit probably should be to disable feature for 2.7 and older while allowing not yet released 2.8 to have feature enabled by default.

---
 include/hw/i386/pc.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/hw/i386/pc.h +0 -0
index b0a61f3..29a6c9b 100644
@@ -367,16 +367,15 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
Quoted 4 lines

include/hw/i386/pc.h int e820_get_num_entries(void); · line 369

Quoted 1 line
include/hw/i386/pc.h +0 -0
 #define PC_COMPAT_2_8 \  

PC_COMPAT_2_8 isn't even used by any code (and shouldn't be used until we release QEMU 2.8). Let's just delete it by now?

Since it's already there in the tree, I'd leave it there.

Quoted 21 lines
Quoted 20 lines
include/hw/i386/pc.h +3 -4
+
+#define PC_COMPAT_2_7 \
+    HW_COMPAT_2_7 \
     {\
         .driver   = TYPE_X86_CPU,\
         .property = "l3-cache",\
         .value    = "off",\
     },
 
-
-#define PC_COMPAT_2_7 \
-    HW_COMPAT_2_7
-
 #define PC_COMPAT_2_6 \
     HW_COMPAT_2_6 \
     {\
Signature · 1 line
2.7.4
Reviewed-by
#7 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] target-i386: turn off CPU.l3-cache only for 2.7 and older machine types

Quoted 24 lines · Igor Mammedov
Quoted 21 lines · On Mon, 19 Sep 2016 13:58:48 -0300 Eduardo Habkost <[email protected]> wrote:
Quoted 20 lines · Igor Mammedov

commit (14c985cff target-i386: present virtual L3 cache info for vcpus) misplaced compat property putting it in new 2.8 machine type which would effectively to disable feature until 2.9 is released. Intent of commit probably should be to disable feature for 2.7 and older while allowing not yet released 2.8 to have feature enabled by default.

---
 include/hw/i386/pc.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/hw/i386/pc.h +0 -0
index b0a61f3..29a6c9b 100644
@@ -367,16 +367,15 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
Quoted 5 lines
Quoted 4 lines

include/hw/i386/pc.h int e820_get_num_entries(void); · line 369

Quoted 1 line
include/hw/i386/pc.h +0 -0
 #define PC_COMPAT_2_8 \  

PC_COMPAT_2_8 isn't even used by any code (and shouldn't be used until we release QEMU 2.8). Let's just delete it by now?

Since it's already there in the tree, I'd leave it there.

I'd remove to avoid causing confusion during the 2.8 cycle. But as it is something independent from this patch:

Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
include/hw/i386/pc.h +3 -4
+
+#define PC_COMPAT_2_7 \
+    HW_COMPAT_2_7 \
     {\
         .driver   = TYPE_X86_CPU,\
         .property = "l3-cache",\
         .value    = "off",\
     },
 
-
-#define PC_COMPAT_2_7 \
-    HW_COMPAT_2_7
-
 #define PC_COMPAT_2_6 \
     HW_COMPAT_2_6 \
     {\
Signature · 1 line
2.7.4
Signature · 1 line
Eduardo
#8 lore raw

PATCH v2 3/3 add stub HW_COMPAT_2_8 to PC_COMPAT_2_8

In reply to Igor Mammedov
---
 include/hw/compat.h  | 2 ++
 include/hw/i386/pc.h | 1 +
 2 files changed, 3 insertions(+)
include/hw/compat.h +2 -0
index a1d6694..ddbb2c4 100644
@@ -1,6 +1,8 @@
 #ifndef HW_COMPAT_H
 #define HW_COMPAT_H
 
+#define HW_COMPAT_2_8 \
+
 #define HW_COMPAT_2_7 \
     {\
         .driver   = "virtio-pci",\
include/hw/i386/pc.h +1 -0
index 29a6c9b..012dc2c 100644
@@ -367,6 +367,7 @@ int e820_get_num_entries(void);
 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 
 #define PC_COMPAT_2_8 \
+    HW_COMPAT_2_8
 
 #define PC_COMPAT_2_7 \
     HW_COMPAT_2_7 \
Signature · 1 line
2.7.4
#9 lore raw
In reply to Igor Mammedov
Quoted 5 lines · On Mon, 19 Sep 2016 10:32:32 +0200 Igor Mammedov <[email protected]> wrote:

Changes since v1:
- drop 'pc: fix regression introduced by adding 2.8 machine' it's not needed
- cleanup old style compat chaining
- add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type

Eduardo could you take it through your tree?

Quoted 15 lines

ref to v1:
https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03140.html

Igor Mammedov (3):
pc: clean up COMPAT macroses chaining
target-i386: turn off CPU.l3-cache only for 2.7 and older machine
types
add stub HW_COMPAT_2_8 to PC_COMPAT_2_8

 include/hw/compat.h  |  2 ++
 include/hw/i386/pc.h | 10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
#10 lore raw
Quoted 10 lines · Igor Mammedov
Quoted 5 lines · On Mon, 19 Sep 2016 10:32:32 +0200 Igor Mammedov <[email protected]> wrote:

Changes since v1:
- drop 'pc: fix regression introduced by adding 2.8 machine' it's not needed
- cleanup old style compat chaining
- add missing HW_COMPAT_2_8 to PC_COMPAT_2_8 machine type

Eduardo could you take it through your tree?

I see it was already merged to master through Michael's tree. (Except for patch 3/3, which is not needed because we should delete PC_COMPAT_2_8).

Quoted 16 lines
Quoted 16 lines

ref to v1:
https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03140.html

Igor Mammedov (3):
pc: clean up COMPAT macroses chaining
target-i386: turn off CPU.l3-cache only for 2.7 and older machine
types
add stub HW_COMPAT_2_8 to PC_COMPAT_2_8

 include/hw/compat.h  |  2 ++
 include/hw/i386/pc.h | 10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
Eduardo