Re: [PATCH v3 0/5] Generate x86 cpu features

2024-03-11 Thread Tim Wiederhake
On Tue, 2024-03-05 at 14:17 +, Daniel P. Berrangé wrote: > > On Tue, Feb 06, 2024 at 02:47:34PM +0100, Tim Wiederhake wrote: > > > > Synchronizing the list of cpu features and models with qemu is > > > > a > > > > recurring > > > > task in

Re: [PATCH v3 0/5] Generate x86 cpu features

2024-03-04 Thread Tim Wiederhake
ping On Tue, 2024-02-06 at 14:47 +0100, Tim Wiederhake wrote: > Synchronizing the list of cpu features and models with qemu is a > recurring > task in libvirt. For x86, this is done by reading qom-list-properties > for > max-x86_64-cpu and manually filtering out everthing that

[PATCH v3 1/5] target/i386: Split out feature_word_info

2024-02-06 Thread Tim Wiederhake
The isolated part will be generated by a script. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 679 +--- target/i386/feature_word_info.c.inc | 678 +++ 2 files changed, 679 insertions(+), 678 deletions(-) create mode

[PATCH v3 4/5] target/i386: Fix feature_word_info.c.inc formatting

2024-02-06 Thread Tim Wiederhake
Make the formatting of the file more regular. This reduces the diff to the generated version. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 136 ++-- 1 file changed, 86 insertions(+), 50 deletions(-) diff --git a/target/i386

[PATCH v3 2/5] target/i386: Translate feature_word_info to yaml

2024-02-06 Thread Tim Wiederhake
This is the data file that will be used to generate the C code. All information, including the comments, is preserved. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.yaml | 699 + 1 file changed, 699 insertions(+) create mode 100644 target/i386

[PATCH v3 5/5] target/i386: Generate feature_word_info.c.inc

2024-02-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 30 ++-- target/i386/feature_word_info.py| 71 + target/i386/feature_word_info.yaml | 2 + 3 files changed, 99 insertions(+), 4 deletions(-) create mode 100755 target/i386

[PATCH v3 3/5] target/i386: Remove comments from feature_word_info.c.inc

2024-02-06 Thread Tim Wiederhake
The comments are preserved in the yaml file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 56 - 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386/feature_word_info.c.inc index

[PATCH v3 0/5] Generate x86 cpu features

2024-02-06 Thread Tim Wiederhake
ion. * Changes to the generator script reduce the changes in formatting to the current feature_word_info even further to address the concern about code legibility. See Patch 5, "target/i386: Generate feature_word_info.c.inc" for all non-whitespace changes. Tim Wiederhake (5): target/i386:

Re: [PATCH v2 00/10] Generate x86 cpu features

2023-09-15 Thread Tim Wiederhake
On Mon, 2023-09-11 at 13:26 +0200, Igor Mammedov wrote: > On Fri, 8 Sep 2023 17:55:12 +0100 > Daniel P. Berrangé wrote: > > > On Fri, Sep 08, 2023 at 04:48:46PM +0200, Igor Mammedov wrote: > > > On Fri,  8 Sep 2023 14:45:24 +0200 > > > Tim Wiederhake wrote: &

Re: [PATCH v2 03/10] target/i386: Fix duplicated feature name in FEAT_KVM

2023-09-15 Thread Tim Wiederhake
On Fri, 2023-09-08 at 16:21 +0200, Igor Mammedov wrote: > On Fri,  8 Sep 2023 14:45:27 +0200 > Tim Wiederhake wrote: > > > The mistake became apparent as there were two features with the > > same name > > in this cpuid leaf. The names are now in line with the >

[PATCH v2 05/10] target/i386: Translate feature_word_info to yaml

2023-09-08 Thread Tim Wiederhake
This is the data file that will be used to generate the C code. All information, including the comments, is preserved. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.yaml | 695 + 1 file changed, 695 insertions(+) create mode 100644 target/i386

[PATCH v2 10/10] target/i386: Autogenerate feature_word_info.c.inc

2023-09-08 Thread Tim Wiederhake
This introduces no semantic changes to the file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 2 + target/i386/feature_word_info.py| 62 + target/i386/feature_word_info.yaml | 2 + 3 files changed, 66 insertions(+) create mode

[PATCH v2 08/10] target/i386: Format feature_word_info.c.inc: Unfold cpuid member

2023-09-08 Thread Tim Wiederhake
Having a consistent formatting minimizes the diff to the generated code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 101 +--- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386

[PATCH v2 06/10] target/i386: Format feature_word_info.c.inc: Remove comments

2023-09-08 Thread Tim Wiederhake
The comments are preserved in the yaml file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 56 - 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386/feature_word_info.c.inc index

[PATCH v2 07/10] target/i386: Format feature_word_info.c.inc: Fill out feat_names

2023-09-08 Thread Tim Wiederhake
This member is an array of length 64. Initializing all entries in this array allows for some simplification in the generating code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 355 +++- 1 file changed, 351 insertions(+), 4 deletions(-) diff

[PATCH v2 09/10] target/i386: Format feature_word_info.c.inc: Whitespaces and trailing commas

2023-09-08 Thread Tim Wiederhake
Having a consistent formatting minimizes the diff to the generated code. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 44 + 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/target/i386/feature_word_info.c.inc b/target/i386

[PATCH v2 04/10] target/i386: Split out feature_word_info

2023-09-08 Thread Tim Wiederhake
The isolated part will be generated by a script. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 677 +--- target/i386/feature_word_info.c.inc | 676 +++ 2 files changed, 677 insertions(+), 676 deletions(-) create mode

[PATCH v2 00/10] Generate x86 cpu features

2023-09-08 Thread Tim Wiederhake
before merging. Tim Wiederhake (10): target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix duplicated feature name in FEAT_KVM target/i386: Split out feature_word_info target/i386: Translate

[PATCH v2 02/10] target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Tim Wiederhake
ned-off-by: Tim Wiederhake --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 7c2c48ac06..f10d343935 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1322,8 +1322,8 @@ FeatureWordInfo feature

[PATCH v2 03/10] target/i386: Fix duplicated feature name in FEAT_KVM

2023-09-08 Thread Tim Wiederhake
The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with the documentation from https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html Fixes: 642258c6c7 ("kvm: add kvmclock to its second bit") Signed-off-by: Tim

[PATCH v2 01/10] target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS

2023-09-08 Thread Tim Wiederhake
Add the missing feature names for two bits in the FEAT_VMX_EPT_VPID_CAPS cpuid leaf. "vmx-ept-uc" is currently unused, but "vmx-ept-wb" is enabled for multiple cpu models. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [PATCH 3/3] target/i386: Fix duplicated feature name in FEAT_KVM

2023-08-25 Thread Tim Wiederhake
On Thu, 2023-08-24 at 17:12 +0200, Philippe Mathieu-Daudé wrote: > On 24/8/23 15:57, Tim Wiederhake wrote: > > The mistake became apparent as there were two features with the > > same name > > in this cpuid leaf. The names are now in line with the > > documentation from

[PATCH 2/3] target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS

2023-08-24 Thread Tim Wiederhake
ned-off-by: Tim Wiederhake --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index e6b8c62b92..0b74d80371 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1322,8 +1322,8 @@ FeatureWordInfo feature

[PATCH 1/3] target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS

2023-08-24 Thread Tim Wiederhake
Add the missing feature names for two bits in the FEAT_VMX_EPT_VPID_CAPS cpuid leaf. "vmx-ept-uc" is currently unused, but "vmx-ept-wb" is enabled for multiple cpu models. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH 0/3] Fix some feature names for i386

2023-08-24 Thread Tim Wiederhake
Tim Wiederhake (3): target/i386: Add missing feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix feature names in FEAT_VMX_EPT_VPID_CAPS target/i386: Fix duplicated feature name in FEAT_KVM target/i386/cpu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.39.2

[PATCH 3/3] target/i386: Fix duplicated feature name in FEAT_KVM

2023-08-24 Thread Tim Wiederhake
The mistake became apparent as there were two features with the same name in this cpuid leaf. The names are now in line with the documentation from https://kernel.org/doc/html/latest/virt/kvm/x86/cpuid.html Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml

2023-08-21 Thread Tim Wiederhake
On Thu, 2023-08-17 at 12:07 +0100, Daniel P. Berrangé wrote: > On Fri, Aug 11, 2023 at 03:50:09PM +0200, Tim Wiederhake wrote: > > This is the data file that will be used to generate the C code. > > All information, including the comments, is preserved. > > > > Si

[PATCH 2/4] target/i386: Translate feature_word_info to xml

2023-08-11 Thread Tim Wiederhake
This is the data file that will be used to generate the C code. All information, including the comments, is preserved. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.xml | 1607 + 1 file changed, 1607 insertions(+) create mode 100644 target/i386

[PATCH 4/4] target/i386: Autogenerate feature_word_info.c.inc

2023-08-11 Thread Tim Wiederhake
This introduces no semantic changes to the file. Signed-off-by: Tim Wiederhake --- target/i386/feature_word_info.c.inc | 2 + target/i386/feature_word_info.py| 110 target/i386/feature_word_info.xml | 3 + 3 files changed, 115 insertions(+) create mode

[PATCH 1/4] target/i386: Split out feature_word_info

2023-08-11 Thread Tim Wiederhake
The isolated part will be generated by a script. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 677 +--- target/i386/feature_word_info.c.inc | 676 +++ 2 files changed, 677 insertions(+), 676 deletions(-) create mode

[PATCH 3/4] target/i386: Format feature_word_info.c.inc

2023-08-11 Thread Tim Wiederhake
Harmonize the formatting: Use trailing commas, fix indentation and empty line usage, define "cpuid" fields one per line, unwind index- assignment in arrays, and remove comments. The information in the comments is preserved in the xml file. Signed-off-by: Tim Wiederhake --- t

[PATCH 0/4] Generate x86 cpu features

2023-08-11 Thread Tim Wiederhake
information present in target/i386/cpu.c (`feature_word_info`) into an xml file and adds a script to generate the c code from this xml. A patch set to convert the cpu model data (`builtin_x86_defs`) in the same way will follow. Tim Wiederhake (4): target/i386: Split out feature_word_info target/i386

[PATCH] i386/cpu: Fix Icelake Server model number

2020-12-02 Thread Tim Wiederhake
See arch/x86/include/asm/intel-family.h in the Kernel: #define INTEL_FAM6_ICELAKE_X 0x6A Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5a8c96072e..67e3f92f98 100644