From patchwork Mon Jun 21 11:04:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 464502 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2456308jao; Mon, 21 Jun 2021 04:07:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztjhAtGG5c/9hyZ96U6xhDefvt5QcbVTCJgvd4YK3BUonGIt+f5t7CxC+po4RtrWoWWwuY X-Received: by 2002:a1f:308a:: with SMTP id w132mr13652652vkw.7.1624273658736; Mon, 21 Jun 2021 04:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624273658; cv=none; d=google.com; s=arc-20160816; b=mETCjJuvvqqi45lkQ01XxOU5wJrvzhhX4Uq9bPZ3e2JWGH7wpYQ+7xip9+GyUFe7xB vk7XWGSWI8voHiHM5ypPbCWYba0dwrqNZAK0bIzHzsi32Dj7q4uvGGqe2W1eO+zToQv1 ZnYtPmvLbYAzeyMn54tMpm1niVGU46RDV0l6lGKUpRT9Y9MsaLFHfHR94EvOqT1KS7CW frA6FpdCHjixwF3F82e84ct7scSfotQTn+HUfe2SSFWNZezeriU2xns3Z9Sc9EzIXxXy Vz1V2iV2x6T4aTvr2v/igRoApym2/xDpWTwRBFpyg5wg3HP3z98B3pA4iWiAdSyjAVMD 1Y4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=GVJxooKk4xi6yX5o8wJUzuDsxGS/ScrNnjt1nvmf3O4=; b=BrhCl6Bf5+5eN44yQEniOeglZ19D33Qq503oyU4loDW8gtbb9UmK8UvbpEH2JYigof lRtHEc46txE1l3BpJIUidmR1yH5S+MAzz2PXuuxU6/5VpQW+jTy2kzio0rHCV4yTBRVF eyknmDXGeEd0BjNiWIICKEE0DnxwjY1zC9z8qEsRRwvHvOVFfy7uqGTb4+46eBuN9YOX yc9M8+Z0/OLwv7cTsSXpoAX/PKGZ1zVrTtTN2bJiW3+Fkfa97h/zODM02i/eoWwPSD1j KDpr/gZRAf4HJ5NB+gIRkGQJPAos357ayGv2Y3UpAYCyEkCC0+FzugaoHGKWH9KZPVfR l4eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p3si2393737vsq.421.2021.06.21.04.07.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 04:07:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:47094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvHmE-00005p-4u for patch@linaro.org; Mon, 21 Jun 2021 07:07:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjY-0002o9-FE for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:53 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:53975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjV-0003uQ-Sc for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:51 -0400 Received: from quad ([82.142.1.74]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MIMOy-1m0jn82TFk-00EPFp; Mon, 21 Jun 2021 13:04:46 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 1/9] linux-user: Set CF_PARALLEL when mapping shared memory Date: Mon, 21 Jun 2021 13:04:37 +0200 Message-Id: <20210621110445.231771-2-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210621110445.231771-1-laurent@vivier.eu> References: <20210621110445.231771-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:UFy6xt4K53iFDMglBPtNG7ol1kK5/42StTASrSex5sojzRu7qj8 mG4rI7zJFwLktBXqHCK54Ru/9lw1ZKB1b1WtGnezZWExFG3v4lnw1PmlJn7yVToO0bZ+9Oo wN5d7jxzu/mdKrRlIFKrMdU7yrlBaIF2rnFEzN69xmBBq0w8tFGbGn7MQCbvso8riGXeoHg yHr60vSFjctrzZWkzvgyw== X-UI-Out-Filterresults: notjunk:1; V03:K0:uREM49oludY=:Jgjm4IxxxbKlgMKN/S2go0 azoiuC/5kE0npg7Ew+5M1m9mBNwtcWNwTjrz8V6uYE2NiI2ek9S8ItEg5/5uIbaLcmUu64B8L T3tPzURYVKjmAtSk8C3I1Ufe2J8aDyF288g0hhEeRqiIjPmz7FbGdsOU+AshFaT/HbSWH+NfE Jzyus/Ggh4kHGRcYgnEJey1PA5IgdDQC0/EdEiLtKljxLRLgGyR+yqlb6BcadrSckZx04V6Yz KEL41DqSLrIE/DE55wBJrwcggemmbVN+SDBhJtQFGGFOfUlGi1XUNsq4f3cY3ds27il8wkh6A C/AkaahK+sbXiHgQWBm2fKiPbHfEaiVTbgXrXbSNhquy3y39tGIgF52YnjBvoYW2occ+wJ4le 3JnLKzh0vpTMLG5VZfvFQe7XjvZYNgs2ivG7pMSCRJxLhjzT+akRts5aXViidgRm1aRRFir5m jUX2/w2oMUJcQHGyQcbOKuxkDCdBt4YyxAlshnx5ABuKav6ZrNm/WA5U/++XZ6n0XXCJKy7LD tzT2rQrHVWYd/6WUMrMHb0= Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signal the translator to use host atomic instructions for guest operations, insofar as it is possible. This is the best we can do to allow the guest to interact atomically with other processes. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/121 Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Message-Id: <20210612060828.695332-1-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 14 ++++++++++++++ linux-user/syscall.c | 12 ++++++++++++ 2 files changed, 26 insertions(+) -- 2.31.1 diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 7e3b2450368a..0e103859fed8 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -451,6 +451,20 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int target_prot, goto fail; } + /* + * If we're mapping shared memory, ensure we generate code for parallel + * execution and flush old translations. This will work up to the level + * supported by the host -- anything that requires EXCP_ATOMIC will not + * be atomic with respect to an external process. + */ + if (flags & MAP_SHARED) { + CPUState *cpu = thread_cpu; + if (!(cpu->tcg_cflags & CF_PARALLEL)) { + cpu->tcg_cflags |= CF_PARALLEL; + tb_flush(cpu); + } + } + real_start = start & qemu_host_page_mask; host_offset = offset & qemu_host_page_mask; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 974dd46c9a17..54037db8d66d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4603,6 +4603,7 @@ static inline abi_ulong target_shmlba(CPUArchState *cpu_env) static inline abi_ulong do_shmat(CPUArchState *cpu_env, int shmid, abi_ulong shmaddr, int shmflg) { + CPUState *cpu = env_cpu(cpu_env); abi_long raddr; void *host_raddr; struct shmid_ds shm_info; @@ -4633,6 +4634,17 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env, mmap_lock(); + /* + * We're mapping shared memory, so ensure we generate code for parallel + * execution and flush old translations. This will work up to the level + * supported by the host -- anything that requires EXCP_ATOMIC will not + * be atomic with respect to an external process. + */ + if (!(cpu->tcg_cflags & CF_PARALLEL)) { + cpu->tcg_cflags |= CF_PARALLEL; + tb_flush(cpu); + } + if (shmaddr) host_raddr = shmat(shmid, (void *)g2h_untagged(shmaddr), shmflg); else { From patchwork Mon Jun 21 11:04:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 464503 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2457142jao; Mon, 21 Jun 2021 04:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybw9divs98ak0JcP8mBrjzb4+kX4mNeLTvxR0PwD3WglV/kgcL3gnDdXfPQei+99EAv0CC X-Received: by 2002:a67:b346:: with SMTP id b6mr1434314vsm.22.1624273715084; Mon, 21 Jun 2021 04:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624273715; cv=none; d=google.com; s=arc-20160816; b=FwwvcVpPyzDQrmSyXrzM9njefYZHH4bB8vufM3kwBz0h1GYaKa1x3hX1018rQQl2O7 UGZNfgimBnunykw2bIVatweJvDSzNEttGl+VdofekqbhvckAv9BkIQ4QeVI3l4+ipCMx TsgL7GQ+FSp5sa1SU/s8N0w3mUST2asDfsmd5S9liKDj2ENaCESM1UvEF0lavFvga/Wu AE9I+oYY48TkH+iQxT5VKY29KBPLywYmSZ762TkM5bvZvDG78ZSnQr32kWnl7L659FnQ SuP9RuO+M9a9gXc39c08JZePWOsAAYXQwOyXGGeSqPuaxtyEcOHwMgBmVsIkT6JuBWZ1 GRCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=8igCAoIO3wYvtx45LYJMbO3QbNNTcoZMq+JNPdYRubQ=; b=qJL1t1aWqQtFxC4C9ODrcXyGTC8oZDu/SAqFZiwZ2zyelarRssm5h86dmU2xKKknK8 x0FdIQ/vU6QIUFQKh/5TolLIBk1SnyAHq57P3fL5/dlNuASprSEg8dSjU57tsX0mC5dQ fC8AeO9WQFo5ncLmHEBhAX5sbC+N98icHkor3+lxYFtVYs7Mmd2/sopZE+yWZfNeOVLt +3pp69FIkyRTLxoC2u/LLbvDI58BYRxkQTBVKr+Tvl+SCTmGHLSQQM9oEgojNwuaEkjZ pfxJwVnxDLMV/SN3EoSdHjGTVLmOXBWQ7b2NrA3TOZ9GOduqLsMEO2BNspc6MyjI4i5m RabQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m24si7697397uah.204.2021.06.21.04.08.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 04:08:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:47500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvHn8-0000Pi-6V for patch@linaro.org; Mon, 21 Jun 2021 07:08:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjg-0003Bf-PW for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:05:00 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:39929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjf-000420-1F for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:05:00 -0400 Received: from quad ([82.142.1.74]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6DrU-1lt4oJ3zc8-006g1l; Mon, 21 Jun 2021 13:04:48 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 3/9] linux-user/trace-events: fix minor typo in format string Date: Mon, 21 Jun 2021 13:04:39 +0200 Message-Id: <20210621110445.231771-4-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210621110445.231771-1-laurent@vivier.eu> References: <20210621110445.231771-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:4uUQ4qhAiTUM6regz/BsQz/5xgUPwQRDtRX38l9aJh15JYp7eNA BMCVdFFmdE6MJ/tR4sPpZMxW7jmVqwxs9TKoJxQKZUwgBD4kpGv6dc6MaVjSRlpO6W6ZgXL cnl+Agu8nb+7U3/DcXnxQxNexnY4Z/gfMwPICL0PXg1HsF8zvu0yHZscpwX8d1gnrSxyA10 D2qPpfsijv9qTnRL3tvvQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:pfjbblathOc=:KFDgspoNb/g+n7B+UCV/MZ Yoy0aE5cDSUJYYMeq0sxQfViRyqArHXldX7HrQzfqtxWnZXLg0aYI/NMhn+H/JNCURDveESLT anlyy/xduB4UrKHF06YN4MzcfQ+Wlr2vRxWwYE5qxbJuWJ8g65UGo4KZR1w19AhSGYiuLTrtk kvA+yF0uyaELmXm5goI/FWDMI0jRbaOugXLyCcDyeBTJwzd1Q5LaRhwyYTlBmfdGrTiIbx+9S hUfl6rbQ88G4SMh94nNNcV70e3Kt8VhLa5iLgRR7UXA8w7PvpdiXaC7Tm8hK90UERCurEJIhw oyVd9TdxUHrlzg6Ev70UQF4A9WOVMzvxCvd1nhnGTGYvrgh+YupeFz/JOedvfc53eILE8gpEP xnRMVFyhti5zImijxyR3/CYV45TPdsvhdv372vL1poFjYKlE5gnRlp/wtdl5YZluB5LEZlV2M 1Yua8xE5MKAD7mxTE0Gd9U/vPGwUZlmN4KR/oVugzlL7e9rtbIHBpewyHdak+pdE+MPiqoSTX Uw1bgOYXire0WYIteCIFA8= Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210614144245.17660-1-alex.bennee@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.31.1 diff --git a/linux-user/trace-events b/linux-user/trace-events index 1ec0d11ee3a9..e7d2f54e9401 100644 --- a/linux-user/trace-events +++ b/linux-user/trace-events @@ -11,7 +11,7 @@ user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64 user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)" user_handle_signal(void *env, int target_sig) "env=%p signal %d" -user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d(" +user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d)" user_queue_signal(void *env, int target_sig) "env=%p signal %d" user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr 0x%"PRIx64 " current psw.addr 0x%"PRIx64 From patchwork Mon Jun 21 11:04:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 464501 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp2455397jao; Mon, 21 Jun 2021 04:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHgAQVxwm7QrC3F/ridJfhUI+jWMBERNBKOUNkv/az+rVWLmdBQ1pvIJJnq2GpQQA+oszv X-Received: by 2002:aa7:d955:: with SMTP id l21mr1629231eds.35.1624273597064; Mon, 21 Jun 2021 04:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624273597; cv=none; d=google.com; s=arc-20160816; b=M93sR/1uepRhAUnW6EZcE8JZcbKezcjS6nRylPtv+pOq8riOy+p4nVTThUGi6y0yGq XP5C61NBXu2tsFe17f3R2FlPy3J3hHhSIQDLTXT5ZDMHqWWxAPAmQzAIOZYXsBDuCAzT gupBAFDd3Y1kxzQCNdGjuTAwM9eCS/8GzagVcfaYHufH2loPujI2k9TxmBs1NcYc7Lnv iWt7Pjdfi/rkk0EsMJZjKeLJX88pkMlnoJ8z6+t6VUnOFYKbj9TGSq9V1LDSVlmImW2i 0M1OsAMBz1sEp2KonK+1SMo4AbcMepzFIHm02Ej6K3fJOgvEqDzc+hf09Ptq4yffaaj/ YRyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=JUCjvH8bfnNsI1Ymp6vNwrdSja9oL3wzEE0EhWgOHs0=; b=x9ZljG0aa/6fhNhvvKn9f7IuaHvKIgowwsJ49HFh89AltHMtuN5Ydf4Vi3D8oOX+6v yHsEJyaztI1F4pDOKDRSrQsN3H0ybryi0R1t1z4vDo+BgG706zLP5jnK5HL4l3sCNL5L vysR+bFVkny/ZcBz1mROM3IBjZ1q9BdVLNELxYPyhtUaqz754P8oAjXu9iyD/rct0/lh e62uFC/EWxER6UYCYnbAAUGACCbg3Z/n31c1ByQ8SWu5Kig6CKYfVrEFc5apiUp7CGC6 REVEZMPBko1vakIBAO7NVulvejaHMHIPU55beiaYbyrE8/s0K9Z8rwhRgOLkv269Jw+P AvWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y14si6288828edw.542.2021.06.21.04.06.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 04:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:43408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvHlE-0005wj-2D for patch@linaro.org; Mon, 21 Jun 2021 07:06:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjb-0002tp-Ko for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:55 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:47679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvHjZ-0003xf-Ir for qemu-devel@nongnu.org; Mon, 21 Jun 2021 07:04:55 -0400 Received: from quad ([82.142.1.74]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MsqMq-1l6lY13DNQ-00t9uv; Mon, 21 Jun 2021 13:04:49 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 7/9] linux-user: Check for ieee128 fpbits in PPC64 HWCAP2 feature list Date: Mon, 21 Jun 2021 13:04:43 +0200 Message-Id: <20210621110445.231771-8-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210621110445.231771-1-laurent@vivier.eu> References: <20210621110445.231771-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:PIwb6DNOfopOaQrbAnvm93XkwkVVkcGckwDMH0vcWJdJkm2Tnbq KuGwqD/CrQR8TYyxcFdKdWxlRgqvdTPR3B3MgDlKF4sWUPAxfQKKzyzkedaHjz2N3kQauKk 07m52XWAP/XJSJUbdsMvtiWJsektEQGSjYknq21iuST+uGokHgJGIYTs9Cg50QbWjyQImGw fk4xu5HyKuL8/Q+14P9nQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:38uxI1WHtSw=:dXl0vNMatlCPs/7fs4v/jk oeYWYqzHcn//08K1NtAvLbpUFxCKilkUXjNaN6TDbdapjzMkX/OGPPcQA8c/y5+YRNtgBCBki euDmED4ucBVCUOXRKK73LOI6hN2lkW5MhOGX7WbletrfjHkBPe2s1xYuXnnTlQRW2OWOui7Qb BEZEInYG3HdEN5zRGf7JhBC1dMEpll7C5gozsZRxfBHjI+tteJpJEbtzLa34/rcQfH4p7VwzM +zPBiGYEuBGVqsFNFTMTxrfhm2dJ9XRkCOuEUPD9TtJjcfnJrj3gTnaMmqZ/YV1JqYu8xLYGy bgp6+dNSExw7mb/vqIQNL1kdtUu/QHqqzjnrChQ1kSBragScyhXNjY5L0FNoKnwZH0K8l2DIG I2dJsSJARvu7IF/zc5LxKRRAnMFZ5t1ifPSg4VZwqXaa1a+tsyK3KL/KBbrtJhAUr9qLxrXrj LQAjYMR9n92dWVLdpEooBPrGF+ac/kEp4psYEssm4E3r8UkZ7fOIA3CxpLveWDl3M0FoTIl4K xVIX26fzX3D07oEnpVofvc= Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Florian Weimer , Laurent Vivier , Khem Raj Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Khem Raj glibc 2.34 is now checking for this in hwcaps at runtime [1] and failing to run the binary if machine does not support 128bit IEEE fp Fixes Fatal glibc error: CPU lacks float128 support (POWER 9 or later required) [1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d337345ce145e23c5f3a956f349d924fdf54ce2d;hp=eb24865637a271ab7dad13190330105eab0d478d Signed-off-by: Khem Raj Cc: Florian Weimer Reviewed-by: Laurent Vivier Message-Id: <20210614191729.2981488-1-raj.khem@gmail.com> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.31.1 diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 17ab06f612dd..e7dd18fd40bf 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -830,7 +830,7 @@ static uint32_t get_elf_hwcap2(void) PPC2_ISA207S), QEMU_PPC_FEATURE2_ARCH_2_07 | QEMU_PPC_FEATURE2_VEC_CRYPTO); GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00 | - QEMU_PPC_FEATURE2_DARN); + QEMU_PPC_FEATURE2_DARN | QEMU_PPC_FEATURE2_HAS_IEEE128); #undef GET_FEATURE #undef GET_FEATURE2