diff mbox series

[v3] target/i386: Add Snowridge-v2 (no MPX) CPU model

Message ID 20191012024748.127135-1-xiaoyao.li@intel.com (mailing list archive)
State New, archived
Headers show
Series [v3] target/i386: Add Snowridge-v2 (no MPX) CPU model | expand

Commit Message

Xiaoyao Li Oct. 12, 2019, 2:47 a.m. UTC
Add new version of Snowridge CPU model that removes MPX feature.

MPX support is being phased out by Intel. GCC has dropped it, Linux kernel
and KVM are also going to do that in the future.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
Changes in v3:
    - Remove the .alias field (ehabkost)
 
Changes in v2:
    - Use CPU model versioning mechanism instead of machine-type compat
---
 target/i386/cpu.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

no-reply@patchew.org Oct. 12, 2019, 8:56 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20191012024748.127135-1-xiaoyao.li@intel.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/change-state-handler.o
make: *** [Makefile:994: docs/interop/index.html] Error 2
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 662, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-rfbm0qix/src/docker-src.2019-10-12-04.54.38.19439:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-rfbm0qix/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    2m1.965s
user    0m7.638s


The full log is available at
http://patchew.org/logs/20191012024748.127135-1-xiaoyao.li@intel.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Xiaoyao Li Oct. 12, 2019, 11:40 a.m. UTC | #2
On Sat, 2019-10-12 at 01:56 -0700, no-reply@patchew.org wrote:
> Patchew URL: 
> https://patchew.org/QEMU/20191012024748.127135-1-xiaoyao.li@intel.com/
> 
> 
> 
> Hi,
> 
> This series failed the docker-mingw@fedora build test. Please find the testing
> commands and
> their output below. If you have Docker installed, you can probably reproduce
> it
> locally.
> 
> === TEST SCRIPT BEGIN ===
> #! /bin/bash
> export ARCH=x86_64
> make docker-image-fedora V=1 NETWORK=1
> time make docker-test-mingw@fedora J=14 NETWORK=1
> === TEST SCRIPT END ===
> 
>   CC      stubs/machine-init-done.o
>   CC      stubs/migr-blocker.o
>   CC      stubs/change-state-handler.o
> make: *** [Makefile:994: docs/interop/index.html] Error 2
> make: *** Waiting for unfinished jobs....
> Traceback (most recent call last):
>   File "./tests/docker/docker.py", line 662, in <module>

Seems something wrong with the python script not this patch?

> ---
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '
> --label', 'com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20', '-u',
> '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=',
> '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 
> 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v',
> '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v',
> '/var/tmp/patchew-tester-tmp-rfbm0qix/src/docker-src.2019-10-12-
> 04.54.38.19439:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-
> mingw']' returned non-zero exit status 2.
> filter=--filter=label=com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20
> make[1]: *** [docker-run] Error 1
> make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-rfbm0qix/src'
> make: *** [docker-run-test-mingw@fedora] Error 2
> 
> real    2m1.965s
> user    0m7.638s
> 
> 
> The full log is available at
> http://patchew.org/logs/20191012024748.127135-1-xiaoyao.li@intel.com/testing.docker-mingw@fedora/?type=message.
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
Eduardo Habkost Oct. 12, 2019, 1:51 p.m. UTC | #3
On Sat, Oct 12, 2019 at 07:40:30PM +0800, Xiaoyao Li wrote:
> On Sat, 2019-10-12 at 01:56 -0700, no-reply@patchew.org wrote:
> > Patchew URL: 
> > https://patchew.org/QEMU/20191012024748.127135-1-xiaoyao.li@intel.com/
> > 
> > 
> > 
> > Hi,
> > 
> > This series failed the docker-mingw@fedora build test. Please find the testing
> > commands and
> > their output below. If you have Docker installed, you can probably reproduce
> > it
> > locally.
> > 
> > === TEST SCRIPT BEGIN ===
> > #! /bin/bash
> > export ARCH=x86_64
> > make docker-image-fedora V=1 NETWORK=1
> > time make docker-test-mingw@fedora J=14 NETWORK=1
> > === TEST SCRIPT END ===
> > 
> >   CC      stubs/machine-init-done.o
> >   CC      stubs/migr-blocker.o
> >   CC      stubs/change-state-handler.o
> > make: *** [Makefile:994: docs/interop/index.html] Error 2
> > make: *** Waiting for unfinished jobs....

This looks like the sphinx-build parallel build failures I am
also seeing in my builds:
https://github.com/sphinx-doc/sphinx/issues/2946


> > Traceback (most recent call last):
> >   File "./tests/docker/docker.py", line 662, in <module>
> 
> Seems something wrong with the python script not this patch?
> 
> > ---
> >     raise CalledProcessError(retcode, cmd)
> > subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '
> > --label', 'com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20', '-u',
> > '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=',
> > '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 
> > 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v',
> > '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v',
> > '/var/tmp/patchew-tester-tmp-rfbm0qix/src/docker-src.2019-10-12-
> > 04.54.38.19439:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-
> > mingw']' returned non-zero exit status 2.
> > filter=--filter=label=com.qemu.instance.uuid=afcfcefa439c40f9ad532249a5058f20
> > make[1]: *** [docker-run] Error 1
> > make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-rfbm0qix/src'
> > make: *** [docker-run-test-mingw@fedora] Error 2
> > 
> > real    2m1.965s
> > user    0m7.638s
> > 
> > 
> > The full log is available at
> > http://patchew.org/logs/20191012024748.127135-1-xiaoyao.li@intel.com/testing.docker-mingw@fedora/?type=message.
> > ---
> > Email generated automatically by Patchew [https://patchew.org/].
> > Please send your feedback to patchew-devel@redhat.com
>
Peter Maydell Oct. 14, 2019, 12:02 p.m. UTC | #4
On Sat, 12 Oct 2019 at 14:52, Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> On Sat, Oct 12, 2019 at 07:40:30PM +0800, Xiaoyao Li wrote:
> > On Sat, 2019-10-12 at 01:56 -0700, no-reply@patchew.org wrote:
> > > Patchew URL:
> > > https://patchew.org/QEMU/20191012024748.127135-1-xiaoyao.li@intel.com/
> > >
> > >
> > >
> > > Hi,
> > >
> > > This series failed the docker-mingw@fedora build test. Please find the testing
> > > commands and
> > > their output below. If you have Docker installed, you can probably reproduce
> > > it
> > > locally.
> > >
> > > === TEST SCRIPT BEGIN ===
> > > #! /bin/bash
> > > export ARCH=x86_64
> > > make docker-image-fedora V=1 NETWORK=1
> > > time make docker-test-mingw@fedora J=14 NETWORK=1
> > > === TEST SCRIPT END ===
> > >
> > >   CC      stubs/machine-init-done.o
> > >   CC      stubs/migr-blocker.o
> > >   CC      stubs/change-state-handler.o
> > > make: *** [Makefile:994: docs/interop/index.html] Error 2
> > > make: *** Waiting for unfinished jobs....
>
> This looks like the sphinx-build parallel build failures I am
> also seeing in my builds:
> https://github.com/sphinx-doc/sphinx/issues/2946

Could you send your workaround patch:
https://github.com/ehabkost/qemu-hacks/commit/569f1dcb5764fccd5942ebbe39d3a8ed91cd632b
to qemu-devel? It seems like a reasonable way to avoid
the problem (just use different doctrees) and less complicated
than trying to serialize the two builds in the QEMU makefiles.
I think my only review comment would be to add a couple of
comment lines to the makefile, something like:
 # Note use of different doctrees for each (manual, builder) tuple;
 # this works around Sphinx not handling parallel invocation on
 # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946

so we don't forget why we had to do this.

If you do that you can add my
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
tag when you send the patch.

thanks
-- PMM
Eduardo Habkost Oct. 14, 2019, 3:02 p.m. UTC | #5
On Mon, Oct 14, 2019 at 01:02:44PM +0100, Peter Maydell wrote:
> On Sat, 12 Oct 2019 at 14:52, Eduardo Habkost <ehabkost@redhat.com> wrote:
> >
> > On Sat, Oct 12, 2019 at 07:40:30PM +0800, Xiaoyao Li wrote:
> > > On Sat, 2019-10-12 at 01:56 -0700, no-reply@patchew.org wrote:
> > > > Patchew URL:
> > > > https://patchew.org/QEMU/20191012024748.127135-1-xiaoyao.li@intel.com/
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > This series failed the docker-mingw@fedora build test. Please find the testing
> > > > commands and
> > > > their output below. If you have Docker installed, you can probably reproduce
> > > > it
> > > > locally.
> > > >
> > > > === TEST SCRIPT BEGIN ===
> > > > #! /bin/bash
> > > > export ARCH=x86_64
> > > > make docker-image-fedora V=1 NETWORK=1
> > > > time make docker-test-mingw@fedora J=14 NETWORK=1
> > > > === TEST SCRIPT END ===
> > > >
> > > >   CC      stubs/machine-init-done.o
> > > >   CC      stubs/migr-blocker.o
> > > >   CC      stubs/change-state-handler.o
> > > > make: *** [Makefile:994: docs/interop/index.html] Error 2
> > > > make: *** Waiting for unfinished jobs....
> >
> > This looks like the sphinx-build parallel build failures I am
> > also seeing in my builds:
> > https://github.com/sphinx-doc/sphinx/issues/2946
> 
> Could you send your workaround patch:
> https://github.com/ehabkost/qemu-hacks/commit/569f1dcb5764fccd5942ebbe39d3a8ed91cd632b
> to qemu-devel? It seems like a reasonable way to avoid
> the problem (just use different doctrees) and less complicated
> than trying to serialize the two builds in the QEMU makefiles.
> I think my only review comment would be to add a couple of
> comment lines to the makefile, something like:
>  # Note use of different doctrees for each (manual, builder) tuple;
>  # this works around Sphinx not handling parallel invocation on
>  # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
> 
> so we don't forget why we had to do this.
> 
> If you do that you can add my
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> tag when you send the patch.

Done, including the comment you've suggested above and your
Reviewed-by line.  Thanks!
diff mbox series

Patch

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 44f1bbdcac76..6685f803da02 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2793,6 +2793,18 @@  static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_6_EAX_ARAT,
         .xlevel = 0x80000008,
         .model_id = "Intel Atom Processor (SnowRidge)",
+        .versions = (X86CPUVersionDefinition[]) {
+            { .version = 1 },
+            {
+                .version = 2,
+                .props = (PropValue[]) {
+                    { "mpx", "off" },
+                    { "model-id", "Intel Atom Processor (Snowridge, no MPX)" },
+                    { /* end of list */ },
+                },
+            },
+            { /* end of list */ },
+        },
     },
     {
         .name = "KnightsMill",