* Memory speed passthrough
@ 2015-03-11 15:28 Tim Bell
2015-03-11 17:58 ` [Qemu-devel] " Gabriel L. Somlo
0 siblings, 1 reply; 5+ messages in thread
From: Tim Bell @ 2015-03-11 15:28 UTC (permalink / raw)
To: kvm
We're running KVM in with the host passthrough for the cpu. This allows the guest to have exactly the same definitions for the processor as on the hypervisor.
We would like to be able to do the same thing for the RAM. From dmidecode, we do not get the RAM speed.
Would it be possible to have a memory passthrough option or can you suggest a different way to achieve this ? We need the memory speed in order to match the guest against a performance reference.
For the deteails, in the guest, we have
Handle 0x1100, DMI type 17, 21 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM 0
Bank Locator: Not Specified
Type: RAM
Type Detail: None
In the hypervisor,
Handle 0x0015, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x0011
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: DIMM
Set: None
Locator: P1_DIMM1A
Bank Locator: BANK1
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Samsung
Serial Number: 13966F1E
Asset Tag: AssetTagNum1
Part Number: M393B1K70DH0-YK0
Rank: 2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] smbios: add max speed comdline option for type-17 (meory device) structure
2015-03-11 15:28 Memory speed passthrough Tim Bell
@ 2015-03-11 17:58 ` Gabriel L. Somlo
0 siblings, 0 replies; 5+ messages in thread
From: Gabriel L. Somlo @ 2015-03-11 17:58 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Tim.Bell, kvm
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
hw/i386/smbios.c | 10 ++++++++--
qemu-options.hx | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index f2e9ab6..1341e02 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -91,6 +91,7 @@ static struct {
static struct {
const char *loc_pfx, *bank, *manufacturer, *serial, *asset, *part;
+ uint16_t speed;
} type17;
static QemuOptsList qemu_smbios_opts = {
@@ -304,6 +305,10 @@ static const QemuOptDesc qemu_smbios_type17_opts[] = {
.name = "part",
.type = QEMU_OPT_STRING,
.help = "part number",
+ },{
+ .name = "speed",
+ .type = QEMU_OPT_NUMBER,
+ .help = "maximum capable speed",
},
{ /* end of list */ }
};
@@ -697,13 +702,13 @@ static void smbios_build_type_17_table(unsigned instance, uint64_t size)
SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
t->memory_type = 0x07; /* RAM */
t->type_detail = cpu_to_le16(0x02); /* Other */
- t->speed = cpu_to_le16(0); /* Unknown */
+ t->speed = cpu_to_le16(type17.speed);
SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
t->attributes = 0; /* Unknown */
- t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
+ t->configured_clock_speed = t->speed; /* reuse value for max speed */
t->minimum_voltage = cpu_to_le16(0); /* Unknown */
t->maximum_voltage = cpu_to_le16(0); /* Unknown */
t->configured_voltage = cpu_to_le16(0); /* Unknown */
@@ -1083,6 +1088,7 @@ void smbios_entry_add(QemuOpts *opts)
save_opt(&type17.serial, opts, "serial");
save_opt(&type17.asset, opts, "asset");
save_opt(&type17.part, opts, "part");
+ type17.speed = qemu_opt_get_number(opts, "speed", 0);
return;
default:
error_report("Don't know how to build fields for SMBIOS type %ld",
diff --git a/qemu-options.hx b/qemu-options.hx
index 837624d..c4f7946 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1392,7 +1392,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
" [,asset=str][,part=str]\n"
" specify SMBIOS type 4 fields\n"
"-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
- " [,asset=str][,part=str]\n"
+ " [,asset=str][,part=str][,speed=%d]\n"
" specify SMBIOS type 17 fields\n",
QEMU_ARCH_I386)
STEXI
@@ -1415,7 +1415,7 @@ Specify SMBIOS type 3 fields
@item -smbios type=4[,sock_pfx=@var{str}][,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
Specify SMBIOS type 4 fields
-@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
+@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}][,speed=@var{%d}]
Specify SMBIOS type 17 fields
ETEXI
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH] smbios: add max speed comdline option for type-17 (meory device) structure
@ 2015-03-11 17:58 ` Gabriel L. Somlo
0 siblings, 0 replies; 5+ messages in thread
From: Gabriel L. Somlo @ 2015-03-11 17:58 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Tim.Bell, kvm
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
hw/i386/smbios.c | 10 ++++++++--
qemu-options.hx | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index f2e9ab6..1341e02 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -91,6 +91,7 @@ static struct {
static struct {
const char *loc_pfx, *bank, *manufacturer, *serial, *asset, *part;
+ uint16_t speed;
} type17;
static QemuOptsList qemu_smbios_opts = {
@@ -304,6 +305,10 @@ static const QemuOptDesc qemu_smbios_type17_opts[] = {
.name = "part",
.type = QEMU_OPT_STRING,
.help = "part number",
+ },{
+ .name = "speed",
+ .type = QEMU_OPT_NUMBER,
+ .help = "maximum capable speed",
},
{ /* end of list */ }
};
@@ -697,13 +702,13 @@ static void smbios_build_type_17_table(unsigned instance, uint64_t size)
SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
t->memory_type = 0x07; /* RAM */
t->type_detail = cpu_to_le16(0x02); /* Other */
- t->speed = cpu_to_le16(0); /* Unknown */
+ t->speed = cpu_to_le16(type17.speed);
SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
t->attributes = 0; /* Unknown */
- t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
+ t->configured_clock_speed = t->speed; /* reuse value for max speed */
t->minimum_voltage = cpu_to_le16(0); /* Unknown */
t->maximum_voltage = cpu_to_le16(0); /* Unknown */
t->configured_voltage = cpu_to_le16(0); /* Unknown */
@@ -1083,6 +1088,7 @@ void smbios_entry_add(QemuOpts *opts)
save_opt(&type17.serial, opts, "serial");
save_opt(&type17.asset, opts, "asset");
save_opt(&type17.part, opts, "part");
+ type17.speed = qemu_opt_get_number(opts, "speed", 0);
return;
default:
error_report("Don't know how to build fields for SMBIOS type %ld",
diff --git a/qemu-options.hx b/qemu-options.hx
index 837624d..c4f7946 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1392,7 +1392,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
" [,asset=str][,part=str]\n"
" specify SMBIOS type 4 fields\n"
"-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
- " [,asset=str][,part=str]\n"
+ " [,asset=str][,part=str][,speed=%d]\n"
" specify SMBIOS type 17 fields\n",
QEMU_ARCH_I386)
STEXI
@@ -1415,7 +1415,7 @@ Specify SMBIOS type 3 fields
@item -smbios type=4[,sock_pfx=@var{str}][,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
Specify SMBIOS type 4 fields
-@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
+@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}][,speed=@var{%d}]
Specify SMBIOS type 17 fields
ETEXI
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] smbios: add max speed comdline option for type-17 (meory device) structure
2015-03-11 17:58 ` [Qemu-devel] " Gabriel L. Somlo
@ 2015-03-12 14:19 ` Paolo Bonzini
-1 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2015-03-12 14:19 UTC (permalink / raw)
To: Gabriel L. Somlo, qemu-devel; +Cc: qemu-trivial, Tim.Bell, kvm
On 11/03/2015 18:58, Gabriel L. Somlo wrote:
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
> hw/i386/smbios.c | 10 ++++++++--
> qemu-options.hx | 4 ++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
> index f2e9ab6..1341e02 100644
> --- a/hw/i386/smbios.c
> +++ b/hw/i386/smbios.c
> @@ -91,6 +91,7 @@ static struct {
>
> static struct {
> const char *loc_pfx, *bank, *manufacturer, *serial, *asset, *part;
> + uint16_t speed;
> } type17;
>
> static QemuOptsList qemu_smbios_opts = {
> @@ -304,6 +305,10 @@ static const QemuOptDesc qemu_smbios_type17_opts[] = {
> .name = "part",
> .type = QEMU_OPT_STRING,
> .help = "part number",
> + },{
> + .name = "speed",
> + .type = QEMU_OPT_NUMBER,
> + .help = "maximum capable speed",
> },
> { /* end of list */ }
> };
> @@ -697,13 +702,13 @@ static void smbios_build_type_17_table(unsigned instance, uint64_t size)
> SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
> t->memory_type = 0x07; /* RAM */
> t->type_detail = cpu_to_le16(0x02); /* Other */
> - t->speed = cpu_to_le16(0); /* Unknown */
> + t->speed = cpu_to_le16(type17.speed);
> SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
> SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
> SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
> SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
> t->attributes = 0; /* Unknown */
> - t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
> + t->configured_clock_speed = t->speed; /* reuse value for max speed */
> t->minimum_voltage = cpu_to_le16(0); /* Unknown */
> t->maximum_voltage = cpu_to_le16(0); /* Unknown */
> t->configured_voltage = cpu_to_le16(0); /* Unknown */
> @@ -1083,6 +1088,7 @@ void smbios_entry_add(QemuOpts *opts)
> save_opt(&type17.serial, opts, "serial");
> save_opt(&type17.asset, opts, "asset");
> save_opt(&type17.part, opts, "part");
> + type17.speed = qemu_opt_get_number(opts, "speed", 0);
> return;
> default:
> error_report("Don't know how to build fields for SMBIOS type %ld",
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 837624d..c4f7946 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1392,7 +1392,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
> " [,asset=str][,part=str]\n"
> " specify SMBIOS type 4 fields\n"
> "-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
> - " [,asset=str][,part=str]\n"
> + " [,asset=str][,part=str][,speed=%d]\n"
> " specify SMBIOS type 17 fields\n",
> QEMU_ARCH_I386)
> STEXI
> @@ -1415,7 +1415,7 @@ Specify SMBIOS type 3 fields
> @item -smbios type=4[,sock_pfx=@var{str}][,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
> Specify SMBIOS type 4 fields
>
> -@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
> +@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}][,speed=@var{%d}]
> Specify SMBIOS type 17 fields
> ETEXI
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] smbios: add max speed comdline option for type-17 (meory device) structure
@ 2015-03-12 14:19 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2015-03-12 14:19 UTC (permalink / raw)
To: Gabriel L. Somlo, qemu-devel; +Cc: qemu-trivial, Tim.Bell, kvm
On 11/03/2015 18:58, Gabriel L. Somlo wrote:
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
> hw/i386/smbios.c | 10 ++++++++--
> qemu-options.hx | 4 ++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
> index f2e9ab6..1341e02 100644
> --- a/hw/i386/smbios.c
> +++ b/hw/i386/smbios.c
> @@ -91,6 +91,7 @@ static struct {
>
> static struct {
> const char *loc_pfx, *bank, *manufacturer, *serial, *asset, *part;
> + uint16_t speed;
> } type17;
>
> static QemuOptsList qemu_smbios_opts = {
> @@ -304,6 +305,10 @@ static const QemuOptDesc qemu_smbios_type17_opts[] = {
> .name = "part",
> .type = QEMU_OPT_STRING,
> .help = "part number",
> + },{
> + .name = "speed",
> + .type = QEMU_OPT_NUMBER,
> + .help = "maximum capable speed",
> },
> { /* end of list */ }
> };
> @@ -697,13 +702,13 @@ static void smbios_build_type_17_table(unsigned instance, uint64_t size)
> SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
> t->memory_type = 0x07; /* RAM */
> t->type_detail = cpu_to_le16(0x02); /* Other */
> - t->speed = cpu_to_le16(0); /* Unknown */
> + t->speed = cpu_to_le16(type17.speed);
> SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
> SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
> SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
> SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
> t->attributes = 0; /* Unknown */
> - t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
> + t->configured_clock_speed = t->speed; /* reuse value for max speed */
> t->minimum_voltage = cpu_to_le16(0); /* Unknown */
> t->maximum_voltage = cpu_to_le16(0); /* Unknown */
> t->configured_voltage = cpu_to_le16(0); /* Unknown */
> @@ -1083,6 +1088,7 @@ void smbios_entry_add(QemuOpts *opts)
> save_opt(&type17.serial, opts, "serial");
> save_opt(&type17.asset, opts, "asset");
> save_opt(&type17.part, opts, "part");
> + type17.speed = qemu_opt_get_number(opts, "speed", 0);
> return;
> default:
> error_report("Don't know how to build fields for SMBIOS type %ld",
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 837624d..c4f7946 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -1392,7 +1392,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
> " [,asset=str][,part=str]\n"
> " specify SMBIOS type 4 fields\n"
> "-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
> - " [,asset=str][,part=str]\n"
> + " [,asset=str][,part=str][,speed=%d]\n"
> " specify SMBIOS type 17 fields\n",
> QEMU_ARCH_I386)
> STEXI
> @@ -1415,7 +1415,7 @@ Specify SMBIOS type 3 fields
> @item -smbios type=4[,sock_pfx=@var{str}][,manufacturer=@var{str}][,version=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
> Specify SMBIOS type 4 fields
>
> -@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}]
> +@item -smbios type=17[,loc_pfx=@var{str}][,bank=@var{str}][,manufacturer=@var{str}][,serial=@var{str}][,asset=@var{str}][,part=@var{str}][,speed=@var{%d}]
> Specify SMBIOS type 17 fields
> ETEXI
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-12 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 15:28 Memory speed passthrough Tim Bell
2015-03-11 17:58 ` [PATCH] smbios: add max speed comdline option for type-17 (meory device) structure Gabriel L. Somlo
2015-03-11 17:58 ` [Qemu-devel] " Gabriel L. Somlo
2015-03-12 14:19 ` Paolo Bonzini
2015-03-12 14:19 ` [Qemu-devel] " Paolo Bonzini
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.