x86/amd: Initial support for Fam19h processors
PATCH 1/1 x86/amd: Initial support for Fam19h processors
Fam19h is very similar to Fam17h in these regards.
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
--- xen/arch/x86/acpi/cpu_idle.c | 1 + xen/arch/x86/cpu/microcode/amd.c | 1 + xen/arch/x86/cpu/vpmu_amd.c | 1 + xen/arch/x86/nmi.c | 2 +- xen/arch/x86/traps.c | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-)
xen/arch/x86/acpi/cpu_idle.c +1 -0
@@ -1356,6 +1356,7 @@ static void amd_cpuidle_init(struct acpi_processor_power *power)switch ( c->x86 ) { +case 0x19 :case 0x18 :if ( boot_cpu_data.x86_vendor !=X86_VENDOR_HYGON ) {
xen/arch/x86/cpu/microcode/amd.c +1 -0
@@ -125,6 +125,7 @@ static bool_t verify_patch_size(uint32_t patch_size) max_size =F16H_MPB_MAX_SIZE ;break ;case 0x17 : +case 0x19 : max_size =F17H_MPB_MAX_SIZE ;break ;default :
xen/arch/x86/cpu/vpmu_amd.c +1 -0
@@ -576,6 +576,7 @@ int __init amd_vpmu_init(void) {case 0x15 :case 0x17 : +case 0x19 : num_counters =F15H_NUM_COUNTERS ; counters =AMD_F15H_COUNTERS ; ctrls =AMD_F15H_CTRLS ;
xen/arch/x86/nmi.c +1 -1
@@ -398,7 +398,7 @@ void setup_apic_nmi_watchdog(void)case X86_VENDOR_AMD :switch (boot_cpu_data.x86) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:setup_k7_watchdog ();break ;default :
xen/arch/x86/traps.c +1 -1
@@ -1939,7 +1939,7 @@ static unsigned int calc_ler_msr(void)switch ( boot_cpu_data.x86 ) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:return MSR_IA32_LASTINTFROMIP ; }break ;
Signature · 1 line
2.11.0
Quoted 18 lines · Andrew Cooper
xen/arch/x86/nmi.c +1
-1@@ -398,7 +398,7 @@ void setup_apic_nmi_watchdog(void)case X86_VENDOR_AMD :switch (boot_cpu_data.x86) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:setup_k7_watchdog ();break ;default :xen/arch/x86/traps.c +0
-0
xen/arch/x86/traps.c static unsigned int calc_ler_msr(void) · line 1943
Quoted 6 lines
xen/arch/x86/traps.c +1
-1@@ -1939,7 +1939,7 @@ static unsigned int calc_ler_msr(void)switch ( boot_cpu_data.x86 ) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:return MSR_IA32_LASTINTFROMIP ;
You seem to also add support for Fam18h here and in the chunk above, is this intentional?
Thanks, Roger.
Quoted 19 lines · Roger Pau Monné
Quoted 18 lines · Andrew Cooper
xen/arch/x86/nmi.c +1
-1@@ -398,7 +398,7 @@ void setup_apic_nmi_watchdog(void)case X86_VENDOR_AMD :switch (boot_cpu_data.x86) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:setup_k7_watchdog ();break ;default :xen/arch/x86/traps.c +0
-0@@ -1939,7 +1939,7 @@ static unsigned int calc_ler_msr(void)
Quoted 8 lines
xen/arch/x86/traps.c static unsigned int calc_ler_msr(void) · line 1943
Quoted 6 lines
xen/arch/x86/traps.c +1
-1switch ( boot_cpu_data.x86 ) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:return MSR_IA32_LASTINTFROMIP ;You seem to also add support for Fam18h here and in the chunk above, is this intentional?
Yes. Honestly, these details have never changed since the K7. I'm tempted to drop the family logic entirely.
~Andrew
Roger Pau Monné
Reviewed-byQuoted 29 lines · Andrew Cooper
Quoted 19 lines · Roger Pau Monné
Quoted 18 lines · Andrew Cooper
xen/arch/x86/nmi.c +1
-1@@ -398,7 +398,7 @@ void setup_apic_nmi_watchdog(void)case X86_VENDOR_AMD :switch (boot_cpu_data.x86) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:setup_k7_watchdog ();break ;default :xen/arch/x86/traps.c +0
-0@@ -1939,7 +1939,7 @@ static unsigned int calc_ler_msr(void)Quoted 8 lines
xen/arch/x86/traps.c static unsigned int calc_ler_msr(void) · line 1943
Quoted 6 lines
xen/arch/x86/traps.c +1
-1switch ( boot_cpu_data.x86 ) {case 6 : - case 0xf ... 0x17: + case 0xf ... 0x19:return MSR_IA32_LASTINTFROMIP ;You seem to also add support for Fam18h here and in the chunk above, is this intentional?
Quoted 2 lines
Yes. Honestly, these details have never changed since the K7. I'm tempted to drop the family logic entirely.
Ack, just wanted to be sure the changes where intentional:
Re dropping the logic - as you wish.
Thanks, Roger.
Quoted 3 lines · Andrew Cooper
Fam19h is very similar to Fam17h in these regards.
Signed-off-by Andrew Cooper <[email protected]>
Nevertheless a question:
xen/arch/x86/cpu/microcode/amd.c static bool_t verify_patch_size(uint32_t patch_size) · line 130
Quoted 9 lines
xen/arch/x86/cpu/microcode/amd.c +1
-0@@ -125,6 +125,7 @@ static bool_t verify_patch_size(uint32_t patch_size) max_size =F16H_MPB_MAX_SIZE ;break ;case 0x17 : +case 0x19 : max_size =F17H_MPB_MAX_SIZE ;break ;
Didn't you indicate to me the other day that the upper bound would grow?
Jan
Quoted 5 lines · Jan Beulich
Quoted 3 lines · Andrew Cooper
Fam19h is very similar to Fam17h in these regards.
Signed-off-by Andrew Cooper <[email protected]>Reviewed-by Jan Beulich <[email protected]>
Thanks.
Quoted 14 lines
Nevertheless a question:
xen/arch/x86/cpu/microcode/amd.c static bool_t verify_patch_size(uint32_t patch_size) · line 130
Quoted 9 lines
xen/arch/x86/cpu/microcode/amd.c +1
-0@@ -125,6 +125,7 @@ static bool_t verify_patch_size(uint32_t patch_size) max_size =F16H_MPB_MAX_SIZE ;break ;case 0x17 : +case 0x19 : max_size =F17H_MPB_MAX_SIZE ;break ;Didn't you indicate to me the other day that the upper bound would grow?
That was a very non-specific patch to Linux. I've asked around, and the answer seems to be 4800.
Are you happy for your review to stand with adding a new F19H_MPB_MAX_SIZE define to this effect?
~Andrew
Quoted 14 lines · Andrew Cooper
Quoted 12 lines · Jan Beulich
xen/arch/x86/cpu/microcode/amd.c static bool_t verify_patch_size(uint32_t patch_size) · line 130
Quoted 9 lines · Andrew Cooper
xen/arch/x86/cpu/microcode/amd.c +1
-0@@ -125,6 +125,7 @@ static bool_t verify_patch_size(uint32_t patch_size) max_size =F16H_MPB_MAX_SIZE ;break ;case 0x17 : +case 0x19 : max_size =F17H_MPB_MAX_SIZE ;break ;Didn't you indicate to me the other day that the upper bound would grow?
Quoted 5 lines
That was a very non-specific patch to Linux. I've asked around, and the answer seems to be 4800.
Are you happy for your review to stand with adding a new
F19H_MPB_MAX_SIZEdefine to this effect?
Yes.
Jan