Skip to contentSkip to conversation

tweak memory error correction field in the SMBIOS data

PATCH In review Paolo Bonzini 3 participants 9 messages Nov 24, 2009 – Nov 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tweak memory error correction field in the SMBIOS data

Microsoft's Windows logo certified hardware requires single- or multi-bit ECC; since the SVVP certification runs the same test on the guest, Xen domains will currently fail it.

This patch fixes it.

---
 tools/firmware/hvmloader/smbios.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
tools/firmware/hvmloader/smbios.c +1 -1
@@ -455,7 +455,7 @@
     
     p->location = 0x01; /* other */
     p->use = 0x03; /* system memory */
-    p->error_correction = 0x01; /* other */
+    p->error_correction = 0x06; /* Multi-bit ECC to make Microsoft happy */
     p->maximum_capacity = memsize * 1024;
     p->memory_error_information_handle = 0xfffe; /* none provided */
     p->number_of_memory_devices = nr_mem_devs;
#1 lore raw

You mean all Windows version will requires ECC?

--jyh

Quoted 28 lines · [email protected] wrote:

Microsoft's Windows logo certified hardware requires single- or multi-bit ECC; since the SVVP certification runs the same test on the guest, Xen domains will currently fail it.

This patch fixes it.
---
tools/firmware/hvmloader/smbios.c | 14 +++++++++-----

1 files changed, 9 insertions(+), 5 deletions(-)
tools/firmware/hvmloader/smbios.c +1 -1
@@ -455,7 +455,7 @@
 
    p->location = 0x01; /* other */
    p->use = 0x03; /* system memory */
-    p->error_correction = 0x01; /* other */
+    p->error_correction = 0x06; /* Multi-bit ECC to make

Microsoft happy */

    p->maximum_capacity = memsize * 1024;
    p->memory_error_information_handle = 0xfffe; /* none provided */
    p->number_of_memory_devices = nr_mem_devs;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 1 line · Yunhong

You mean all Windows version will requires ECC?

No, it's just a requirement of the Windows *Hardware* Logo Program (probably for server hardware only, I don't know). But it affects the SVVP testing too.

Paolo

#3 lore raw

So with your patch, even if host has no ECC support, you will still tell guest that the memory has ECC?

Generally, I don't think it is a good idea to present guest with capability more than host can provide, unless you can provide that capability through software emulation. But I don;t think you can emulate ECC memory through software method.

--jyh

Quoted 8 lines · Paolo Bonzini
Quoted 1 line · Yunhong

You mean all Windows version will requires ECC?

No, it's just a requirement of the Windows *Hardware* Logo Program (probably for server hardware only, I don't know). But it affects the SVVP testing too.

Paolo

#4 lore raw
Quoted 2 lines · Yunhong

So with your patch, even if host has no ECC support, you will still tell guest that the memory has ECC?

Yes, but I don't think it's of great importance. I'm just pleasing a test with the simplest possible 1-line fix. Do you know of anything that actually cares (i.e. not just "shows it to the user") about that particular DMI field, and does something different if it reads "ECC"?

For that matter, hvmloader is already saying that the host is running at some number of megahertz, which does not make sense for virtualization because the host may be loaded and slow down the guest.

Paolo

#5 lore raw
Quoted 8 lines · Paolo Bonzini
Quoted 2 lines · Yunhong

So with your patch, even if host has no ECC support, you will still tell guest that the memory has ECC?

Yes, but I don't think it's of great importance. I'm just pleasing a test with the simplest possible 1-line fix. Do you know of anything that actually cares (i.e. not just "shows it to the user") about that particular DMI field, and does something different if it reads "ECC"?

One possible situation is, considering a host without ECC. When the host detected 1 bit memory error, it may raises #MCE. If we try to inject this #MCE to guest, guest will be confused, since DMI have report ECC support already.

Of course, I don't know if any host system will raise #MCE for such error, so it's more about a feeling that present guest with more capability than what host can provide is something tricky.

Quoted 5 lines

For that matter, hvmloader is already saying that the host is running at
some number of megahertz, which does not make sense for virtualization because the host may be loaded and slow down the guest.

Yes, but timer virtualization (especially the TSC virtualization) has taken a lot of effort on this so that it make sense to guest, although sometime is relaxed with different timer mode.

--jyh

Quoted 2 lines

Paolo

#6 lore raw
Quoted 1 line · Yunhong

When the host detected 1 bit memory error, it may raises #MCE

Does MCE distinguish single- or multi-bit errors? Multi-bit ECC makes errors less likely, not impossible.

I know it's not optimal, I just don't think it's worth the effort. Besides it could become wrong anyway after migration.

Paolo

#7 lore raw
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · Yunhong

When the host detected 1 bit memory error, it may raises #MCE

Does MCE distinguish single- or multi-bit errors? Multi-bit ECC makes errors less likely, not impossible.

That depends on implementation, I think.

Quoted 3 lines

I know it's not optimal, I just don't think it's worth the effort. Besides it could become wrong anyway after migration.

Noticed Andi's response for the mail that "It would be better if you checked that on the host and then set it appropiately in the guest too." and agree with this idea.

For migration, I think this only extend the host requirement from CPU to memory. For example, we can't migrate guest from host supporting SSE4 instruciton to host does not support it if we don't limit guest's CPUID.

Also, another potential issue is, not sure if Windows guest will utilize the ECC support or not, although it should not.

BTW, I'm not against the change, which is not critical.

--jyh

Quoted 2 lines

Paolo

#8 lore raw
In reply to Paolo Bonzini

tools/firmware/hvmloader/smbios.c line 458

Quoted 6 lines · Paolo Bonzini

Microsoft's Windows logo certified hardware requires single- or multi-bit ECC; since the SVVP certification runs the same test on the guest, Xen domains will currently fail it.

tools/firmware/hvmloader/smbios.c +1 -1
-    p->error_correction = 0x01; /* other */
+    p->error_correction = 0x06; /* Multi-bit ECC to make Microsoft happy */

That's lying if the host doesn't support ECC.

It would be better if you checked that on the host and then set it appropiately in the guest too.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.