From patchwork Thu Feb 20 09:20:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 11393643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CB9D924 for ; Thu, 20 Feb 2020 09:24:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7DC8920801 for ; Thu, 20 Feb 2020 09:24:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DC8920801 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4i40-0000WN-Mf for patchwork-qemu-devel@patchwork.kernel.org; Thu, 20 Feb 2020 04:24:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51786) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4i1X-00048z-4i for qemu-devel@nongnu.org; Thu, 20 Feb 2020 04:21:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4i1W-00088v-4T for qemu-devel@nongnu.org; Thu, 20 Feb 2020 04:21:35 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:38107) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4i1V-000886-Rn for qemu-devel@nongnu.org; Thu, 20 Feb 2020 04:21:34 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M5PRT-1j3sXF3qgX-001VXL; Thu, 20 Feb 2020 10:20:57 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 01/13] linux-user: Implement membarrier syscall Date: Thu, 20 Feb 2020 10:20:41 +0100 Message-Id: <20200220092053.1510215-2-laurent@vivier.eu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200220092053.1510215-1-laurent@vivier.eu> References: <20200220092053.1510215-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:pCfKeP0sdaMCzYW0ZbJkVeNq0bI4maMyKzmKSjuSrcmKZI1xGFd 7C0K27YLuS00xrsNInms9G+O2K4tRcQaeqxSzBCcXis/AMu7vyx2Kr6O/6NNP6tFi9qzFPM 0bn3Qxis0smc/6WJeUPkTZ4uRk7k1lNcycdY2bN38S6KFWUO/kgouKgcDK11cf+J6Uyc1gd cqHwqEvkBII+PJAllSNAw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QHo6oa5FLIk=:eUQqno9qkdHaBHO60/r+WJ uu6febSZaNZW1CIWMRshqWUF3RwlrxB+y81w8BFH18yOaME2/0KdgJE5I5N8+5odZSfAvPkT0 ZvzZ3Ke/Xi+n6u2LpWmyhSqc8aiqSh3m9acynt79yoQzK4bMnL9wq5rILGV3f4azLp0sF/+qP uvMI+5oG0iMZR8sDf5q9AAQ97I5yGVTvbAQDFAXQRHBA2y3oSKdxZDxr0LjMPQKR4Y5l/OyOf C/O+oFyWxM1k7rHH0mpDBp6LJabac5Gf3Ea6HmgeMUgr1deo3/9vl+fxonUb0KH+Egh7/RVsN j+7b+HzTB+JmGBzCUDqdSUiZTSphSD4/iW7j5NUkJDTCh+FExz2yR04tOy3h/aVvX5IJgoP7X OfHvlnCbYC0ljhJi0FMGkK9G/uLhA3RDydaXf1QWWiFvmnnBQKFiuWdiEijMWA9RGXxhfiEzl mi6y++Cc09Z/gAdSAAuFDiVn8OucmdaAclDVR2AGRq4xipMoLoNUr0JRJ1u6nvJOnE78PLCkZ vFwBIDDpSSZz2qj37iHo0DZMy2L6M4nxOrLZUXbDO+lYRVjpml0SHm4GXye5Q3iFbI+wOHF9P X2nTYWTqDJb2+yGiHuqdYmQgn7tvJJhNaGFJ2l1qOzDsm+58Ebcu90a3whxgHOIVINQmU/R4b tBn1aJNOEzLee8NYEdHlPH8vX3/b6LDuMeRgPzn1H9ZwEjkEbl8Ldi6fu+2MPu1ak1YJhEEDH LrwJaEXmrbgakEa6/BW6SRk5WchhiMt/1Tr1R1oFdEKVmbdc0edJobzVg2v/u2VZhi35Vxtu2 Uu3QkXpTnRoAPhHtgYsfRAnVn8/Mj+YpJ3LULmaFdYp7eNB1zwZ+Fn4NUdw1Ajfh1KDgz+9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andreas Schwab , Riku Voipio , Laurent Vivier , Aleksandar Markovic , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Andreas Schwab Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier Message-Id: Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c930577686da..7aaa9d96397c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -334,6 +334,9 @@ _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type, _syscall5(int, sys_statx, int, dirfd, const char *, pathname, int, flags, unsigned int, mask, struct target_statx *, statxbuf) #endif +#if defined(TARGET_NR_membarrier) && defined(__NR_membarrier) +_syscall2(int, membarrier, int, cmd, int, flags) +#endif static bitmask_transtbl fcntl_flags_tbl[] = { { TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, }, @@ -12090,6 +12093,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, unlock_user(p, arg1, 0); return ret; #endif +#if defined TARGET_NR_membarrier && defined __NR_membarrier + case TARGET_NR_membarrier: + return get_errno(membarrier(arg1, arg2)); +#endif default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num);