From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149069028166244.908380251948984; Tue, 28 Mar 2017 01:38:01 -0700 (PDT) Received: from localhost ([::1]:51567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmdc-0000p9-Gx for importer@patchew.org; Tue, 28 Mar 2017 04:38:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmc9-0008GM-8P for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmc7-000148-KK for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:29 -0400 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:33584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmc7-00013R-EC for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:27 -0400 Received: by mail-wr0-x230.google.com with SMTP id w43so79527968wrb.0 for ; Tue, 28 Mar 2017 01:36:27 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e16sm3868381wra.62.2017.03.28.01.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:23 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3E34B3E053E; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GD8ZnZqGLLy0X89YV8OJ53xghC4jA3XIV3HFKJxdLcU=; b=AZypt11rXwLORb2qvXUZ1bZcidYuO/TBv2Ki6wEBjmy136hGr3Um9rdb02DrzfuWYL XbaQorw+8+dJAogBuL416nqvWrBeRl0kQrS8imfmQ0EhN9VkPLEEhin5ndEuddxwNgdT 7F5aqOdW76QP8SISKc62fLrD2bHyihXbUuoAQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GD8ZnZqGLLy0X89YV8OJ53xghC4jA3XIV3HFKJxdLcU=; b=bfh85n90xG/JlOGyPRpIpHRtY9sHGkAsKjSYOJ+hBNqLE2J/kCjmVnRWNJZlTUKM3t LpNwCzyN0WeB8iDbBONnMVIYzH3YifVB4Uwk7Z0n2S2/i1QnnAqsEreEOT4y/sOkUMHf N9gTH+ioLF77puMEikeifk+jPP3REGII8PaXMgRUjY0OfKmi7MIRPz6prP033hMjk/XS bP8GgoWiPtOG4aumsgpJrvFry8PbImd4xnArQxnhHxgiTK865lUMcoKbu72zS35tmUZ2 nwB3QoI239jYmQwSWE/p184GQ2Fzu4Elks4nXX8ZaRya9j/tBjh3r2VVCiaxyuMzIpIp sSzw== X-Gm-Message-State: AFeK/H2CLhw8wPmFbl2EcoNqRtCymUfdReKUxXgx//4PGO7Or4i08/4Ml3yuksO2QqTDCuWM X-Received: by 10.28.230.204 with SMTP id e73mr13530725wmi.89.1490690185366; Tue, 28 Mar 2017 01:36:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:18 +0100 Message-Id: <20170328083623.10396-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 Subject: [Qemu-devel] [PATCH v2 1/6] user-exec: handle synchronous signals from QEMU gracefully X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, Riku Voipio , a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 When "tcg: enable thread-per-vCPU" (commit 3725794) was merged the lifetime of current_cpu was changed. Previously a broken linux-user call might abort() which can eventually escalate into a SIGSEGV which would then crash qemu as it attempted to deref a NULL current_cpu. After commit 3725794 it would attempt to fixup state and re-start the run-loop and much hilarity (i.e. a looping lockup) would ensue from jumping into a stale jmp_env. As we can actually tell if we are in the run-loop from looking at the cpu->running flag we should catch this badness first and abort() cleanly rather than try to soldier on. There is a theoretical race between the flag being set and sigsetjmp refreshing the jump buffer but we can try really hard to not introduce crashes into that code. [LV: setgroups03 fails on powerpc LTP] Reported-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- user-exec.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/user-exec.c b/user-exec.c index 6db075884d..a8f95fa1e1 100644 --- a/user-exec.c +++ b/user-exec.c @@ -57,10 +57,23 @@ static void cpu_exit_tb_from_sighandler(CPUState *cpu, = sigset_t *old_set) static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, int is_write, sigset_t *old_set) { - CPUState *cpu; + CPUState *cpu =3D current_cpu; CPUClass *cc; int ret; =20 + /* For synchronous signals we expect to be coming from the vCPU + * thread (so current_cpu should be valid) and either from running + * code or during translation which can fault as we cross pages. + * + * If neither is true then something has gone wrong and we should + * abort rather than try and restart the vCPU execution. + */ + if (!cpu || !cpu->running) { + printf("qemu:%s received signal outside vCPU context @ pc=3D0x%" + PRIxPTR "\n", __func__, pc); + abort(); + } + #if defined(DEBUG_SIGNAL) printf("qemu: SIGSEGV pc=3D0x%08lx address=3D%08lx w=3D%d oldset=3D0x%= 08lx\n", pc, address, is_write, *(unsigned long *)old_set); @@ -83,7 +96,7 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigne= d long address, * currently executing TB was modified and must be exited * immediately. */ - cpu_exit_tb_from_sighandler(current_cpu, old_set); + cpu_exit_tb_from_sighandler(cpu, old_set); g_assert_not_reached(); default: g_assert_not_reached(); @@ -94,7 +107,6 @@ static inline int handle_cpu_signal(uintptr_t pc, unsign= ed long address, are still valid segv ones */ address =3D h2g_nocheck(address); =20 - cpu =3D current_cpu; cc =3D CPU_GET_CLASS(cpu); /* see if it is an MMU fault */ g_assert(cc->handle_mmu_fault); --=20 2.11.0 From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490690579051772.5568679912161; Tue, 28 Mar 2017 01:42:59 -0700 (PDT) Received: from localhost ([::1]:51594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmiQ-00047P-1b for importer@patchew.org; Tue, 28 Mar 2017 04:42:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmc9-0008GP-9k for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmc8-00015L-GM for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:29 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmc8-00014P-B9 for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:28 -0400 Received: by mail-wr0-x229.google.com with SMTP id w43so79528598wrb.0 for ; Tue, 28 Mar 2017 01:36:28 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b82sm2639971wmh.4.2017.03.28.01.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:24 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 50B313E058D; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k0LCM6/jBI8p+CjBFMpPRBkk39PeRiGE10e5oOJcXAM=; b=jjMrD8+Np8zWCdfTVi6t2uQDFSxIGzlF3G8nmpvCzyhFvFG8lvwVqj5M/bJ361R9XL 0a4vPKL8VYJFtUn9UH+pQx0kq1+lo1R6lg8qfZyfzbKOID86z8C57B7ZulaXiK8+ewEA wb7RxdSQzuwdn5loFldLAH9HSrfv9bCT7AcDk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k0LCM6/jBI8p+CjBFMpPRBkk39PeRiGE10e5oOJcXAM=; b=rYE9WV4atVhMHE3dfvxJHIVeRWukgodj9toLc2LKHAo70pVR5nL7Z3FcDt01PrjVD4 nZpwS+Qx0HDg/YTcRyC899ke3KjdYbMSwEzYRuLnkb5EzUJvd6BqKudP6Cbot/kp1XKB hbzHnNOrq7olKyat/jRvf29bE12w1IxP2HNZo5gSfrPN3bxesfTgb4QP6HV71DAhsqMK 13MPmvBupTkDcMy5dvYA6VjFWfSlkTXpfsZP2YcjNoxthJ38f6EZ/TI1d+LneNEIZnsa 8ODvuLdlnKU50+svtMfgwQoWWTYcWSNyJ6R77jEh0/gzOTbnNsSqUN/9vtuEXLdeNiAQ 7jaw== X-Gm-Message-State: AFeK/H0QOOQjDcudWErsijI+elD6egKFpJkWez198EbD5x37P+O0a68LoC0BZ5KenDkWfJ/0 X-Received: by 10.28.20.70 with SMTP id 67mr13584522wmu.86.1490690186283; Tue, 28 Mar 2017 01:36:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:19 +0100 Message-Id: <20170328083623.10396-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 Subject: [Qemu-devel] [PATCH v2 2/6] bsd-user: align use of mmap_lock to that of linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 The introduction of stricter mmap_lock checking in translate-all broke the BSD user build. The working mmap_lock functions were hidden behind CONFIG_USE_NPTL which is never defined. This patch brings them inline with linux-user. Despite the disapearence of the comment "We aren't threadsafe to start with..." this doesn't make bsd-user so. It will still need the rest of the fixes that have been done in linux-user ported over. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- bsd-user/mmap.c | 13 +------------ bsd-user/qemu.h | 2 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 1ad018a127..7f2018ede0 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -24,8 +24,7 @@ =20 //#define DEBUG_MMAP =20 -#if defined(CONFIG_USE_NPTL) -pthread_mutex_t mmap_mutex; +static pthread_mutex_t mmap_mutex =3D PTHREAD_MUTEX_INITIALIZER; static int __thread mmap_lock_count; =20 void mmap_lock(void) @@ -62,16 +61,6 @@ void mmap_fork_end(int child) else pthread_mutex_unlock(&mmap_mutex); } -#else -/* We aren't threadsafe to start with, so no need to worry about locking. = */ -void mmap_lock(void) -{ -} - -void mmap_unlock(void) -{ -} -#endif =20 /* NOTE: all the constants are the HOST ones, but addresses are target. */ int target_mprotect(abi_ulong start, abi_ulong len, int prot) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 2b2b9184e0..b550cee0cb 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -209,10 +209,8 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong o= ld_size, abi_ulong new_addr); int target_msync(abi_ulong start, abi_ulong len, int flags); extern unsigned long last_brk; -#if defined(CONFIG_USE_NPTL) void mmap_fork_start(void); void mmap_fork_end(int child); -#endif =20 /* main.c */ extern unsigned long x86_stack_size; --=20 2.11.0 From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490690281448453.2415839085619; Tue, 28 Mar 2017 01:38:01 -0700 (PDT) Received: from localhost ([::1]:51566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmda-0000m7-60 for importer@patchew.org; Tue, 28 Mar 2017 04:37:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmc9-0008GO-9j for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmc8-00015D-EU for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:29 -0400 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:35170) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmc8-00014S-7n for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:28 -0400 Received: by mail-wr0-x230.google.com with SMTP id u1so92922063wra.2 for ; Tue, 28 Mar 2017 01:36:28 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v108sm3867130wrc.41.2017.03.28.01.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 630E73E0600; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JCQcVoB9U4xa6DiRX5jw8lbZ+YKJQ8uMF2rGlsezMmQ=; b=C+EGTTBnuNdemLCQMsHZIph8DAq1v/uiHxa3f5SWXOqJl+zh3cdERc3VcLjl/gSnAK ru71q48HtMNtRjlnH9gcp7vdfBLwg/71vzyQ3vNuN7NdoDYVCJAFDG9pCH1ay76+uwat 6qpERKdkwWF267fX8JKgeXkUHJrKOxb4A7Z5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JCQcVoB9U4xa6DiRX5jw8lbZ+YKJQ8uMF2rGlsezMmQ=; b=fj4v0J4/R/4Mpt8JQkXd1tBJx+q//fiMXBK9yDdimmYgWCz9sXE1dFf5H7XWDx4XmN eIweltVO1cv062Zs2A6i6az3XuVmnBfHLDWULSAmSX0rXDaHZcQxhhRmptw2GZvcR1md dvtF5p3Pk+zPyjEGxC3VMfseP59e6JPal705G0jSvdps3JS1J93MnuH28QhFuBoBXzdU np310cmcsjFJowlgleOie2L0Q2lavFZBeoDIW5kf/bn4Ogt7OYYKF9PRCMTC7kJYPEQ7 W0xc9V6CBj7ezYtssZKkYaBpv/wHVbgrww1YAGyp7xSSlBG/w9aQzuItshG8V4c839y1 ohWQ== X-Gm-Message-State: AFeK/H1z2kyldhW+Gv1ontDWkytYGGVhLPGXWpuXkDa/oWkuBNHHxaabXXRxDW6OYkKwpQCH X-Received: by 10.223.171.79 with SMTP id r15mr14031222wrc.148.1490690187199; Tue, 28 Mar 2017 01:36:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:20 +0100 Message-Id: <20170328083623.10396-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 Subject: [Qemu-devel] [PATCH v2 3/6] ui/console: ensure do_safe_dpy_refresh holds BQL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, Peter Crosthwaite , a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 I missed the fact that when an exclusive work item runs it drops the BQL to ensure all no vCPUs are stuck waiting for it, hence causing a deadlock. However the actual helper needs to take the BQL especially as we'll be messing with device emulation bits during the update which all assume BQL is held. We make a minor cpu_reloading_memory_map which must try and unlock the RCU if we are actually outside the running context. Reported-by: Laurent Desnogues CC: Gerd Hoffmann CC: Paolo Bonzini Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- cpu-exec-common.c | 2 +- ui/console.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu-exec-common.c b/cpu-exec-common.c index 0504a9457b..e81da276bb 100644 --- a/cpu-exec-common.c +++ b/cpu-exec-common.c @@ -35,7 +35,7 @@ void cpu_loop_exit_noexc(CPUState *cpu) #if defined(CONFIG_SOFTMMU) void cpu_reloading_memory_map(void) { - if (qemu_in_vcpu_thread()) { + if (qemu_in_vcpu_thread() && current_cpu->running) { /* The guest can in theory prolong the RCU critical section as long * as it feels like. The major problem with this is that because it * can do multiple reconfigurations of the memory map within the diff --git a/ui/console.c b/ui/console.c index 937c950840..dd27c9501b 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1586,7 +1586,9 @@ bool dpy_gfx_check_format(QemuConsole *con, static void do_safe_dpy_refresh(CPUState *cpu, run_on_cpu_data opaque) { DisplayChangeListener *dcl =3D opaque.host_ptr; + qemu_mutex_lock_iothread(); dcl->ops->dpy_refresh(dcl); + qemu_mutex_unlock_iothread(); } =20 static void dpy_refresh(DisplayState *s) --=20 2.11.0 From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490690440624566.0720379162938; Tue, 28 Mar 2017 01:40:40 -0700 (PDT) Received: from localhost ([::1]:51583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmgB-0002c8-F2 for importer@patchew.org; Tue, 28 Mar 2017 04:40:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmcA-0008GY-IG for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmc9-00015z-Fs for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:30 -0400 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]:34775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmc9-00015R-AN for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:29 -0400 Received: by mail-wr0-x232.google.com with SMTP id l43so92602043wre.1 for ; Tue, 28 Mar 2017 01:36:29 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o15sm3854931wra.61.2017.03.28.01.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:25 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 747533E0632; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lLQqSMJCk0I/TFhPrU94g2NRUMy855zAUX4c+qVRZBc=; b=BOihpOuNYo0CmOVP5OOaxd5+YEngEr4qgmTo86sao9HSSA9WHjW7RydllyGzkHAbWi XzQONi+LneQiptGwfQVS6czeRpN7swAEI9Hs56R3fUAklOqKZkyhHCgfLiOVDSSjZle0 rMygiVgo+PtOVwlICVsmACKixHWw+XAeepdRg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lLQqSMJCk0I/TFhPrU94g2NRUMy855zAUX4c+qVRZBc=; b=el03gfv3hA7I8jMr1ZvOTlyNKO3uf5ui1Ax9cr+W7t5L6WaGLi4O3du0eg00PnFnD+ YPv1WvIOaQU2A1K2I5LuUkShm7KyOh9jFq2Ja4T1fVdlGRIVWus+5AUTLt/HfMSYAL6K wz2yg8+ibsoLqUC+ISa8nSWtaxIKWwDw0DyMCJFDkWs/pVwlmmWe25q9cqIBxQU8+vUX ZvYrhv9a+/rOA0Y7LkI5qDmlX3QEQGbMZppMtSrSDlbLRbBfZ89mx4abyKWnA0zNNNOJ YfDuas04X2yP3Y9Weimym8f6/ncfMSJWwNji6VxIZwow4J3Pw7qByXRGcjGgzFSyr3Dt JLIg== X-Gm-Message-State: AFeK/H2J0iKEeeQt0vEe6x+tk42Eo89UNd8/1adXcB3750x7GkAEVNDOB51hWSWZ6O2KBWav X-Received: by 10.223.176.204 with SMTP id j12mr26517984wra.10.1490690188120; Tue, 28 Mar 2017 01:36:28 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:21 +0100 Message-Id: <20170328083623.10396-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::232 Subject: [Qemu-devel] [PATCH v2 4/6] ui/console: use exclusive mechanism directly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 The previous commit (8bb93c6f99) using async_safe_run_on_cpu() doesn't work on graphics sub-system which restrict which threads can do GUI updates. Rather the special casing MacOS we just directly call the helper and move all the exclusive handling into do_dafe_dpy_refresh(). The unfortunate bouncing of the BQL is to ensure there is no deadlock as vCPUs waiting on the BQL are kicked into their quiescent state. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- ui/console.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/console.c b/ui/console.c index dd27c9501b..419b098c11 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1576,19 +1576,22 @@ bool dpy_gfx_check_format(QemuConsole *con, } =20 /* - * Safe DPY refresh for TCG guests. This runs when the TCG vCPUs are - * quiescent so we can avoid races between dirty page tracking for - * direct frame-buffer access by the guest. + * Safe DPY refresh for TCG guests. We use the exclusive mechanism to + * ensure the TCG vCPUs are quiescent so we can avoid races between + * dirty page tracking for direct frame-buffer access by the guest. * * This is a temporary stopgap until we've fixed the dirty tracking * races in display adapters. */ -static void do_safe_dpy_refresh(CPUState *cpu, run_on_cpu_data opaque) +static void do_safe_dpy_refresh(DisplayChangeListener *dcl) { - DisplayChangeListener *dcl =3D opaque.host_ptr; + qemu_mutex_unlock_iothread(); + start_exclusive(); qemu_mutex_lock_iothread(); dcl->ops->dpy_refresh(dcl); qemu_mutex_unlock_iothread(); + end_exclusive(); + qemu_mutex_lock_iothread(); } =20 static void dpy_refresh(DisplayState *s) @@ -1598,8 +1601,7 @@ static void dpy_refresh(DisplayState *s) QLIST_FOREACH(dcl, &s->listeners, next) { if (dcl->ops->dpy_refresh) { if (tcg_enabled()) { - async_safe_run_on_cpu(first_cpu, do_safe_dpy_refresh, - RUN_ON_CPU_HOST_PTR(dcl)); + do_safe_dpy_refresh(dcl); } else { dcl->ops->dpy_refresh(dcl); } --=20 2.11.0 From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490690519267580.5143909536787; Tue, 28 Mar 2017 01:41:59 -0700 (PDT) Received: from localhost ([::1]:51592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmhS-0003aa-8h for importer@patchew.org; Tue, 28 Mar 2017 04:41:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmcB-0008GZ-29 for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmcA-00016L-A6 for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:31 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:34786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmcA-00015x-4i for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:30 -0400 Received: by mail-wr0-x22b.google.com with SMTP id l43so92602680wre.1 for ; Tue, 28 Mar 2017 01:36:30 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k203sm2639601wmk.4.2017.03.28.01.36.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:26 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 85B563E0641; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yPpMbOkcbBSmmD/xyEr7Y73S0zzL86SZ6r6dr9ZTzp4=; b=V6lQ1zFJ5uIlciMfZ5GjcFfHKFBGvyuqcUikTvt/LTJc6Gr6HWMGIXvHIUr9umnoD3 QL7CUMT10VQdAVSS2tyVBZHCJqTur2+SBCay3A/5YtJD4Ndap93DvNpjuoV50XYhmFbQ XeLvnchszbQ1tX0ZSARjWkDvLulwAPDLew1aI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yPpMbOkcbBSmmD/xyEr7Y73S0zzL86SZ6r6dr9ZTzp4=; b=FKROOiyzJ0xZMM4TqpzaHe+a68nqLCauvd6+Z0Cw3J7bL6shdxbCjDuDPYBi/Skh1D yaij1Ud9sHkXd9UTlbhdgVnIVklU/81UFbk1JC8qVgKElZXM7BPKu5zIDcCrgsNNfnaZ KRUjuZbmy0zYwvmcfzb1T3NgFfE4FLnPxZ7UU5DoBhQCpfJOFS0j0EfWhEuqcPdn9Oy+ +u3w0S62clJ+0KK+5o5EWDrkl8UIlydgN/gdVKPKU238aqt3mG8x5zHfnDpjCJxO9Jq4 tV19wyT5buxgYf7FNHSmU/yvItV3oKhwT9Nk3ZGtSTBufBpvBTLjFpu848g0X6UszHqI B2jw== X-Gm-Message-State: AFeK/H0CuvJQYrkMPOE42blmsQ+5dPK1Jy+dV+7TWsk0MHd1fapFTHDB33i0tzD53GEYymaH X-Received: by 10.28.169.199 with SMTP id s190mr13170305wme.2.1490690189015; Tue, 28 Mar 2017 01:36:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:22 +0100 Message-Id: <20170328083623.10396-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b Subject: [Qemu-devel] [PATCH v2 5/6] tcg: Add a new line after incompatibility warning X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, Peter Crosthwaite , a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Pranith Kumar Signed-off-by: Pranith Kumar Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- cpus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpus.c b/cpus.c index 167d9615e1..68fdbc40b9 100644 --- a/cpus.c +++ b/cpus.c @@ -209,7 +209,7 @@ void qemu_tcg_configure(QemuOpts *opts, Error **errp) if (!check_tcg_memory_orders_compatible()) { error_report("Guest expects a stronger memory ordering= " "than the host provides"); - error_printf("This may cause strange/hard to debug err= ors"); + error_printf("This may cause strange/hard to debug err= ors\n"); } mttcg_enabled =3D true; } --=20 2.11.0 From nobody Sat Apr 27 22:03:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490690284971179.96733643554387; Tue, 28 Mar 2017 01:38:04 -0700 (PDT) Received: from localhost ([::1]:51568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmdf-0000tL-Kk for importer@patchew.org; Tue, 28 Mar 2017 04:38:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csmcC-0008Gz-Gc for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csmcB-000175-EG for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:32 -0400 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:34802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csmcB-00016a-9U for qemu-devel@nongnu.org; Tue, 28 Mar 2017 04:36:31 -0400 Received: by mail-wr0-x22b.google.com with SMTP id l43so92603660wre.1 for ; Tue, 28 Mar 2017 01:36:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i133sm2617173wmg.26.2017.03.28.01.36.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 01:36:26 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 970293E0865; Tue, 28 Mar 2017 09:36:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kDjZR6oYxp80UMoAsl1O+2zWzocV8TgVh3XKUb5mISE=; b=CzDB8OjzW/BWHJ1ICeJKGW7iIv4i1ArJys8ddo+NOacCam/dX9hprZjUieY38AnjRq sggfPSdKx847yZGDOsZrBf+wsNszSwE2jZji6X5V5wKFM0WYIo5stz3M5HQHxbGRcJ/M Q9Jxcvf99Ep/HoZlWxIqcgvbWPJG2I5c3Snrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kDjZR6oYxp80UMoAsl1O+2zWzocV8TgVh3XKUb5mISE=; b=pFZDd1oEHIWqKkZ32rBId0a+3O4P2gf/WrLjDkRo6VYIcI+7BysbsaoGOHOU/1TsFv v3ke+5MDqQTB9+WLIu8Vvw2DxmRiCLPJpdsJPvB6S8g6kdXra2aNncbOtoNqYl37seR/ r3JUpN7JjtFcVGkINjLKDHkX8mgTXrMDXDE/TRk7Cps3+kdMD3YQG9inJ1b4SlbJLa8r jTDu2H2Dq1RqzBRzxM2B+6AektiKU4swqnugBg6D/2oxGRTFo+i9rn6aiSB7oN/6DwUk TtZqab7udVHZl7lr/RWaMQH+9Qx9WWuLpS3Mnw0xGQGEqeYmsvRLESbQglk4Aya4vDAv p6vQ== X-Gm-Message-State: AFeK/H0IdWZ1bNiRd9ErJ3X+NdxU0zJhO20v3K+90s4t+Z3YNGwvUGcgJnX+vj92VWkElx4n X-Received: by 10.223.164.150 with SMTP id g22mr26095859wrb.92.1490690190200; Tue, 28 Mar 2017 01:36:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com, kraxel@redhat.com Date: Tue, 28 Mar 2017 09:36:23 +0100 Message-Id: <20170328083623.10396-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170328083623.10396-1-alex.bennee@linaro.org> References: <20170328083623.10396-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b Subject: [Qemu-devel] [PATCH v2 6/6] replay/replay.c: bump REPLAY_VERSION X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- replay/replay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replay/replay.c b/replay/replay.c index 78e2a7e570..9e0724e756 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -22,7 +22,7 @@ =20 /* Current version of the replay mechanism. Increase it when file format changes. */ -#define REPLAY_VERSION 0xe02005 +#define REPLAY_VERSION 0xe02006 /* Size of replay log header */ #define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) =20 --=20 2.11.0