From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333231672662.767392647937; Fri, 19 Nov 2021 06:47:11 -0800 (PST) Received: from localhost ([::1]:51392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5AT-0004lC-UH for importer@patchew.org; Fri, 19 Nov 2021 09:47:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo599-0002hW-A7 for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:47 -0500 Received: from [2a00:1450:4864:20::52a] (port=37668 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo597-0003Zx-F1 for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:47 -0500 Received: by mail-ed1-x52a.google.com with SMTP id e3so43703406edu.4 for ; Fri, 19 Nov 2021 06:45:42 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S4WcyNcg5hoULtV70DvWKqOAgeFCc06Rzhg1frdIwHA=; b=Do6umhuk2XKgbikNyj5z4g2q5TiBfCDKffpQJ9djOzjJ5tvuShBRos20QqZ5cL8+T9 Wf+G68dCf8tnRkzsnvW3FWZZByGH894q6EZzQ3mGY3gOA1FvCHIM1TZf7CQbB9nApqo+ tMc9fXfVcA+Z9i02ve7z66HhyOe3ufjyM1AGUGk595feIpWDmgK/yjp0iu66/tYEmBN6 v84wCsYSOTw6xrlzdmh7MwE2xZ6U+Jj1YvdENPInwPjDqQed8MCUQe9Q/+K7hb0egZ24 bPMADfLCTTtQ1GUgahhGEEGmf0K38YZ3B45vMR5z4IC8ypoCj15Gt8mXOsrV9jwv26+v Q0jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=S4WcyNcg5hoULtV70DvWKqOAgeFCc06Rzhg1frdIwHA=; b=Hjo2II4IA0Y15xStyffp4/8feJ+mUwnz9uCEcQnK9oByB4pH8lQ2hXXrW3APGw+E2V pmN17Kw9xcKdCJ2zGl4a8JRY4E2a03Q9/AgDoO+4J3wIHF9jfrd1wyGojqhAKqZ+UE2S FcGVJ6gVwZ2E5c72J+MqoZ5k2SLNQssbOSZHnoScCljQdqlXCi+BI1BusvIH1awXV6Qr LTe7TWxiV4KjmiFtqtoc4V97meKW3a/pgJnyBCiQMDJisXG+5EimoVRED22BADF2KsRm CXWUdLXdMITo7H2NXjgE1Ih47B9Yg+ofQSC+CkXL7nJpDMB/zvw7ZIP0SURhlh0RKJAu 4iYw== X-Gm-Message-State: AOAM532a2r9HV4pqbLVSXZTwKwlMGUEDyHkwa0z3eDvfjeLqVpZuYE0O 5G5uzsd7nl5QA5+9O4Lj56lGFrvE3J0= X-Google-Smtp-Source: ABdhPJz5IVJR4urJXUmauBn5PhidJdWIs4egx88QuDIArXD3c6fOlXf/Q6FKGuSGdVdMSKJEGi7TdA== X-Received: by 2002:a17:906:ad89:: with SMTP id la9mr8327268ejb.178.1637333141253; Fri, 19 Nov 2021 06:45:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 1/7] meson: fix botched compile check conversions Date: Fri, 19 Nov 2021 15:45:33 +0100 Message-Id: <20211119144539.285740-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333233741100007 Content-Type: text/plain; charset="utf-8" Fix a bunch of incorrect conversions from configure to Meson, which result in different outcomes with --extra-cflags=3D-Werror. pthread_setname_np needs "#define _GNU_SOURCE" on Linux (which I am using also for the non-Linux check, so that it correctly fails with an error about having too few parameters). Fix struct checks to use has_type instead of has_symbol, and "#define _GNU_SOURCE" too in the case of struct mmsghdr. Remove an apostrophe that ended up at the end of a #include line. Reported-by: Peter Maydell Signed-off-by: Paolo Bonzini --- meson.build | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 2ece4fe088..93a5e50a16 100644 --- a/meson.build +++ b/meson.build @@ -1547,8 +1547,6 @@ config_host_data.set('CONFIG_INOTIFY', cc.has_header_symbol('sys/inotify.h', 'inotify_init')) config_host_data.set('CONFIG_INOTIFY1', cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) -config_host_data.set('CONFIG_IOVEC', - cc.has_header_symbol('sys/uio.h', 'struct iovec')) config_host_data.set('CONFIG_MACHINE_BSWAP_H', cc.has_header_symbol('machine/bswap.h', 'bswap32', prefix: '''#include @@ -1561,8 +1559,6 @@ config_host_data.set('CONFIG_SYSMACROS', cc.has_header_symbol('sys/sysmacros.h', 'makedev')) config_host_data.set('HAVE_OPTRESET', cc.has_header_symbol('getopt.h', 'optreset')) -config_host_data.set('HAVE_UTMPX', - cc.has_header_symbol('utmpx.h', 'struct utmpx')) config_host_data.set('HAVE_IPPROTO_MPTCP', cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) =20 @@ -1574,6 +1570,14 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', cc.has_member('struct stat', 'st_atim', prefix: '#include ')) =20 +# has_type +config_host_data.set('CONFIG_IOVEC', + cc.has_type('struct iovec', + prefix: '#include ')) +config_host_data.set('HAVE_UTMPX', + cc.has_type('struct utmpx', + prefix: '#include ')) + config_host_data.set('CONFIG_EVENTFD', cc.links(''' #include int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) @@ -1615,7 +1619,7 @@ config_host_data.set('CONFIG_POSIX_MADVISE', cc.links= (gnu_source_prefix + ''' #include int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }''= ')) =20 -config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(''' +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(gnu_sourc= e_prefix + ''' #include =20 static void *f(void *p) { return NULL; } @@ -1626,7 +1630,7 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID= ', cc.links(''' pthread_setname_np(thread, "QEMU"); return 0; }''', dependencies: threads)) -config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(''' +config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_sour= ce_prefix + ''' #include =20 static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; } @@ -1662,8 +1666,10 @@ config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_s= ource_prefix + ''' =20 have_l2tpv3 =3D false if not get_option('l2tpv3').disabled() and have_system - have_l2tpv3 =3D (cc.has_header_symbol('sys/socket.h', 'struct mmsghdr') - and cc.has_header('linux/ip.h')) + have_l2tpv3 =3D cc.has_type('struct mmsghdr', + prefix: gnu_source_prefix + ''' + #include + #include ''') endif config_host_data.set('CONFIG_L2TPV3', have_l2tpv3) =20 @@ -1689,7 +1695,7 @@ config_host_data.set('CONFIG_NETMAP', have_netmap) # xfs headers will not try to redefine structs from linux headers # if this macro is set. config_host_data.set('HAVE_FSXATTR', cc.links(''' - #include ' + #include struct fsxattr foo; int main(void) { return 0; --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333233788465.1857252421306; Fri, 19 Nov 2021 06:47:13 -0800 (PST) Received: from localhost ([::1]:51414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5AW-0004ls-D0 for importer@patchew.org; Fri, 19 Nov 2021 09:47:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59A-0002hU-6N for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:48 -0500 Received: from [2a00:1450:4864:20::533] (port=47062 helo=mail-ed1-x533.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo597-0003a2-Bb for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:46 -0500 Received: by mail-ed1-x533.google.com with SMTP id y13so43518417edd.13 for ; Fri, 19 Nov 2021 06:45:43 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LNmgxkki39VS/5cKODPLgvf7JSDULcUYXDW8fN8IF6A=; b=dyX+mNcvQJmdq3ND7VG6ovtHF8sblfcA57xMEPoj9x5DhAYFxfqOLEXlNWkweOruq1 SzCTro9MVm21zTBT3kc3VNy7Plhs3KighM1BPyCWVl/WFa2OIfM+ao3n+U/8u1NF1qk0 4PFdrzNdg04GVB0cWkswIKFneDkGw7jDeScaq58LqJ2X8r8tJ0Vo7T9l9Dkk/qHVWb+g GKbk5Nl+4R9jlZidxiVG4agTles9RlVCyA5YlBhWbTWJ7/CPunP+d3XeqgmbtUK97qoD vQmf3+kdhmXBe6Ral6zRLGbYOzWR+M7X3aRdM9wRK3BTbDzlq4dXGKb4aae7XqrMg7ox Yz0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LNmgxkki39VS/5cKODPLgvf7JSDULcUYXDW8fN8IF6A=; b=JX42wiSJlFEaOOlJ2HMNZQ/CVGSHIGvf6KvyL+JlGa67i3wLrNpALB5UsweDMhQ/aa alWf9eLlT3S+5eJ5R4yy0T+7fxD5yjlrFr1KLfRgcV9+MhZyymjaMGzq1y+996TIDdwf 171plpJmSRPSzbOs+sHl57iN9ghgoBs/lcMy8RyKr6aouo50PEB6eyOH5LgPvVErdGx3 ak3mY5Oaov3ImEsMlVCBciLeKU3dLhiaZpxtMmQzbzdSQpNSpmFjUdWFod4mTH074MCx PUsY0ciHT85icXsfbqxTRIaeL6RRdU+mn1V3Ut3Ya9HtQf4zYV4R7O7QA2EK+0tE0aRv OYoA== X-Gm-Message-State: AOAM5321ghUpRBIIV2kRih6lV4GQFS+eBF9bXIPCtCHwAsaqw20imEID l1a0FHt1sBZ69HancoXGhdcDmPprz1o= X-Google-Smtp-Source: ABdhPJxU2z2PX18hL95TBW5k/aUxxI+q4ViLgiy1yMPi/S69HO4x+na9XaV55HctNYLlwgf6s6fH7A== X-Received: by 2002:a17:907:7e91:: with SMTP id qb17mr8745049ejc.449.1637333141877; Fri, 19 Nov 2021 06:45:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 2/7] nvmm: Fix support for stable version Date: Fri, 19 Nov 2021 15:45:34 +0100 Message-Id: <20211119144539.285740-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::533 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nia , Kamil Rytarowski Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333235735100010 Content-Type: text/plain; charset="utf-8" From: nia NVMM user version 1 is the version being shipped with netbsd-9, which is the most recent stable branch of NetBSD. This makes it possible to use the NVMM accelerator on the most recent NetBSD release, 9.2, which lacks nvmm_cpu_stop. (CC'ing maintainers) Signed-off-by: Nia Alarie Reviewed-by: Kamil Rytarowski Message-Id: Signed-off-by: Paolo Bonzini --- meson.build | 4 +--- target/i386/nvmm/nvmm-all.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 93a5e50a16..582f356209 100644 --- a/meson.build +++ b/meson.build @@ -323,9 +323,7 @@ if not get_option('hax').disabled() endif endif if targetos =3D=3D 'netbsd' - if cc.has_header_symbol('nvmm.h', 'nvmm_cpu_stop', required: get_option(= 'nvmm')) - nvmm =3D cc.find_library('nvmm', required: get_option('nvmm')) - endif + nvmm =3D cc.find_library('nvmm', required: get_option('nvmm')) if nvmm.found() accelerators +=3D 'CONFIG_NVMM' endif diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 14c996f968..9af261eea3 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -750,7 +750,11 @@ nvmm_vcpu_loop(CPUState *cpu) nvmm_vcpu_pre_run(cpu); =20 if (qatomic_read(&cpu->exit_request)) { +#if NVMM_USER_VERSION >=3D 2 nvmm_vcpu_stop(vcpu); +#else + qemu_cpu_kick_self(); +#endif } =20 /* Read exit_request before the kernel reads the immediate exit fl= ag */ @@ -767,6 +771,7 @@ nvmm_vcpu_loop(CPUState *cpu) switch (exit->reason) { case NVMM_VCPU_EXIT_NONE: break; +#if NVMM_USER_VERSION >=3D 2 case NVMM_VCPU_EXIT_STOPPED: /* * The kernel cleared the immediate exit flag; cpu->exit_reque= st @@ -775,6 +780,7 @@ nvmm_vcpu_loop(CPUState *cpu) smp_wmb(); qcpu->stop =3D true; break; +#endif case NVMM_VCPU_EXIT_MEMORY: ret =3D nvmm_handle_mem(mach, vcpu); break; @@ -888,8 +894,12 @@ nvmm_ipi_signal(int sigcpu) { if (current_cpu) { struct qemu_vcpu *qcpu =3D get_qemu_vcpu(current_cpu); +#if NVMM_USER_VERSION >=3D 2 struct nvmm_vcpu *vcpu =3D &qcpu->vcpu; nvmm_vcpu_stop(vcpu); +#else + qcpu->stop =3D true; +#endif } } =20 --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333403057452.72779458616526; Fri, 19 Nov 2021 06:50:03 -0800 (PST) Received: from localhost ([::1]:57888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5DF-0000er-TA for importer@patchew.org; Fri, 19 Nov 2021 09:50:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59A-0002hh-7i for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:49 -0500 Received: from [2a00:1450:4864:20::52d] (port=37671 helo=mail-ed1-x52d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo597-0003a8-C4 for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:47 -0500 Received: by mail-ed1-x52d.google.com with SMTP id e3so43703654edu.4 for ; Fri, 19 Nov 2021 06:45:43 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JQKZ9bRtqSvHpNaLNoc+FaaQORBxNiFocmVVGQINbJ4=; b=h1pXpsUm9vhjIWkXu1cPvKosFlP6v1VI6cfKf60PpoAsELLioV+ybgRHGr65Uxpa6F Mqn+PSL77zZxqiczdb390GUKWEwLZ4dP2v1bn6MaJqKCbQa8j4S0m6xhw6jmWwd7AZII p+oYqZUEVbmmpXfyddCv9p8OEF6GJAecOcMDr4ciXblCUwFSs5RhMcxXScYQ6V1y28nr 03rRs/PMg9D5ZwQQP1ehWowziyDoRIt5sHRfAODVgcYcaZcOMgxEalLaCjfr1zbNTFTS 2ebo2jcfu9t8sjU1IhosB3w6yw1Aemb4Dep1SsJ4BEWwXQdkvmmTpZJswFOYrVhhgwkT C8fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JQKZ9bRtqSvHpNaLNoc+FaaQORBxNiFocmVVGQINbJ4=; b=OeQ9kKSiLWjhG73tmlVqrqCR9iW14DVE6o8ExGSDllmQK/m5C52o0topzPKC2q50u7 2goiSJAlr5Z1tHEfivWIGYSktbpYurweFCn6D6GpsvjUtmgyjXCV8nXzS824sVB22iv6 XUA1oDXFK1VBQEBOqkbBLyVAaQjTQGwS09H/X5vSHgzsZpA+uYkmkuaZS6KUT9cUgXee 8WcNKkgAE4Vh7cq3L83cuIYjPz6Z92NSkwQoYRiEiE7eg4C0dJHEL0J4GHq2tCR9gfIS 5RJCe5XuA86nnzMBZ4t/CbufMG4QKVFqyHE0ACUcCM4FnUKhqsjidjZpPajO06lAsTo0 aFvA== X-Gm-Message-State: AOAM532Ux06Hib167mAOB6qhKbpD3tzlYazoxeysMxmifchqNmDW5d6q IJTydATWW6KxW7WKcUy5ZN2/nkcs2E4= X-Google-Smtp-Source: ABdhPJxceXjuqxfcU2K/ftzWRspg5fzOSokNA8fjiOsQNvNPGh6WlkUrFoE3FH3+1RxgCvlY+gwKQw== X-Received: by 2002:a17:907:8a1b:: with SMTP id sc27mr8630830ejc.572.1637333142744; Fri, 19 Nov 2021 06:45:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 3/7] esp: ensure that async_len is reset to 0 during esp_hard_reset() Date: Fri, 19 Nov 2021 15:45:35 +0100 Message-Id: <20211119144539.285740-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52d (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Mark Cave-Ayland Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333405200100004 From: Mark Cave-Ayland If a reset command is sent after data has been transferred into the SCSI bu= ffer ensure that async_len is reset to 0. Otherwise a subsequent TI command assu= mes the SCSI buffer contains data to be transferred to the device causing it to dereference the stale async_buf pointer. Signed-off-by: Mark Cave-Ayland Fixes: https://gitlab.com/qemu-project/qemu/-/issues/724 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211118100327.29061-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini --- hw/scsi/esp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 84f935b549..58d0edbd56 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -894,6 +894,7 @@ void esp_hard_reset(ESPState *s) memset(s->wregs, 0, ESP_REGS); s->tchi_written =3D 0; s->ti_size =3D 0; + s->async_len =3D 0; fifo8_reset(&s->fifo); fifo8_reset(&s->cmdfifo); s->dma =3D 0; --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333403518930.535553207687; Fri, 19 Nov 2021 06:50:03 -0800 (PST) Received: from localhost ([::1]:57918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5DG-0000g7-IK for importer@patchew.org; Fri, 19 Nov 2021 09:50:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59A-0002hi-8V for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:49 -0500 Received: from [2a00:1450:4864:20::52a] (port=39760 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo597-0003aI-Bf for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:47 -0500 Received: by mail-ed1-x52a.google.com with SMTP id w1so43683096edc.6 for ; Fri, 19 Nov 2021 06:45:44 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nTBeiSYtfqyKgwXrCNwHRY5u4tXc9JC5JK/7Z1LztnA=; b=H4jAPEjV3eRHVc8Ij5FgmqTqjjDNjH6ZJ+ypH1FCXYlcncGbrX63IiNx3v69d3CN2N L+hqRNoy2c44Bhn8fh6gU06eMGyQZUUqeM+KKSEOZC7LD5HKiqwyzEfDlJKVjxwtKICz BsAMFtLqEYql1TBmX9YmuDtXsTLTHakoUXJed9Jwq9RuOIBBCOKy3ffGj2s+/YUmZKFS z8qIEsbxiPdYPKgfNgOjkLb4yGejJo/hGYZruV3+zVHqGLDl7wSxxanb+ESTaqowGt4d 87aznfwn94pV0jXXJCRdySjgvde4b57E6OGXuopxFfRu7FSGe7Lfi0HHTa9u7pDAfG+E p9Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=nTBeiSYtfqyKgwXrCNwHRY5u4tXc9JC5JK/7Z1LztnA=; b=ZuEnEJ6rDnhg94uZUfPpddQ+sqiKDuyAVRMMTeSUEfyrJjs6PmTc+udG+qusoR3bza D3V90n8+czuHEXLYhmxAiuU6CW/yMFXFOv213aV5kKkEgOxWDX+Vm9KOpQ4gMY89tVw9 UNrD3L7ZkEWj9Nymf1URKZrYw9K7BYzUHrZ++CdKAxT2h5Kg7OlmWj/ZKyfrOq5E7Y4o KAGa6bZ2hYUNUTAwICz1kIb/l/uMYkOaFpkj+etbUdYRjvcST1jbzewGkmBuKI8WernS UNbVAFZDk1SSX7mh4IOoFDLHFnpDPJUBftSc8ZVI6DOCMZE5mph4d0PC0VAmDcCgvtWC 01pg== X-Gm-Message-State: AOAM5308zaHijntRCZ+Mq/QLLjcXtD9J63WgKo01Wv4REZEhAmu+N7kq F7E4TeAfRcymrnmflLf5btdb4aweSOY= X-Google-Smtp-Source: ABdhPJwsom5Mzn6IMmeUwhBLyXxJ89rFG/DmemOKM2q2mX4djZ28Dhig7nUeySfE6ushY59zgQFjAg== X-Received: by 2002:a17:906:4fc5:: with SMTP id i5mr8765415ejw.475.1637333143449; Fri, 19 Nov 2021 06:45:43 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 4/7] qtest/am53c974-test: add test for reset before transfer Date: Fri, 19 Nov 2021 15:45:36 +0100 Message-Id: <20211119144539.285740-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Mark Cave-Ayland Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333405197100003 Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Based upon the qtest reproducer posted to Gitlab issue #724 at https://gitlab.com/qemu-project/qemu/-/issues/724. Signed-off-by: Mark Cave-Ayland Acked-by: Thomas Huth Message-Id: <20211118100327.29061-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini --- tests/qtest/am53c974-test.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/am53c974-test.c b/tests/qtest/am53c974-test.c index 9b1e4211bd..d214a912b3 100644 --- a/tests/qtest/am53c974-test.c +++ b/tests/qtest/am53c974-test.c @@ -223,6 +223,34 @@ static void test_inflight_cancel_ok(void) qtest_quit(s); } =20 +static void test_reset_before_transfer_ok(void) +{ + QTestState *s =3D qtest_init( + "-device am53c974,id=3Dscsi " + "-device scsi-hd,drive=3Ddisk0 -drive " + "id=3Ddisk0,if=3Dnone,file=3Dnull-co://,format=3Draw -nodefaults"); + + qtest_outl(s, 0xcf8, 0x80001010); + qtest_outl(s, 0xcfc, 0xc000); + qtest_outl(s, 0xcf8, 0x80001004); + qtest_outw(s, 0xcfc, 0x01); + qtest_outl(s, 0xc007, 0x2500); + qtest_outl(s, 0xc00a, 0x410000); + qtest_outl(s, 0xc00a, 0x410000); + qtest_outw(s, 0xc00b, 0x0200); + qtest_outw(s, 0xc040, 0x03); + qtest_outw(s, 0xc009, 0x00); + qtest_outw(s, 0xc00b, 0x00); + qtest_outw(s, 0xc009, 0x00); + qtest_outw(s, 0xc00b, 0x00); + qtest_outw(s, 0xc009, 0x00); + qtest_outw(s, 0xc003, 0x1000); + qtest_outw(s, 0xc00b, 0x1000); + qtest_outl(s, 0xc00b, 0x9000); + qtest_outw(s, 0xc00b, 0x1000); + qtest_quit(s); +} + int main(int argc, char **argv) { const char *arch =3D qtest_get_arch(); @@ -248,6 +276,8 @@ int main(int argc, char **argv) test_cancelled_request_ok); qtest_add_func("am53c974/test_inflight_cancel_ok", test_inflight_cancel_ok); + qtest_add_func("am53c974/test_reset_before_transfer_ok", + test_reset_before_transfer_ok); } =20 return g_test_run(); --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333602602625.2888073182073; Fri, 19 Nov 2021 06:53:22 -0800 (PST) Received: from localhost ([::1]:36070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5GT-00056e-Eq for importer@patchew.org; Fri, 19 Nov 2021 09:53:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59B-0002i9-5U for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:49 -0500 Received: from [2a00:1450:4864:20::52a] (port=34644 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo597-0003aV-Ou for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:48 -0500 Received: by mail-ed1-x52a.google.com with SMTP id x15so43743308edv.1 for ; Fri, 19 Nov 2021 06:45:45 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UVu/KlfSjin8bS+0R2IT+zvUaoBK48OnJEf++UCzYjk=; b=Puk8/Az5M5Qd9QlrujgFmB7unAVnIMonQeDMPhFoc2R8SABlJW9WDHXh3Lb7iamUlX zEh3vQVK8QZsreBXaaZhJszVzkytSLRd9YFXpezdKKVQ93RAuhxzKXzWHtqx/JEISnQS cFKv6snTRc5jc21T12Mb2LPrpmTN05NJJE1Yd1GRBLXF8piMgJOW+Xl8pdxrsH54SxaG EG1yrRQexL0MLmjPENIS6I4ZsnQkFz/6JaNeMTIsY7/NwgMS7okV+boSdw4gl5+hB29E 4lmJva6oWkuW8jxBR8Caem3ebTRLf4hulo6NNrJmyJez57XPn0TPItTJpxWhnkBR+UYA n9Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=UVu/KlfSjin8bS+0R2IT+zvUaoBK48OnJEf++UCzYjk=; b=u9ZYKRf82ZugkiRuyrPgjfa1bewN5E2Tjzr+t8NcWKiNFq31Qgwca/QAEjOO++ZNi0 ZCyK7ZEjGhggmPeb1ETJu0uLomnZgPDTeYmER/uade6szg7FBR9gPih2rHHGDvzXopn7 mhNsTSuhfOdvXl5HDuRBdk3OCRjXXc4hUhFl7e4PQCubHGp7NBXGBgy6UM8XCWxI1weT aL9EueAHeCd0SiOQSOEpN2M3bCFFw/RaCE9Wj+C8WaD+CfvU3wI9sencOUDxJMwS1QvA Y3wYR5ohRbBqyXniTNpwipMHHlAt7TG7JWYoX1xGpps8NeISGHesBZhO551Zgbk5CxYv Y7Hg== X-Gm-Message-State: AOAM530z0r6ACmNdcfgfiuDT5wwrn6UpNchJDoG5DSuUe2gZW1c4Px2w Irh5WE49/t6i7O8xVFKa7VqLKQnibTw= X-Google-Smtp-Source: ABdhPJzn+3YC9NqLQj3+7t4oCo64+CbecqIragFWb0UXDzdSfrDhakJmOdR+hJC9H3UojIbJszaS+w== X-Received: by 2002:a17:907:961a:: with SMTP id gb26mr8298000ejc.71.1637333144254; Fri, 19 Nov 2021 06:45:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 5/7] docs: Spell QEMU all caps Date: Fri, 19 Nov 2021 15:45:37 +0100 Message-Id: <20211119144539.285740-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Darren Kenny , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333603459100001 From: Philippe Mathieu-Daud=C3=A9 Replace Qemu -> QEMU. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Darren Kenny Reviewed-by: Markus Armbruster Message-Id: <20211118143401.4101497-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- docs/devel/modules.rst | 2 +- docs/devel/multi-thread-tcg.rst | 2 +- docs/devel/style.rst | 2 +- docs/devel/ui.rst | 4 ++-- docs/interop/nbd.txt | 6 +++--- docs/interop/qcow2.txt | 8 ++++---- docs/multiseat.txt | 2 +- docs/system/device-url-syntax.rst.inc | 2 +- docs/system/i386/sgx.rst | 26 +++++++++++++------------- docs/u2f.txt | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/devel/modules.rst b/docs/devel/modules.rst index 066f347b89..8e999c4fa4 100644 --- a/docs/devel/modules.rst +++ b/docs/devel/modules.rst @@ -1,5 +1,5 @@ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -Qemu modules +QEMU modules =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 .. kernel-doc:: include/qemu/module.h diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.= rst index 5b446ee08b..c9541a7b20 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -228,7 +228,7 @@ Emulated hardware state =20 Currently thanks to KVM work any access to IO memory is automatically protected by the global iothread mutex, also known as the BQL (Big -Qemu Lock). Any IO region that doesn't use global mutex is expected to +QEMU Lock). Any IO region that doesn't use global mutex is expected to do its own locking. =20 However IO memory isn't the only way emulated hardware state can be diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 260e3263fa..e00af62e76 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -686,7 +686,7 @@ Rationale: hex numbers are hard to read in logs when th= ere is no 0x prefix, especially when (occasionally) the representation doesn't contain any lett= ers and especially in one line with other decimal numbers. Number groups are a= llowed to not use '0x' because for some things notations like %x.%x.%x are used n= ot -only in Qemu. Also dumping raw data bytes with '0x' is less readable. +only in QEMU. Also dumping raw data bytes with '0x' is less readable. =20 '#' printf flag --------------- diff --git a/docs/devel/ui.rst b/docs/devel/ui.rst index 06c7d622ce..17fb667dec 100644 --- a/docs/devel/ui.rst +++ b/docs/devel/ui.rst @@ -1,8 +1,8 @@ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -Qemu UI subsystem +QEMU UI subsystem =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Qemu Clipboard +QEMU Clipboard -------------- =20 .. kernel-doc:: include/ui/clipboard.h diff --git a/docs/interop/nbd.txt b/docs/interop/nbd.txt index 10ce098a29..bdb0f2a41a 100644 --- a/docs/interop/nbd.txt +++ b/docs/interop/nbd.txt @@ -1,4 +1,4 @@ -Qemu supports the NBD protocol, and has an internal NBD client (see +QEMU supports the NBD protocol, and has an internal NBD client (see block/nbd.c), an internal NBD server (see blockdev-nbd.c), and an external NBD server tool (see qemu-nbd.c). The common code is placed in nbd/*. @@ -7,11 +7,11 @@ The NBD protocol is specified here: https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md =20 The following paragraphs describe some specific properties of NBD -protocol realization in Qemu. +protocol realization in QEMU. =20 =3D Metadata namespaces =3D =20 -Qemu supports the "base:allocation" metadata context as defined in the +QEMU supports the "base:allocation" metadata context as defined in the NBD protocol specification, and also defines an additional metadata namespace "qemu". =20 diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt index 0463f761ef..f7dc304ff6 100644 --- a/docs/interop/qcow2.txt +++ b/docs/interop/qcow2.txt @@ -313,7 +313,7 @@ The fields of the bitmaps extension are: The number of bitmaps contained in the image. Must be greater than or equal to 1. =20 - Note: Qemu currently only supports up to 65535 bitmaps = per + Note: QEMU currently only supports up to 65535 bitmaps = per image. =20 4 - 7: Reserved, must be zero. @@ -775,7 +775,7 @@ Structure of a bitmap directory entry: 2: extra_data_compatible This flags is meaningful when the extra data is unknown to the software (currently any extra data= is - unknown to Qemu). + unknown to QEMU). If it is set, the bitmap may be used as expected,= extra data must be left as is. If it is not set, the bitmap must not be used, but @@ -793,7 +793,7 @@ Structure of a bitmap directory entry: 17: granularity_bits Granularity bits. Valid values: 0 - 63. =20 - Note: Qemu currently supports only values 9 - 31. + Note: QEMU currently supports only values 9 - 31. =20 Granularity is calculated as granularity =3D 1 << granularity_bits @@ -804,7 +804,7 @@ Structure of a bitmap directory entry: 18 - 19: name_size Size of the bitmap name. Must be non-zero. =20 - Note: Qemu currently doesn't support values greater th= an + Note: QEMU currently doesn't support values greater th= an 1023. =20 20 - 23: extra_data_size diff --git a/docs/multiseat.txt b/docs/multiseat.txt index 11850c96ff..2b297e979d 100644 --- a/docs/multiseat.txt +++ b/docs/multiseat.txt @@ -123,7 +123,7 @@ Background info is here: guest side with pci-bridge-seat ------------------------------- =20 -Qemu version 2.4 and newer has a new pci-bridge-seat device which +QEMU version 2.4 and newer has a new pci-bridge-seat device which can be used instead of pci-bridge. Just swap the device name in the qemu command line above. The only difference between the two devices is the pci id. We can match the pci id instead of the device path diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url= -syntax.rst.inc index d15a021508..7dbc525fa8 100644 --- a/docs/system/device-url-syntax.rst.inc +++ b/docs/system/device-url-syntax.rst.inc @@ -15,7 +15,7 @@ These are specified using a special URL syntax. 'iqn.2008-11.org.linux-kvm[:]' but this can also be set from the command line or a configuration file. =20 - Since version Qemu 2.4 it is possible to specify a iSCSI request + Since version QEMU 2.4 it is possible to specify a iSCSI request timeout to detect stalled requests and force a reestablishment of the session. The timeout is specified in seconds. The default is 0 which means no timeout. Libiscsi 1.15.0 or greater is required for this diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst index 9aa161af1a..f8fade5ac2 100644 --- a/docs/system/i386/sgx.rst +++ b/docs/system/i386/sgx.rst @@ -20,13 +20,13 @@ report the same CPUID info to guest as on host for most= of SGX CPUID. With reporting the same CPUID guest is able to use full capacity of SGX, and KVM doesn't need to emulate those info. =20 -The guest's EPC base and size are determined by Qemu, and KVM needs Qemu to +The guest's EPC base and size are determined by QEMU, and KVM needs QEMU to notify such info to it before it can initialize SGX for guest. =20 Virtual EPC ~~~~~~~~~~~ =20 -By default, Qemu does not assign EPC to a VM, i.e. fully enabling SGX in a= VM +By default, QEMU does not assign EPC to a VM, i.e. fully enabling SGX in a= VM requires explicit allocation of EPC to the VM. Similar to other specialized memory types, e.g. hugetlbfs, EPC is exposed as a memory backend. =20 @@ -35,12 +35,12 @@ prior to realizing the vCPUs themselves, which occurs l= ong before generic devices are parsed and realized. This limitation means that EPC does not require -maxmem as EPC is not treated as {cold,hot}plugged memory. =20 -Qemu does not artificially restrict the number of EPC sections exposed to a -guest, e.g. Qemu will happily allow you to create 64 1M EPC sections. Be a= ware +QEMU does not artificially restrict the number of EPC sections exposed to a +guest, e.g. QEMU will happily allow you to create 64 1M EPC sections. Be a= ware that some kernels may not recognize all EPC sections, e.g. the Linux SGX d= river is hardwired to support only 8 EPC sections. =20 -The following Qemu snippet creates two EPC sections, with 64M pre-allocated +The following QEMU snippet creates two EPC sections, with 64M pre-allocated to the VM and an additional 28M mapped but not allocated:: =20 -object memory-backend-epc,id=3Dmem1,size=3D64M,prealloc=3Don \ @@ -54,7 +54,7 @@ to physical EPC. Because physical EPC is protected via ra= nge registers, the size of the physical EPC must be a power of two (though software sees a subset of the full EPC, e.g. 92M or 128M) and the EPC must be naturally aligned. KVM SGX's virtual EPC is purely a software construct and only -requires the size and location to be page aligned. Qemu enforces the EPC +requires the size and location to be page aligned. QEMU enforces the EPC size is a multiple of 4k and will ensure the base of the EPC is 4k aligned. To simplify the implementation, EPC is always located above 4g in the guest physical address space. @@ -62,7 +62,7 @@ physical address space. Migration ~~~~~~~~~ =20 -Qemu/KVM doesn't prevent live migrating SGX VMs, although from hardware's +QEMU/KVM doesn't prevent live migrating SGX VMs, although from hardware's perspective, SGX doesn't support live migration, since both EPC and the SGX key hierarchy are bound to the physical platform. However live migration can be supported in the sense if guest software stack can support recreati= ng @@ -76,7 +76,7 @@ CPUID ~~~~~ =20 Due to its myriad dependencies, SGX is currently not listed as supported -in any of Qemu's built-in CPU configuration. To expose SGX (and SGX Launch +in any of QEMU's built-in CPU configuration. To expose SGX (and SGX Launch Control) to a guest, you must either use ``-cpu host`` to pass-through the host CPU model, or explicitly enable SGX when using a built-in CPU model, e.g. via ``-cpu ,+sgx`` or ``-cpu ,+sgx,+sgxlc``. @@ -101,7 +101,7 @@ controlled via -cpu are prefixed with "sgx", e.g.:: sgx2 sgxlc =20 -The following Qemu snippet passes through the host CPU but restricts acces= s to +The following QEMU snippet passes through the host CPU but restricts acces= s to the provision and EINIT token keys:: =20 -cpu host,-sgx-provisionkey,-sgx-tokenkey @@ -112,11 +112,11 @@ in hardware cannot be forced on via '-cpu'. Virtualize SGX Launch Control ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -Qemu SGX support for Launch Control (LC) is passive, in the sense that it -does not actively change the LC configuration. Qemu SGX provides the user +QEMU SGX support for Launch Control (LC) is passive, in the sense that it +does not actively change the LC configuration. QEMU SGX provides the user the ability to set/clear the CPUID flag (and by extension the associated IA32_FEATURE_CONTROL MSR bit in fw_cfg) and saves/restores the LE Hash MSRs -when getting/putting guest state, but Qemu does not add new controls to +when getting/putting guest state, but QEMU does not add new controls to directly modify the LC configuration. Similar to hardware behavior, locki= ng the LC configuration to a non-Intel value is left to guest firmware. Unli= ke host bios setting for SGX launch control(LC), there is no special bios set= ting @@ -126,7 +126,7 @@ creating VM with SGX. Feature Control ~~~~~~~~~~~~~~~ =20 -Qemu SGX updates the ``etc/msr_feature_control`` fw_cfg entry to set the S= GX +QEMU SGX updates the ``etc/msr_feature_control`` fw_cfg entry to set the S= GX (bit 18) and SGX LC (bit 17) flags based on their respective CPUID support, i.e. existing guest firmware will automatically set SGX and SGX LC accordi= ngly, assuming said firmware supports fw_cfg.msr_feature_control. diff --git a/docs/u2f.txt b/docs/u2f.txt index 8f44994818..7f5813a0b7 100644 --- a/docs/u2f.txt +++ b/docs/u2f.txt @@ -21,7 +21,7 @@ The second factor is materialized by a device implementin= g the U2F protocol. In case of a USB U2F security key, it is a USB HID device that implements the U2F protocol. =20 -In Qemu, the USB U2F key device offers a dedicated support of U2F, allowing +In QEMU, the USB U2F key device offers a dedicated support of U2F, allowing guest USB FIDO/U2F security keys operating in two possible modes: pass-through and emulated. =20 --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333401623564.1725754416601; Fri, 19 Nov 2021 06:50:01 -0800 (PST) Received: from localhost ([::1]:57772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5DE-0000a4-MR for importer@patchew.org; Fri, 19 Nov 2021 09:50:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59A-0002ho-BD for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:49 -0500 Received: from [2a00:1450:4864:20::52c] (port=37671 helo=mail-ed1-x52c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo598-0003cJ-6a for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:48 -0500 Received: by mail-ed1-x52c.google.com with SMTP id e3so43704014edu.4 for ; Fri, 19 Nov 2021 06:45:45 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tCBRwkko7c4H4RuUuPZjIUNcUTtlkBLCm+3e4KSz5wM=; b=g+sZnoON6RcS/V4k1INU+e0DTqQdKlI/f4x26nMuEN4YWAfT1OHGtT5yvd11NnOmr+ 5aiKA8gbfBnIApgc3gSaix2jIYiKLuMV5dUag3eG63M5jBCPkNX19apgPKlaiHvBRBQk rx3IHQoff0vvSej8Hnep4iUmwTbFyomaqplSpoJWbotWPr0prkSXaXc04diNPoegY39P FP+cfPWqyNGkTgV2YnR6WdSX10VNiHQLGRmLLzPySSqS6g+l/nBFYPYHIXiPCzcWalYR eMpT0vXOMs3K8AuN79XzQVIuKY9aN/chRS9ojEFFuMcjRPQZ2wUqGkP6EKAFjmm4P2N8 FrOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tCBRwkko7c4H4RuUuPZjIUNcUTtlkBLCm+3e4KSz5wM=; b=2hLg7hzTJvi1FXqNh/dXtd66AHAet5QwZM8qiWPWinWaJvjz77B4iXWzyU7+fcZjTT kKK2XI8AXuThIydHSRAcfeD2WnRP/Tc7TC0piH2Crj+dIcHnr7HfcLftIVoFxXvWchfJ RdD8LoxgU1ecHmgepSKQH5ve2J/8zqx1gowzcMx4uhrxpFYzly/1RkGq1jykU+5EjFJQ MWN9aZTlaD0Mev3BzAvqXkH7HoE5lBhvwW46wFCd7IQD3OAdzn1V1Wfyb3VAUsRYMY94 HoBrbH4pLRe29AbP3vJzjgkOAgqmj0CkI0Spdl/XFeneK3vxhuUNeWPguHhXVfUkOWNt Iw5w== X-Gm-Message-State: AOAM530l9+R1+lLfFKqYJHCDE8sAuOE4el+ekY0wyfi2YrdTUVu/2jbc un6ekq8Zdr7kEBJkeCFlUP6t1xLAvDs= X-Google-Smtp-Source: ABdhPJzcFjo7daccYDsFFr8HtuDgYVOLGPHLF0StlrLH9IYI6bq+UEon26gBvU6ZVaKY9d3cwOoI0Q== X-Received: by 2002:a17:907:d14:: with SMTP id gn20mr8316614ejc.73.1637333144927; Fri, 19 Nov 2021 06:45:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 6/7] meson.build: Support ncurses on MacOS and OpenBSD Date: Fri, 19 Nov 2021 15:45:38 +0100 Message-Id: <20211119144539.285740-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333403277100001 From: Stefan Weil MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=3D1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change also the old macro definition of NCURSES_WIDECHAR and set it to 1 like it is done in newer versions of curses.h when _XOPEN_SOURCE_EXTENDED=3D1 is defined. OpenBSD has the same version of ncurses and needs the same fix. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Stefan Weil Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Brad Smith Message-Id: <20211117205355.1392292-1-sw@weilnetz.de> Signed-off-by: Paolo Bonzini --- meson.build | 5 ++++- ui/curses.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 582f356209..fbdd415376 100644 --- a/meson.build +++ b/meson.build @@ -679,6 +679,9 @@ iconv =3D not_found curses =3D not_found if have_system and not get_option('curses').disabled() curses_test =3D ''' + #if defined(__APPLE__) || defined(__OpenBSD__) + #define _XOPEN_SOURCE_EXTENDED 1 + #endif #include #include #include @@ -702,7 +705,7 @@ if have_system and not get_option('curses').disabled() endif endforeach msg =3D get_option('curses').enabled() ? 'curses library not found' : '' - curses_compile_args =3D ['-DNCURSES_WIDECHAR'] + curses_compile_args =3D ['-DNCURSES_WIDECHAR=3D1'] if curses.found() if cc.links(curses_test, args: curses_compile_args, dependencies: [cur= ses]) curses =3D declare_dependency(compile_args: curses_compile_args, dep= endencies: [curses]) diff --git a/ui/curses.c b/ui/curses.c index e4f9588c3e..861d63244c 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -38,6 +38,10 @@ #include "ui/input.h" #include "sysemu/sysemu.h" =20 +#if defined(__APPLE__) || defined(__OpenBSD__) +#define _XOPEN_SOURCE_EXTENDED 1 +#endif + /* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */ #undef KEY_EVENT #include --=20 2.33.1 From nobody Sun May 19 03:02:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1637333600041285.6184377984731; Fri, 19 Nov 2021 06:53:20 -0800 (PST) Received: from localhost ([::1]:35950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo5GQ-00051z-W6 for importer@patchew.org; Fri, 19 Nov 2021 09:53:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo59F-0002ml-RJ for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:55 -0500 Received: from [2a00:1450:4864:20::52c] (port=35683 helo=mail-ed1-x52c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo598-0003cy-Ti for qemu-devel@nongnu.org; Fri, 19 Nov 2021 09:45:53 -0500 Received: by mail-ed1-x52c.google.com with SMTP id v1so10296557edx.2 for ; Fri, 19 Nov 2021 06:45:46 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id z25sm26934ejd.80.2021.11.19.06.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 06:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ejfNglUO8k6Fc/DKJDw6PTnm2iPEvk0IjXsaBppK+20=; b=FeR+KFkcGUX22x+O5eprElAYSSU9NQ0qM1fSvipgrKM7G5sn7wbdkieRDSkjyFDcqG 1I+SSMSt10HB1LQ0vItfH5iITyrjWS7lkKk0Q8LADrGAWiyL8yn0nURIexcghujGQLEN 5mcCOESqnAujLGdAILg1up41HyG1fHOW+R3wEdx9Tkt6mLef0BvmEaatChaWrbP2uJ49 LFIxrsdnQxgjt9fznipGoKFXEokE7W7bL51g4qPVxt/USzslcl90CwvxPrUctL/c/7UC h2dJ02zWPHI3GQcfKhcL/JpWPUp+8EQ1qkZNIUI+/OBCB8e9bXTqhZqfTVNrzH4QYHKt 6gpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ejfNglUO8k6Fc/DKJDw6PTnm2iPEvk0IjXsaBppK+20=; b=vti9SZ2ngTKoe3DnBk0PPbpH5D4ejHC4JgcbPpwtpFP9+Omj0hyYi231ly7mxAjw6H KgKvo71eyD79P3tTfXlKW2NDYtLnNJ/Jo5Z8aZNduV13UigdJUim5TP5dQxmE8gRSaAV GWoxlCZ2iRYpZmvsnxR96wEQF+uz3xEpLDZkaoZyt2sQYPrMhZf7mNMGzEca+IfZ6sk5 FduLU8Aem6g3In6wh9S6bFYQNNRyPPiWV51Ny/82/qPQj8VSLnnYXv2fVd2mjyIU3/L6 PkMux9knK9zMIRBhbrZqZ6Vcu4WNupHyrfCa/cVlCD//XdPFv+kqEf9lNWxkiuEc1KmC YxKw== X-Gm-Message-State: AOAM530wBFCOo6JjDsKgOQhmuYpGdGXVFhpGT/yYwXq5YPi2ItEwQ1jQ xaE0NXSPh/Bxi5TQZSpeTeoE6Gma6b0= X-Google-Smtp-Source: ABdhPJywtJHps4oKDgNckE4X9Kf7JGvMKHBL7XrzACJ9o51m8G5OKIPBXUJgPAf/5cxmcKguR+h0qg== X-Received: by 2002:a17:906:7305:: with SMTP id di5mr8402572ejc.182.1637333145592; Fri, 19 Nov 2021 06:45:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 7/7] chardev/wctable: don't free the instance in wctablet_chr_finalize Date: Fri, 19 Nov 2021 15:45:39 +0100 Message-Id: <20211119144539.285740-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211119144539.285740-1-pbonzini@redhat.com> References: <20211119144539.285740-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Daniil Tatianin Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1637333601350100001 From: Daniil Tatianin Object is supposed to be freed by invoking obj->free, and not obj->instance_finalize. This would lead to use-after-free followed by double free in object_unref/object_finalize. Signed-off-by: Daniil Tatianin Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20211117142349.836279-1-d-tatianin@yandex-team.ru> Signed-off-by: Paolo Bonzini --- chardev/wctablet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/chardev/wctablet.c b/chardev/wctablet.c index 95e005f5a5..e8b292c43c 100644 --- a/chardev/wctablet.c +++ b/chardev/wctablet.c @@ -320,7 +320,6 @@ static void wctablet_chr_finalize(Object *obj) TabletChardev *tablet =3D WCTABLET_CHARDEV(obj); =20 qemu_input_handler_unregister(tablet->hs); - g_free(tablet); } =20 static void wctablet_chr_open(Chardev *chr, --=20 2.33.1