qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] efa921: linux-user: Add support for translati


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] efa921: linux-user: Add support for translation of statx()...
Date: Wed, 03 Jul 2019 13:17:27 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: efa921845c03ef4df6b9d4b3b1ee1a103e7d4b46
      
https://github.com/qemu/qemu/commit/efa921845c03ef4df6b9d4b3b1ee1a103e7d4b46
  Author: Aleksandar Rikalo <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/syscall.c
    M linux-user/syscall_defs.h

  Log Message:
  -----------
  linux-user: Add support for translation of statx() syscall

Implement support for translation of system call statx().

The implementation is based on "best effort" approach: if host
is capable of executing statx(), host statx() is used. If not,
the implementation includes invoking a more mature system call
fstatat() on the host side to achieve as close as possible
functionality.

Support for statx() in kernel and glibc was, however, introduced
at different points of time (the difference is more than a year):

  - kernel: Linux 4.11 (30 April 2017)
  - glibc: glibc 2.28 (1 Aug 2018)

In this patch, the availability of statx() support is established
via __NR_statx (if it is defined, statx() is considered available).
This coincedes with statx() introduction in kernel.

However, the structure statx definition may not be available in
any header for hosts with glibc older than 2.28 (and it is, by
design, to be defined in one of glibc headers), even though the
full statx() functionality may be supported in kernel. Hence, a
structure "target_statx" is defined in this patch, to remove that
dependency on glibc headers, and to use statx() functionality as
soon as the host kernel is capable of supporting it. Such statx
structure definition is used for both target and host structures
statx (of course, this doesn't mean the endian arrangement is
the same on target and host - the endian conversion is done in
all necessary cases).

Signed-off-by: Aleksandar Rikalo <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: d42744fe0417a3b88f04f32881b7af9f48de3d2c
      
https://github.com/qemu/qemu/commit/d42744fe0417a3b88f04f32881b7af9f48de3d2c
  Author: Jim Wilson <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/strace.c
    M linux-user/strace.list

  Log Message:
  -----------
  linux-user: Add support for strace for statx() syscall

All of the flags need to be conditional as old systems don't have
statx support.  Otherwise it works the same as other stat family
syscalls.  This requires the pending patch to add statx support.

Tested on Ubuntu 16.04 (no host statx) and Ubuntu 19.04 (with host
statx) using a riscv32-linux toolchain.

Signed-off-by: Jim Wilson <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: bf9136722c47ce964715fa3fcff4b16cbbd08d58
      
https://github.com/qemu/qemu/commit/bf9136722c47ce964715fa3fcff4b16cbbd08d58
  Author: Aleksandar Markovic <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/generic/fcntl.h
    M linux-user/mips/target_fcntl.h

  Log Message:
  -----------
  linux-user: Fix target_flock structure for MIPS O64 ABI

Among MIPS ABIs, only MIPS O32 and N32 have special (different
than other architectures) definition of structure flock in kernel.

Bring target_flock definition in QEMU for MIPS O64 ABI to the
correct state, which is currently different than the most common
definition, and it should actually be the same.

Reported-by: Dragan Mladjenovic <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 1272a6c4883db77e08a9cff1d2d3d1fa1f420865
      
https://github.com/qemu/qemu/commit/1272a6c4883db77e08a9cff1d2d3d1fa1f420865
  Author: Aleksandar Markovic <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/generic/fcntl.h
    M linux-user/mips/target_fcntl.h

  Log Message:
  -----------
  linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK

Bring target_flock definitions to be more in sync with the way
flock is defined in kernel.

Basically, the rules from the kernel are:

1. Majority of architectures have a common flock definition.

2. Architectures with 32-bit MIPS ABIs have a sligtly different
flock definition; those architectures are the only arcitectures
that have HAVE_ARCH_STRUCT_FLOCK defined, and that preprocessor
constant is used in the common header as a flag for including or
not including common flock definition.

3. Sparc architectures also have a sligtly different flock
definition, but the difference is only the padding at the end of
the structure. The presence of that padding is determined by
preprocessor constants __ARCH_FLOCK6_PAD and __ARCH_FLOCK64_PAD.

QEMU linux-user already implements rules 1. and 3. in a very
similar way as they are implemented in kernel. However, rule 2.
is implemented in a dissimilar way (for example, the constant
TARGET_HAVE_ARCH_STRUCT_FLOCK is missing), and this patch brings
QEMU implementation much closer to the kernel implementation.
TARGET_HAVE_ARCH_STRUCT_FLOCK64 constant is also introduced to
mimic HAVE_ARCH_STRUCT_FLOCK64 from kernel, but it is not defined
anywhere, however, this is the case with HAVE_ARCH_STRUCT_FLOCK64
in kernel as well.

Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 64ce541c0bde7f8bcf8b39a08c32e71ceab23268
      
https://github.com/qemu/qemu/commit/64ce541c0bde7f8bcf8b39a08c32e71ceab23268
  Author: Aleksandar Markovic <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/mips/cpu_loop.c

  Log Message:
  -----------
  linux-user: Handle EXCP_FPE properly for MIPS

Handle EXCP_FPE properly for MIPS in cpu loop.

Note that a vast majority of FP instructions are not affected by
the absence of the code in this patch, as they use alternative code
paths for handling floating point exceptions (see, for example,
invocations of update_fcr31()) - they rely on softfloat library for
keeping track on exceptions that needs to be raised. However, there
are few MIPS FP instructions (an example is CTC1) that use function
do_raise_exception() directly, and they need the case that is added
in this patch to propagate the FPE exception as designed.

The code is based on kernel's function force_fcr31_sig() in
arch/mips/kernel.traps.c.

Reported-by: Yunqiang Su <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 01154f792d254ae60a8a7ed6b363f1ed9a511204
      
https://github.com/qemu/qemu/commit/01154f792d254ae60a8a7ed6b363f1ed9a511204
  Author: Laurent Vivier <address@hidden>
  Date:   2019-07-02 (Tue, 02 Jul 2019)

  Changed paths:
    M linux-user/fd-trans.c

  Log Message:
  -----------
  linux-user: move QEMU_IFLA_BR_MULTI_BOOLOPT to the good function

QEMU_IFLA_BR_MULTI_BOOLOPT has been added to the wrong function
host_to_target_slave_data_bridge_nlattr(). Move it to
host_to_target_data_bridge_nlattr().

This fixes following error:
  Unknown QEMU_IFLA_BR type 46

Fixes: 61b463fbf6cb ("linux-user: add new netlink types")
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 2b40d231ae49f7d91c253cd57bce627b4f4be8f0
      
https://github.com/qemu/qemu/commit/2b40d231ae49f7d91c253cd57bce627b4f4be8f0
  Author: Peter Maydell <address@hidden>
  Date:   2019-07-03 (Wed, 03 Jul 2019)

  Changed paths:
    M linux-user/fd-trans.c
    M linux-user/generic/fcntl.h
    M linux-user/mips/cpu_loop.c
    M linux-user/mips/target_fcntl.h
    M linux-user/strace.c
    M linux-user/strace.list
    M linux-user/syscall.c
    M linux-user/syscall_defs.h

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging

Add statx
Fix netlink with IFLA_BR_MULTI_BOOLOPT
Fix mips (EXCP_FPE, struct flock)

# gpg: Signature made Tue 02 Jul 2019 16:05:18 BST
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <address@hidden>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-4.1-pull-request:
  linux-user: move QEMU_IFLA_BR_MULTI_BOOLOPT to the good function
  linux-user: Handle EXCP_FPE properly for MIPS
  linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK
  linux-user: Fix target_flock structure for MIPS O64 ABI
  linux-user: Add support for strace for statx() syscall
  linux-user: Add support for translation of statx() syscall

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/374f63f6810a...2b40d231ae49



reply via email to

[Prev in Thread] Current Thread [Next in Thread]