Windows Server 2008 checked build complains about lack of consistency between MTRR MSRs in SMP guests.
Problem is the smp_mtrr array is not large enough to hold all MSRs (31 entries with current qemu/kvm implementations).
Increase it to 32.
Signed-off-by: Marcelo Tosatti mtosatti@redhat.com
diff --git a/src/smp.c b/src/smp.c index 40f5451..2317d36 100644 --- a/src/smp.c +++ b/src/smp.c @@ -17,7 +17,7 @@
#define APIC_ENABLED 0x0100
-struct { u32 ecx, eax, edx; } smp_mtrr[16] VAR16VISIBLE; +struct { u32 ecx, eax, edx; } smp_mtrr[32] VAR16VISIBLE; u32 smp_mtrr_count VAR16VISIBLE;
void
On Fri, Jul 29, 2011 at 07:40:51PM -0300, Marcelo Tosatti wrote:
Windows Server 2008 checked build complains about lack of consistency between MTRR MSRs in SMP guests.
Problem is the smp_mtrr array is not large enough to hold all MSRs (31 entries with current qemu/kvm implementations).
Increase it to 32.
Thanks. I applied your patch and the patch below as well.
-Kevin
diff --git a/src/smp.c b/src/smp.c index 2317d36..8c077a1 100644 --- a/src/smp.c +++ b/src/smp.c @@ -24,8 +24,10 @@ void wrmsr_smp(u32 index, u64 val) { wrmsr(index, val); - if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr)) + if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr)) { + warn_noalloc(); return; + } smp_mtrr[smp_mtrr_count].ecx = index; smp_mtrr[smp_mtrr_count].eax = val; smp_mtrr[smp_mtrr_count].edx = val >> 32;