Skip to content

Commit 9b6b6ec

Browse files
committed
one more pass at aligning RFD 314, what we currently expose, and the platform as defined in Nexus
1 parent 33956f9 commit 9b6b6ec

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

nexus/src/app/instance_platform.rs

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -536,16 +536,19 @@ fn cpuid_from_vmm_cpu_platform(
536536
cpuid_leaf!(0x0, 0x0000000D, 0x68747541, 0x444D4163, 0x69746E65),
537537
cpuid_leaf!(0x1, 0x00A00F11, 0x00000800, 0xF6F83203, 0x078BFBFF),
538538
cpuid_leaf!(0x5, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
539-
cpuid_leaf!(0x6, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
539+
cpuid_leaf!(0x6, 0x00000004, 0x00000000, 0x00000000, 0x00000000),
540540
cpuid_subleaf!(
541-
0x7, 0x0, 0x00000000, 0x219C03A9, 0x00000000, 0x00000000
541+
0x7, 0x0, 0x00000000, 0x219803A9, 0x00000600, 0x00000000
542542
),
543543
cpuid_subleaf!(
544544
0xB, 0x0, 0x00000001, 0x00000002, 0x00000100, 0x00000000
545545
),
546546
cpuid_subleaf!(
547547
0xB, 0x1, 0x00000000, 0x00000000, 0x00000201, 0x00000000
548548
),
549+
cpuid_subleaf!(
550+
0xB, 0x2, 0x00000000, 0x00000000, 0x00000002, 0x00000000
551+
),
549552
cpuid_subleaf!(
550553
0xD, 0x0, 0x00000007, 0x00000340, 0x00000340, 0x00000000
551554
),
@@ -556,16 +559,24 @@ fn cpuid_from_vmm_cpu_platform(
556559
0xD, 0x2, 0x00000100, 0x00000240, 0x00000000, 0x00000000
557560
),
558561
cpuid_leaf!(0x80000000, 0x80000021, 0x68747541, 0x444D4163, 0x69746E65),
559-
cpuid_leaf!(0x80000001, 0x00A00F11, 0x40000000, 0x444001F0, 0x27D3FBFF),
560-
cpuid_leaf!(0x80000002, 0x73736F72, 0x726F6365, 0x31332050, 0x43203737),
561-
cpuid_leaf!(0x80000003, 0x20455059, 0x00414D44, 0x00000000, 0x00000000),
562-
cpuid_leaf!(0x80000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
562+
// ecx bit 23 should be flipped true at some point, but is currently
563+
// hidden and will continue to be for the moment.
564+
// ecx bit 3 should be masked, but is is not and advertises support for
565+
// unsupported extensions to LAPIC space.
566+
//
567+
// RFD 314 talks about these bits more, but we currently allow them to
568+
// be wrong as they have been wrong before and we'll get to them
569+
// individually later.
570+
cpuid_leaf!(0x80000001, 0x00A00F11, 0x40000000, 0x444001F1, 0x27D3FBFF),
571+
cpuid_leaf!(0x80000002, 0x20444D41, 0x43595045, 0x31373720, 0x36205033),
572+
cpuid_leaf!(0x80000003, 0x6F432D34, 0x50206572, 0x65636F72, 0x726F7373),
573+
cpuid_leaf!(0x80000004, 0x20202020, 0x20202020, 0x20202020, 0x00202020),
563574
cpuid_leaf!(0x80000005, 0xFF40FF40, 0xFF40FF40, 0x20080140, 0x20080140),
564-
cpuid_leaf!(0x80000006, 0x08002200, 0x68004200, 0x02006140, 0x01009140),
575+
cpuid_leaf!(0x80000006, 0x48002200, 0x68004200, 0x02006140, 0x08009140),
565576
cpuid_leaf!(0x80000007, 0x00000000, 0x00000000, 0x00000000, 0x00000100),
566-
cpuid_leaf!(0x80000008, 0x00003030, 0x111ED205, 0x00000000, 0x00000000),
577+
cpuid_leaf!(0x80000008, 0x00003030, 0x00000205, 0x00000000, 0x00000000),
567578
cpuid_leaf!(0x8000000A, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
568-
cpuid_leaf!(0x80000019, 0xF040F040, 0xF040F040, 0x00000000, 0x00000000),
579+
cpuid_leaf!(0x80000019, 0xF040F040, 0xF0400000, 0x00000000, 0x00000000),
569580
cpuid_leaf!(0x8000001A, 0x00000006, 0x00000000, 0x00000000, 0x00000000),
570581
cpuid_leaf!(0x8000001B, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
571582
cpuid_leaf!(0x8000001C, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
@@ -581,12 +592,9 @@ fn cpuid_from_vmm_cpu_platform(
581592
cpuid_subleaf!(
582593
0x8000001D, 0x3, 0x00000163, 0x03C0003F, 0x00007FFF, 0x00000001
583594
),
584-
cpuid_subleaf!(
585-
0x8000001D, 0x4, 0x00000000, 0x00000000, 0x00000000, 0x00000000
586-
),
587595
cpuid_leaf!(0x8000001E, 0x00000000, 0x00000100, 0x00000000, 0x00000000),
588596
cpuid_leaf!(0x8000001F, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
589-
cpuid_leaf!(0x80000021, 0x0000002D, 0x00000000, 0x00000000, 0x00000000),
597+
cpuid_leaf!(0x80000021, 0x00000045, 0x00000000, 0x00000000, 0x00000000),
590598
];
591599

592600
let cpuid = match platform {

0 commit comments

Comments
 (0)