All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 0/4 -v3a] xl: add cpuid config file option
Date: Tue, 21 Sep 2010 15:25:46 +0200	[thread overview]
Message-ID: <4C98B25A.6070708@amd.com> (raw)

Hi,

This patch series introduces a cpuid parameter in xl.
This is a small update to address IanJ's comment on the 
xlu_cfg_get_type() function. I now removed the function from the 
patchset and replaced it with a changed version of xl_cfg_get_list() 
call. Other than that there were no changes compared to v3.
This is against the staging tree (c/s 22187), so it omits the already 
committed 1/5.

Please review and commit!

Regards,
Andre.

--------------
xl is currently ignoring the cpuid= variable in the config file. As I
don't like the current interface xm exposes (basically because it is
complicated, unintuitive and very error prone), I implemented a new
scheme for specifying CPUID flags policy, combining QEMU's and Xen's
approach:
cpuid = "<base>,<feature_name>=[01xks]*,...
The patch includes a (preliminary) list of feature names along with
their bit positions. The value for each feature bit copies the current
meaning is Xen:
0: clear, 1: set, x: don't care/use default, k: keep from host, s: use
host but preserve across migration
The value can also be a number (either in hex or decimal), so things
like "stepping=3" can be easily specified.
To show you the advantage, I quote the example config file:
    > #cpuid=[ '1:ecx=xxxxxxxxxxx00xxxxxxxxxxxxxxxxxxx,
    > #           eax=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]
    > # - Unset the SSE4 features (CPUID.1[ECX][20-19])
    > # - Default behaviour for all other bits in ECX And EAX registers.
new version: cpuid = "host,sse4.1=0,sse4.2=0"
    > #  Expose to the guest multi-core cpu instead of multiple processors
    > # Example for intel, expose a 8-core processor :
    > #cpuid=['1:edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
    > #          ebx=xxxxxxxx00010000xxxxxxxxxxxxxxxx',
    > #     '4,0:eax=001111xxxxxxxxxxxxxxxxxxxxxxxxxx']
    > #  - CPUID.1[EDX][HT] : Enable HT
    > #  - CPUID.1[EBX] : Number of vcpus * 2
    > #  - CPUID.4,0[EAX] : Number of vcpus * 2 - 1
    > #vcpus=8
new version: cpuid = "host,htt=1,proccount=16,maxcores=15"
    > # Example for amd, expose a 5-core processor :
    > # cpuid = ['1:ebx=xxxxxxxx00001010xxxxxxxxxxxxxxxx,
    > #             edx=xxx1xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    > # '0x80000001:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1x',
    > # '0x80000008:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxx001001']
    > #  - CPUID.1[EBX] : Threads per Core * Cores per Socket (2 * #vcpus)
    > #  - CPUID.1[EDX][HT] : Enable HT
    > #  - CPUID.0x80000001[CmpLegacy] : Use legacy method
    > #  - CPUID.0x80000008[ECX] : #vcpus * 2 - 1
new version: cpuid="host,htt=1,cmplegacy=1,proccount=10,nc=9"

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12

                 reply	other threads:[~2010-09-21 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C98B25A.6070708@amd.com \
    --to=andre.przywara@amd.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.