All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tweak memory error correction field in the SMBIOS data
@ 2009-11-24 18:14 Paolo Bonzini
  2009-11-25  3:06 ` Jiang, Yunhong
  2009-11-25 10:27 ` Andi Kleen
  0 siblings, 2 replies; 9+ messages in thread
From: Paolo Bonzini @ 2009-11-24 18:14 UTC (permalink / raw)
  To: xen-devel

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(-)

diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/smbios.c
--- a/tools/firmware/hvmloader/smbios.c
+++ b/tools/firmware/hvmloader/smbios.c
@@ -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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-24 18:14 [PATCH] tweak memory error correction field in the SMBIOS data Paolo Bonzini
@ 2009-11-25  3:06 ` Jiang, Yunhong
  2009-11-25  9:27   ` Paolo Bonzini
  2009-11-25 10:27 ` Andi Kleen
  1 sibling, 1 reply; 9+ messages in thread
From: Jiang, Yunhong @ 2009-11-25  3:06 UTC (permalink / raw)
  To: Paolo Bonzini, xen-devel

You mean all Windows version will requires ECC? 

--jyh

xen-devel-bounces@lists.xensource.com 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(-)
> 
> diff --git a/tools/firmware/hvmloader/smbios.c
> b/tools/firmware/hvmloader/smbios.c
> --- a/tools/firmware/hvmloader/smbios.c
> +++ b/tools/firmware/hvmloader/smbios.c
> @@ -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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-25  3:06 ` Jiang, Yunhong
@ 2009-11-25  9:27   ` Paolo Bonzini
  2009-11-25 15:00     ` Jiang, Yunhong
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2009-11-25  9:27 UTC (permalink / raw)
  To: Jiang, Yunhong; +Cc: xen-devel

On 11/25/2009 04:06 AM, Jiang, Yunhong wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-24 18:14 [PATCH] tweak memory error correction field in the SMBIOS data Paolo Bonzini
  2009-11-25  3:06 ` Jiang, Yunhong
@ 2009-11-25 10:27 ` Andi Kleen
  1 sibling, 0 replies; 9+ messages in thread
From: Andi Kleen @ 2009-11-25 10:27 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: xen-devel

Paolo Bonzini <pbonzini@redhat.com> writes:

> 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.
>
> -    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
-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-25  9:27   ` Paolo Bonzini
@ 2009-11-25 15:00     ` Jiang, Yunhong
  2009-11-25 15:18       ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Jiang, Yunhong @ 2009-11-25 15:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: xen-devel

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

Paolo Bonzini wrote:
> On 11/25/2009 04:06 AM, Jiang, Yunhong wrote:
>> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-25 15:00     ` Jiang, Yunhong
@ 2009-11-25 15:18       ` Paolo Bonzini
  2009-11-26  1:21         ` Jiang, Yunhong
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2009-11-25 15:18 UTC (permalink / raw)
  To: Jiang, Yunhong; +Cc: xen-devel

On 11/25/2009 04:00 PM, Jiang, Yunhong wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-25 15:18       ` Paolo Bonzini
@ 2009-11-26  1:21         ` Jiang, Yunhong
  2009-11-26 12:45           ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Jiang, Yunhong @ 2009-11-26  1:21 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: xen-devel



Paolo Bonzini wrote:
> On 11/25/2009 04:00 PM, Jiang, Yunhong wrote:
>> 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.

> 
> 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

> 
> Paolo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-26  1:21         ` Jiang, Yunhong
@ 2009-11-26 12:45           ` Paolo Bonzini
  2009-11-27  1:50             ` Jiang, Yunhong
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2009-11-26 12:45 UTC (permalink / raw)
  To: Jiang, Yunhong; +Cc: xen-devel

On 11/26/2009 02:21 AM, Jiang, Yunhong wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] tweak memory error correction field in the SMBIOS data
  2009-11-26 12:45           ` Paolo Bonzini
@ 2009-11-27  1:50             ` Jiang, Yunhong
  0 siblings, 0 replies; 9+ messages in thread
From: Jiang, Yunhong @ 2009-11-27  1:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: xen-devel


Paolo Bonzini wrote:
> On 11/26/2009 02:21 AM, Jiang, Yunhong wrote:
>> 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.

> 
> 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


> 
> Paolo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-27  1:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-24 18:14 [PATCH] tweak memory error correction field in the SMBIOS data Paolo Bonzini
2009-11-25  3:06 ` Jiang, Yunhong
2009-11-25  9:27   ` Paolo Bonzini
2009-11-25 15:00     ` Jiang, Yunhong
2009-11-25 15:18       ` Paolo Bonzini
2009-11-26  1:21         ` Jiang, Yunhong
2009-11-26 12:45           ` Paolo Bonzini
2009-11-27  1:50             ` Jiang, Yunhong
2009-11-25 10:27 ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.