From nobody Sun May 5 12:23:36 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 ARC-Seal: i=1; a=rsa-sha256; t=1596617799; cv=none; d=zohomail.com; s=zohoarc; b=QupuSEK2nd0QgfEa0oM6X2XumFsIaCqq5MKsBuGopFfQfD2u0Gg0jeAxM/jQoVLI5jnO9nwJjejO4iQe12RWivfyCLf83ptcFOoRhWTn/fcUWImmzfAH7l0S+Y46CvS8WVu0epsWjcLGstnr+aHfGtSzUaaU/J2mM7ImVbQpFj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596617799; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M46m4CKnd0h2fnbiaQwpYocPzWV6Ty9hunqocvBwXyI=; b=m0wIsZY6O4449zgt1x6RQF/xX2TkQMCki2nfWHDKLi/38CIXcYdNctFTxy7SSNZGmFLz7+XFxaYeVTSK8by5Z3UKxkQjEsLEjBlAFU5NXJ9aH0WAXb1qtw5aGS9n8wnlC4fLt9qcMrSgrWS6Lrh/kjxGm+7ciuppSfo5cNro+us= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1596617799449782.4303494179388; Wed, 5 Aug 2020 01:56:39 -0700 (PDT) Received: from localhost ([::1]:52276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3FDx-0006G9-St for importer@patchew.org; Wed, 05 Aug 2020 04:56:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3FD3-000539-2L for qemu-devel@nongnu.org; Wed, 05 Aug 2020 04:55:41 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:33685 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3FD1-00012x-Cl for qemu-devel@nongnu.org; Wed, 05 Aug 2020 04:55:40 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-flaDf9iTOteftXmkBO_O9A-1; Wed, 05 Aug 2020 04:55:35 -0400 Received: by mail-wr1-f71.google.com with SMTP id s23so13179586wrb.12 for ; Wed, 05 Aug 2020 01:55:34 -0700 (PDT) Received: from localhost.localdomain (214.red-88-21-68.staticip.rima-tde.net. [88.21.68.214]) by smtp.gmail.com with ESMTPSA id a10sm1780858wro.35.2020.08.05.01.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 01:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596617738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M46m4CKnd0h2fnbiaQwpYocPzWV6Ty9hunqocvBwXyI=; b=funIogXkOb4549Ke41IgC+zci+n5xioiqHl/RAK1EpkmKP5aNKS7Dixb1iWB9qe3FK4d3C ZJTu/LkM7kMr+maLenScj5H2PMmjUMZoevqfi2m6bHQzVGOueOYoPpBqOcLO+MOMJ+5HbS se1jZNd1nptxiHasLZScpkA/b4B51WU= X-MC-Unique: flaDf9iTOteftXmkBO_O9A-1 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=M46m4CKnd0h2fnbiaQwpYocPzWV6Ty9hunqocvBwXyI=; b=XQKca+KupDubwxIoeL+0MjPkfZnEsxrWzAw7U9IGk+HR5CrGgfybx680M5UBKMeWd5 syrLVHm1k7yLnnYYZ+ncps5WdcevaNUDrU/OVX80fSl5cNHShuJY0iSQbcrwNVV8Ir5J sI0n50lB6iZQ6gChNCQ/nmJ3GN8tYG/NGsVqK0WkOCjCYPTnwCyqHRM9QJTYLF2hNa+K DMLS0peOdjP6LjEnocq49f45kHqZyVw8tVQuShjkycF6XtzWOfDvhY0wcxBbJ0U7SvIX i5O2gej//u7zmW3j8QMz0SXGIvd+DQABc7P5Qbz7qFo2c7kzw052Sy6I1ZTPUhJ5EYuz FANg== X-Gm-Message-State: AOAM5311CHYeTp4Jxg851Zb0MhbuOc/Is5Vp5sceKzvZmEtmNEhL1Dxu 3nSJC/8w7OvXqkUNc+MrXDDBJhPICmG4yHd8Gdo1TXotVSYXeGvfN/+tQzcrl8qdjyNnKGGHiQf Jm9ayfHTiDuZJsmU= X-Received: by 2002:a1c:c1:: with SMTP id 184mr2466544wma.105.1596617733921; Wed, 05 Aug 2020 01:55:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydxgo4GeZ1jNy74ol7cYEnLCBZrlch0Vc7FDMC0pj+rlFXELJjCw2NbFUUIKDGPrHpabS9Wg== X-Received: by 2002:a1c:c1:: with SMTP id 184mr2466523wma.105.1596617733624; Wed, 05 Aug 2020 01:55:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 v2 1/2] exec: Restrict icount to softmmu Date: Wed, 5 Aug 2020 10:55:25 +0200 Message-Id: <20200805085526.9787-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200805085526.9787-1-philmd@redhat.com> References: <20200805085526.9787-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/05 03:37:07 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 'icount' feature is only meaningful when using softmmu. Move it out of the globally used exec.c, and define it as 'false' in user-mode emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/cpus.h | 4 ++++ exec.c | 4 ---- softmmu/cpus.c | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index 3c1da6a018..d8442aa9f0 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -11,9 +11,13 @@ void pause_all_vcpus(void); void cpu_stop_current(void); void cpu_ticks_init(void); =20 +#if !defined(CONFIG_USER_ONLY) void configure_icount(QemuOpts *opts, Error **errp); extern int use_icount; extern int icount_align_option; +#else +#define use_icount false +#endif =20 /* drift information for info jit command */ extern int64_t max_delay; diff --git a/exec.c b/exec.c index 6f381f98e2..a89ffa93c1 100644 --- a/exec.c +++ b/exec.c @@ -102,10 +102,6 @@ uintptr_t qemu_host_page_size; intptr_t qemu_host_page_mask; =20 #if !defined(CONFIG_USER_ONLY) -/* 0 =3D Do not count executed instructions. - 1 =3D Precise instruction counting. - 2 =3D Adaptive rate instruction counting. */ -int use_icount; =20 typedef struct PhysPageEntry PhysPageEntry; =20 diff --git a/softmmu/cpus.c b/softmmu/cpus.c index a802e899ab..a4772034c0 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -81,6 +81,13 @@ =20 #endif /* CONFIG_LINUX */ =20 +/* + * 0 =3D Do not count executed instructions. + * 1 =3D Precise instruction counting. + * 2 =3D Adaptive rate instruction counting. + */ +int use_icount; + static QemuMutex qemu_global_mutex; =20 int64_t max_delay; --=20 2.21.3 From nobody Sun May 5 12:23:36 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 ARC-Seal: i=1; a=rsa-sha256; t=1596617801; cv=none; d=zohomail.com; s=zohoarc; b=Ec/YByjr8S9EKD6nL9K6X9hQA5ACZYPm54TGC8sGQ/ESViFiYbHfHfkzav31ncCMCrFpmcGpsin8V9Ilfclj8ia1NgelwHJx8mWTLLgsIDGUWxEndyq8uLm/BlBdwbt/lMchHn6rq1xG3hKSTO3LwwxOpJ5yMxw82U7vNK1uKtA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596617801; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V1FhaTOycuvEOwdTFxqEseFbzAWqSh1HQLKcV71KICA=; b=PJIIRh4C3tyyjYYv80tOAi/Znp+X9qBU3wV/DMqM43U8qepur7JCKrNrd7jM1uvjDVzebioruGjGh5tipnhP/sTBePgQGkoKQ8O7BPueeWRNYFTIGbeVIOou8GdHSHEVlfJEIEkghCb843CnxC6UxvSp6ypbq5B3nc2o8yda1QM= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159661780177365.36596491515661; Wed, 5 Aug 2020 01:56:41 -0700 (PDT) Received: from localhost ([::1]:52540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3FE0-0006Me-9c for importer@patchew.org; Wed, 05 Aug 2020 04:56:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3FD6-00056q-0r for qemu-devel@nongnu.org; Wed, 05 Aug 2020 04:55:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29791 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k3FD4-000135-Cc for qemu-devel@nongnu.org; Wed, 05 Aug 2020 04:55:43 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-iJvLvoN0NOWyifwzeOps1g-1; Wed, 05 Aug 2020 04:55:40 -0400 Received: by mail-wm1-f69.google.com with SMTP id v8so2202768wma.6 for ; Wed, 05 Aug 2020 01:55:39 -0700 (PDT) Received: from localhost.localdomain (214.red-88-21-68.staticip.rima-tde.net. [88.21.68.214]) by smtp.gmail.com with ESMTPSA id z15sm1809439wrn.89.2020.08.05.01.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 01:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596617741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V1FhaTOycuvEOwdTFxqEseFbzAWqSh1HQLKcV71KICA=; b=g6JSjLt0AnN5hX/sJoPpUybV+U7ji8SXYu+raJhgyMH5Q0lMpC+zyVjUR2X0YDy62YZHRo KQWDAeIou07adOUaGcTekQ/iQjup9/WqJtNarHnXV6klfBKFK2VjlYhiQoWQcq/mpaxiAa NVyeglrOm9IQIEc9TDsMZbGgVUKt90U= X-MC-Unique: iJvLvoN0NOWyifwzeOps1g-1 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=V1FhaTOycuvEOwdTFxqEseFbzAWqSh1HQLKcV71KICA=; b=R5+cyzrUzy6tqEa9BKV+hUy9qMnyLynJaPaLTFXvgkRQbjD5iT/JDjV1J05bpQ2jow 4IoKMQOCRDwS8Ndzk/BifqIS9x1d83FjqYil058wUxv9iL6dKihAY2b4I94uociKeC4F T/eWJTciu5IiwfedLO1sbM6zHOEvYrjDjkHkYTjAuWy0qKFHpkcrX9qu+LJmLvbksv19 cAbyJ8+xE2g0yhLZ4TSAFGDKVcgO+dxa4CsTieQd2RQ28G0zwao428X8gwJRAGMdT9X6 lEQxPVeX/I7e8JV0gplJUHA54acE6fnkBZqZqLG6Vi2hHwMHCANxoiPMmnTQX17y5ghT cXkQ== X-Gm-Message-State: AOAM533f65I5PmtfcYhcRLGTXAD7vYXjtHF/a6CKKWFUIUtQCW3EuQVA 4jQipcNTJwvFu4Zljlh1soWUTgdOjMw/A7vKiwnwIZASY4cJWbBMhgR/yzToAhF71G2KdtHOT0W x3L4rcrHpZm7o2+E= X-Received: by 2002:adf:a351:: with SMTP id d17mr1803268wrb.111.1596617738804; Wed, 05 Aug 2020 01:55:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuUYushjX0k9M+owXFOYlQ7TQ+r5Xf3OAaR/qhRqx9B5m47UkDc2t/Aze9M4dfQ124sZUYrQ== X-Received: by 2002:adf:a351:: with SMTP id d17mr1803243wrb.111.1596617738545; Wed, 05 Aug 2020 01:55:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event() Date: Wed, 5 Aug 2020 10:55:26 +0200 Message-Id: <20200805085526.9787-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200805085526.9787-1-philmd@redhat.com> References: <20200805085526.9787-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/05 01:46:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We don't need the qemu_notify_event() stub anymore. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- stubs/cpu-get-icount.c | 2 +- stubs/notify-event.c | 6 ------ stubs/Makefile.objs | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 stubs/notify-event.c diff --git a/stubs/cpu-get-icount.c b/stubs/cpu-get-icount.c index b35f844638..8962dfd71f 100644 --- a/stubs/cpu-get-icount.c +++ b/stubs/cpu-get-icount.c @@ -17,5 +17,5 @@ int64_t cpu_get_icount_raw(void) =20 void qemu_timer_notify_cb(void *opaque, QEMUClockType type) { - qemu_notify_event(); + abort(); } diff --git a/stubs/notify-event.c b/stubs/notify-event.c deleted file mode 100644 index 827bb52d1a..0000000000 --- a/stubs/notify-event.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu/main-loop.h" - -void qemu_notify_event(void) -{ -} diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index d42046afe4..cb374c96db 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -12,7 +12,6 @@ stub-obj-y +=3D isa-bus.o stub-obj-$(CONFIG_LINUX_AIO) +=3D linux-aio.o stub-obj-$(CONFIG_LINUX_IO_URING) +=3D io_uring.o stub-obj-y +=3D monitor-core.o -stub-obj-y +=3D notify-event.o stub-obj-y +=3D pci-bus.o stub-obj-y +=3D qmp_memory_device.o stub-obj-y +=3D qtest.o --=20 2.21.3