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

Xiaoyao Li posted 1 patch 4 years, 6 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191012024748.127135-1-xiaoyao.li@intel.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
[PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model
Posted by Xiaoyao Li 4 years, 6 months ago
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(+)

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",
-- 
2.19.1


Re: [PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model
Posted by no-reply@patchew.org 4 years, 6 months ago
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
Re: [PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model
Posted by Xiaoyao Li 4 years, 6 months ago
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


sphinx-build parallel build failures (was Re: [PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model)
Posted by Eduardo Habkost 4 years, 6 months ago
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
> 

-- 
Eduardo

Re: sphinx-build parallel build failures (was Re: [PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model)
Posted by Peter Maydell 4 years, 6 months ago
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

Re: sphinx-build parallel build failures (was Re: [PATCH v3] target/i386: Add Snowridge-v2 (no MPX) CPU model)
Posted by Eduardo Habkost 4 years, 6 months ago
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!

-- 
Eduardo