Skip to contentSkip to conversation

VCPU cores & sockets

DISCUSSION Ben Guthro 4 participants 9 messages Jun 17, 2008

lore
Share & tools
lore

Ben Guthro

author
#0 lore raw

Before I get to entrenched in the ACPI code - I thought I'd ping the community to make sure nobody else has investigated this already -

Can we present cores vs sockets for guest VCPUs?
Right now, the number of total processors can be specified, but can we specify cores per socket?

I see this potentially being an hvmloader function, as part of its acpi build code. Could this be accomplished more generally?

Ben

#1 lore raw
Quoted 8 lines · Ben Guthro

Before I get to entrenched in the ACPI code - I thought I'd ping the community to make sure nobody else has investigated this already -

Can we present cores vs sockets for guest VCPUs?
Right now, the number of total processors can be specified, but can we specify cores per socket?

I see this potentially being an hvmloader function, as part of its acpi build code. Could this be accomplished more generally?

Ben,

This already exists, It's supported via a CPUID configuration. Right now there are just some comments in the xmexample.hvm file.

I think it would be better to have an entry in the config file like you suggest. I will work on that.

Cheers,

Signature · 1 line
Jean Guyader
author
#2 lore raw

so...if I read your patch, and the intel manual properly - CPUID.4:EAX[31:26] + 1 is the number of cores...

...
# '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
# '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']
...

This would set the EAX of leaf 4 to 3 - indicating a dual core processor?

Am I understanding that config file correctly?

Jean Guyader wrote on 06/17/2008 10:44 AM:

Quoted 19 lines
Quoted 8 lines · Ben Guthro

Before I get to entrenched in the ACPI code - I thought I'd ping the community to make sure nobody else has investigated this already -

Can we present cores vs sockets for guest VCPUs?
Right now, the number of total processors can be specified, but can we specify cores per socket?

I see this potentially being an hvmloader function, as part of its acpi build code. Could this be accomplished more generally?

Ben,

This already exists, It's supported via a CPUID configuration. Right now there are just some comments in the xmexample.hvm file.

I think it would be better to have an entry in the config file like you suggest. I will work on that.

Cheers,

#3 lore raw
Quoted 12 lines · Ben Guthro

so...if I read your patch, and the intel manual properly - CPUID.4:EAX[31:26] + 1 is the number of cores...

...
# '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
# '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']
...

This would set the EAX of leaf 4 to 3 - indicating a dual core processor?

Am I understanding that config file correctly?

My previous patch has nothing to do with that. What you are looking for is just above in this file.

Signature · 1 line
Jean Guyader
author
#4 lore raw

my mistake - I was looking at a rather old version of the file

Jean Guyader wrote on 06/17/2008 11:57 AM:

Quoted 17 lines
Quoted 12 lines · Ben Guthro

so...if I read your patch, and the intel manual properly - CPUID.4:EAX[31:26] + 1 is the number of cores...

...
# '4:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0',
# '0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']
...

This would set the EAX of leaf 4 to 3 - indicating a dual core processor?

Am I understanding that config file correctly?

My previous patch has nothing to do with that. What you are looking for is just above in this file.

#5 lore raw
In reply to Jean Guyader
Quoted 10 lines · Jean Guyader
Quoted 7 lines

Can we present cores vs sockets for guest VCPUs?
Right now, the number of total processors can be specified, but can we specify cores per socket?

I see this potentially being an hvmloader function, as part of its acpi build code.
Could this be accomplished more generally?

This already exists, It's supported via a CPUID configuration. Right now there are just some comments in the xmexample.hvm file.

Yes, and I don't think CPU topology needs to have any effect on the ACPI tables.

Quoted 2 lines

I think it would be better to have an entry in the config file like you suggest. I will work on that.

I argue against further redundant domain config options.

-- Keir

author
#6 lore raw
Quoted 5 lines

I argue against further redundant domain config options.

-- Keir

While I would normally agree with this statement...
knowing that you must set CPUID.4:EAX[31:26] to cores + 1 (but only if CPUID.1:EDX[28]==1) is not exactly user friendly...

#7 lore raw
Quoted 7 lines · Ben Guthro
Quoted 4 lines

I argue against further redundant domain config options.

-- Keir

While I would normally agree with this statement...
knowing that you must set CPUID.4:EAX[31:26] to cores + 1 (but only if CPUID.1:EDX[28]==1) is not exactly user friendly...

I might consider having 'xm create' or the domain-config-cooking bit of xend grind a new cores_per_socket config option into the canonical cpuid option. I don't think it should be part of the persistent vm configuration state that xend keeps in xenstore and saves/restores. And this could be done equally well in higher-level tools.

-- Keir

#8 lore raw
In reply to Ben Guthro
Quoted 8 lines · Ben Guthro, le Tue 17 Jun 2008 11:56:30 -0400, a écrit :
Quoted 5 lines

I argue against further redundant domain config options.

-- Keir

While I would normally agree with this statement...
knowing that you must set CPUID.4:EAX[31:26] to cores + 1 (but only if CPUID.1:EDX[28]==1) is not exactly user friendly...

Maybe we could add a little tool that computes the CPUIDs you want?

Samuel