[PULL 00/21] MIPS queue for June 7th, 2020

Aleksandar Markovic posted 21 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1591559185-31287-1-git-send-email-aleksandar.qemu.devel@gmail.com
Maintainers: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Eduardo Habkost <ehabkost@redhat.com>
include/hw/mips/mips.h                      |   3 +
target/mips/cpu.h                           |  32 +-
target/mips/internal.h                      |   3 +-
target/mips/mips-defs.h                     |  45 +-
hw/core/null-machine.c                      |   4 +
hw/mips/common.c                            |  55 +++
target/mips/fpu_helper.c                    | 658 +++++++++++++++++++---------
target/mips/{lmi_helper.c => lmmi_helper.c} |   0
target/mips/msa_helper.c                    |  77 ++--
target/mips/translate.c                     |   2 +
target/mips/translate_init.inc.c            |  95 +++-
.mailmap                                    |   2 +
hw/core/Makefile.objs                       |   2 +-
hw/mips/Makefile.objs                       |   2 +-
target/mips/Makefile.objs                   |   2 +-
15 files changed, 722 insertions(+), 260 deletions(-)
create mode 100644 hw/mips/common.c
rename target/mips/{lmi_helper.c => lmmi_helper.c} (100%)
[PULL 00/21] MIPS queue for June 7th, 2020
Posted by Aleksandar Markovic 3 years, 11 months ago
The following changes since commit 175198ad91d8bac540159705873b4ffe4fb94eab:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200605' into staging (2020-06-05 17:45:59 +0100)

are available in the git repository at:

  https://github.com/AMarkovic/qemu tags/mips-queue-june-07-2020

for you to fetch changes up to ffbd8a88e8872d61fa5622a0075eddbe71951067:

  target/mips: Enable hardware page table walker and CMGCR features for P5600 (2020-06-07 21:34:14 +0200)

----------------------------------------------------------------

MIPS queue for June 7th, 2020

Highlights:

  - Registring change of email address for two contributors
  - Cleanup and improvements of FPU helpers
  - Enabling some features of P5600
  - Adding two Loongson-3A CPU definitions
  - Moving futher towards Loongson-3A KVM support
  - Two checkpatch warnings are known and should be ignored

----------------------------------------------------------------


Aleksandar Markovic (18):
  mailmap: Change email address of Filip Bozuta
  mailmap: Change email address of Stefan Brankovic
  target/mips: fpu: Demacro ADD.<D|S|PS>
  target/mips: fpu: Demacro SUB.<D|S|PS>
  target/mips: fpu: Demacro MUL.<D|S|PS>
  target/mips: fpu: Demacro DIV.<D|S|PS>
  target/mips: fpu: Remove now unused macro FLOAT_BINOP
  target/mips: fpu: Demacro MADD.<D|S|PS>
  target/mips: fpu: Demacro MSUB.<D|S|PS>
  target/mips: fpu: Demacro NMADD.<D|S|PS>
  target/mips: fpu: Demacro NMSUB.<D|S|PS>
  target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros
  target/mips: fpu: Demacro CLASS.<D|S>
  target/mips: fpu: Remove now unused FLOAT_CLASS macro
  target/mips: fpu: Demacro RINT.<D|S>
  target/mips: fpu: Remove now unused FLOAT_RINT macro
  target/mips: fpu: Name better paired-single variables
  target/mips: fpu: Refactor conversion from ieee to mips exception
    flags

Andrea Oliveri (1):
  target/mips: Enable hardware page table walker and CMGCR features for
    P5600

Huacai Chen (2):
  hw/mips: Implement the kvm_type() hook in MachineClass
  target/mips: Add Loongson-3 CPU definition

 include/hw/mips/mips.h                      |   3 +
 target/mips/cpu.h                           |  32 +-
 target/mips/internal.h                      |   3 +-
 target/mips/mips-defs.h                     |  45 +-
 hw/core/null-machine.c                      |   4 +
 hw/mips/common.c                            |  55 +++
 target/mips/fpu_helper.c                    | 658 +++++++++++++++++++---------
 target/mips/{lmi_helper.c => lmmi_helper.c} |   0
 target/mips/msa_helper.c                    |  77 ++--
 target/mips/translate.c                     |   2 +
 target/mips/translate_init.inc.c            |  95 +++-
 .mailmap                                    |   2 +
 hw/core/Makefile.objs                       |   2 +-
 hw/mips/Makefile.objs                       |   2 +-
 target/mips/Makefile.objs                   |   2 +-
 15 files changed, 722 insertions(+), 260 deletions(-)
 create mode 100644 hw/mips/common.c
 rename target/mips/{lmi_helper.c => lmmi_helper.c} (100%)

-- 
2.7.4


Re: [PULL 00/21] MIPS queue for June 7th, 2020
Posted by Peter Maydell 3 years, 11 months ago
On Sun, 7 Jun 2020 at 20:46, Aleksandar Markovic
<aleksandar.qemu.devel@gmail.com> wrote:
>
> The following changes since commit 175198ad91d8bac540159705873b4ffe4fb94eab:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200605' into staging (2020-06-05 17:45:59 +0100)
>
> are available in the git repository at:
>
>   https://github.com/AMarkovic/qemu tags/mips-queue-june-07-2020
>
> for you to fetch changes up to ffbd8a88e8872d61fa5622a0075eddbe71951067:
>
>   target/mips: Enable hardware page table walker and CMGCR features for P5600 (2020-06-07 21:34:14 +0200)
>
> ----------------------------------------------------------------
>
> MIPS queue for June 7th, 2020
>
> Highlights:
>
>   - Registring change of email address for two contributors
>   - Cleanup and improvements of FPU helpers
>   - Enabling some features of P5600
>   - Adding two Loongson-3A CPU definitions
>   - Moving futher towards Loongson-3A KVM support
>   - Two checkpatch warnings are known and should be ignored
>

Hi; I'm afraid this fails to build on non-Linux hosts
(OSx, BSDs, Windows):

hw/mips/common.c:21:23: fatal error: linux/kvm.h: No such file or directory

Looking at that file, it also makes the mistake of putting
an include line before osdep.h, which should always be the
first include in a C file.

The more usual way to arrange this kind of "real implementation
of a function for the compiled-with-KVM case, stub for
the #ifndef CONFIG_KVM case" is to put the real implementation
into a C file that's only built for the CONFIG_KVM case:
obj-$(CONFIG_KVM) += whatever.o
(it may be simplest to just put it in the existing target/mips/kvm.c?)
and then either
(a) provide the non-kvm stub version directly in the .h file
that declares the prototype for the kvm case:
#ifdef CONFIG_KVM
int mips_kvm_type(MachineState *machine, const char *vm_type)
#else
static inline mips_kvm_type(MachineState *machine, const char *vm_type)
{
    return 0;
}
#endif
(b) alternatively put the stub code in a built-for-non-KVM
source file:
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o

i386, s390x and arm all have examples of this kind of "stub
version plus for-kvm version" function that may be useful
as examples.

thanks
-- PMM

Re: [PULL 00/21] MIPS queue for June 7th, 2020
Posted by Aleksandar Markovic 3 years, 11 months ago
пон, 8. јун 2020. у 15:05 Peter Maydell <peter.maydell@linaro.org> је
написао/ла:
>
> On Sun, 7 Jun 2020 at 20:46, Aleksandar Markovic
> <aleksandar.qemu.devel@gmail.com> wrote:
> >
> > The following changes since commit 175198ad91d8bac540159705873b4ffe4fb94eab:
> >
> >   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200605' into staging (2020-06-05 17:45:59 +0100)
> >
> > are available in the git repository at:
> >
> >   https://github.com/AMarkovic/qemu tags/mips-queue-june-07-2020
> >
> > for you to fetch changes up to ffbd8a88e8872d61fa5622a0075eddbe71951067:
> >
> >   target/mips: Enable hardware page table walker and CMGCR features for P5600 (2020-06-07 21:34:14 +0200)
> >
> > ----------------------------------------------------------------
> >
> > MIPS queue for June 7th, 2020
> >
> > Highlights:
> >
> >   - Registring change of email address for two contributors
> >   - Cleanup and improvements of FPU helpers
> >   - Enabling some features of P5600
> >   - Adding two Loongson-3A CPU definitions
> >   - Moving futher towards Loongson-3A KVM support
> >   - Two checkpatch warnings are known and should be ignored
> >
>
> Hi; I'm afraid this fails to build on non-Linux hosts
> (OSx, BSDs, Windows):
>
> hw/mips/common.c:21:23: fatal error: linux/kvm.h: No such file or directory
>
> Looking at that file, it also makes the mistake of putting
> an include line before osdep.h, which should always be the
> first include in a C file.
>
> The more usual way to arrange this kind of "real implementation
> of a function for the compiled-with-KVM case, stub for
> the #ifndef CONFIG_KVM case" is to put the real implementation
> into a C file that's only built for the CONFIG_KVM case:
> obj-$(CONFIG_KVM) += whatever.o
> (it may be simplest to just put it in the existing target/mips/kvm.c?)
> and then either
> (a) provide the non-kvm stub version directly in the .h file
> that declares the prototype for the kvm case:
> #ifdef CONFIG_KVM
> int mips_kvm_type(MachineState *machine, const char *vm_type)
> #else
> static inline mips_kvm_type(MachineState *machine, const char *vm_type)
> {
>     return 0;
> }
> #endif
> (b) alternatively put the stub code in a built-for-non-KVM
> source file:
> obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
>
> i386, s390x and arm all have examples of this kind of "stub
> version plus for-kvm version" function that may be useful
> as examples.
>

Thanks for your detailed response and pointers!

I am going to work with the original contributor on this.

I am planning, of course, to send another, corrected, pull request,
but not sooner than in 5-6 days.

Aleksandar

> thanks
> -- PMM

Re: [PULL 00/21] MIPS queue for June 7th, 2020
Posted by Aleksandar Markovic 3 years, 11 months ago
On Mon, Jun 8, 2020 at 3:17 PM Aleksandar Markovic
<aleksandar.qemu.devel@gmail.com> wrote:
>
> пон, 8. јун 2020. у 15:05 Peter Maydell <peter.maydell@linaro.org> је
> написао/ла:
> >
> > On Sun, 7 Jun 2020 at 20:46, Aleksandar Markovic
> > <aleksandar.qemu.devel@gmail.com> wrote:
> > >
> > > The following changes since commit 175198ad91d8bac540159705873b4ffe4fb94eab:
> > >
> > >   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200605' into staging (2020-06-05 17:45:59 +0100)
> > >
> > > are available in the git repository at:
> > >
> > >   https://github.com/AMarkovic/qemu tags/mips-queue-june-07-2020
> > >
> > > for you to fetch changes up to ffbd8a88e8872d61fa5622a0075eddbe71951067:
> > >
> > >   target/mips: Enable hardware page table walker and CMGCR features for P5600 (2020-06-07 21:34:14 +0200)
> > >
> > > ----------------------------------------------------------------
> > >
> > > MIPS queue for June 7th, 2020
> > >
> > > Highlights:
> > >
> > >   - Registring change of email address for two contributors
> > >   - Cleanup and improvements of FPU helpers
> > >   - Enabling some features of P5600
> > >   - Adding two Loongson-3A CPU definitions
> > >   - Moving futher towards Loongson-3A KVM support
> > >   - Two checkpatch warnings are known and should be ignored
> > >
> >
> > Hi; I'm afraid this fails to build on non-Linux hosts
> > (OSx, BSDs, Windows):
> >
> > hw/mips/common.c:21:23: fatal error: linux/kvm.h: No such file or directory
> >
> > Looking at that file, it also makes the mistake of putting
> > an include line before osdep.h, which should always be the
> > first include in a C file.
> >
> > The more usual way to arrange this kind of "real implementation
> > of a function for the compiled-with-KVM case, stub for
> > the #ifndef CONFIG_KVM case" is to put the real implementation
> > into a C file that's only built for the CONFIG_KVM case:
> > obj-$(CONFIG_KVM) += whatever.o
> > (it may be simplest to just put it in the existing target/mips/kvm.c?)
> > and then either
> > (a) provide the non-kvm stub version directly in the .h file
> > that declares the prototype for the kvm case:
> > #ifdef CONFIG_KVM
> > int mips_kvm_type(MachineState *machine, const char *vm_type)
> > #else
> > static inline mips_kvm_type(MachineState *machine, const char *vm_type)
> > {
> >     return 0;
> > }
> > #endif
> > (b) alternatively put the stub code in a built-for-non-KVM
> > source file:
> > obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
> >
> > i386, s390x and arm all have examples of this kind of "stub
> > version plus for-kvm version" function that may be useful
> > as examples.
> >
>
> Thanks for your detailed response and pointers!
>
> I am going to work with the original contributor on this.
>
> I am planning, of course, to send another, corrected, pull request,
> but not sooner than in 5-6 days.
>

I changed my mind. Since the offending patch is logically independent
from other patches and vice versa, I am going to send a pull request
this evening, without it, rather than wait for it to be fixed.

Truly yours,

Aleksandar


> Aleksandar
>
> > thanks
> > -- PMM
>

Re: [PULL 00/21] MIPS queue for June 7th, 2020
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/1591559185-31287-1-git-send-email-aleksandar.qemu.devel@gmail.com/



Hi,

This series failed the docker-quick@centos7 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
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

--- /tmp/qemu-test/src/tests/qemu-iotests/040.out       2020-06-07 19:56:39.000000000 +0000
+++ /tmp/qemu-test/build/tests/qemu-iotests/040.out.bad 2020-06-07 20:21:34.803254929 +0000
@@ -1,3 +1,5 @@
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.G5tFM6qSxm/qemu-20664-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.G5tFM6qSxm/qemu-20664-qtest.sock -accel qtest -nodefaults -display none -accel qtest
+WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.G5tFM6qSxm/qemu-20664-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.G5tFM6qSxm/qemu-20664-qtest.sock -accel qtest -nodefaults -display none -accel qtest
 ...........................................................
 ----------------------------------------------------------------------
 Ran 59 tests
---
Not run: 259
Failures: 040
Failed 1 of 119 iotests
make: *** [check-tests/check-block.sh] Error 1
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 665, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=f770c887f5824103a4bf9eb1cb4665d2', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-4e7hhqlp/src/docker-src.2020-06-07-16.13.37.32764:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=f770c887f5824103a4bf9eb1cb4665d2
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-4e7hhqlp/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    15m14.937s
user    0m9.503s


The full log is available at
http://patchew.org/logs/1591559185-31287-1-git-send-email-aleksandar.qemu.devel@gmail.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PULL 00/21] MIPS queue for June 7th, 2020
Posted by Aleksandar Markovic 3 years, 11 months ago
нед, 7. јун 2020. у 22:29 <no-reply@patchew.org> је написао/ла:
>
> Patchew URL: https://patchew.org/QEMU/1591559185-31287-1-git-send-email-aleksandar.qemu.devel@gmail.com/
>
>
>
> Hi,
>
> This series failed the docker-quick@centos7 build test. Please find the testing commands and
> their output below. If you have Docker installed, you can probably reproduce it
> locally.
>

I took a look at logs, my conclusion is that the failure is either
test or test environment issue.

There is no, even remote, logical connection between changes in this
pull request and any reported failures.

Thanks,
Aleksandar

> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> make docker-image-centos7 V=1 NETWORK=1
> time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
> === TEST SCRIPT END ===
>
> --- /tmp/qemu-test/src/tests/qemu-iotests/040.out       2020-06-07 19:56:39.000000000 +0000
> +++ /tmp/qemu-test/build/tests/qemu-iotests/040.out.bad 2020-06-07 20:21:34.803254929 +0000
> @@ -1,3 +1,5 @@
> +WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.G5tFM6qSxm/qemu-20664-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.G5tFM6qSxm/qemu-20664-qtest.sock -accel qtest -nodefaults -display none -accel qtest
> +WARNING:qemu.machine:qemu received signal 9: /tmp/qemu-test/build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmp.G5tFM6qSxm/qemu-20664-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmp.G5tFM6qSxm/qemu-20664-qtest.sock -accel qtest -nodefaults -display none -accel qtest
>  ...........................................................
>  ----------------------------------------------------------------------
>  Ran 59 tests
> ---
> Not run: 259
> Failures: 040
> Failed 1 of 119 iotests
> make: *** [check-tests/check-block.sh] Error 1
> Traceback (most recent call last):
>   File "./tests/docker/docker.py", line 665, in <module>
>     sys.exit(main())
> ---
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=f770c887f5824103a4bf9eb1cb4665d2', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-4e7hhqlp/src/docker-src.2020-06-07-16.13.37.32764:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
> filter=--filter=label=com.qemu.instance.uuid=f770c887f5824103a4bf9eb1cb4665d2
> make[1]: *** [docker-run] Error 1
> make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-4e7hhqlp/src'
> make: *** [docker-run-test-quick@centos7] Error 2
>
> real    15m14.937s
> user    0m9.503s
>
>
> The full log is available at
> http://patchew.org/logs/1591559185-31287-1-git-send-email-aleksandar.qemu.devel@gmail.com/testing.docker-quick@centos7/?type=message.
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com