From patchwork Thu Sep 10 13:14:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767817 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F31D92C for ; Thu, 10 Sep 2020 13:16:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91F54207FB for ; Thu, 10 Sep 2020 13:16:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QWasbVzq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91F54207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMR3-0005cb-DU for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:16:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMPu-0003vy-5z for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:10 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:56040) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMPs-00064g-E6 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:09 -0400 Received: by mail-wm1-x334.google.com with SMTP id a65so5589184wme.5 for ; Thu, 10 Sep 2020 06:15:07 -0700 (PDT) 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=1IVujaGcl6Gaeb44XvH6utm7tpVyG1R70wAp2OwcHKE=; b=QWasbVzqGjmIb6mcq+bDGufK48YF9mzK9gFFvYiuOwKW3ujXXBOxSjepx841Qn0ERZ /NGAAdiT9EehL8SBgR2liB8AV52gnqC3/b0Vv+VfzbECCV2Lo/ofYQloJ8m6vcQI+U9Y ofxnEZpU8pazgX1neTq+rl94WBAPCd0UKmVAeXO7/EgPhQINzsRmKBgdE8ge+vIfAQFb k5r8Ht59wagjlSEeHMrvmuvhSWcCz8BU2W7hrjbC4fDIIBPulkD7GtNlVwQ5mlQkrgCi YZeh+u59VRRmX2zC1bA83NsVvgp0LfVt8AS3pT125u9KFeArja8YDXvNzC8pxSA+YTqS NTpA== 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=1IVujaGcl6Gaeb44XvH6utm7tpVyG1R70wAp2OwcHKE=; b=r/1sRu4DnLp+TLRfwwaLuKpzAnqf5EEuaaISpAfyZ2of5ZoakCsiCbm4WtwPtU44GN 0uzNFxdJk6L2MGbW0q+/KWDCZaDyFgclSkGNDeymPzqPu8m9BYXk9AJi+6FzjAnntmDy IpEut5VmMl5nMADxRMm14QDa53rDyKGo5urG7iBslqg5JS7gDbX3HTRx6rRk82RQGrwD CEuxVHWn6l1CXQl6/36PdqEkbfs9wI/annnqy/H3cdc6pfe8w4llJeVCMVBAbTz4BInA BjP0uX7eN7t6Mp/17Lijdg5JuZEatp1aOedeAnQ9n9yyeKcdhuwjQOI2aOFKwp3/w8+S XZjA== X-Gm-Message-State: AOAM533nmJypdCnqmd9pIFcjhxb6fXdGKdsg/t5qNfcHwo5I61p28RaW An1yOd+/DA8vf0vcHONJ3j82pw== X-Google-Smtp-Source: ABdhPJz5W4oHB5KcDDy1IcOmfNtvhSdSRWZxgKzsC1XVyKTiKLqcHa2boLy1lCaKs9bqzPqy119f2A== X-Received: by 2002:a1c:9a8d:: with SMTP id c135mr63339wme.58.1599743706263; Thu, 10 Sep 2020 06:15:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f1sm9030393wrt.20.2020.09.10.06.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 77C6B1FF87; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/10] CODING_STYLE.rst: flesh out our naming conventions. Date: Thu, 10 Sep 2020 14:14:55 +0100 Message-Id: <20200910131504.11341-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Mention a few of the more common naming conventions we follow in the code base including common variable names and function prefix and suffix examples. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20200909112742.25730-2-alex.bennee@linaro.org> diff --git a/CODING_STYLE.rst b/CODING_STYLE.rst index 427699e0e42..8b13ef0669e 100644 --- a/CODING_STYLE.rst +++ b/CODING_STYLE.rst @@ -109,8 +109,41 @@ names are lower_case_with_underscores_ending_with_a_t, like the POSIX uint64_t and family. Note that this last convention contradicts POSIX and is therefore likely to be changed. -When wrapping standard library functions, use the prefix ``qemu_`` to alert -readers that they are seeing a wrapped version; otherwise avoid this prefix. +Variable Naming Conventions +--------------------------- + +A number of short naming conventions exist for variables that use +common QEMU types. For example, the architecture independent CPUState +is often held as a ``cs`` pointer variable, whereas the concrete +CPUArchState is usually held in a pointer called ``env``. + +Likewise, in device emulation code the common DeviceState is usually +called ``dev``. + +Function Naming Conventions +--------------------------- + +Wrapped version of standard library or GLib functions use a ``qemu_`` +prefix to alert readers that they are seeing a wrapped version, for +example ``qemu_strtol`` or ``qemu_mutex_lock``. Other utility functions +that are widely called from across the codebase should not have any +prefix, for example ``pstrcpy`` or bit manipulation functions such as +``find_first_bit``. + +The ``qemu_`` prefix is also used for functions that modify global +emulator state, for example ``qemu_add_vm_change_state_handler``. +However, if there is an obvious subsystem-specific prefix it should be +used instead. + +Public functions from a file or subsystem (declared in headers) tend +to have a consistent prefix to show where they came from. For example, +``tlb_`` for functions from ``cputlb.c`` or ``cpu_`` for functions +from cpus.c. + +If there are two versions of a function to be called with or without a +lock held, the function that expects the lock to be already held +usually uses the suffix ``_locked``. + Block structure =============== From patchwork Thu Sep 10 13:14:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33A27698 for ; Thu, 10 Sep 2020 13:16:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9BC2207FB for ; Thu, 10 Sep 2020 13:16:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hqaQz8ME" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9BC2207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMRA-0005vC-Ir for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMPx-00040M-19 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:13 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMPv-00066x-BA for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:12 -0400 Received: by mail-wr1-x42f.google.com with SMTP id s12so6632211wrw.11 for ; Thu, 10 Sep 2020 06:15:10 -0700 (PDT) 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=2cx8jHS3LDXcAjC1Gi1p55lLhOOKCtECYIqvv44WK10=; b=hqaQz8MEie1GF6oYswJDmywE8n12EtaZ4paup5LTS7qqWM++rSPPcSXwJvcG3Ub3q2 Ze2LoN+xyT+FA5ITATgl9MrCxjg6cmbL6PsYKwKvMFoHoguDZkQsM7sRXcQ2qWE9VeHT MuL/CQoDO10jZX8hJN98uFnfv0Tvc4Oafcir6J9RU0NDloXo9iiwkivJZ0dETjJ09lbC MEDaZtXrpxCVB0hNCCEJ0d8o/hwoDRlWsOeWbExa52fgPSYh+gEz85xDz9wu3UnnsKlV 250AREmaUjcynCdAlhNGIl33wKYV0OJgq0r29ZKudcbs0MYjJlQHM++FZ0dwcLfiXwkb q9dA== 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=2cx8jHS3LDXcAjC1Gi1p55lLhOOKCtECYIqvv44WK10=; b=E+NAZV5pEUjUXwL27Q8LqkpU8lFlPLkVvPbqJoAfdXe+jAjg6Ou5gKdIMHZPlWr1t6 +evVPd/sm1E0VMW2mPVAc+jADt1vd9jAx/uLynRWiAp/lXIy2kRkxaDH4+RNfjI4MwTd Tl3aatXPFe4uePVYImNnrEbLmlK4ljZCS3CpyKjV8x05y2z7mnzUBjY1O4UHhmY+isBK sEmrINpinsVywibhi7Mje/XYM5And8K2aP69U1dbkNlmSbdZR3lhBCTdDIiMQQuYGxxH sYAC7d+lF15+IXTi4NCSO3GU7JA3rNZyhyO1uirXeQdm89VYim7mpsbS6rluxkvqKq08 R/qg== X-Gm-Message-State: AOAM530fI9+mGQ7X3GGlr6p+0dZVb4CZfat35ubDjjlFDDnavTeEbEGa AUtxM4oUJEU/yQKU9Pb9pppbew== X-Google-Smtp-Source: ABdhPJwKvxg4pb/T0NM2vcuAnrhbJ29Uf/o/3XpFNVmxwr2pPIcS8WlkrTehU6ecUo4O0wIrjqg+9w== X-Received: by 2002:a5d:458e:: with SMTP id p14mr9053965wrq.61.1599743709923; Thu, 10 Sep 2020 06:15:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i1sm11364022wrc.49.2020.09.10.06.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:05 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8F60A1FF8C; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/10] usb-host: restrict workaround to new libusb versions Date: Thu, 10 Sep 2020 14:14:56 +0100 Message-Id: <20200910131504.11341-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Fixes build failures with old kernels (USBDEVFS_GET_SPEED missing), on the assumtion that distros with old kernels also have old libusb. Reported-by: Alex Bennée Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200902081445.3291-1-kraxel@redhat.com> Message-Id: <20200909112742.25730-3-alex.bennee@linaro.org> diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 08604f787fd..c5d38cb09c0 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -942,7 +942,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) usb_host_ep_update(s); libusb_speed = libusb_get_device_speed(dev); -#ifdef CONFIG_LINUX +#if LIBUSB_API_VERSION >= 0x01000107 && defined(CONFIG_LINUX) if (hostfd && libusb_speed == 0) { /* * Workaround libusb bug: libusb_get_device_speed() does not From patchwork Thu Sep 10 13:14:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767833 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E17BF92C for ; Thu, 10 Sep 2020 13:19:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BEA1207FB for ; Thu, 10 Sep 2020 13:19:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Y342jato" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BEA1207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMUK-0003uZ-Gx for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:19:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQ2-0004CE-UA for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:18 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:36442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMPw-00067J-NH for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:18 -0400 Received: by mail-wm1-x332.google.com with SMTP id z9so14070wmk.1 for ; Thu, 10 Sep 2020 06:15:12 -0700 (PDT) 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=eti/00xuqW2aTyT+ZU1Cdkbf/mkV1wbPcRPArTMTYBw=; b=Y342jatoHXMXkVZ843PLKIXqJVZB9SUySXLH+EWRBDClBaVt0muSjmgtyV8IOuxSZa X1LHJYqv/8wj8jsXfxyC1oSO7qxW+yXCEEmO/ZjL+mQxx5ey1Npctjirs2D+CRjeAOSZ rJ1zpoLN8abcFnCtqRE00BdGveXDEskX6TzLEjgncmU/UTI1CnTAwooXlS+5tt9XAx32 lItHa+hxb5LkxDm344hXNbP6Dv0ZbddJ3XcLoMzhBRN0LiypKbxjUix/TyFVVQOPsWt5 U6W8E4LGZkYSDWHAyRLGPHkB9LmdDJrDhFgkstohiuK7ROblQiDJQVMEOKFnZ8IIIvk2 nfeg== 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=eti/00xuqW2aTyT+ZU1Cdkbf/mkV1wbPcRPArTMTYBw=; b=tGkKSPuPHUB8JwT+vfhgeb9hmOqILypB/Jos3oV9Jid+Pc2O9eT0I4Gbl1vZ8wciV9 qqeEVR3YHC+yIhRLk1VYk03D5JC9U4KZV29c4P9jDaWo6VrawYEK3Gb+6GhIdsND5aTq Mun41GsyUokOvnY3mXKbD3jDqHib4PStXIGPcFT432rqk7uXNTIB7kZbfJm1sO6liwII 0n7XCYqC58v2B9itfsZZryVQ/ypg+VX9CfIr6WUHZj4h4u4NFPlKf7cIeh7dSkQ7nNsq 9wATrZ1JCxpK5sNGUEZ3eZiewXV9Zc37rzV3lvqy9eUQAvowW+ogNPXKPV6+n1O1n71O 4KdA== X-Gm-Message-State: AOAM532ssdXVj+JunEvQjVTD7O3OErC3wpEzSVIyZJMqsv51/EMAu9ql fC84CA00ruIIl+FhxspEwc9yDA== X-Google-Smtp-Source: ABdhPJwxdhzQKJF+WthDET5Z9eYPGGvlAtC3xdtAuvaPOvNTP9bCS9/yYFu823Kkoh3zLe7jrrJv4w== X-Received: by 2002:a7b:cd89:: with SMTP id y9mr58823wmj.72.1599743711217; Thu, 10 Sep 2020 06:15:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 59sm9542540wro.82.2020.09.10.06.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A59B61FF8F; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/10] tests/meson.build: fp tests don't need CONFIG_TCG Date: Thu, 10 Sep 2020 14:14:57 +0100 Message-Id: <20200910131504.11341-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" As the tests build only softfloat.c no actual TCG machinary is needed to test them (as is evidenced by GCC check-softfloat). Might as well fix the wording on Travis while at it. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200909112742.25730-4-alex.bennee@linaro.org> diff --git a/.travis.yml b/.travis.yml index 1d0ade0a133..65341634d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,7 +138,7 @@ jobs: # Just build tools and run minimal unit and softfloat checks - - name: "GCC check-softfloat (user)" + - name: "GCC check-unit and check-softfloat" env: - BASE_CONFIG="--enable-tools" - CONFIG="--disable-user --disable-system" diff --git a/tests/meson.build b/tests/meson.build index 998e4c48f90..dae8a77df14 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -259,8 +259,9 @@ test('decodetree', sh, workdir: meson.current_source_dir() / 'decode', suite: 'decodetree') +subdir('fp') + if 'CONFIG_TCG' in config_host - subdir('fp') if 'CONFIG_PLUGIN' in config_host subdir('plugin') endif From patchwork Thu Sep 10 13:14:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767827 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8674698 for ; Thu, 10 Sep 2020 13:18:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54D84207FB for ; Thu, 10 Sep 2020 13:18:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Dj1fZ+8U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54D84207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMSu-0000gb-DY for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:18:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQ2-0004AN-4h for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:18 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:45540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMPz-00069e-LF for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:17 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x14so6625908wrl.12 for ; Thu, 10 Sep 2020 06:15:15 -0700 (PDT) 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=g8PtmApH/K3qKSdHTvoF6QAOQMNnnFMaqVpih1ljmaA=; b=Dj1fZ+8UB9Yr5miY3MEhTd21OZlHc9inMaDL3muEm4Mf0kgLR1yZKFjWUXTL3kqIkr jjK7iFPyP8+DbUF2NvQZ033owFGmA2B4LoJ41bRfw3+hKkq18Y3FKQwiF6dcAKVmfvpW Qv3inujGLp/u6+cfKxNtWqBwgO8FMCcMwOKX0/CdTTkkzMGpiE8s+v1ALwi9CU8i1JXA VHZegFRrpXjTUsxY+CWZea52CL55+A/rdougOHozahigo03usyKSUcVoqeOaWOH6b5xx KleGoE89fyowVYG+iDJh2ba+nbZa/o+9MQvPXpEYURY06HWM0P92n+EHhc4JngZSa/S9 BgCw== 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=g8PtmApH/K3qKSdHTvoF6QAOQMNnnFMaqVpih1ljmaA=; b=m1KKMmHrct6N+JnEkqY2q1W9LcWKGh4Hxt7kABKZZ11pQ3olPpGX/XowZqPh5NrCBV BlGxYjkx0s+7rqF7kjgUGyOht6QVpx7V9bMxdoxTN5yLenvmc0jbjjz+BBGfFf/tG2+Q WHLOuHmmzukODhcD30outbs5fZAMFxXGITpcMgQ1iF0lggjf+0yZcqYBFl04TRhZ7nOW Mxhz8AtQd8BqjAU7RqSdpJGMNnrk6HJP3Sl4WwXFvu8i0ob6XlvMZjTt5Yupp+fr/v+O j4rZ3hwC5S41i4arO7z7Kbw4GVEwJ1OZUwg/b+nON/yZ7MJmkwofYypQjXAsepLDBLOo inqw== X-Gm-Message-State: AOAM530s/pwcJFgPEeDeQjJWqDPYkS96q+nx/B07+siUtgQO1CK41kQq iIxdGa6LECVBbeSYaD48uwmrpg== X-Google-Smtp-Source: ABdhPJzspMdjQovCSfYyyI+0EtsCQykl+yIl0/weVj+Q2vSDrCvlcm7BQJJEs2yu1YGEt9wDu4DzYA== X-Received: by 2002:adf:d4c7:: with SMTP id w7mr9074836wrk.263.1599743714284; Thu, 10 Sep 2020 06:15:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i3sm8896003wrs.4.2020.09.10.06.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BABD61FF90; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/10] target/mips: simplify gen_compute_imm_branch logic Date: Thu, 10 Sep 2020 14:14:58 +0100 Message-Id: <20200910131504.11341-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Aleksandar Rikalo , Richard Henderson , qemu-devel@nongnu.org, Jiaxun Yang , Aleksandar Markovic , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" One of the Travis builds was complaining about: qemu/include/tcg/tcg.h:437:12: error: ‘cond’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return (TCGCond)(c ^ 1); ../target/mips/translate.c:20031:13: note: ‘cond’ was declared here TCGCond cond; Rather than figure out exactly which one was causing the complaint I just defaulted to TCG_COND_ALWAYS and allowed that state to double up for the now defunct bcond_compute variable. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200909112742.25730-5-alex.bennee@linaro.org> diff --git a/target/mips/translate.c b/target/mips/translate.c index 899b90ae0ff..398edf72898 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -20028,8 +20028,7 @@ static void gen_pool32axf_nanomips_insn(CPUMIPSState *env, DisasContext *ctx) static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, int rt, int32_t imm, int32_t offset) { - TCGCond cond; - int bcond_compute = 0; + TCGCond cond = TCG_COND_ALWAYS; TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); @@ -20046,7 +20045,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, /* Treat as NOP */ goto out; } else { - bcond_compute = 1; cond = TCG_COND_EQ; } break; @@ -20065,7 +20063,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, tcg_gen_shri_tl(t0, t0, imm); tcg_gen_andi_tl(t0, t0, 1); tcg_gen_movi_tl(t1, 0); - bcond_compute = 1; if (opc == NM_BBEQZC) { cond = TCG_COND_EQ; } else { @@ -20080,7 +20077,6 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, } else if (rt == 0 && imm != 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_NE; } break; @@ -20088,24 +20084,20 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, if (rt == 0 && imm == 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_GE; } break; case NM_BLTIC: - bcond_compute = 1; cond = TCG_COND_LT; break; case NM_BGEIUC: if (rt == 0 && imm == 0) { /* Unconditional branch */ } else { - bcond_compute = 1; cond = TCG_COND_GEU; } break; case NM_BLTIUC: - bcond_compute = 1; cond = TCG_COND_LTU; break; default: @@ -20118,7 +20110,7 @@ static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, clear_branch_hflags(ctx); ctx->base.is_jmp = DISAS_NORETURN; - if (bcond_compute == 0) { + if (cond == TCG_COND_ALWAYS) { /* Uncoditional compact branch */ gen_goto_tb(ctx, 0, ctx->btarget); } else { From patchwork Thu Sep 10 13:14:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767825 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F4A6698 for ; Thu, 10 Sep 2020 13:18:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6012B207FB for ; Thu, 10 Sep 2020 13:18:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MiDiAxtW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6012B207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMSs-0000c3-Dn for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:18:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQ0-00047y-W1 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:17 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:44144) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMPy-00068x-I8 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:16 -0400 Received: by mail-wr1-x436.google.com with SMTP id s12so6632377wrw.11 for ; Thu, 10 Sep 2020 06:15:14 -0700 (PDT) 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=uwY/+7vlmf43PbXcBb0gVGgVr3dkngqHO5dviJBNyX8=; b=MiDiAxtWsFdTp6EJ/FvvAikoaY4/KXoz65QsAw/nHrANWFIIXKvr+UT1xJu0BxVYcY qINcYD+QU8LFMp1F6qVuuD4U0d6WspcvU9ngACbOd3r2Mn6tHJ8g23zbrsOWKJynJuFZ cbpBl8XQHTy7neDmkijFbZDPfC1pssAJSAYTpGVKX7ePP+FnTyAnOJk9jyJc1iiJ6Fcb dCxNErL/mdfvgpUchIiLxCv6e8gNYsAQtdCEF1iy6n5DLBV0Ylpo98m4aYeLszn1OTN0 DEkI/0SuZiuul8u1LvXaMOheNqY7PR5IoFYNZG75/rspKtUb4u2WPq8XSXsAHCRtix6/ //hg== 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=uwY/+7vlmf43PbXcBb0gVGgVr3dkngqHO5dviJBNyX8=; b=bqeaZJ0r66nAuInmn58hBwAAIdaGr1JzhFcwPmAQFqeCT2N+iqwWqGnqKD77lrzEKl AyLLFrWUKks51/PJ2iPcmQEH0YNL/k6Dy+BKLMppLFvz7yljJWOUQMB2b2nRC5brTAwO QGVBy9Floa7nHYG8Rd1XLyYFLd1jBxzQFkrr9wqv/4bcgo0pNSVOg+2axxsM+5eyxmze AXLSCIYhHCBDNjqI2VjyH0Gg9e70AjLXor0tyowNAF6b2kwkwl4PGS6Th3bwEpusiWfI ogNgOoOXLuckRPhFpRdTiz2e3bcBUmlzI8Uo5Kw45pC+lEPNM4pjhD5wg/Dcqqfq4NpQ 1VSg== X-Gm-Message-State: AOAM533W1cG9zg2YlOLUv43ry+VN8kJBgHnbgioENUvkMripdnznZEoK S7Z4vrAmmJP8hGV4/JnH+uXFiA== X-Google-Smtp-Source: ABdhPJyxRnDHhJY3C2dhZ9Md/N6Q4QK/sNkuI1i1EPfwlcyMHjOza56HgRx3IDyKq8FW7+cQoiPtmw== X-Received: by 2002:a5d:514e:: with SMTP id u14mr8864053wrt.211.1599743713144; Thu, 10 Sep 2020 06:15:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c206sm3802345wmf.47.2020.09.10.06.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CEE051FF91; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/10] docs/system/deprecated: mark ppc64abi32-linux-user for deprecation Date: Thu, 10 Sep 2020 14:14:59 +0100 Message-Id: <20200910131504.11341-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: "reviewer:Incompatible changes" , Richard Henderson , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_B?= =?utf-8?q?enn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" It's buggy and we are not sure anyone uses it. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Acked-by: David Gibson Message-Id: <20200909112742.25730-6-alex.bennee@linaro.org> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 851dbdeb8ab..a158e765c33 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -424,6 +424,13 @@ linux-user mode) is deprecated and will be removed in a future version of QEMU. Support for this CPU was removed from the upstream Linux kernel in 2018, and has also been dropped from glibc. +``ppc64abi32`` CPUs (since 5.2.0) +''''''''''''''''''''''''''''''''' + +The ``ppc64abi32`` architecture has a number of issues which regularly +trip up our CI testing and is suspected to be quite broken. For that +reason the maintainers strongly suspect no one actually uses it. + Related binaries ---------------- From patchwork Thu Sep 10 13:15:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4C2B92C for ; Thu, 10 Sep 2020 13:16:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59143207FB for ; Thu, 10 Sep 2020 13:16:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IXrXmuTv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59143207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMRD-00060m-Cw for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:16:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQ4-0004Fj-Sl for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:21 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:36800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMQ2-0006Bq-Uk for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:20 -0400 Received: by mail-wr1-x42c.google.com with SMTP id z1so6670153wrt.3 for ; Thu, 10 Sep 2020 06:15:18 -0700 (PDT) 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=NerGAGER8t51tNNFzaXyr6ZuNtUYYRuPZHB2QB32qyI=; b=IXrXmuTvhPl0Rph80bXrcmCIanq6XLMnGnp36EV9dwAg+b76TS3WeO7TZPGBje7xIc pQUhxzq8kskRWeXqxy1bsKrpfmjhR0oim20ReEZD1dI+E+7ON2TL7Fuy0VwksIxSdjh0 mUVLKvyBydU5R4fFGG8aGUWJ1sAnpweWZqTUwVtsL2nPbrEP70VKtd4J1bHq7CyLNmQV XLWpUle8SYeSh5DfJotYtSH56lsUiqbRCNMGH3HdMd1CIgbdEgNk197I+Bi8X6u8XZus HeqtNI6QrNM71nSboriGN7QEjSfm3b2INRFTW7LB7mUxEdxu61vl5JYkgmaTxMUjE5cG /H9A== 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=NerGAGER8t51tNNFzaXyr6ZuNtUYYRuPZHB2QB32qyI=; b=RLAVACKkQNPeInl2PaIj6CLalxldi3P0Y1IyufAuYfegmS/aRpxjfwRHzoiXJQmI8d 7dsHPjQQUZoD7yAmBPm032E8MMRVCSvOBpW320F1pfWbIFejED/LqOp5lbJ180fSA16Q UovAnekhh6te9R/44EzAWXNxpfaHl38gia2HCSJpBC0RgAKEgYwz535Bw5ILC+eEqa2w 8Go2uu05BG+Y2lVYIxmV7RSMhC3A6DiuZ22lmPa32ULwWMxd/fuUQLxsv7z+zqODtQnr SxvZvBLpukXN8aP+PCC2edAhsW3U83Qw1U8hq0CK03cpbiG9aUJgyU+sgFJR3OlkvHFi Qp4g== X-Gm-Message-State: AOAM532GTnnHsTuWhLAfO00YH4Amm3zK9s9OftgrAzPeQ3j32PsaedSb melLUuRFcvGPSN7An9p8o0l6Yg== X-Google-Smtp-Source: ABdhPJyw55Xtw89+zMvKz9/cuwS417DaQO/UCm5pNC7Q4xHfufsw0ypY1sA/1GElEWOcE/3jhyJPQQ== X-Received: by 2002:adf:9027:: with SMTP id h36mr8825477wrh.259.1599743717426; Thu, 10 Sep 2020 06:15:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z14sm8674078wrh.14.2020.09.10.06.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E47C51FF92; Thu, 10 Sep 2020 14:15:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/10] configure: don't enable ppc64abi32-linux-user by default Date: Thu, 10 Sep 2020 14:15:00 +0100 Message-Id: <20200910131504.11341-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The user can still enable this explicitly but they will get a warning at the end of configure for their troubles. This also drops any builds of ppc64abi32 from our CI tests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200909112742.25730-7-alex.bennee@linaro.org> diff --git a/configure b/configure index 4231d56bcc0..2b5492a0d63 100755 --- a/configure +++ b/configure @@ -542,6 +542,8 @@ gettext="" bogus_os="no" malloc_trim="" +deprecated_features="" + # parse CC options first for opt do optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') @@ -1720,26 +1722,25 @@ if [ "$bsd_user" = "yes" ]; then mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak" fi -if test -z "$target_list_exclude"; then - for config in $mak_wilds; do - default_target_list="${default_target_list} $(basename "$config" .mak)" - done -else - exclude_list=$(echo "$target_list_exclude" | sed -e 's/,/ /g') - for config in $mak_wilds; do - target="$(basename "$config" .mak)" - exclude="no" - for excl in $exclude_list; do - if test "$excl" = "$target"; then - exclude="yes" - break; - fi - done - if test "$exclude" = "no"; then - default_target_list="${default_target_list} $target" +if test -z "$target_list_exclude" -a -z "$target_list"; then + # if the user doesn't specify anything lets skip deprecating stuff + target_list_exclude=ppc64abi32-linux-user +fi + +exclude_list=$(echo "$target_list_exclude" | sed -e 's/,/ /g') +for config in $mak_wilds; do + target="$(basename "$config" .mak)" + exclude="no" + for excl in $exclude_list; do + if test "$excl" = "$target"; then + exclude="yes" + break; fi done -fi + if test "$exclude" = "no"; then + default_target_list="${default_target_list} $target" + fi +done # Enumerate public trace backends for --help output trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' "$source_path"/scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/')) @@ -7557,7 +7558,7 @@ TARGET_SYSTBL="" case "$target_name" in i386) mttcg="yes" - gdb_xml_files="i386-32bit.xml" + gdb_xml_files="i386-32bit.xml" TARGET_SYSTBL_ABI=i386 TARGET_SYSTBL=syscall_32.tbl ;; @@ -7667,6 +7668,7 @@ case "$target_name" in TARGET_SYSTBL_ABI=common,nospu,32 echo "TARGET_ABI32=y" >> $config_target_mak gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml" + deprecated_features="ppc64abi32 ${deprecated_features}" ;; riscv32) TARGET_BASE_ARCH=riscv @@ -8011,6 +8013,12 @@ fi touch ninjatool.stamp fi +if test -n "${deprecated_features}"; then + echo "Warning, deprecated features enabled." + echo "Please see docs/system/deprecated.rst" + echo " features: ${deprecated_features}" +fi + # Save the configure command line for later reuse. cat <config.status #!/bin/sh From patchwork Thu Sep 10 13:15:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767829 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8064698 for ; Thu, 10 Sep 2020 13:18:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E66B207FB for ; Thu, 10 Sep 2020 13:18:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sInO4zeP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E66B207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMSy-0000t1-OP for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:18:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQ3-0004Df-Mn for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:19 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:56044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMQ1-0006BI-Uu for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:19 -0400 Received: by mail-wm1-x344.google.com with SMTP id a65so5589801wme.5 for ; Thu, 10 Sep 2020 06:15:17 -0700 (PDT) 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=M4f+hM45++u5gmHF5wGmAw5i5AWpIMBzMXfEaibABW8=; b=sInO4zePqNtT3dsOvWzJnXceYmhdmFcbet9JWP4CH8Fo7MOPqjhaUzatGPGmeTsbad XC+RhWLTIFPWUUFjCjrQTKp/C4nL9ahSakMfczblvn8bB5KJCBxkBkjCMYkjfotuyjuv usdGYi7oXP/r/MkLOGfin2txQDjAb8Pc2hYLVqo7wTPuoMsm0nqdstSMc6ovyYd6ywqP kKHfHiXXKpnAeAmvIzyXkPvI4fI85huHQp7l+/mwxOM8EAQ0jTCcf9Dxny/Aq5pmwB44 vJIikvvQry+ZFWoq0hBj2Vq+TTG8Qt27XIC4/BeIKeIHqS0kprzVJ4VEiWxO3+9MBoXI UCqQ== 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=M4f+hM45++u5gmHF5wGmAw5i5AWpIMBzMXfEaibABW8=; b=WLWOnHByaVi166k1XHw6T2Rpu1aM5NQrGlR+dJr0e6RJEU2RxmhRw11MUPfQ5JDUmP SWm2TnbieMEva+V2pAKaee0Kk8K/bWaI3RHu/tNA0jZfITZ9M6L+Bjb+AQ524Jtj39AP 3nPC8Uebzo85NYOVqwB79GZSOv85svGKXIAlFuDvAooP05TeoBbhz/53FAHgIpr11WNH 1uC/Oy6RTYIobvt2XTAfgu9DzMBT8rsmli4tbFJ+yTN7lkQaRjZz3grzORHrlYqUbPY2 GjFdUkK36pN4VzeX6JkwZmUbLdmpOg3sEcfz1EDG6+x+BxVAvbFCD2cWvpLJsC2wIleh 7eug== X-Gm-Message-State: AOAM530UuqphWRHlo+M0U5tDcpS6unWfvCqc/gpZVDrquk2ZGYEDJ934 40ppj8sQ/yZgOMxTNCuWRRt5X0+lcqsZ/w== X-Google-Smtp-Source: ABdhPJzAqqBQYGBXv+XXGG1f80EiahC9zaTUecPedFDyWjijger5Om9XYPi9SSA/3j24WcheimwOhA== X-Received: by 2002:a1c:2e4b:: with SMTP id u72mr14905wmu.69.1599743716478; Thu, 10 Sep 2020 06:15:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c18sm9469436wrx.63.2020.09.10.06.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 074F81FF93; Thu, 10 Sep 2020 14:15:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/10] hw/i386: make explicit clearing of pch_rev_id Date: Thu, 10 Sep 2020 14:15:01 +0100 Message-Id: <20200910131504.11341-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Some compilers (notably the Xenial gcc in Travis) fail to spot that this will always be set if pch_dev_id != 0xffff. Given this is setup code and using _Pragma to override is equally as ugly lets just remove the doubt from the compilers mind. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200909112742.25730-8-alex.bennee@linaro.org> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 32b1453e6a8..33fa035fb7f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -930,7 +930,7 @@ void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id) struct PCIDevice *bridge_dev; int i, num; uint16_t pch_dev_id = 0xffff; - uint8_t pch_rev_id; + uint8_t pch_rev_id = 0; num = ARRAY_SIZE(igd_combo_id_infos); for (i = 0; i < num; i++) { From patchwork Thu Sep 10 13:15:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767837 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC8D6698 for ; Thu, 10 Sep 2020 13:21:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78A25207FB for ; Thu, 10 Sep 2020 13:21:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yiuQ8uNZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78A25207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMVa-0005ot-Br for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:21:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQC-0004K9-Od for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:29 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMQ5-0006EB-SP for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:27 -0400 Received: by mail-wr1-x42d.google.com with SMTP id g4so6669287wrs.5 for ; Thu, 10 Sep 2020 06:15:20 -0700 (PDT) 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=DEVVZdY9bSpEyzZCcrt4wAUF84l4cqCakjvurZYUtQY=; b=yiuQ8uNZo0z4Y3bdSI9lQEBtwLxt6g1MeuVeOl/4rJQm4Rm1ixTcWozw9apgf79ybi BfSzEadLd9vGd3EqlVZ7lmXFxmTmV6XdgylfRMlT/vgzCi7GaewibikrIDWaTvGyjyce hiXVRSpe9we+0g4L/tzOHsUxx383a2CO99sWzSzJz2fK5DsoiLjj9m3uQB8KFnguB0lt n37Kzf3oxc5WsErIlj/M2UQX4yrmPvYR456u21K1mcS/WnKydnYMfA8dSMd5qo5lIPD4 bLLQeqy29m+LhKURvDMUPTWdXLzX6ocDLG+f3cRlyu3Ct5akT0/mhqcS15Qf3RKY7tXE 7NpQ== 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=DEVVZdY9bSpEyzZCcrt4wAUF84l4cqCakjvurZYUtQY=; b=oqZArA5eLL3SeBJaFcPm4X43gPW/RZyU5ohCEXXFt277O4aU6rZDBDicIaW76KCTWv CmJTQ2aWQVgQEJh+rCcsMC4NoPrVLXM4CI0aOUagvq3gwkVa9Nr2PEm3Uxsu+LakCzK6 pCXSzpBauqrJKRAflfpI5e4nYRo12UWaSqR0OdD+3OvjrJ26cINRQ0bsx75nUTjn7gta 5XUGd51b7eHDHHjaHIe4A323eh1kbL4gxgToxCKL/GhsHgE5naOv4ClWnLMWdS5SJWQm X0jqsDvG+9Biwx5c/8hJrCKFK8eB8+v8AN/duA+uNRDajP/mwwI+VX1G+DoO7OEzfjQK 4idw== X-Gm-Message-State: AOAM533T7bxsb2SjVgYHWvZMVCjDgCgekukTflDsX5IcsPy+1AjcPqsV /3gt8KWfzpnCqoTjsTE1FDrj0A== X-Google-Smtp-Source: ABdhPJwvKfwDF18Kqv5bTpOqRs5FXsvIB3nE+brxCIs5XJ2dY71j/yJX3ucZBbOmeAEKvOwttwi9WQ== X-Received: by 2002:a5d:414b:: with SMTP id c11mr2814713wrq.181.1599743719460; Thu, 10 Sep 2020 06:15:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k6sm3511635wmf.30.2020.09.10.06.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1DBEC1FF96; Thu, 10 Sep 2020 14:15:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/10] tests: bump avocado version Date: Thu, 10 Sep 2020 14:15:02 +0100 Message-Id: <20200910131504.11341-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: Pavel Dovgalyuk , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , qemu-devel@nongnu.org, Willian Rampazzo , Pavel Dovgalyuk , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Pavel Dovgalyuk Reverse debugging test uses gdb remote client of avocado framework. This client was fixed since the currently used version 76. Therefore this patch bumps the version to 81 and fixes command line version compatibility issue. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Tested-by: Cleber Rosa Tested-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Message-Id: <159903462803.28509.16851113546106095750.stgit@pasha-ThinkPad-X280> Message-Id: <20200908202352.298506-2-philmd@redhat.com> Message-Id: <20200909112742.25730-9-alex.bennee@linaro.org> diff --git a/tests/Makefile.include b/tests/Makefile.include index f93e6112202..2baebc179e7 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -127,7 +127,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ --filter-by-tags-include-empty --filter-by-tags-include-empty-key \ $(AVOCADO_TAGS) \ - $(if $(GITLAB_CI),,--failfast=on) tests/acceptance, \ + $(if $(GITLAB_CI),,--failfast) tests/acceptance, \ "AVOCADO", "tests/acceptance") # Consolidated targets diff --git a/tests/requirements.txt b/tests/requirements.txt index f9c84b4ba1a..036691c9221 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,5 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==76.0 +avocado-framework==81.0 pycdlib==1.9.0 From patchwork Thu Sep 10 13:15:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767835 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 24E8A92C for ; Thu, 10 Sep 2020 13:19:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5892207FB for ; Thu, 10 Sep 2020 13:19:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rvpmaHWP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5892207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMUN-00040H-Ro for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:19:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQC-0004KA-W7 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:29 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:40177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMQA-0006GD-29 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:28 -0400 Received: by mail-wm1-x333.google.com with SMTP id k18so5745121wmj.5 for ; Thu, 10 Sep 2020 06:15:23 -0700 (PDT) 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=7UF2Z5+SuIyq9l+IsO7cNSeFnpuZpKompmhgJjMgzVo=; b=rvpmaHWP7HWrI+tkZsAUHhytka4nY0N0VuqtNt49rzCrbx37B0ED37fUlGRi1C1Ef9 uK9jFeinbF2zSet/7DuwVlFG0sgwQYeC8cmXtSEeE5LRjAyzixIaexo8gKNIn0zaDZWL phyuaNlhVVHI5QDuDnLekMsltBazc1S8LXzycEWdrvtTZhhECR8l/Kd/cgolM9oinYoD Xvf1c42QJKpImheGkmKjlDOrquXqs8EBkSh7S4RDOESxLc3YnLoucABLRD10dGvfV8tI q4qmXcs574awLAVPCrLuF5yMyj7lF7M6e5jh9aXGgk20yHArdWjj8RktBukilAzvpzf+ 3bZQ== 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=7UF2Z5+SuIyq9l+IsO7cNSeFnpuZpKompmhgJjMgzVo=; b=ZuffjhcKoYA7pM6LQFC5mPuPU1vFXjeiQWqvW0zvcztXoPiPP73M9lQ8e4BIKAQliF lbyLf3N6qqOszwrET+n/JpCPMIHyyvXFHJ1jmqWAGPX6WBoO1jm3RQTQLf64164S2f13 I4THHNhqVaKuKUBuWaIh5Fv1JbRvIBI9vsP+Dj++a2jRtqtzbe0YuWriTXWCQm93zMEz FuUWTL7KgMVWEnqMXxlZY7NOQ29m5lGb6h6Hz0nyKhpfZ0JDRhLEbo7cJ45E3C8nQ95J giO41AQGWLfHhcU8+b4epbvo512aMKk42ZxNIC8bTpiAwIblY2NKckLKAggLIqNMQ7KB s+7w== X-Gm-Message-State: AOAM530aYP1pUGoo3vduEx/dtUDGEZZE5F0gJCY/plZr0+KKNeIWDAdm 8+bZZuvbf5qPwrz6jgfGVmUYmg== X-Google-Smtp-Source: ABdhPJxuEtCtSTwrYZfPP/CqRSFzc581PuFt7M3Rg8c6eKT35AgHyPAqnO9bdRBhRxLhwrca5/CVnw== X-Received: by 2002:a1c:b3c6:: with SMTP id c189mr24923wmf.27.1599743722942; Thu, 10 Sep 2020 06:15:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 70sm3814892wme.15.2020.09.10.06.15.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3256C1FF98; Thu, 10 Sep 2020 14:15:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/10] tests/acceptance: Add Test.fetch_asset(cancel_on_missing=True) Date: Thu, 10 Sep 2020 14:15:03 +0100 Message-Id: <20200910131504.11341-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Invert the default of avocado.Test.fetch_asset 'cancel_on_missing' keyword: accept missing artefacts by default. If a test is certain an artifact can't be missing, it will set cancel_on_missing=False. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200908202352.298506-3-philmd@redhat.com> Message-Id: <20200909112742.25730-10-alex.bennee@linaro.org> diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index db9c0f5d79d..4cda0371879 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -192,3 +192,15 @@ class Test(avocado.Test): def tearDown(self): for vm in self._vms.values(): vm.shutdown() + + def fetch_asset(self, name, + asset_hash=None, algorithm=None, + locations=None, expire=None, + find_only=False, cancel_on_missing=True): + return super(Test, self).fetch_asset(name, + asset_hash=asset_hash, + algorithm=algorithm, + locations=locations, + expire=expire, + find_only=find_only, + cancel_on_missing=cancel_on_missing) From patchwork Thu Sep 10 13:15:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11767831 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D415092C for ; Thu, 10 Sep 2020 13:18:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 828C3207FB for ; Thu, 10 Sep 2020 13:18:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="x/YtfGxk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 828C3207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGMT2-00012H-LP for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Sep 2020 09:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGMQA-0004Ii-CC for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:27 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:51605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGMQ7-0006G2-GQ for qemu-devel@nongnu.org; Thu, 10 Sep 2020 09:15:26 -0400 Received: by mail-wm1-x32b.google.com with SMTP id w2so14846wmi.1 for ; Thu, 10 Sep 2020 06:15:23 -0700 (PDT) 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=cqJ066dFQBFsxFnNEWbdDyKeXG6aiF7vK4bsRU8kX08=; b=x/YtfGxkNdDgvhXKpYocOB66ZjS35N+9HWWrQBf6Z/iWHFoK4B4bGzwY2wLIa/4OHP fl0ySxNvzvkxb/NPVEkjI4cYHGMRAOn+nrjASf0HaBm8WKzObUZpGyvv0kbQXMB01yZl jsxEbVRfslGTpNx/vdHSfoNCbsgu5bYyJMuJGJrEqfTOpbaFckuQbf7U4DWp8KKz8u+Z cSLwswFanSTSEf/nkHKIrsrVD/XrDS6x1ryJROgr3MTemigKQfr797rRYs8Mgjti0xW6 gppMP1uBVKIUcxcUaQo1F16+okC+3LOqOQYHgf7yAz4ku/kkRwxnB55jzhEKxCWDu3IR dh+A== 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=cqJ066dFQBFsxFnNEWbdDyKeXG6aiF7vK4bsRU8kX08=; b=P3Fd5WtprPm07JQq9hJW+4vuAjBPJ0oMkJDaKLa/3CzvmrQjiGC7m/J1qAvSg+60Wd VY9GiXLBEIgZ6ZQ0FD75coH9MUi7lf891ojkeuDswgtAKzvUvx/H/WT723ZHrPrJ5QdR LbWHH2U1K50RAKg01QtjJP7VSwaUo/hEXELz6C6qKORDHEC9V0m9UQWO/1lv0lgl5g10 wA6cZ845GsZpHfwnjj7bPmwX0PYUJEYZR9HzSNZviU4yfz0nsk9M48o1ob/ncbB4l9bm IXuyLN8eSgFzQ9vfME4Wv0/eUjXWwF17hzGywQnAUL9bZ5piGa8Yta98TShk9MbJ9uCX S4lQ== X-Gm-Message-State: AOAM533ioGIfzh/5wvg0Ep4ISnlPU9bYuz0IyLvSdGJje/wXwLDEM9RU /Cvv9jg2S8ECzVEusjCSCLddp6DxmFi4Mg== X-Google-Smtp-Source: ABdhPJx7zk4WiG9pHfJ2MOlzqRpk5mGRCGEyVObx/TVyotnWP5av8g3GAzaRzO8lwpzGJhZYd2ocRQ== X-Received: by 2002:a05:600c:22c5:: with SMTP id 5mr74918wmg.34.1599743721975; Thu, 10 Sep 2020 06:15:21 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v17sm9000287wrr.60.2020.09.10.06.15.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 06:15:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 534C91FF99; Thu, 10 Sep 2020 14:15:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/10] plugins: move the more involved plugins to contrib Date: Thu, 10 Sep 2020 14:15:04 +0100 Message-Id: <20200910131504.11341-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200910131504.11341-1-alex.bennee@linaro.org> References: <20200910131504.11341-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" We have an exploding complexity problem in the testing so lets just move the more involved plugins into contrib. tests/plugins still exist for the basic plugins that exercise the API. We restore the old pre-meson style Makefile for contrib as it also doubles as a guide for out-of-tree plugin builds. While we are at it add some examples to the documentation and a specific plugins build target. Signed-off-by: Alex Bennée Message-Id: <20200909112742.25730-11-alex.bennee@linaro.org> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index a05990906cc..0568dfa6a49 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -134,3 +134,149 @@ longer want to instrument the code. This operation is asynchronous which means callbacks may still occur after the uninstall operation is requested. The plugin isn't completely uninstalled until the safe work has executed while all vCPUs are quiescent. + +Example Plugins +=============== + +There are a number of plugins included with QEMU and you are +encouraged to contribute your own plugins plugins upstream. There is a +`contrib/plugins` directory where they can go. + +- tests/plugins + +These are some basic plugins that are used to test and exercise the +API during the `make check-tcg` target. + +- contrib/plugins/hotblocks.c + +The hotblocks plugin allows you to examine the where hot paths of +execution are in your program. Once the program has finished you will +get a sorted list of blocks reporting the starting PC, translation +count, number of instructions and execution count. This will work best +with linux-user execution as system emulation tends to generate +re-translations as blocks from different programs get swapped in and +out of system memory. + +If your program is single-threaded you can use the `inline` option for +slightly faster (but not thread safe) counters. + +Example:: + + ./aarch64-linux-user/qemu-aarch64 \ + -plugin contrib/plugins/libhotblocks.so -d plugin \ + ./tests/tcg/aarch64-linux-user/sha1 + SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6 + collected 903 entries in the hash table + pc, tcount, icount, ecount + 0x0000000041ed10, 1, 5, 66087 + 0x000000004002b0, 1, 4, 66087 + ... + +- contrib/plugins/hotpages.c + +Similar to hotblocks but this time tracks memory accesses:: + + ./aarch64-linux-user/qemu-aarch64 \ + -plugin contrib/plugins/libhotpages.so -d plugin \ + ./tests/tcg/aarch64-linux-user/sha1 + SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6 + Addr, RCPUs, Reads, WCPUs, Writes + 0x000055007fe000, 0x0001, 31747952, 0x0001, 8835161 + 0x000055007ff000, 0x0001, 29001054, 0x0001, 8780625 + 0x00005500800000, 0x0001, 687465, 0x0001, 335857 + 0x0000000048b000, 0x0001, 130594, 0x0001, 355 + 0x0000000048a000, 0x0001, 1826, 0x0001, 11 + +- contrib/plugins/howvec.c + +This is an instruction classifier so can be used to count different +types of instructions. It has a number of options to refine which get +counted. You can give an argument for a class of instructions to break +it down fully, so for example to see all the system registers +accesses:: + + ./aarch64-softmmu/qemu-system-aarch64 $(QEMU_ARGS) \ + -append "root=/dev/sda2 systemd.unit=benchmark.service" \ + -smp 4 -plugin ./contrib/plugins/libhowvec.so,arg=sreg -d plugin + +which will lead to a sorted list after the class breakdown:: + + Instruction Classes: + Class: UDEF not counted + Class: SVE (68 hits) + Class: PCrel addr (47789483 hits) + Class: Add/Sub (imm) (192817388 hits) + Class: Logical (imm) (93852565 hits) + Class: Move Wide (imm) (76398116 hits) + Class: Bitfield (44706084 hits) + Class: Extract (5499257 hits) + Class: Cond Branch (imm) (147202932 hits) + Class: Exception Gen (193581 hits) + Class: NOP not counted + Class: Hints (6652291 hits) + Class: Barriers (8001661 hits) + Class: PSTATE (1801695 hits) + Class: System Insn (6385349 hits) + Class: System Reg counted individually + Class: Branch (reg) (69497127 hits) + Class: Branch (imm) (84393665 hits) + Class: Cmp & Branch (110929659 hits) + Class: Tst & Branch (44681442 hits) + Class: AdvSimd ldstmult (736 hits) + Class: ldst excl (9098783 hits) + Class: Load Reg (lit) (87189424 hits) + Class: ldst noalloc pair (3264433 hits) + Class: ldst pair (412526434 hits) + Class: ldst reg (imm) (314734576 hits) + Class: Loads & Stores (2117774 hits) + Class: Data Proc Reg (223519077 hits) + Class: Scalar FP (31657954 hits) + Individual Instructions: + Instr: mrs x0, sp_el0 (2682661 hits) (op=0xd5384100/ System Reg) + Instr: mrs x1, tpidr_el2 (1789339 hits) (op=0xd53cd041/ System Reg) + Instr: mrs x2, tpidr_el2 (1513494 hits) (op=0xd53cd042/ System Reg) + Instr: mrs x0, tpidr_el2 (1490823 hits) (op=0xd53cd040/ System Reg) + Instr: mrs x1, sp_el0 (933793 hits) (op=0xd5384101/ System Reg) + Instr: mrs x2, sp_el0 (699516 hits) (op=0xd5384102/ System Reg) + Instr: mrs x4, tpidr_el2 (528437 hits) (op=0xd53cd044/ System Reg) + Instr: mrs x30, ttbr1_el1 (480776 hits) (op=0xd538203e/ System Reg) + Instr: msr ttbr1_el1, x30 (480713 hits) (op=0xd518203e/ System Reg) + Instr: msr vbar_el1, x30 (480671 hits) (op=0xd518c01e/ System Reg) + ... + +To find the argument shorthand for the class you need to examine the +source code of the plugin at the moment, specifically the `*opt` +argument in the InsnClassExecCount tables. + +- contrib/plugins/lockstep.c + +This is a debugging tool for developers who want to find out when and +where execution diverges after a subtle change to TCG code generation. +It is not an exact science and results are likely to be mixed once +asynchronous events are introduced. While the use of -icount can +introduce determinism to the execution flow it doesn't always follow +the translation sequence will be exactly the same. Typically this is +caused by a timer firing to service the GUI causing a block to end +early. However in some cases it has proved to be useful in pointing +people at roughly where execution diverges. The only argument you need +for the plugin is a path for the socket the two instances will +communicate over:: + + + ./sparc-softmmu/qemu-system-sparc -monitor none -parallel none \ + -net none -M SS-20 -m 256 -kernel day11/zImage.elf \ + -plugin ./contrib/plugins/liblockstep.so,arg=lockstep-sparc.sock \ + -d plugin,nochain + +which will eventually report:: + + qemu-system-sparc: warning: nic lance.0 has no peer + @ 0x000000ffd06678 vs 0x000000ffd001e0 (2/1 since last) + @ 0x000000ffd07d9c vs 0x000000ffd06678 (3/1 since last) + Δ insn_count @ 0x000000ffd07d9c (809900609) vs 0x000000ffd06678 (809900612) + previously @ 0x000000ffd06678/10 (809900609 insns) + previously @ 0x000000ffd001e0/4 (809900599 insns) + previously @ 0x000000ffd080ac/2 (809900595 insns) + previously @ 0x000000ffd08098/5 (809900593 insns) + previously @ 0x000000ffd080c0/1 (809900588 insns) + diff --git a/configure b/configure index 2b5492a0d63..2b6a1196da5 100755 --- a/configure +++ b/configure @@ -7855,6 +7855,7 @@ DIRS="$DIRS tests/qtest tests/qemu-iotests tests/vm tests/fp tests/qgraph" DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw" DIRS="$DIRS roms/seabios" +DIRS="$DIRS contrib/plugins/" LINKS="Makefile" LINKS="$LINKS tests/tcg/lm32/Makefile" LINKS="$LINKS tests/tcg/Makefile.target" @@ -7866,6 +7867,7 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit LINKS="$LINKS tests/acceptance tests/data" LINKS="$LINKS tests/qemu-iotests/check" LINKS="$LINKS python" +LINKS="$LINKS contrib/plugins/Makefile " UNLINK="pc-bios/keymaps" for bios_file in \ $source_path/pc-bios/*.bin \ diff --git a/Makefile b/Makefile index d6c5c9fdef1..b63f7dce529 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,12 @@ config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION # Force configure to re-run if the API symbols are updated ifeq ($(CONFIG_PLUGIN),y) config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols + +.PHONY: plugins +plugins: + $(call quiet-command,\ + $(MAKE) $(SUBDIR_MAKEFLAGS) -C contrib/plugins V="$(V)", \ + "BUILD", "example plugins") endif else @@ -256,6 +262,11 @@ help: $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' +ifeq ($(CONFIG_PLUGIN),y) + @echo 'Plugin targets:' + $(call print-help,plugins,Build the example TCG plugins) + @echo '' +endif @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/tests/plugin/hotblocks.c b/contrib/plugins/hotblocks.c similarity index 100% rename from tests/plugin/hotblocks.c rename to contrib/plugins/hotblocks.c diff --git a/tests/plugin/hotpages.c b/contrib/plugins/hotpages.c similarity index 100% rename from tests/plugin/hotpages.c rename to contrib/plugins/hotpages.c diff --git a/tests/plugin/howvec.c b/contrib/plugins/howvec.c similarity index 100% rename from tests/plugin/howvec.c rename to contrib/plugins/howvec.c diff --git a/tests/plugin/lockstep.c b/contrib/plugins/lockstep.c similarity index 100% rename from tests/plugin/lockstep.c rename to contrib/plugins/lockstep.c diff --git a/MAINTAINERS b/MAINTAINERS index 7d0a5e91e4f..018c4f94a93 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2745,7 +2745,8 @@ M: Alex Bennée S: Maintained F: docs/devel/tcg-plugins.rst F: plugins/ -F: tests/plugin +F: tests/plugin/ +F: contrib/plugins/ AArch64 TCG target M: Richard Henderson diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile new file mode 100644 index 00000000000..7801b08b0d6 --- /dev/null +++ b/contrib/plugins/Makefile @@ -0,0 +1,42 @@ +# -*- Mode: makefile -*- +# +# This Makefile example is fairly independent from the main makefile +# so users can take and adapt it for their build. We only really +# include config-host.mak so we don't have to repeat probing for +# cflags that the main configure has already done for us. +# + +BUILD_DIR := $(CURDIR)/../.. + +include $(BUILD_DIR)/config-host.mak + +VPATH += $(SRC_PATH)/contrib/plugins + +NAMES := +NAMES += hotblocks +NAMES += hotpages +NAMES += howvec +NAMES += lockstep + +SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) + +# The main QEMU uses Glib extensively so it's perfectly fine to use it +# in plugins (which many example do). +CFLAGS = $(GLIB_CFLAGS) +CFLAGS += -fPIC +CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi) +CFLAGS += -I$(SRC_PATH)/include/qemu + +all: $(SONAMES) + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +lib%.so: %.o + $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) + +clean: + rm -f *.o *.so *.d + rm -Rf .libs + +.PHONY: all clean diff --git a/tests/Makefile.include b/tests/Makefile.include index 2baebc179e7..40d909badcb 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -50,7 +50,7 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS)) $(foreach PROBE_TARGET,$(TARGET_DIRS), \ $(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs)) -build-tcg-tests-%: $(if $(CONFIG_PLUGIN),plugins) +build-tcg-tests-%: $(if $(CONFIG_PLUGIN),test-plugins) $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \ -f $(SRC_PATH)/tests/tcg/Makefile.qemu \ SRC_PATH=$(SRC_PATH) \ diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index dbbdcbaa670..1eacfa6e355 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -1,7 +1,7 @@ t = [] -foreach i : ['bb', 'empty', 'insn', 'mem', 'hotblocks', 'howvec', 'hotpages', 'lockstep'] +foreach i : ['bb', 'empty', 'insn', 'mem'] t += shared_module(i, files(i + '.c'), include_directories: '../../include/qemu', dependencies: glib) endforeach -alias_target('plugins', t) +alias_target('test-plugins', t) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 4b2b696fcee..2ae86776cdc 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -129,8 +129,7 @@ ifeq ($(CONFIG_PLUGIN),y) PLUGIN_SRC=$(SRC_PATH)/tests/plugin PLUGIN_LIB=../../plugin VPATH+=$(PLUGIN_LIB) -PLUGINS=$(filter-out liblockstep.so,\ - $(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c)))) +PLUGINS=$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c))) # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We