Skip to contentSkip to conversation

x86: Mark APR as reserved in x2APIC

PATCH Applied Nadav Amit 4 participants 8 messages Jun 25, 2019 – Jul 2, 2019 KVM

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH 1/1 x86: Mark APR as reserved in x2APIC

---
 lib/x86/apic.h | 1 +
 1 file changed, 1 insertion(+)
lib/x86/apic.h +1 -0
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
 	switch (reg) {
 	case 0x000 ... 0x010:
 	case 0x040 ... 0x070:
+	case 0x090:
 	case 0x0c0:
 	case 0x0e0:
 	case 0x290 ... 0x2e0:
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Nadav Amit
---
  lib/x86/apic.h | 1 +
  1 file changed, 1 insertion(+)
lib/x86/apic.h +0 -0
index 537fdfb..b5bf208 100644

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 7 lines
lib/x86/apic.h +1 -0
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
  	switch (reg) {
  	case 0x000 ... 0x010:
  	case 0x040 ... 0x070:
+	case 0x090:
  	case 0x0c0:
  	case 0x0e0:
  	case 0x290 ... 0x2e0:

 0x02f0 which is also reserved, is missing from the above list.

#2 lore raw
Quoted 9 lines · Krish Sadhukhan
Quoted 6 lines · Nadav Amit
---
  lib/x86/apic.h | 1 +
  1 file changed, 1 insertion(+)
Quoted 15 lines

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 12 lines
lib/x86/apic.h +1 -0
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
      switch (reg) {
      case 0x000 ... 0x010:
      case 0x040 ... 0x070:
+     case 0x090:
      case 0x0c0:
      case 0x0e0:
      case 0x290 ... 0x2e0:

0x02f0 which is also reserved, is missing from the above list.

0x02f0 is "LVT CMCI register", right?

#3 lore raw
Quoted 24 lines · Marc Orr
Quoted 8 lines · Krish Sadhukhan
Quoted 6 lines · Nadav Amit
---
   lib/x86/apic.h | 1 +
   1 file changed, 1 insertion(+)
Quoted 14 lines

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 12 lines
lib/x86/apic.h +1 -0
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
       switch (reg) {
       case 0x000 ... 0x010:
       case 0x040 ... 0x070:
+     case 0x090:
       case 0x0c0:
       case 0x0e0:
       case 0x290 ... 0x2e0:

0x02f0 which is also reserved, is missing from the above list.

Quoted 1 line

0x02f0 is "LVT CMCI register", right?

That's right.

author
#4 lore raw
In reply to Krish Sadhukhan
Quoted 10 lines · Krish Sadhukhan
Quoted 6 lines · Nadav Amit
---
 lib/x86/apic.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 12 lines
lib/x86/apic.h +1 -0
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
 	switch (reg) {
 	case 0x000 ... 0x010:
 	case 0x040 ... 0x070:
+	case 0x090:
 	case 0x0c0:
 	case 0x0e0:
 	case 0x290 ... 0x2e0:

0x02f0 which is also reserved, is missing from the above list.

I tried adding it, and I get on bare-metal:

FAIL: x2apic - reading 0x2f0: x2APIC op triggered GP.

And actually, the SDM table 10-6 “Local APIC Register Address Map Supported by x2APIC” also shows this register (LVT CMCI) as "Read/write”. So I don’t know why you say it is reserved.

Reviewed-by
#5 lore raw
Quoted 24 lines · Nadav Amit
Quoted 10 lines · Krish Sadhukhan
Quoted 6 lines · Nadav Amit
---
  lib/x86/apic.h | 1 +
  1 file changed, 1 insertion(+)
Quoted 14 lines

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 12 lines
lib/x86/apic.h +1 -0
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
  	switch (reg) {
  	case 0x000 ... 0x010:
  	case 0x040 ... 0x070:
+	case 0x090:
  	case 0x0c0:
  	case 0x0e0:
  	case 0x290 ... 0x2e0:

0x02f0 which is also reserved, is missing from the above list.

Quoted 8 lines

I tried adding it, and I get on bare-metal:

   FAIL: x2apic - reading 0x2f0: x2APIC op triggered GP.

And actually, the SDM table 10-6 “Local APIC Register Address Map Supported by x2APIC” also shows this register (LVT CMCI) as "Read/write”. So I don’t know why you say it is reserved.

Sorry, my bad !  I was looking at an older version (318148) of the SDM in which it was showing as reserved.

We are good.

Reviewed-by on v1 1/1
#6 lore raw
In reply to Nadav Amit
Quoted 20 lines · Nadav Amit
---
 lib/x86/apic.h | 1 +
 1 file changed, 1 insertion(+)
lib/x86/apic.h +1 -1
index 537fdfb..b5bf208 100644
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
        switch (reg) {
        case 0x000 ... 0x010:
        case 0x040 ... 0x070:
+       case 0x090:
        case 0x0c0:
        case 0x0e0:
        case 0x290 ... 0x2e0:
--
Quoted 2 lines

2.17.1

maintainer Applied
#7 lore raw
In reply to Nadav Amit
Quoted 12 lines · Nadav Amit
---
 lib/x86/apic.h | 1 +
 1 file changed, 1 insertion(+)
lib/x86/apic.h +0 -0
index 537fdfb..b5bf208 100644

lib/x86/apic.h static inline bool x2apic_reg_reserved(u32 reg) · line 81

Quoted 7 lines
lib/x86/apic.h +1 -0
@@ -75,6 +75,7 @@ static inline bool x2apic_reg_reserved(u32 reg)
 	switch (reg) {
 	case 0x000 ... 0x010:
 	case 0x040 ... 0x070:
+	case 0x090:
 	case 0x0c0:
 	case 0x0e0:
 	case 0x290 ... 0x2e0:

Queued, thanks.

Paolo