From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526987; cv=none; d=zohomail.com; s=zohoarc; b=kn9tuHXuUhLbFVy3MnVSYtdPK4DqOrkO1OxPHaaWtFlN5ENnirAyYyvX6ZlGOTyifYtXHkU5hmri3S76JcxQUpvo5uQdoMjIW7hleNB801wHC1gbgOHychLkc/uV7TJHwdFk4/HXZqqTOZMgtMewYMskdl6zF1VfHGyxhytiXeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526987; 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=VzF8PA6ek1MoUJLhlubB3deg/aUiCd4KpJOKWHcRyfQ=; b=m55JmsbCeQDU3gaTDei55pfRKdp9tKiouQK8TcZQs7CN9BQpCguIlSY7zbMTZBUrpVgEjAik8cauKPeVJUmEAmzyHn0gc5ZeHnoO0noavR1llAWb3Wa3veaSVpFsGbR3XXPTjSSrks/W6RRfMJLNRA4nCgrZ2vS8K10o2x/3nNM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526987053853.2956907618275; Mon, 6 Jun 2022 07:49:47 -0700 (PDT) Received: from localhost ([::1]:45648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE37-0000PQ-Jz for importer@patchew.org; Mon, 06 Jun 2022 10:49:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr7-00025V-Qj for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Vc-K2 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-421-CMVnazMLOHePnDuMYdmhMQ-1; Mon, 06 Jun 2022 10:36:50 -0400 Received: by mail-wm1-f69.google.com with SMTP id p24-20020a05600c1d9800b0039c51c2da19so760380wms.0 for ; Mon, 06 Jun 2022 07:36:49 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id c7-20020a05600c0a4700b003973c54bd69sm25016268wmq.1.2022.06.06.07.36.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526211; 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=VzF8PA6ek1MoUJLhlubB3deg/aUiCd4KpJOKWHcRyfQ=; b=TszokRNq9gnCnDih+Xf5PhQgTqwUoGYVeOufST+PSfntXImH2aKoGcjyUillJHkUwyC68O 2svp9dJzrdg8wHqazd+gr1LcDj3aCJyrt3aq62gN187u/XsaKXPunrMdkBMMG1v3mOFcN7 qlN5M+qcxFQbbScW6ySposr4dZMUsQI= X-MC-Unique: CMVnazMLOHePnDuMYdmhMQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VzF8PA6ek1MoUJLhlubB3deg/aUiCd4KpJOKWHcRyfQ=; b=EzT42bdEQ6x1T/mBZgoUXPXpt57Uu0TIOxYrG1nWbyN2mk/7L82cJ/BGsx2fAxwir2 dioLhd8rKXhvtdGqFxxMJItyFe2SzxdVLrJJkL+xWK9tQg42yl/1/I5yQeWS90fI/vby 8lXD8nvrQuXalUORdOyfQ3zQP+ysGk4NHZ1lBOL0S409fLMY2q5RS+k27LgrW3lvqb/B cuGHG/1i+DVtXLXsOF2YFyohmtthCLkUq5sMy03V1hK84OxwbEyhVWtXmz2TJ7RuLjID TBr0XZTxv+DWcHdfQsh2SEu2CpBkWd/4+BkwozO8frS0JOEdIbgwaGPK2WQuaxyWypid cX6g== X-Gm-Message-State: AOAM531vYTrVtu/M/PgyadQDrbgR4EWrwi1Q/F2DbJIx7Fw32bVwxDp2 799PJDO1ndzmsI5DcoRBECR0iaD01nNxASWJJghN+2Zzt5G5G4UTPCwlCe1RqFQxuMU68zKN2zv gvs+flzItdEHVHBPxeyCh9wnlPLq+nEZZcKiIpQnUhtvTfDLfLHuEEx8ff3uyuYwLZ84= X-Received: by 2002:a5d:47c1:0:b0:217:1bfc:56c2 with SMTP id o1-20020a5d47c1000000b002171bfc56c2mr9179980wrc.336.1654526208290; Mon, 06 Jun 2022 07:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv9/cGwHN2A+ficzzDjm0CXYh8OesQAaD5UB6hoHSCv47nJxhKHWjl9HeXyIDp8T4FgUETxQ== X-Received: by 2002:a5d:47c1:0:b0:217:1bfc:56c2 with SMTP id o1-20020a5d47c1000000b002171bfc56c2mr9179949wrc.336.1654526207953; Mon, 06 Jun 2022 07:36:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Stephen Michael Jothen Subject: [PULL 01/29] target/i386/tcg: Fix masking of real-mode addresses with A20 bit Date: Mon, 6 Jun 2022 16:36:16 +0200 Message-Id: <20220606143644.1151112-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526989001100001 Content-Type: text/plain; charset="utf-8" From: Stephen Michael Jothen The correct A20 masking is done if paging is enabled (protected mode) but it seems to have been forgotten in real mode. For example from the AMD64 APM V= ol. 2 section 1.2.4: > If the sum of the segment base and effective address carries over into bi= t 20, > that bit can be optionally truncated to mimic the 20-bit address wrapping= of the > 8086 processor by using the A20M# input signal to mask the A20 address bi= t. Most BIOSes will enable the A20 line on boot, but I found by disabling the = A20 line afterwards, the correct wrapping wasn't taking place. `handle_mmu_fault' in target/i386/tcg/sysemu/excp_helper.c seems to be the = culprit. In real mode, it fills the TLB with the raw unmasked address. However, for = the protected mode, the `mmu_translate' function does the correct A20 masking. The fix then should be to just apply the A20 mask in the first branch of th= e if statement. Signed-off-by: Stephen Michael Jothen Message-Id: Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/excp_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/= excp_helper.c index e1b6d88683..48feba7e75 100644 --- a/target/i386/tcg/sysemu/excp_helper.c +++ b/target/i386/tcg/sysemu/excp_helper.c @@ -359,6 +359,7 @@ static int handle_mmu_fault(CPUState *cs, vaddr addr, i= nt size, CPUX86State *env =3D &cpu->env; int error_code =3D PG_ERROR_OK; int pg_mode, prot, page_size; + int32_t a20_mask; hwaddr paddr; hwaddr vaddr; =20 @@ -368,7 +369,8 @@ static int handle_mmu_fault(CPUState *cs, vaddr addr, i= nt size, #endif =20 if (!(env->cr[0] & CR0_PG_MASK)) { - paddr =3D addr; + a20_mask =3D x86_get_a20_mask(env); + paddr =3D addr & a20_mask; #ifdef TARGET_X86_64 if (!(env->hflags & HF_LMA_MASK)) { /* Without long mode we can only address 32bits in real mode */ --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526632; cv=none; d=zohomail.com; s=zohoarc; b=Szj1/YpRgT/1jMErFPPXjC4oJnyjjX6ume591/nGR2pqvzJ92+eNYCm5O7XMVzFg4lC8ahzE9u1YUKFudkCLIcVyHpmfsme3oWhx7G55JpNfO6yTLxcT2ZKWD9swfcD/Oh9ChMP0ffARNHt1nTDDwJzqvVUbkMyedYiqd5xc3pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526632; h=Content-Type:Content-Transfer-Encoding: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=XKQ001hoZI6qaGoS4FyZOiSsbAJWoJf8cHlWtj+qR84=; b=nrZF4LW+Hs1DdEH6EKj+s4IzDnNwWfzKg358loGncMyilsRPiM2PZVkQI3+Aa8EzMABfMy+XEUhtIka8mYwby6T3ck0CZNXPr6lVDHWB4r/YB8OKmfuwBWHwphDM+7FPAdzbjUThZce42Q+QNJ4T3+tULpPFjvU0EAzhPEMuRSM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526632115120.16059700598987; Mon, 6 Jun 2022 07:43:52 -0700 (PDT) Received: from localhost ([::1]:33874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyDxO-0000Z8-OV for importer@patchew.org; Mon, 06 Jun 2022 10:43:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr6-0001xU-1k for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDqn-0000Vp-Oo for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:06 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-NyzZ9m_kPtG3wkbnoWM2UA-1; Mon, 06 Jun 2022 10:36:52 -0400 Received: by mail-wr1-f69.google.com with SMTP id p10-20020adfaa0a000000b0020c4829af5fso2879546wrd.16 for ; Mon, 06 Jun 2022 07:36:52 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id bp11-20020a5d5a8b000000b0020c5253d926sm2055412wrb.114.2022.06.06.07.36.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XKQ001hoZI6qaGoS4FyZOiSsbAJWoJf8cHlWtj+qR84=; b=Iagw7XjWEFW1Uv76O7msfa8FyNv23Tux2mOe7utJY8GOUuHVBLoodDD5PANJeTEdf930pT kWiMa4CUhJaQm6dxpNoy3kD7eYEN3XfeTb6FNvTy66dCQ4VNJscf4UsZnTIZUQDElu1h0w s8K0G11gakKDKODUzUUEC7aJWVycQ9U= X-MC-Unique: NyzZ9m_kPtG3wkbnoWM2UA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XKQ001hoZI6qaGoS4FyZOiSsbAJWoJf8cHlWtj+qR84=; b=IkKzN7NmaxkQUqW8NrqKZlRATHR9cD9ykrC4G0HmzdGTn/rdWxOmYDXwL6ThjDVi9R T3kLvqqz6/r0UYOpN+wKuXvMhG+jt8heZcdWI9Bbney7wiKr34pRYJfeHxmtwRXa2O19 RY3zQGjtDKXPbUQ/rnVOXXLDbBARsLCMDO0mez7jXaC9BpfN6FLI+C1eiDLcBmUOjc+t 3HMpYLMBqzzw7EGvQVNFWXweeQSlkG2VdLMyqwqhYh2ZZK1NUt1aNY6hb97ZDx21rNaG h6FwBjbBsuu9L7Vg0NYtiCvl8s9TlafZtofkN/tKqN8Oyqo+zeqO8fPG7I7XZ7shiJ+J Y/aw== X-Gm-Message-State: AOAM532vBmhFc9gd7x7Bp3Pek+s77p/BuhVQzocO7/mJ58nzSbDasf8s TSB7SE9WJgZIVnD7IpYgsjwDddSk4LkVRD4Wz68tPyOsHNGYVEJfcdXRjMaqpbnlBnSVTBqWD6C KPrwGkVqd9j6FfZ9dFbiko+aGjcPotoeLO+jQIDYka0WeZ4oITD6+ANdvEqf5zwY1sfQ= X-Received: by 2002:a05:6000:1548:b0:217:6480:e65 with SMTP id 8-20020a056000154800b0021764800e65mr8662297wry.381.1654526210714; Mon, 06 Jun 2022 07:36:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqR7XGZhUbw/QSrtqyV2bSZ0G1+I7DEJTgDg1/+Pw6E0uhM4q1mj+dPVPAuBr+B74a09DagA== X-Received: by 2002:a05:6000:1548:b0:217:6480:e65 with SMTP id 8-20020a056000154800b0021764800e65mr8662219wry.381.1654526209694; Mon, 06 Jun 2022 07:36:49 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/29] build: add a "make modules" target Date: Mon, 6 Jun 2022 16:36:17 +0200 Message-Id: <20220606143644.1151112-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526634567100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index bc6234c85e..9b3fd4e52b 100644 --- a/meson.build +++ b/meson.build @@ -3285,6 +3285,9 @@ foreach m : block_mods + softmmu_mods install: true, install_dir: qemu_moddir) endforeach +if emulator_modules.length() > 0 + alias_target('modules', emulator_modules) +endif =20 softmmu_ss.add(authz, blockdev, chardev, crypto, io, qmp) common_ss.add(qom, qemuutil) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526683; cv=none; d=zohomail.com; s=zohoarc; b=lbjQvEqq7uCYqxOgNFzVuyLsLTk5JhMWCDves4F7vyK9mPU7aLmU6A9DdNJJPAhHjCvej0WqRqRbxbjS9HkIg9/6Uw210BvPPMfgVQu3L9NLL6KPyHpIAmZpo+p9TuBaZnhg+NbDDszPZIFXytNLis23YOHG6j0XzMHpDZZP+HI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526683; 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=KXRNumb0PKZ5F4F0yrvtrWIHLJU9qPmC5y9tpVx2nDY=; b=XnOqPJc7MA4N3Fw/6sCI0gO9abCkEabnW3Bm86R3NnNMz3l00yxIyGMWG7lIT5GcBQt6DdHyfq4gn6LMrP0sDsblAeRl8WO7o231P1SEXMWg/h3KN+NEyQkQ48VOp/oQ/d2d82wgAAk/3hyNSSbbBbmzfTjnZSczGElBbiyiUMw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526683708981.350166136994; Mon, 6 Jun 2022 07:44:43 -0700 (PDT) Received: from localhost ([::1]:35700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyDyD-0001tQ-Lq for importer@patchew.org; Mon, 06 Jun 2022 10:44:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr5-0001wZ-Oy for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDqq-0000WE-8m for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:17 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-478-klzLyr7QPXmetFj9S-g4Aw-1; Mon, 06 Jun 2022 10:36:54 -0400 Received: by mail-wr1-f70.google.com with SMTP id m18-20020adff392000000b0021848a78a53so349687wro.19 for ; Mon, 06 Jun 2022 07:36:53 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id q15-20020adff50f000000b002102e6b757csm18153474wro.90.2022.06.06.07.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526215; 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=KXRNumb0PKZ5F4F0yrvtrWIHLJU9qPmC5y9tpVx2nDY=; b=Gwjn27hHisb3uBckc8LD2fh1JusiNnGqxqxAa5jqPDbpyK610AIHUY1nHvaJEfPUa4ibLC 0ApgSLyKoGl6DYcF/RRyGW91Swsn7fuQU27uth9PWtUTKU5rPuc4sqgvGeV1C7tYaxLDKT 6qMcO68LogmpekiR9zR3bLLqGw/kw0U= X-MC-Unique: klzLyr7QPXmetFj9S-g4Aw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KXRNumb0PKZ5F4F0yrvtrWIHLJU9qPmC5y9tpVx2nDY=; b=V38MDZL2qn8ts7X38pZ2lJX6eLDyJBll2S19Z7NkaZ2iVaTl2IGuHPSQwF32Eui4hD x2LybnOJ+d6uE0ovnIGpHP3DI5Kkg8ZfIBnpNXL1VZV+Y9Yf2B6zJ4a0B4f+6PpZGbP2 fUgyQmoRgWWsn3IJXP5AaWENiz/XTpvhn0ibulB+mRl50LBCQoWHAj5eo13LStUIT3I3 oy47Z4/OxpGzeLQu5WuBFqS7VRbwphczY6eAuN/z+0NpF6u16EFwhn5uKb3Q3kNYwLG0 nzAwvVATqknW5gD9KDusy2OmkmWUUCB5OSMkfEK0SPYn/jWWZeUF+R5X313q1Wm5w9qS ol+Q== X-Gm-Message-State: AOAM5335Q/koAmmPkcF8CKBJPK2veOm6JcXuTJemX6GR6vkXq9J+/hSE WoZbfGXB+dFLzcjrXWCpFe7nc0xVzWkb1nwfnmPRkiPT34f2lYB53HTnhZ4kqIsqKGDGvEdKqsA yNmr/5UEFLvxZd4p5wkkHSZAWgU7Pi5AhVF/WSU/gZz3cTksqLW0yNJa4CpMlNg8Z4vQ= X-Received: by 2002:a5d:62c7:0:b0:216:fa41:2f81 with SMTP id o7-20020a5d62c7000000b00216fa412f81mr10006603wrv.249.1654526212202; Mon, 06 Jun 2022 07:36:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTxARHUTbfpSvwoyk/WeBgrZltKzSHeERSGpawBpcOKiL2ZvYhhz37H4IwfLhvpa1qAbmdyw== X-Received: by 2002:a5d:62c7:0:b0:216:fa41:2f81 with SMTP id o7-20020a5d62c7000000b00216fa412f81mr10006566wrv.249.1654526211914; Mon, 06 Jun 2022 07:36:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Yang Zhong Subject: [PULL 03/29] target/i386: Fix wrong count setting Date: Mon, 6 Jun 2022 16:36:18 +0200 Message-Id: <20220606143644.1151112-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526685397100001 Content-Type: text/plain; charset="utf-8" From: Yang Zhong The previous patch used wrong count setting with index value, which got wro= ng value from CPUID(EAX=3D12,ECX=3D0):EAX. So the SGX1 instruction can't be ex= posed to VM and the SGX decice can't work in VM. Fixes: d19d6ffa0710 ("target/i386: introduce helper to access supported CPU= ID") Signed-off-by: Yang Zhong Message-Id: <20220530131834.1222801-1-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index bb6a5dd498..9fdfec9d8b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5559,7 +5559,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, = uint32_t count, * supports. Features can be further restricted by userspace, but= not * made more permissive. */ - x86_cpu_get_supported_cpuid(0x12, index, eax, ebx, ecx, edx); + x86_cpu_get_supported_cpuid(0x12, count, eax, ebx, ecx, edx); =20 if (count =3D=3D 0) { *eax &=3D env->features[FEAT_SGX_12_0_EAX]; --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526922; cv=none; d=zohomail.com; s=zohoarc; b=Z6l+u5l4VggUZh+xCpGLtKCLOAyhWAegbHBfd6o+c5RrYSpBAkAoBFEyXd7KsK979q8aza83MMo44Y4Kmbt/qR/OCmtOwS8WzORpT9pHOdqhs4vWcBLZR9f/4n5TDtl4gnfUPdwRQGJQx/U6/jZRzHzlYGr/t74t9TBFQtF6qiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526922; 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=DOrsZ5W1EM+XIefhLU6hhgixIaVmrTRC3SQ+1ZzxGTM=; b=ZmlKifwqehB644nwdvRRQsuZDyDZnh6/TgyZuIHJUXWsmWP8j+QjnmDSJRSlpwm9NwtREKVtf3T3i+4UPl59Ppofg4pwk0S6kH+zZTUip9m4XZTt8mG1QNsOb3XmkGeDAgR2FC9hSfgbO1zXNNoIbvJ+OlGKLUc/wEWXXLY9Xow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526922196520.244103882825; Mon, 6 Jun 2022 07:48:42 -0700 (PDT) Received: from localhost ([::1]:44278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE24-0007tN-Ps for importer@patchew.org; Mon, 06 Jun 2022 10:48:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr5-0001x5-RN for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDqn-0000WP-JQ for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:05 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-357-OAT1Jz-YOtW1cRagxOdY6g-1; Mon, 06 Jun 2022 10:36:55 -0400 Received: by mail-wm1-f69.google.com with SMTP id u12-20020a05600c19cc00b0038ec265155fso11312402wmq.6 for ; Mon, 06 Jun 2022 07:36:55 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id l1-20020a1c2501000000b0039c4d022a44sm4462490wml.1.2022.06.06.07.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526216; 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=DOrsZ5W1EM+XIefhLU6hhgixIaVmrTRC3SQ+1ZzxGTM=; b=b5ZEaGEn9qWwXj/QbtF/Cf7Kaary+0UFRWHqLPxitwgWJ+GGubnd7ezKUnFQq5peVPooC0 qpcjRrjyZJAiyqUUF3++R4o0YnvGJKTgm1sNJc85Qfz0XwnpRYV8pRE8jJPOgfzY7GfW7w 29SyE1uW7PMDw+1g4Ivlee25wla3u/A= X-MC-Unique: OAT1Jz-YOtW1cRagxOdY6g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DOrsZ5W1EM+XIefhLU6hhgixIaVmrTRC3SQ+1ZzxGTM=; b=WUFexD0yD7nXrUsAn+5CZ+P3qcWnOR+/2EKsAe5QwpfstdCWB4K7uXvsFJN6e1kZRz sqWXAflTawUEWLlAIWsUUmX+4xJSHFGaUKddaZMx5hZuMG/+wPIfgGrMIj7fTp5DMYKs TDJZZGhX59GhkMnKNZYykaw3pS3f94eGi2lFUr5yK3K1r09cXAMgBubYyKQgf2c603vg THFYqnXO2kVc6bT83EgsGrnvm9zNIcsgO3YkcRAJW9/ff9HMWyFeGbj/4uYUHuc6bAw+ upLnQU2kFanN5MZbTGZBAF61GdqHVkG9QcQIi4PTdrhzZw3EJIZKO7B7p43jnTw3qrnw 7xJg== X-Gm-Message-State: AOAM530Ez0OQ/IgvvKavfk8BIjLjrQ/kDwjE1NELWO7yIXVwbCdpmrFO GZ+YxhODZ+2yvfGQxjERT3ShLdocrbJD0XCWIfZX0N/1PIEvfurT5H5ptugesQ9efqWF+ZqhgV6 uEVvZB7SGY6+FjSQPiEBDmrxaKDsDMHXH4mK8MHarWhN8MsFM+EGSwc6W+Ch/thCib7s= X-Received: by 2002:a05:600c:4e43:b0:397:7493:5f02 with SMTP id e3-20020a05600c4e4300b0039774935f02mr23637887wmq.34.1654526213982; Mon, 06 Jun 2022 07:36:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4ozDN4JGZcWvBDyvlkUeLY0YsAHNEgk5T6FbGz3IcXpjA6Q/UeeBC8oajwgeD25WZFyhJjw== X-Received: by 2002:a05:600c:4e43:b0:397:7493:5f02 with SMTP id e3-20020a05600c4e4300b0039774935f02mr23637848wmq.34.1654526213573; Mon, 06 Jun 2022 07:36:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Jose R. Ziviani" , Dario Faggioli Subject: [PULL 04/29] modules: introduces module_kconfig directive Date: Mon, 6 Jun 2022 16:36:19 +0200 Message-Id: <20220606143644.1151112-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526922718100001 Content-Type: text/plain; charset="utf-8" From: "Jose R. Ziviani" module_kconfig is a new directive that should be used with module_obj whenever that module depends on the Kconfig to be enabled. When the module is enabled in Kconfig we are sure that its dependencies will be enabled as well, thus the module will be loaded without any problem. The correct way to use module_kconfig is by passing the Kconfig option to module_kconfig (or the *config-devices.mak without CONFIG_). Signed-off-by: Jose R. Ziviani Signed-off-by: Dario Faggioli Message-Id: <165369002370.5857.12150544416563557322.stgit@work> Signed-off-by: Paolo Bonzini --- hw/display/qxl.c | 1 + hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user-vga.c | 1 + hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu-gl.c | 1 + hw/display/virtio-gpu-pci-gl.c | 1 + hw/display/virtio-gpu-pci.c | 1 + hw/display/virtio-gpu.c | 1 + hw/display/virtio-vga-gl.c | 1 + hw/display/virtio-vga.c | 1 + hw/s390x/virtio-ccw-gpu.c | 1 + hw/usb/ccid-card-emulated.c | 1 + hw/usb/ccid-card-passthru.c | 1 + hw/usb/host-libusb.c | 1 + hw/usb/redirect.c | 1 + include/qemu/module.h | 10 ++++++++++ scripts/modinfo-generate.py | 2 ++ 18 files changed, 28 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 2db34714fb..5b10f697f1 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2515,6 +2515,7 @@ static const TypeInfo qxl_primary_info =3D { .class_init =3D qxl_primary_class_init, }; module_obj("qxl-vga"); +module_kconfig(QXL); =20 static void qxl_secondary_class_init(ObjectClass *klass, void *data) { diff --git a/hw/display/vhost-user-gpu-pci.c b/hw/display/vhost-user-gpu-pc= i.c index daefcf7101..d119bcae45 100644 --- a/hw/display/vhost-user-gpu-pci.c +++ b/hw/display/vhost-user-gpu-pci.c @@ -44,6 +44,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_gpu_pci_i= nfo =3D { .instance_init =3D vhost_user_gpu_pci_initfn, }; module_obj(TYPE_VHOST_USER_GPU_PCI); +module_kconfig(VHOST_USER_GPU); =20 static void vhost_user_gpu_pci_register_types(void) { diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 96e56c4467..3340ef9e5f 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -606,6 +606,7 @@ static const TypeInfo vhost_user_gpu_info =3D { .class_init =3D vhost_user_gpu_class_init, }; module_obj(TYPE_VHOST_USER_GPU); +module_kconfig(VHOST_USER_GPU); =20 static void vhost_user_gpu_register_types(void) { diff --git a/hw/display/vhost-user-vga.c b/hw/display/vhost-user-vga.c index 072c9c65bc..0c146080fd 100644 --- a/hw/display/vhost-user-vga.c +++ b/hw/display/vhost-user-vga.c @@ -45,6 +45,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_vga_info = =3D { .instance_init =3D vhost_user_vga_inst_initfn, }; module_obj(TYPE_VHOST_USER_VGA); +module_kconfig(VHOST_USER_VGA); =20 static void vhost_user_vga_register_types(void) { diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index 8ba5da4312..790cec333c 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -260,6 +260,7 @@ static const TypeInfo virtio_gpu_base_info =3D { .abstract =3D true }; module_obj(TYPE_VIRTIO_GPU_BASE); +module_kconfig(VIRTIO_GPU); =20 static void virtio_register_types(void) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index 0bca887703..e06be60dfb 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -160,6 +160,7 @@ static const TypeInfo virtio_gpu_gl_info =3D { .class_init =3D virtio_gpu_gl_class_init, }; module_obj(TYPE_VIRTIO_GPU_GL); +module_kconfig(VIRTIO_GPU); =20 static void virtio_register_types(void) { diff --git a/hw/display/virtio-gpu-pci-gl.c b/hw/display/virtio-gpu-pci-gl.c index 99b14a0718..a2819e1ca9 100644 --- a/hw/display/virtio-gpu-pci-gl.c +++ b/hw/display/virtio-gpu-pci-gl.c @@ -47,6 +47,7 @@ static const VirtioPCIDeviceTypeInfo virtio_gpu_gl_pci_in= fo =3D { .instance_init =3D virtio_gpu_gl_initfn, }; module_obj(TYPE_VIRTIO_GPU_GL_PCI); +module_kconfig(VIRTIO_PCI); =20 static void virtio_gpu_gl_pci_register_types(void) { diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index e36eee0c40..93f214ff58 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -65,6 +65,7 @@ static const TypeInfo virtio_gpu_pci_base_info =3D { .abstract =3D true }; module_obj(TYPE_VIRTIO_GPU_PCI_BASE); +module_kconfig(VIRTIO_PCI); =20 #define TYPE_VIRTIO_GPU_PCI "virtio-gpu-pci" typedef struct VirtIOGPUPCI VirtIOGPUPCI; diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 529b5246b2..cd4a56056f 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1452,6 +1452,7 @@ static const TypeInfo virtio_gpu_info =3D { .class_init =3D virtio_gpu_class_init, }; module_obj(TYPE_VIRTIO_GPU); +module_kconfig(VIRTIO_GPU); =20 static void virtio_register_types(void) { diff --git a/hw/display/virtio-vga-gl.c b/hw/display/virtio-vga-gl.c index f22549097c..984faa6b39 100644 --- a/hw/display/virtio-vga-gl.c +++ b/hw/display/virtio-vga-gl.c @@ -37,6 +37,7 @@ static VirtioPCIDeviceTypeInfo virtio_vga_gl_info =3D { .instance_init =3D virtio_vga_gl_inst_initfn, }; module_obj(TYPE_VIRTIO_VGA_GL); +module_kconfig(VIRTIO_VGA); =20 static void virtio_vga_register_types(void) { diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 7b55c8d0e7..c206b5da38 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -231,6 +231,7 @@ static const TypeInfo virtio_vga_base_info =3D { .abstract =3D true, }; module_obj(TYPE_VIRTIO_VGA_BASE); +module_kconfig(VIRTIO_VGA); =20 #define TYPE_VIRTIO_VGA "virtio-vga" =20 diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 8d995fcb33..0642c5281d 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -69,6 +69,7 @@ static const TypeInfo virtio_ccw_gpu =3D { .class_init =3D virtio_ccw_gpu_class_init, }; module_obj(TYPE_VIRTIO_GPU_CCW); +module_kconfig(VIRTIO_CCW); =20 static void virtio_ccw_gpu_register(void) { diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 6c8c0355e0..1ddf7297f6 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -613,6 +613,7 @@ static const TypeInfo emulated_card_info =3D { .class_init =3D emulated_class_initfn, }; module_obj(TYPE_EMULATED_CCID); +module_kconfig(USB); =20 static void ccid_card_emulated_register_types(void) { diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index f530ab2565..07ee42f304 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -415,6 +415,7 @@ static const TypeInfo passthru_card_info =3D { .class_init =3D passthru_class_initfn, }; module_obj(TYPE_CCID_PASSTHRU); +module_kconfig(USB); =20 static void ccid_card_passthru_register_types(void) { diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 2b35cb6cdd..28f8af8941 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1809,6 +1809,7 @@ static const TypeInfo usb_host_dev_info =3D { .instance_init =3D usb_host_instance_init, }; module_obj(TYPE_USB_HOST_DEVICE); +module_kconfig(USB); =20 static void usb_host_register_types(void) { diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 3bc4dee7fe..fd7df599bc 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2620,6 +2620,7 @@ static const TypeInfo usbredir_dev_info =3D { .instance_init =3D usbredir_instance_init, }; module_obj(TYPE_USB_REDIR); +module_kconfig(USB); =20 static void usbredir_register_types(void) { diff --git a/include/qemu/module.h b/include/qemu/module.h index 5fcc323b2a..bd73607104 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -135,6 +135,16 @@ void module_allow_arch(const char *arch); */ #define module_opts(name) modinfo(opts, name) =20 +/** + * module_kconfig + * + * @name: Kconfig requirement necessary to load the module + * + * This module requires a core module that should be implemented and + * enabled in Kconfig. + */ +#define module_kconfig(name) modinfo(kconfig, name) + /* * module info database * diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py index f559eed007..689f33c0f2 100755 --- a/scripts/modinfo-generate.py +++ b/scripts/modinfo-generate.py @@ -48,6 +48,8 @@ def generate(name, lines): opts.append(data) elif kind =3D=3D 'arch': arch =3D data; + elif kind =3D=3D 'kconfig': + pass # ignore else: print("unknown:", kind) exit(1) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526744; cv=none; d=zohomail.com; s=zohoarc; b=BcYGtOCvdV3bVAiBx8DwIOPtAwgwbofBP5WepuebE3ACZTZwD96pLYw5OkcZJKhA4ZQarxUFLjIBPHgqZWvIDLL2oUq1hNS0jTtjmRptei9YXoJwvUNG7zGW5C5BC7UTu9chFQq0nwOya9kbct5EpJpaS5aUZFYHwGfjXAzcmt8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526744; 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=HFr/Aaii6FmPOYULMv1KwzCLupIB34T325TogenjuFQ=; b=hBZQ1M17crPQ7ZYhp3GSgw3T+4kCmzRWrsWrO5CWMUW3kVsFN45yEcCoy8kPnTT+eOoflFetN9RY3+mulpm6Y/VfdGNzGvdPKePjB6FwHJF8QzgiEdAfw+UHI+bDoLTV6GWLHXsT5aKWXL957URnZYeTx2wEkMBQITvBZ6twERk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526744209477.6617032286845; Mon, 6 Jun 2022 07:45:44 -0700 (PDT) Received: from localhost ([::1]:37218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyDzC-0002wx-NK for importer@patchew.org; Mon, 06 Jun 2022 10:45:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr5-0001wa-QI for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:50952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDqn-0000We-Ig for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:05 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-527-N-_QqcKZO2ae2mpQ23wnOQ-1; Mon, 06 Jun 2022 10:36:59 -0400 Received: by mail-wr1-f69.google.com with SMTP id c16-20020a5d4cd0000000b00213b1d4a96cso2300536wrt.1 for ; Mon, 06 Jun 2022 07:36:59 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id z3-20020a05600c0a0300b0039c362311d2sm20936018wmp.9.2022.06.06.07.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526220; 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=HFr/Aaii6FmPOYULMv1KwzCLupIB34T325TogenjuFQ=; b=I8i+J9x6evzMeuhybWp/src/K5zq650iW0jfqbS48nLgsnZgJR5A5lHDKV55vafGhwhkiQ A9QiR2sVc3nGFZw1g0Y7eB+1xZLLGPRdatZDG9hhfT+NesZ6lqqls7HoFBZGPYDzCRjZD6 yL99pmyKDgxc+HjGHoQoNlnH9O0lcgc= X-MC-Unique: N-_QqcKZO2ae2mpQ23wnOQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HFr/Aaii6FmPOYULMv1KwzCLupIB34T325TogenjuFQ=; b=ROsRA7Q/PL+TZrvCJnLQYGpMyst4fS3K2RwoPGw3QMaau7Wf+zW+Jkw5HGTRE9yFvB xW/zrQInnLY9gWizhTp7mbfcUytzmJ/reLl1xHQZq8jErhM1v2JvV/jxHdgm+a8mF/qy 4QOxjKReEGZrF0Hrlln5uka6d89+S8Jl5ArwLVLDpG4UAWlODF2ZMKPthrEFJ70FDiIY JihUK0jt8YzBZWECCUPt+G/sZJKfibMehY1HZ8ZnIJ3h6JiJm1A8nc8B3dQv9yc4pVjs p5pLulINd4cdL2SQJPXS2TFKDo9xYV5hG1Za1pHZH3LhyBNQGqwuPb0GD3m97Bp4fEb/ jmGw== X-Gm-Message-State: AOAM530eU+VpgSJkxZEHJwZf7b+sGoEoaWyDHIcgaAGZEdey707l63jE 1O0CxKib1gymUS+rOyVVZqcXNrC5NZOPHz3awIM0zvc2e2Bt7LwmZJoju0Gz/y2086Cz4YbFqfC XfeX4fTgFybAtRBCnRjPIJmNE5e9qjN8S7ccivs6Kms/qdyB//FVV9T0gr6TGsr+K8CM= X-Received: by 2002:a5d:56d2:0:b0:212:9250:e18b with SMTP id m18-20020a5d56d2000000b002129250e18bmr20921200wrw.672.1654526217827; Mon, 06 Jun 2022 07:36:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEwj2k0cDgMU1Vx4Kn7K4X2K1MxSSglXR6i3Gh7HMm8FpyvXro4dtWRktvsLwWgGvbBwr/6A== X-Received: by 2002:a5d:56d2:0:b0:212:9250:e18b with SMTP id m18-20020a5d56d2000000b002129250e18bmr20921167wrw.672.1654526217521; Mon, 06 Jun 2022 07:36:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: "Jose R. Ziviani" , Dario Faggioli Subject: [PULL 05/29] modules: generates per-target modinfo Date: Mon, 6 Jun 2022 16:36:20 +0200 Message-Id: <20220606143644.1151112-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526745732100001 Content-Type: text/plain; charset="utf-8" From: "Jose R. Ziviani" This patch changes the way modinfo is generated and built. Instead of one modinfo.c it generates one modinfo--softmmu.c per target. It aims a fine-tune control of modules by configuring Kconfig. Signed-off-by: Jose R. Ziviani Signed-off-by: Dario Faggioli Message-Id: <165369003038.5857.13084289285185196779.stgit@work> Signed-off-by: Paolo Bonzini --- meson.build | 25 +++++++++++++------ scripts/modinfo-generate.py | 49 ++++++++++++++++++++++++++----------- 2 files changed, 52 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index 9b3fd4e52b..d738391810 100644 --- a/meson.build +++ b/meson.build @@ -3175,14 +3175,23 @@ foreach d, list : target_modules endforeach =20 if enable_modules - modinfo_src =3D custom_target('modinfo.c', - output: 'modinfo.c', - input: modinfo_files, - command: [modinfo_generate, '@INPUT@'], - capture: true) - modinfo_lib =3D static_library('modinfo', modinfo_src) - modinfo_dep =3D declare_dependency(link_whole: modinfo_lib) - softmmu_ss.add(modinfo_dep) + foreach target : target_dirs + if target.endswith('-softmmu') + config_target =3D config_target_mak[target] + config_devices_mak =3D target + '-config-devices.mak' + modinfo_src =3D custom_target('modinfo-' + target + '.c', + output: 'modinfo-' + target + '.c', + input: modinfo_files, + command: [modinfo_generate, '--devices',= config_devices_mak, '@INPUT@'], + capture: true) + + modinfo_lib =3D static_library('modinfo-' + target + '.c', modinfo_s= rc) + modinfo_dep =3D declare_dependency(link_with: modinfo_lib) + + arch =3D config_target['TARGET_NAME'] =3D=3D 'sparc64' ? 'sparc64' := config_target['TARGET_BASE_ARCH'] + hw_arch[arch].add(modinfo_dep) + endif + endforeach endif =20 nm =3D find_program('nm') diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py index 689f33c0f2..b1538fcced 100755 --- a/scripts/modinfo-generate.py +++ b/scripts/modinfo-generate.py @@ -32,7 +32,7 @@ def parse_line(line): continue return (kind, data) =20 -def generate(name, lines): +def generate(name, lines, enabled): arch =3D "" objs =3D [] deps =3D [] @@ -49,7 +49,13 @@ def generate(name, lines): elif kind =3D=3D 'arch': arch =3D data; elif kind =3D=3D 'kconfig': - pass # ignore + # don't add a module which dependency is not enabled + # in kconfig + if data.strip() not in enabled: + print(" /* module {} isn't enabled in Kconfig. */" + .format(data.strip())) + print("/* },{ */") + return None else: print("unknown:", kind) exit(1) @@ -60,8 +66,8 @@ def generate(name, lines): print_array("objs", objs) print_array("deps", deps) print_array("opts", opts) - print("},{"); - return deps + print("},{") + return {dep.strip('" ') for dep in deps} =20 def print_pre(): print("/* generated by scripts/modinfo-generate.py */") @@ -74,23 +80,38 @@ def print_post(): print("}};") =20 def main(args): - deps =3D {} + if len(args) < 3 or args[0] !=3D '--devices': + print('Expected: modinfo-generate.py --devices ' + 'config-device.mak [modinfo files]', file=3Dsys.stderr) + exit(1) + + # get all devices enabled in kconfig, from *-config-device.mak + enabled =3D set() + with open(args[1]) as file: + for line in file.readlines(): + config =3D line.split('=3D') + if config[1].rstrip() =3D=3D 'y': + enabled.add(config[0][7:]) # remove CONFIG_ + + deps =3D set() + modules =3D set() print_pre() - for modinfo in args: + for modinfo in args[2:]: with open(modinfo) as f: lines =3D f.readlines() print(" /* %s */" % modinfo) - (basename, ext) =3D os.path.splitext(modinfo) - deps[basename] =3D generate(basename, lines) + (basename, _) =3D os.path.splitext(modinfo) + moddeps =3D generate(basename, lines, enabled) + if moddeps is not None: + modules.add(basename) + deps.update(moddeps) print_post() =20 - flattened_deps =3D {flat.strip('" ') for dep in deps.values() for flat= in dep} error =3D False - for dep in flattened_deps: - if dep not in deps.keys(): - print("Dependency {} cannot be satisfied".format(dep), - file=3Dsys.stderr) - error =3D True + for dep in deps.difference(modules): + print("Dependency {} cannot be satisfied".format(dep), + file=3Dsys.stderr) + error =3D True =20 if error: exit(1) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526705; cv=none; d=zohomail.com; s=zohoarc; b=e1DFAYip8l7pIYNzNQbBTUC0bEH6F7lSescYDKWwQVG6rRS4AbkUUWaC80WAxrSp8N/FKN2NvAOtn4Rug/jrTp7I9TNejP7YFvqO0VU2erwfOhNWH/bg9PJ/l6XUcwfG+Ff9x5CASdfHszoCuJL/cI5Bb7cDQ8utd610TrlsAdo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526705; 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=GV6fJFZNyQM7Vlfi7lzQrg6nodQlBueopCSHj17DwEk=; b=iYRMCW+Or93MPyQtj6ac8S9LhHr0Gsww6PrVgCGqRur6Wd+sNx6om7qo5MYx7oV0rg4dvjWf4LiUZ8Wa3Jbmvsol71k4hkxSLD5QPJHYL/RsyUFfU4bLnlHnE5RiEEgXSNB5+kj5hlA0QqQcr7lkWAIg9ALVukqUw0uvtAlNyhQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526705424299.6180407815327; Mon, 6 Jun 2022 07:45:05 -0700 (PDT) Received: from localhost ([::1]:36780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyDyY-0002eW-L0 for importer@patchew.org; Mon, 06 Jun 2022 10:45:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr6-00020C-8M for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDqs-0000X4-SC for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:19 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-3A7YOR8-M_u55edosFU2EQ-1; Mon, 06 Jun 2022 10:37:01 -0400 Received: by mail-wr1-f72.google.com with SMTP id c11-20020adffb4b000000b0020ff998391dso2868251wrs.8 for ; Mon, 06 Jun 2022 07:37:00 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id o22-20020a1c7516000000b003942a244ed1sm17015441wmc.22.2022.06.06.07.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526222; 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=GV6fJFZNyQM7Vlfi7lzQrg6nodQlBueopCSHj17DwEk=; b=Om1TqIbgY2TbErKRcBSPnFpQ68LQos2cVC0Vb9SMj1cnmVNCq3TT3ussPtTtIUO69t10T2 Mdy7ZnaItKHcmlpGTNfiIYlPGWa3OdQZo3XTEN6fP3JkMBLxLQK1fxdP8qCG5gIMuplmRV GMxvXijM6COdIi5iqfBT4/44tscB4GE= X-MC-Unique: 3A7YOR8-M_u55edosFU2EQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GV6fJFZNyQM7Vlfi7lzQrg6nodQlBueopCSHj17DwEk=; b=uBhrF25GVlaXPzgdm4NjPMbpMLjLK/xCCQ5C+jS8jaSWQy/925W2sOVKKieGnhu8+l LgYt8PcOjApX61YncFsC+Vkd65X9NwSWJ94dh4q9in2/fc+N60E0x4Tr0Pqu8Ms/B4dM PTHytFquondZk7t4/TqQqLH9akKwbVYNH3med8+f34tDoUaVxqIOUuvDqKX7VTt0y0kc 0x56FB6uSLuR9bvE0yIeRS83qAJFnmRZ1b37X84o3wHdsskvtJVw0ycCpxHgYwY2VI8E SRIt/obMpHPflCgH9SU36Vrw5P1ReV6wDOlBSAvU5es74TcVoF+ceuTZUUWcDpSuE5NS sNqQ== X-Gm-Message-State: AOAM5324u9WkdLuzAZz1r9PtXYWf+iIiE1E+eJb2mYtR/o/cM4Jz70Yh RZSVc8RfOXWYm01L0uggMrEnulPgjw6pl8xrizfohLm1KfTVYDX7DG0ydL6aRFmnUD727rvJmw6 lhwXl5yfY9AW1VROLBuR7SHRnq/ENlPl7o6iIeIyDwqDHUaFreXLm4SFWWgWICe7Lpis= X-Received: by 2002:a05:600c:4fd2:b0:39b:893e:ff79 with SMTP id o18-20020a05600c4fd200b0039b893eff79mr39757315wmq.73.1654526219505; Mon, 06 Jun 2022 07:36:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD8VnhghkKWY31A7DunOMWZnYYXjV9UWCDYKKxBKHkSegoSJfk7QEJQokD7iWiB+QDaXQTUA== X-Received: by 2002:a05:600c:4fd2:b0:39b:893e:ff79 with SMTP id o18-20020a05600c4fd200b0039b893eff79mr39757296wmq.73.1654526219287; Mon, 06 Jun 2022 07:36:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 06/29] replay: fix event queue flush for qemu shutdown Date: Mon, 6 Jun 2022 16:36:21 +0200 Message-Id: <20220606143644.1151112-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526707640100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Message-Id: <165364836758.688121.7959245442743676491.stgit@pasha-ThinkPad-X= 280> Signed-off-by: Paolo Bonzini --- replay/replay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/replay/replay.c b/replay/replay.c index 6df2abc18c..2d3607998a 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -387,9 +387,8 @@ void replay_finish(void) g_free(replay_snapshot); replay_snapshot =3D NULL; =20 - replay_mode =3D REPLAY_MODE_NONE; - replay_finish_events(); + replay_mode =3D REPLAY_MODE_NONE; } =20 void replay_add_blocker(Error *reason) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526873; cv=none; d=zohomail.com; s=zohoarc; b=G3IJp0MDWkgFWi5Qtoq4MuTo7rMgsMdzjaWtHjdo9YS8FQcSc31GOCn+KZsOAA7Hgh97ah49ZZg0XBFtK0Z0mZeor/vzultM9N/BZCbCZbiuiXSTfvzljnwcEixpZxpeO9U1ZlHYgNANo1HgIdBKEsudXm1xto8uVohpW1e0m/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526873; 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=zULr4YP03VtZMbKJkPWJb9O8aKaUTvJuTVWqlVbFzjI=; b=laS5kVQ0d310ujToUzQxuuGmRlt5stRWZn/n4ZtnmRfNrTd4mq+meaZRtdcMTNgcCnS+PG/fOoRqXmbFNMQ5HkL6iGzXhVT3adwxigMO2rqY9PUV6/3sSNz1vNqFP6uB2R/4X6Nl4spvFWDnLwNf5W60RNkTftSfoxlTcLfi50A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526873382813.1286319136398; Mon, 6 Jun 2022 07:47:53 -0700 (PDT) Received: from localhost ([::1]:42202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE1H-0006Qd-AU for importer@patchew.org; Mon, 06 Jun 2022 10:47:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr6-00020h-DI for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000XG-JM for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:20 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-178-3hBohOiwN1C-psrmCUYV9g-1; Mon, 06 Jun 2022 10:37:02 -0400 Received: by mail-wm1-f69.google.com with SMTP id n15-20020a05600c4f8f00b0039c3e76d646so4422225wmq.7 for ; Mon, 06 Jun 2022 07:37:02 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id l15-20020a05600c1d0f00b0039c4f0c827fsm3650521wms.26.2022.06.06.07.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526224; 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=zULr4YP03VtZMbKJkPWJb9O8aKaUTvJuTVWqlVbFzjI=; b=YBcDy8Njx12NnulHaHw1W1I5nYLrnxoYhxryfdBXsiMGkkVE6q/C2tqNoAcwal7lKd2SkE 8tVJTke8KoyhOzX+95h2LVb5A7uyD3+ocHfEIEWRPqzkvz0v9Rdk5PktXlP1depX+EMT6s Wg1L67Q9sNnQs/YEhLsZ96gM/ISCKEQ= X-MC-Unique: 3hBohOiwN1C-psrmCUYV9g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zULr4YP03VtZMbKJkPWJb9O8aKaUTvJuTVWqlVbFzjI=; b=hmP93F7KjlZJfEja7Mg60CaQlkcSsrjKXDIEqNyQ8Lyk4SnrcSlIzvBChslfoRGhbe rGzHxA6KFiW0y/D/HLF41wkorZ6v7qEEmTBQGv+o95QwMmZQW+esdeuI+Akq8oxlZMsm 7oK7J/aZRH5lQw0a07MV8uYFJE494P6QX5P/vsleMKqX05UZH9oc8ZYzqm8sr5sJW14R I+E+X0to+VAl/xd/lekzGM/9m1oK3TXCl48x13G0Q/dg99Ha7q7yAe275u/5AZ1UpHZi /laYQwN02hzKqGPfT4GyFREHaIAIX/sdJuiJUSW/ev7rP+gi12JnkO7Ja2bZ1tgnabOZ xroA== X-Gm-Message-State: AOAM530Eelq7iJVwhFw700r8Vd3CHSyFumM8i5C4trsTrf+LnpZ/3mSo bO5RzfTfnzi9aPFjhqCZl78MK1FToQHGqXLbq44ko6Mu2y0/j5MFiOycFTgWdPm6V5Qd7rD45fW AOboH/OmMoQhTIgwoc5jB7JLaE5WR2GyNgpXkg/HGNTZBsJfEgs8EqbNy0Dr4v3cH0js= X-Received: by 2002:a5d:6acb:0:b0:218:426d:5973 with SMTP id u11-20020a5d6acb000000b00218426d5973mr3677645wrw.4.1654526221181; Mon, 06 Jun 2022 07:37:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb8NpsHiLhrKhOVyoq71fpcjB/gLDzSGwoTauN9lS8WKhNUvI2eGUZcLbtd/Kgkf7kw3XMDg== X-Received: by 2002:a5d:6acb:0:b0:218:426d:5973 with SMTP id u11-20020a5d6acb000000b00218426d5973mr3677611wrw.4.1654526220855; Mon, 06 Jun 2022 07:37:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 07/29] replay: notify vCPU when BH is scheduled Date: Mon, 6 Jun 2022 16:36:22 +0200 Message-Id: <20220606143644.1151112-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526874368100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event comes to the queue. This patch adds notification which wakes up vCPU or interrupts execution of guest code. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: changed first_cpu to current_cpu (suggested by Richard Henderson) v4: moved vCPU notification to aio_bh_enqueue (suggested by Paolo Bonzini) Message-Id: <165364837317.688121.17680519919871405281.stgit@pasha-ThinkPad-= X280> Signed-off-by: Paolo Bonzini --- include/sysemu/cpu-timers.h | 1 + softmmu/icount.c | 8 ++++++++ stubs/icount.c | 4 ++++ util/async.c | 8 ++++++++ 4 files changed, 21 insertions(+) diff --git a/include/sysemu/cpu-timers.h b/include/sysemu/cpu-timers.h index ed6ee5c46c..2e786fe7fb 100644 --- a/include/sysemu/cpu-timers.h +++ b/include/sysemu/cpu-timers.h @@ -59,6 +59,7 @@ int64_t icount_round(int64_t count); /* if the CPUs are idle, start accounting real time to virtual clock. */ void icount_start_warp_timer(void); void icount_account_warp_timer(void); +void icount_notify_exit(void); =20 /* * CPU Ticks and Clock diff --git a/softmmu/icount.c b/softmmu/icount.c index 5ca271620d..1cafec5014 100644 --- a/softmmu/icount.c +++ b/softmmu/icount.c @@ -486,3 +486,11 @@ void icount_configure(QemuOpts *opts, Error **errp) qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + NANOSECONDS_PER_SECOND / 10); } + +void icount_notify_exit(void) +{ + if (icount_enabled() && current_cpu) { + qemu_cpu_kick(current_cpu); + qemu_clock_notify(QEMU_CLOCK_VIRTUAL); + } +} diff --git a/stubs/icount.c b/stubs/icount.c index f13c43568b..6df8c2bf7d 100644 --- a/stubs/icount.c +++ b/stubs/icount.c @@ -43,3 +43,7 @@ void icount_account_warp_timer(void) { abort(); } + +void icount_notify_exit(void) +{ +} diff --git a/util/async.c b/util/async.c index 554ba70cca..63434ddae4 100644 --- a/util/async.c +++ b/util/async.c @@ -33,6 +33,7 @@ #include "block/raw-aio.h" #include "qemu/coroutine_int.h" #include "qemu/coroutine-tls.h" +#include "sysemu/cpu-timers.h" #include "trace.h" =20 /***********************************************************/ @@ -84,6 +85,13 @@ static void aio_bh_enqueue(QEMUBH *bh, unsigned new_flag= s) } =20 aio_notify(ctx); + /* + * Workaround for record/replay. + * vCPU execution should be suspended when new BH is set. + * This is needed to avoid guest timeouts caused + * by the long cycles of the execution. + */ + icount_notify_exit(); } =20 /* Only called from aio_bh_poll() and aio_ctx_finalize() */ --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527236; cv=none; d=zohomail.com; s=zohoarc; b=YbMYHeGATJhJW8J3w3RcU1/oTWRO3E930cmv8ifrX1VEMszIMyubn+Eyz/KrvdrQLcg+zNaBwEku6iyQ/jnMfLd+DIHYeHtZpnv8zrLRLaTQ4JWhTmXvt+mIfCmVMDWDT+Nlje55X3l6isa0LWxKnxVs800PFMBjy2FJ/bMi6Uo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527236; 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=fo5STQNw+03ymu9gYP+ud+ZniYSeWLU21YJqYEKwa7c=; b=KiVo6cdp4FzJkTH5UFREPwqsPNmpZX9hBALRfshHovGP9GljfhL1kPjtvKhFfD35zsH11YKwvlZZ+CzsteFn7cvW1N+cZmrxLqzYibl4F4s1z+NUAJomK+sUcTT1OuN+qoOQN/eO+FjTu9SpyUxg8x3alK52T6NCyMMdtS3bIkM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527236696384.33888267693897; Mon, 6 Jun 2022 07:53:56 -0700 (PDT) Received: from localhost ([::1]:53934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE79-00067X-KD for importer@patchew.org; Mon, 06 Jun 2022 10:53:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr8-00026i-DC for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:33111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000XZ-JE for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:22 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-1xofJq8IO8mm_m_8m9e89g-1; Mon, 06 Jun 2022 10:37:05 -0400 Received: by mail-wm1-f71.google.com with SMTP id bg13-20020a05600c3c8d00b003974d0ff917so7804774wmb.3 for ; Mon, 06 Jun 2022 07:37:04 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id l13-20020adfe9cd000000b0020c5253d8edsm5324679wrn.57.2022.06.06.07.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526226; 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=fo5STQNw+03ymu9gYP+ud+ZniYSeWLU21YJqYEKwa7c=; b=gYlVtGPucyCujh+SA8p72w6igIuM0ChRYuFwkANIvp+CA+4c0wLhysz4wooPZVLrBV0Nd6 v24y11ij/MUbNXimP6ZzTC5gAXwTdNRSpwqsy4t/8it1cLxTwzXOXlkoDdRB8PCoHTLC9x 9RDlhdAHAL1tzsxDBIJAuW0c8kJKo4U= X-MC-Unique: 1xofJq8IO8mm_m_8m9e89g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fo5STQNw+03ymu9gYP+ud+ZniYSeWLU21YJqYEKwa7c=; b=0yh9+j8xjeMvWH3R5giCf5ZyGso+R9o125TjA8JIU7za0jhuwj5ZbEluaMdygkFd8u l2IKAfIEN4rthGI0Vosbn3Z9z2cB73vXGg7keEciObVFi8PPbV2aid/aSTrZ50s/wjeK zvHUZDdaQKBJyI/OJuqeKm2p59tVJJhYYyGgBJ26aXGaWce2bXBOLLk69biH+mYOnd9F eMxueIWeA18FpLu5y4z9YrQRXEfcPBAgeYAvQ27hzxN+jq9gBD4p2PuLCbzq4UDv4oMc S2LComKRYm770Z8G9amfXgkzmOql6OgGbiPDO19h03h8BWKzMQhIIh1rme/LO2VVp4OE AKJg== X-Gm-Message-State: AOAM531VQoUJafNNH2uHyZiZoefuSwMU3wnaHQnywuEfGZiWO0HOQ5QR LslUCbvUfh6WcgXq9DVQkRRXH8Qxi7tSgipyQj2ciqq4wFN2JGAalg64MD7/KY2JcRE4WpkfDbV wkH48ziWeLx3cseWTBQElIaSgfrWXMjUjJsNYjTINE/sNt7a1u6MsKeam0o4khDKmFWI= X-Received: by 2002:a05:6000:1091:b0:213:b515:f46f with SMTP id y17-20020a056000109100b00213b515f46fmr18839338wrw.632.1654526222996; Mon, 06 Jun 2022 07:37:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDOOlQsCCyc8aZH9A2yrLrpTYkAUA+q49fFJybwws9V3SBf1vd0skC4FV5dTAWUyC+H24dCg== X-Received: by 2002:a05:6000:1091:b0:213:b515:f46f with SMTP id y17-20020a056000109100b00213b515f46fmr18839294wrw.632.1654526222560; Mon, 06 Jun 2022 07:37:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 08/29] replay: rewrite async event handling Date: Mon, 6 Jun 2022 16:36:23 +0200 Message-Id: <20220606143644.1151112-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527237863100003 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson Message-Id: <165364837856.688121.8785039478408995979.stgit@pasha-ThinkPad-X= 280> Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-accel-ops-icount.c | 5 +-- docs/replay.txt | 11 ++--- include/sysemu/replay.h | 9 +++- replay/replay-events.c | 20 +++------ replay/replay-internal.h | 6 +-- replay/replay-snapshot.c | 1 - replay/replay.c | 74 +++++++++++++------------------- softmmu/icount.c | 4 +- 8 files changed, 54 insertions(+), 76 deletions(-) diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-ico= unt.c index 24520ea112..8f1dda4344 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -84,8 +84,7 @@ void icount_handle_deadline(void) * Don't interrupt cpu thread, when these events are waiting * (i.e., there is no checkpoint) */ - if (deadline =3D=3D 0 - && (replay_mode !=3D REPLAY_MODE_PLAY || replay_has_checkpoint()))= { + if (deadline =3D=3D 0) { icount_notify_aio_contexts(); } } @@ -109,7 +108,7 @@ void icount_prepare_for_run(CPUState *cpu) =20 replay_mutex_lock(); =20 - if (cpu->icount_budget =3D=3D 0 && replay_has_checkpoint()) { + if (cpu->icount_budget =3D=3D 0) { icount_notify_aio_contexts(); } } diff --git a/docs/replay.txt b/docs/replay.txt index 5b008ca491..6c9fdff09d 100644 --- a/docs/replay.txt +++ b/docs/replay.txt @@ -366,11 +366,9 @@ Here is the list of events that are written into the l= og: Argument: 4-byte number of executed instructions. - EVENT_INTERRUPT. Used to synchronize interrupt processing. - EVENT_EXCEPTION. Used to synchronize exception handling. - - EVENT_ASYNC. This is a group of events. They are always processed - together with checkpoints. When such an event is generated, it is - stored in the queue and processed only when checkpoint occurs. - Every such event is followed by 1-byte checkpoint id and 1-byte - async event id from the following list: + - EVENT_ASYNC. This is a group of events. When such an event is generated, + it is stored in the queue and processed in icount_account_warp_timer(). + Every such event has it's own id from the following list: - REPLAY_ASYNC_EVENT_BH. Bottom-half callback. This event synchronizes callbacks that affect virtual machine state, but normally called asynchronously. @@ -405,6 +403,5 @@ Here is the list of events that are written into the lo= g: - EVENT_CLOCK + clock_id. Group of events for host clock read operations. Argument: 8-byte clock value. - EVENT_CHECKPOINT + checkpoint_id. Checkpoint for synchronization of - CPU, internal threads, and asynchronous input events. May be followed - by one or more EVENT_ASYNC events. + CPU, internal threads, and asynchronous input events. - EVENT_END. Last event in the log. diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 0f3b0f7eac..73dee9ccdf 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -160,9 +160,14 @@ void replay_shutdown_request(ShutdownCause cause); Returns 0 in PLAY mode if checkpoint was not found. Returns 1 in all other cases. */ bool replay_checkpoint(ReplayCheckpoint checkpoint); -/*! Used to determine that checkpoint is pending. +/*! Used to determine that checkpoint or async event is pending. Does not proceed to the next event in the log. */ -bool replay_has_checkpoint(void); +bool replay_has_event(void); +/* + * Processes the async events added to the queue (while recording) + * or reads the events from the file (while replaying). + */ +void replay_async_events(void); =20 /* Asynchronous events queue */ =20 diff --git a/replay/replay-events.c b/replay/replay-events.c index ac47c89834..db1decf9dd 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -170,12 +170,11 @@ void replay_block_event(QEMUBH *bh, uint64_t id) } } =20 -static void replay_save_event(Event *event, int checkpoint) +static void replay_save_event(Event *event) { if (replay_mode !=3D REPLAY_MODE_PLAY) { /* put the event into the file */ replay_put_event(EVENT_ASYNC); - replay_put_byte(checkpoint); replay_put_byte(event->event_kind); =20 /* save event-specific data */ @@ -206,34 +205,27 @@ static void replay_save_event(Event *event, int check= point) } =20 /* Called with replay mutex locked */ -void replay_save_events(int checkpoint) +void replay_save_events(void) { g_assert(replay_mutex_locked()); - g_assert(checkpoint !=3D CHECKPOINT_CLOCK_WARP_START); - g_assert(checkpoint !=3D CHECKPOINT_CLOCK_VIRTUAL); while (!QTAILQ_EMPTY(&events_list)) { Event *event =3D QTAILQ_FIRST(&events_list); - replay_save_event(event, checkpoint); + replay_save_event(event); replay_run_event(event); QTAILQ_REMOVE(&events_list, event, events); g_free(event); } } =20 -static Event *replay_read_event(int checkpoint) +static Event *replay_read_event(void) { Event *event; if (replay_state.read_event_kind =3D=3D -1) { - replay_state.read_event_checkpoint =3D replay_get_byte(); replay_state.read_event_kind =3D replay_get_byte(); replay_state.read_event_id =3D -1; replay_check_error(); } =20 - if (checkpoint !=3D replay_state.read_event_checkpoint) { - return NULL; - } - /* Events that has not to be in the queue */ switch (replay_state.read_event_kind) { case REPLAY_ASYNC_EVENT_BH: @@ -294,11 +286,11 @@ static Event *replay_read_event(int checkpoint) } =20 /* Called with replay mutex locked */ -void replay_read_events(int checkpoint) +void replay_read_events(void) { g_assert(replay_mutex_locked()); while (replay_state.data_kind =3D=3D EVENT_ASYNC) { - Event *event =3D replay_read_event(checkpoint); + Event *event =3D replay_read_event(); if (!event) { break; } diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 97649ed8d7..d6e631a394 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -87,8 +87,6 @@ typedef struct ReplayState { int32_t read_event_kind; /*! Asynchronous event id read from the log */ uint64_t read_event_id; - /*! Asynchronous event checkpoint id read from the log */ - int32_t read_event_checkpoint; } ReplayState; extern ReplayState replay_state; =20 @@ -152,9 +150,9 @@ void replay_finish_events(void); /*! Returns true if there are any unsaved events in the queue */ bool replay_has_events(void); /*! Saves events from queue into the file */ -void replay_save_events(int checkpoint); +void replay_save_events(void); /*! Read events from the file into the input queue */ -void replay_read_events(int checkpoint); +void replay_read_events(void); /*! Adds specified async event to the queue */ void replay_add_event(ReplayAsyncEventKind event_kind, void *opaque, void *opaque2, uint64_t id); diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index e8767a1937..7e935deb15 100644 --- a/replay/replay-snapshot.c +++ b/replay/replay-snapshot.c @@ -61,7 +61,6 @@ static const VMStateDescription vmstate_replay =3D { VMSTATE_UINT64(block_request_id, ReplayState), VMSTATE_INT32(read_event_kind, ReplayState), VMSTATE_UINT64(read_event_id, ReplayState), - VMSTATE_INT32(read_event_checkpoint, ReplayState), VMSTATE_END_OF_LIST() }, }; diff --git a/replay/replay.c b/replay/replay.c index 2d3607998a..ccd7edec76 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -22,7 +22,7 @@ =20 /* Current version of the replay mechanism. Increase it when file format changes. */ -#define REPLAY_VERSION 0xe0200a +#define REPLAY_VERSION 0xe0200b /* Size of replay log header */ #define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) =20 @@ -171,64 +171,49 @@ void replay_shutdown_request(ShutdownCause cause) =20 bool replay_checkpoint(ReplayCheckpoint checkpoint) { - bool res =3D false; - static bool in_checkpoint; assert(EVENT_CHECKPOINT + checkpoint <=3D EVENT_CHECKPOINT_LAST); =20 - if (!replay_file) { - return true; - } - - if (in_checkpoint) { - /* - Recursion occurs when HW event modifies timers. - Prevent performing icount warp in this case and - wait for another invocation of the checkpoint. - */ - g_assert(replay_mode =3D=3D REPLAY_MODE_PLAY); - return false; - } - in_checkpoint =3D true; - replay_save_instructions(); =20 if (replay_mode =3D=3D REPLAY_MODE_PLAY) { g_assert(replay_mutex_locked()); if (replay_next_event_is(EVENT_CHECKPOINT + checkpoint)) { replay_finish_event(); - } else if (replay_state.data_kind !=3D EVENT_ASYNC) { - res =3D false; - goto out; + } else { + return false; } - replay_read_events(checkpoint); - /* replay_read_events may leave some unread events. - Return false if not all of the events associated with - checkpoint were processed */ - res =3D replay_state.data_kind !=3D EVENT_ASYNC; } else if (replay_mode =3D=3D REPLAY_MODE_RECORD) { g_assert(replay_mutex_locked()); replay_put_event(EVENT_CHECKPOINT + checkpoint); - /* This checkpoint belongs to several threads. - Processing events from different threads is - non-deterministic */ - if (checkpoint !=3D CHECKPOINT_CLOCK_WARP_START - /* FIXME: this is temporary fix, other checkpoints - may also be invoked from the different threads somed= ay. - Asynchronous event processing should be refactored - to create additional replay event kind which is - nailed to the one of the threads and which processes - the event queue. */ - && checkpoint !=3D CHECKPOINT_CLOCK_VIRTUAL) { - replay_save_events(checkpoint); - } - res =3D true; } -out: - in_checkpoint =3D false; - return res; + return true; } =20 -bool replay_has_checkpoint(void) +void replay_async_events(void) +{ + static bool processing =3D false; + /* + * If we are already processing the events, recursion may occur + * in case of incorrect implementation when HW event modifies timers. + * Timer modification may invoke the icount warp, event processing, + * and cause the recursion. + */ + g_assert(!processing); + processing =3D true; + + replay_save_instructions(); + + if (replay_mode =3D=3D REPLAY_MODE_PLAY) { + g_assert(replay_mutex_locked()); + replay_read_events(); + } else if (replay_mode =3D=3D REPLAY_MODE_RECORD) { + g_assert(replay_mutex_locked()); + replay_save_events(); + } + processing =3D false; +} + +bool replay_has_event(void) { bool res =3D false; if (replay_mode =3D=3D REPLAY_MODE_PLAY) { @@ -236,6 +221,7 @@ bool replay_has_checkpoint(void) replay_account_executed_instructions(); res =3D EVENT_CHECKPOINT <=3D replay_state.data_kind && replay_state.data_kind <=3D EVENT_CHECKPOINT_LAST; + res =3D res || replay_state.data_kind =3D=3D EVENT_ASYNC; } return res; } diff --git a/softmmu/icount.c b/softmmu/icount.c index 1cafec5014..4504433e16 100644 --- a/softmmu/icount.c +++ b/softmmu/icount.c @@ -322,7 +322,7 @@ void icount_start_warp_timer(void) * to vCPU was processed in advance and vCPU went to sleep. * Therefore we have to wake it up for doing someting. */ - if (replay_has_checkpoint()) { + if (replay_has_event()) { qemu_clock_notify(QEMU_CLOCK_VIRTUAL); } return; @@ -404,6 +404,8 @@ void icount_account_warp_timer(void) return; } =20 + replay_async_events(); + /* warp clock deterministically in record/replay mode */ if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP_ACCOUNT)) { return; --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527211; cv=none; d=zohomail.com; s=zohoarc; b=QhhoSTbjOOH8I3iAtyoN/GceOjfOIz5W0popOuAlpQhSLPoKE12fRPhmn6ad9GFHRNT0O3I8FtoPnbq90CdfVY391Rm9mZUQR8G0x++2GusVOU/OhJuXw2heXnxJ2lK0kF1BPweJzU6VzlhbjCwp2FKWv/Xg50BgNebGHKtsIgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527211; 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=sIPOhTLQlwR5isH3e+n1CCQhooUx4MPtdUkaeU4PXWw=; b=JFSb6WEJC03fKvvN4ce/XCoGQCGz4JuXrJLd5QuUlsRZDb2mGdMjQ9REZIUymBlOmFd1EnbohnrTZJVmzw9GPzigcnu4pJNvuUDNt6bGKKvdWC/uDUxiJRgjeGj1tWr+y332p+7fn4XPkVs8baxpzIgNGywqoBG2lBTXyYuj9Wk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527211681198.9278479674598; Mon, 6 Jun 2022 07:53:31 -0700 (PDT) Received: from localhost ([::1]:52882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE6k-0005R5-IG for importer@patchew.org; Mon, 06 Jun 2022 10:53:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr8-00026b-8D for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Xd-IZ for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-108-A7BOTl4cNwevuML-Wk4cUA-1; Mon, 06 Jun 2022 10:37:06 -0400 Received: by mail-wm1-f72.google.com with SMTP id e19-20020a05600c4e5300b0039c4b6acd83so2800488wmq.2 for ; Mon, 06 Jun 2022 07:37:06 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id u18-20020a5d5152000000b0020cdcb0efa2sm15380031wrt.34.2022.06.06.07.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526227; 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=sIPOhTLQlwR5isH3e+n1CCQhooUx4MPtdUkaeU4PXWw=; b=SyBdzxIbjjKhCj3hVFbsmsq1bOyU9Myin+Ct5XBhdNJyaucLb/fdS3+Ln9vlYBbU8xsLKz DxtCmvLQI35TSgWuYDqpdSX8229HffZXVI6cGynCI4upEg88yp+rd/SD/mcFiKnR2D4Rg5 41xN2HaCBEv7vnYPp+nSiTENGvORE3U= X-MC-Unique: A7BOTl4cNwevuML-Wk4cUA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sIPOhTLQlwR5isH3e+n1CCQhooUx4MPtdUkaeU4PXWw=; b=2TCGZrsGIDXCF6/oR8xuetkkmwDdx9JjhuItLPgo7I66J1lm1apEav2EBN5Aq8JbBf aYszRxCMrVh1T34Oj/AFCyvvHfrxoGZaTx6/d8YqzQo18nd3YHT40qkUXSXMNuz72GfH wfB5uAVxvjshHcQ4AZXVwQBnc2Zt/btDlJK8+tkzwQn+NjfZnGxxVQhPI5YnK6cq+O4L lXjrZP4a2QSU0F3MkWAN23IiweE9rzrFQqJ5TsQ254ULbXSLT2AuZhRMlSHydGHnf45b CVmzlMaJKoKlxY29YMPL7HVYr3IUEXo3vbVgq30ByCcJiDcG5JdXKp5bftYt5fwAU4eM PwhA== X-Gm-Message-State: AOAM531jf4wj10hUOAVVkYvozI42z6wFXl5azU1/7bgfS1eLyUGWTjxf xFXPxeAxbdXYm9XwV40BDslm08QRpPeHV1JbPZVjXjr9AgWjZ2MO/xZP287WBCUWJHuDbuWxGdO 3N8ozKrp7R9hed0Y/ixTnABcxKNy2ysboE3d0M3TIv7VQ1SCQ+oAAHwrHg7ltFOw34eI= X-Received: by 2002:adf:eacb:0:b0:217:dd5:445f with SMTP id o11-20020adfeacb000000b002170dd5445fmr9428641wrn.359.1654526224587; Mon, 06 Jun 2022 07:37:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV/zNxifT+hyxptKe/NJ3tqLuC6+3T0YzPzSIK/Ml5jCBKxgBrmv0luari4S+KW7HNv18nUw== X-Received: by 2002:adf:eacb:0:b0:217:dd5:445f with SMTP id o11-20020adfeacb000000b002170dd5445fmr9428610wrn.359.1654526224296; Mon, 06 Jun 2022 07:37:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 09/29] replay: simplify async event processing Date: Mon, 6 Jun 2022 16:36:24 +0200 Message-Id: <20220606143644.1151112-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527213745100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch joins replay event id and async event id into single byte in the= log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: minor enum fixes (suggested by Richard Henderson) Message-Id: <165364838393.688121.8191379555130516329.stgit@pasha-ThinkPad-X= 280> Signed-off-by: Paolo Bonzini --- replay/replay-events.c | 36 ++++++++++++++---------------------- replay/replay-internal.h | 31 ++++++++++++++----------------- replay/replay-snapshot.c | 1 - replay/replay.c | 5 +++-- 4 files changed, 31 insertions(+), 42 deletions(-) diff --git a/replay/replay-events.c b/replay/replay-events.c index db1decf9dd..af0721cc1a 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -174,8 +174,8 @@ static void replay_save_event(Event *event) { if (replay_mode !=3D REPLAY_MODE_PLAY) { /* put the event into the file */ - replay_put_event(EVENT_ASYNC); - replay_put_byte(event->event_kind); + g_assert(event->event_kind < REPLAY_ASYNC_COUNT); + replay_put_event(EVENT_ASYNC + event->event_kind); =20 /* save event-specific data */ switch (event->event_kind) { @@ -220,14 +220,10 @@ void replay_save_events(void) static Event *replay_read_event(void) { Event *event; - if (replay_state.read_event_kind =3D=3D -1) { - replay_state.read_event_kind =3D replay_get_byte(); - replay_state.read_event_id =3D -1; - replay_check_error(); - } + ReplayAsyncEventKind event_kind =3D replay_state.data_kind - EVENT_ASY= NC; =20 /* Events that has not to be in the queue */ - switch (replay_state.read_event_kind) { + switch (event_kind) { case REPLAY_ASYNC_EVENT_BH: case REPLAY_ASYNC_EVENT_BH_ONESHOT: if (replay_state.read_event_id =3D=3D -1) { @@ -236,17 +232,17 @@ static Event *replay_read_event(void) break; case REPLAY_ASYNC_EVENT_INPUT: event =3D g_new0(Event, 1); - event->event_kind =3D replay_state.read_event_kind; + event->event_kind =3D event_kind; event->opaque =3D replay_read_input_event(); return event; case REPLAY_ASYNC_EVENT_INPUT_SYNC: event =3D g_new0(Event, 1); - event->event_kind =3D replay_state.read_event_kind; + event->event_kind =3D event_kind; event->opaque =3D 0; return event; case REPLAY_ASYNC_EVENT_CHAR_READ: event =3D g_new0(Event, 1); - event->event_kind =3D replay_state.read_event_kind; + event->event_kind =3D event_kind; event->opaque =3D replay_event_char_read_load(); return event; case REPLAY_ASYNC_EVENT_BLOCK: @@ -256,18 +252,17 @@ static Event *replay_read_event(void) break; case REPLAY_ASYNC_EVENT_NET: event =3D g_new0(Event, 1); - event->event_kind =3D replay_state.read_event_kind; + event->event_kind =3D event_kind; event->opaque =3D replay_event_net_load(); return event; default: - error_report("Unknown ID %d of replay event", - replay_state.read_event_kind); + error_report("Unknown ID %d of replay event", event_kind); exit(1); break; } =20 QTAILQ_FOREACH(event, &events_list, events) { - if (event->event_kind =3D=3D replay_state.read_event_kind + if (event->event_kind =3D=3D event_kind && (replay_state.read_event_id =3D=3D -1 || replay_state.read_event_id =3D=3D event->id)) { break; @@ -276,12 +271,8 @@ static Event *replay_read_event(void) =20 if (event) { QTAILQ_REMOVE(&events_list, event, events); - } else { - return NULL; } =20 - /* Read event-specific data */ - return event; } =20 @@ -289,13 +280,14 @@ static Event *replay_read_event(void) void replay_read_events(void) { g_assert(replay_mutex_locked()); - while (replay_state.data_kind =3D=3D EVENT_ASYNC) { + while (replay_state.data_kind >=3D EVENT_ASYNC + && replay_state.data_kind <=3D EVENT_ASYNC_LAST) { Event *event =3D replay_read_event(); if (!event) { break; } replay_finish_event(); - replay_state.read_event_kind =3D -1; + replay_state.read_event_id =3D -1; replay_run_event(event); =20 g_free(event); @@ -304,7 +296,7 @@ void replay_read_events(void) =20 void replay_init_events(void) { - replay_state.read_event_kind =3D -1; + replay_state.read_event_id =3D -1; } =20 void replay_finish_events(void) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index d6e631a394..89e377be90 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -12,6 +12,19 @@ * */ =20 +/* Asynchronous events IDs */ + +typedef enum ReplayAsyncEventKind { + REPLAY_ASYNC_EVENT_BH, + REPLAY_ASYNC_EVENT_BH_ONESHOT, + REPLAY_ASYNC_EVENT_INPUT, + REPLAY_ASYNC_EVENT_INPUT_SYNC, + REPLAY_ASYNC_EVENT_CHAR_READ, + REPLAY_ASYNC_EVENT_BLOCK, + REPLAY_ASYNC_EVENT_NET, + REPLAY_ASYNC_COUNT +} ReplayAsyncEventKind; + /* Any changes to order/number of events will need to bump REPLAY_VERSION = */ enum ReplayEvents { /* for instruction event */ @@ -22,6 +35,7 @@ enum ReplayEvents { EVENT_EXCEPTION, /* for async events */ EVENT_ASYNC, + EVENT_ASYNC_LAST =3D EVENT_ASYNC + REPLAY_ASYNC_COUNT - 1, /* for shutdown requests, range allows recovery of ShutdownCause */ EVENT_SHUTDOWN, EVENT_SHUTDOWN_LAST =3D EVENT_SHUTDOWN + SHUTDOWN_CAUSE__MAX, @@ -49,21 +63,6 @@ enum ReplayEvents { EVENT_COUNT }; =20 -/* Asynchronous events IDs */ - -enum ReplayAsyncEventKind { - REPLAY_ASYNC_EVENT_BH, - REPLAY_ASYNC_EVENT_BH_ONESHOT, - REPLAY_ASYNC_EVENT_INPUT, - REPLAY_ASYNC_EVENT_INPUT_SYNC, - REPLAY_ASYNC_EVENT_CHAR_READ, - REPLAY_ASYNC_EVENT_BLOCK, - REPLAY_ASYNC_EVENT_NET, - REPLAY_ASYNC_COUNT -}; - -typedef enum ReplayAsyncEventKind ReplayAsyncEventKind; - typedef struct ReplayState { /*! Cached clock values. */ int64_t cached_clock[REPLAY_CLOCK_COUNT]; @@ -83,8 +82,6 @@ typedef struct ReplayState { uint64_t block_request_id; /*! Prior value of the host clock */ uint64_t host_clock_last; - /*! Asynchronous event type read from the log */ - int32_t read_event_kind; /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index 7e935deb15..10a7cf7992 100644 --- a/replay/replay-snapshot.c +++ b/replay/replay-snapshot.c @@ -59,7 +59,6 @@ static const VMStateDescription vmstate_replay =3D { VMSTATE_UINT32(has_unread_data, ReplayState), VMSTATE_UINT64(file_offset, ReplayState), VMSTATE_UINT64(block_request_id, ReplayState), - VMSTATE_INT32(read_event_kind, ReplayState), VMSTATE_UINT64(read_event_id, ReplayState), VMSTATE_END_OF_LIST() }, diff --git a/replay/replay.c b/replay/replay.c index ccd7edec76..4c396bb376 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -22,7 +22,7 @@ =20 /* Current version of the replay mechanism. Increase it when file format changes. */ -#define REPLAY_VERSION 0xe0200b +#define REPLAY_VERSION 0xe0200c /* Size of replay log header */ #define HEADER_SIZE (sizeof(uint32_t) + sizeof(uint64_t)) =20 @@ -221,7 +221,8 @@ bool replay_has_event(void) replay_account_executed_instructions(); res =3D EVENT_CHECKPOINT <=3D replay_state.data_kind && replay_state.data_kind <=3D EVENT_CHECKPOINT_LAST; - res =3D res || replay_state.data_kind =3D=3D EVENT_ASYNC; + res =3D res || (EVENT_ASYNC <=3D replay_state.data_kind + && replay_state.data_kind <=3D EVENT_ASYNC_LAST); } return res; } --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654526975; cv=none; d=zohomail.com; s=zohoarc; b=huxy0IetEeKi7vualaRIKQ89PZ8LI5zfvzSEGTJAsIRTA/iMtdLMYcFe1Tetp0D7DfEGZmT4drh0MNttQULMatn3LssbwCDjnrxuBZRYbfXrRbo96u/1uvTnKnaiuXfx/NNb2S/g1OpLe9OgjUtBg67Lbw+elWh1/SpSFKadiYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654526975; 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=GFkVwteKGaTzycRQEQZ+I1GrqbQDodeFp5/XE96lH98=; b=bwWrPOLCMRZ8HpoxFuAp0SXbvf8KisLr0jnfYyPACf1869XAfy8H0rVWR2eBGrFhycW0Bxohx4FrEMAuS+lgGHKwqkEGY0Cu2mKKQjEmff56g+g32nhuPYSx9d7tMHJcmqIs3czv33Dsyy0tzGATREhH4EWedDA5EUZv4OCW3jg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654526975631338.57935624981064; Mon, 6 Jun 2022 07:49:35 -0700 (PDT) Received: from localhost ([::1]:45302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE2w-0000AK-KU for importer@patchew.org; Mon, 06 Jun 2022 10:49:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr7-00025Z-Pm for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Xj-I2 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-284-RE04WKSVMW-iO9FNIeVYjw-1; Mon, 06 Jun 2022 10:37:08 -0400 Received: by mail-wm1-f71.google.com with SMTP id bg13-20020a05600c3c8d00b003974d0ff917so7804831wmb.3 for ; Mon, 06 Jun 2022 07:37:08 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id t17-20020adfeb91000000b0021031c894d3sm16359452wrn.94.2022.06.06.07.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526229; 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=GFkVwteKGaTzycRQEQZ+I1GrqbQDodeFp5/XE96lH98=; b=W/kPJmQNn/CxUk2kHc7tewYpIZh3WnS3QTNf9GsKS0q+Fn6ESu7l2e3PQptajSzy3sBWmy AXXAsJPNUvNUzkQHRGnKnJdUohyY4chDEG3qkO0uxe8hYJmCtq+XDdwyrVBAjX1ysH4gWf cy4pOUYaLOAU8f1VhdcYO6bON6nDnp0= X-MC-Unique: RE04WKSVMW-iO9FNIeVYjw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GFkVwteKGaTzycRQEQZ+I1GrqbQDodeFp5/XE96lH98=; b=QyKH//G1EtJZ/07HqG4EY3Vc8yxWOb7QtnNjYIizDTTJmw0uj0vkZMK0iE46fWNUg3 9kCOzb8LekrbUROzNnpbYpTJzf0pXyo8YFRRx1dIvv8WsX8cY19aagc/ZB7fSvhqq9gW kIbq/Jtz611FQsT8NkVIDFVz2UH5VNIqZUhEAo0pFeIclyKGJidkFXw2fR5UIsZCFKV+ ap4ydC/uXViI9sofz2zq1Tm9tQJg0aK1iIpA/snLqq1LEb7KiWcdj8XGzs40FcCx+3i+ qiU7SC98AyMUX5JlJI69rj6ZQcgmSGt6lpCakvrdc9GwPAK8XckniAm0A0VzX1YxJsmq O6FA== X-Gm-Message-State: AOAM533ngtt4QUIayHo9JMGMURdpVCLQ0xX8LQzW9qS/OXWXIMzRr0hZ sKqkuALJJroA6zZa8xcts8CJu3h57vkNGFV83toUISx4birKcKWhUOc6GeWIgH5G/2BxXBf2yrf vXsQ42CpJAZSB+GirvVsIpzQnpmnuPvQgAx47gvLIakwDpjOf8uQ9Je618dnLa/NfDuc= X-Received: by 2002:a1c:3b56:0:b0:39c:472a:4aff with SMTP id i83-20020a1c3b56000000b0039c472a4affmr12421136wma.23.1654526226568; Mon, 06 Jun 2022 07:37:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6VAkbYgTNbw7/qi1kIVDgm58akEsOMuwpoWEe1ol3Fd2/6Q/og/bSlNCO3cJ5o7WCm1oZXw== X-Received: by 2002:a1c:3b56:0:b0:39c:472a:4aff with SMTP id i83-20020a1c3b56000000b0039c472a4affmr12421088wma.23.1654526226123; Mon, 06 Jun 2022 07:37:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 10/29] docs: convert docs/devel/replay page to rst Date: Mon, 6 Jun 2022 16:36:25 +0200 Message-Id: <20220606143644.1151112-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654526976859100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Message-Id: <165364839013.688121.11935249420738873044.stgit@pasha-ThinkPad-= X280> Signed-off-by: Paolo Bonzini --- docs/devel/index-tcg.rst | 1 + docs/devel/{replay.txt =3D> replay.rst} | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) rename docs/devel/{replay.txt =3D> replay.rst} (90%) diff --git a/docs/devel/index-tcg.rst b/docs/devel/index-tcg.rst index 0b0ad12c22..7b9760b26f 100644 --- a/docs/devel/index-tcg.rst +++ b/docs/devel/index-tcg.rst @@ -13,3 +13,4 @@ are only implementing things for HW accelerated hyperviso= rs. multi-thread-tcg tcg-icount tcg-plugins + replay diff --git a/docs/devel/replay.txt b/docs/devel/replay.rst similarity index 90% rename from docs/devel/replay.txt rename to docs/devel/replay.rst index e641c35add..dd8bf3b195 100644 --- a/docs/devel/replay.txt +++ b/docs/devel/replay.rst @@ -1,3 +1,11 @@ +.. + Copyright (c) 2022, ISP RAS + Written by Pavel Dovgalyuk + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Execution Record/Replay +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + Record/replay mechanism, that could be enabled through icount mode, expects the virtual devices to satisfy the following requirements. =20 @@ -5,7 +13,7 @@ The main idea behind this document is that everything that= affects the guest state during execution in icount mode should be deterministic. =20 Timers -=3D=3D=3D=3D=3D=3D +------ =20 All virtual devices should use virtual clock for timers that change the gu= est state. Virtual clock is deterministic, therefore such timers are determini= stic @@ -19,7 +27,7 @@ the virtual devices (e.g., slirp routing device) that lie= outside the replayed guest. =20 Bottom halves -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +------------- =20 Bottom half callbacks, that affect the guest state, should be invoked thro= ugh replay_bh_schedule_event or replay_bh_schedule_oneshot_event functions. @@ -27,7 +35,7 @@ Their invocations are saved in record mode and synchroniz= ed with the existing log in replay mode. =20 Saving/restoring the VM state -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D +----------------------------- =20 All fields in the device state structure (including virtual timers) should be restored by loadvm to the same values they had before savevm. @@ -38,7 +46,7 @@ is not defined. It means that you should not call functio= ns like the dependencies that may make restoring the VM state non-deterministic. =20 Stopping the VM -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--------------- =20 Stopping the guest should not interfere with its state (with the exception of the network connections, that could be broken by the remote timeouts). --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528114; cv=none; d=zohomail.com; s=zohoarc; b=UbblQpzTaNYlqMnlIaXgK4zej/xpEkl3Lt2Ko3KkA7mCcKwvUfjx30XRqm+rJSvjS57BsIgacovdlLxe4dOvN4YS+gGXtOez1VRpKpVj1WUwTw/knu91ULwDc4X3TiYaxWZLEk2+ZKMvoXhxvM+iC3XMfOxeMRXiFLDfzIPEAlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528114; 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=LXa79UGDmSIsbmtfVzhaW15N3u2B1s7XlJaLffWJM6E=; b=hfJQebZ7I4OoOaoTcHkM7oLvvZP5ORVSpRg1+WsQXUi5C44Y1s9UaDOYeVFjDSI6POkIvAdZSYoHY8Cjdg+BFIV7RPH6ib6g3iwjBlL/I8RPh5oDdaOlCY4fpy9ReCGUwmjSOT97DtwmuVWGMBSlAu32QsDKZbP6rrIkcuEa1hA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528114068811.19437665196; Mon, 6 Jun 2022 08:08:34 -0700 (PDT) Received: from localhost ([::1]:58502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyELI-00046Y-6b for importer@patchew.org; Mon, 06 Jun 2022 11:08:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrJ-0002XY-J9 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Xt-PH for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:33 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-Lfzy5ZcXOi-U8FGIIgMvoA-1; Mon, 06 Jun 2022 10:37:12 -0400 Received: by mail-wm1-f70.google.com with SMTP id be12-20020a05600c1e8c00b0039c506b52a4so877043wmb.1 for ; Mon, 06 Jun 2022 07:37:12 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id h1-20020a5d4fc1000000b0020fc4cd81f6sm15321524wrw.60.2022.06.06.07.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526233; 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=LXa79UGDmSIsbmtfVzhaW15N3u2B1s7XlJaLffWJM6E=; b=IpelED9orosmYIui31InE7fZe/HGQ+ORbY3OBHtk23yRKfvyqekxQryM422sgeT0HLMx52 S5JuKAFTgy6T0oPZFi43hS2OC5RNl6yI6L9CYGaJTKZ9D8KG7DazVk87eY9MSWO+La8efb 6cH4zqjp1dCEo8Uevm5kMYNiG/l3CTA= X-MC-Unique: Lfzy5ZcXOi-U8FGIIgMvoA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LXa79UGDmSIsbmtfVzhaW15N3u2B1s7XlJaLffWJM6E=; b=btgO5NkWQjR/oNxKCT39bUr2yqUzh812mDgAHXBXQNTUQi/qxec1u/+eAaz0WvAph9 vtXMaQmwe5JM2EbXi5KP59bb/xIrKRWle6gRGSDQbgQhzv9UKB2TBee9VKL2pjKKuwwa 84BxbFNI82SFMiJwwVPw5IpQ0xg2icu3/p9yF/dS73Gs4LA22CmIOY3/aviNYge078rq MyqP6Tc+8dIQh3U35RToMseHLjAuZm+9+73Az3J1eCr3dbLd/K9pcEqZagY3Sef7zSmX ycyrOIuPdOwMtg02WjWxoJbR6Whi9re+UH0sGTSoePYeuTzBRRkP3csCrNvA7vZT3r/W NNug== X-Gm-Message-State: AOAM530K8mrkO8Ai6hJqWmUssF8j6A/hktzC5vpE17svD69kgk7gdZ5t EYDJBtgERYDJ787T4i7dvvfarhU6kDSDpvpbtRBCYjHginKizsCKzmgfa1kg/QwFl/Zitj8cRA3 PeSZcWhWx9BiV+HMuIqlD7hqFsLoAUOpCRRvcFEMXKSJXZ8zs8bxhziCtLdBw7+UYLak= X-Received: by 2002:a05:600c:1d99:b0:397:482b:429 with SMTP id p25-20020a05600c1d9900b00397482b0429mr51572675wms.130.1654526229701; Mon, 06 Jun 2022 07:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtbgZohiJrCr6CfH/d9vvSYDMSKkxxFihG/65t2axBASB41I0yzwjII5WY4vufqZK48Zd11w== X-Received: by 2002:a05:600c:1d99:b0:397:482b:429 with SMTP id p25-20020a05600c1d9900b00397482b0429mr51572549wms.130.1654526228194; Mon, 06 Jun 2022 07:37:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk , Richard Henderson Subject: [PULL 11/29] docs: move replay docs to docs/system/replay.rst Date: Mon, 6 Jun 2022 16:36:26 +0200 Message-Id: <20220606143644.1151112-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528115961100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson Message-Id: <165364839601.688121.5131456980322853233.stgit@pasha-ThinkPad-X= 280> Signed-off-by: Paolo Bonzini --- docs/devel/replay.rst | 264 +++++++++++++++++++++++++- docs/replay.txt | 407 ----------------------------------------- docs/system/index.rst | 1 + docs/system/replay.rst | 237 ++++++++++++++++++++++++ 4 files changed, 496 insertions(+), 413 deletions(-) delete mode 100644 docs/replay.txt create mode 100644 docs/system/replay.rst diff --git a/docs/devel/replay.rst b/docs/devel/replay.rst index dd8bf3b195..0244be8b9c 100644 --- a/docs/devel/replay.rst +++ b/docs/devel/replay.rst @@ -1,20 +1,149 @@ .. Copyright (c) 2022, ISP RAS - Written by Pavel Dovgalyuk + Written by Pavel Dovgalyuk and Alex Benn\ufffd\ufffde =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Execution Record/Replay =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Record/replay mechanism, that could be enabled through icount mode, expects -the virtual devices to satisfy the following requirements. +Core concepts +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The main idea behind this document is that everything that affects +Record/replay functions are used for the deterministic replay of qemu +execution. Execution recording writes a non-deterministic events log, which +can be later used for replaying the execution anywhere and for unlimited +number of times. Execution replaying reads the log and replays all +non-deterministic events including external input, hardware clocks, +and interrupts. + +Several parts of QEMU include function calls to make event log recording +and replaying. +Devices' models that have non-deterministic input from external devices we= re +changed to write every external event into the execution log immediately. +E.g. network packets are written into the log when they arrive into the vi= rtual +network adapter. + +All non-deterministic events are coming from these devices. But to +replay them we need to know at which moments they occur. We specify +these moments by counting the number of instructions executed between +every pair of consecutive events. + +Academic papers with description of deterministic replay implementation: + +* `Deterministic Replay of System's Execution with Multi-target QEMU Simul= ator for Dynamic Analysis and Reverse Debugging `_ +* `Don't panic: reverse debugging of kernel drivers `_ + +Modifications of qemu include: + + * wrappers for clock and time functions to save their return values in th= e log + * saving different asynchronous events (e.g. system shutdown) into the log + * synchronization of the bottom halves execution + * synchronization of the threads from thread pool + * recording/replaying user input (mouse, keyboard, and microphone) + * adding internal checkpoints for cpu and io synchronization + * network filter for recording and replaying the packets + * block driver for making block layer deterministic + * serial port input record and replay + * recording of random numbers obtained from the external sources + +Instruction counting +-------------------- + +QEMU should work in icount mode to use record/replay feature. icount was +designed to allow deterministic execution in absence of external inputs +of the virtual machine. We also use icount to control the occurrence of the +non-deterministic events. The number of instructions elapsed from the last= event +is written to the log while recording the execution. In replay mode we +can predict when to inject that event using the instruction counter. + +Locking and thread synchronisation +---------------------------------- + +Previously the synchronisation of the main thread and the vCPU thread +was ensured by the holding of the BQL. However the trend has been to +reduce the time the BQL was held across the system including under TCG +system emulation. As it is important that batches of events are kept +in sequence (e.g. expiring timers and checkpoints in the main thread +while instruction checkpoints are written by the vCPU thread) we need +another lock to keep things in lock-step. This role is now handled by +the replay_mutex_lock. It used to be held only for each event being +written but now it is held for a whole execution period. This results +in a deterministic ping-pong between the two main threads. + +As the BQL is now a finer grained lock than the replay_lock it is almost +certainly a bug, and a source of deadlocks, to take the +replay_mutex_lock while the BQL is held. This is enforced by an assert. +While the unlocks are usually in the reverse order, this is not +necessary; you can drop the replay_lock while holding the BQL, without +doing a more complicated unlock_iothread/replay_unlock/lock_iothread +sequence. + +Checkpoints +----------- + +Replaying the execution of virtual machine is bound by sources of +non-determinism. These are inputs from clock and peripheral devices, +and QEMU thread scheduling. Thread scheduling affect on processing events +from timers, asynchronous input-output, and bottom halves. + +Invocations of timers are coupled with clock reads and changing the state +of the virtual machine. Reads produce non-deterministic data taken from +host clock. And VM state changes should preserve their order. Their relati= ve +order in replay mode must replicate the order of callbacks in record mode. +To preserve this order we use checkpoints. When a specific clock is proces= sed +in record mode we save to the log special "checkpoint" event. +Checkpoints here do not refer to virtual machine snapshots. They are just +record/replay events used for synchronization. + +QEMU in replay mode will try to invoke timers processing in random moment +of time. That's why we do not process a group of timers until the checkpoi= nt +event will be read from the log. Such an event allows synchronizing CPU +execution and timer events. + +Two other checkpoints govern the "warping" of the virtual clock. +While the virtual machine is idle, the virtual clock increments at +1 ns per *real time* nanosecond. This is done by setting up a timer +(called the warp timer) on the virtual real time clock, so that the +timer fires at the next deadline of the virtual clock; the virtual clock +is then incremented (which is called "warping" the virtual clock) as +soon as the timer fires or the CPUs need to go out of the idle state. +Two functions are used for this purpose; because these actions change +virtual machine state and must be deterministic, each of them creates a +checkpoint. ``icount_start_warp_timer`` checks if the CPUs are idle and if= so +starts accounting real time to virtual clock. ``icount_account_warp_timer`` +is called when the CPUs get an interrupt or when the warp timer fires, +and it warps the virtual clock by the amount of real time that has passed +since ``icount_start_warp_timer``. + +Virtual devices +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Record/replay mechanism, that could be enabled through icount mode, expects +the virtual devices to satisfy the following requirement: +everything that affects the guest state during execution in icount mode should be deterministic. =20 Timers ------ =20 +Timers are used to execute callbacks from different subsystems of QEMU +at the specified moments of time. There are several kinds of timers: + + * Real time clock. Based on host time and used only for callbacks that + do not change the virtual machine state. For this reason real time + clock and timers does not affect deterministic replay at all. + * Virtual clock. These timers run only during the emulation. In icount + mode virtual clock value is calculated using executed instructions coun= ter. + That is why it is completely deterministic and does not have to be reco= rded. + * Host clock. This clock is used by device models that simulate real time + sources (e.g. real time clock chip). Host clock is the one of the sourc= es + of non-determinism. Host clock read operations should be logged to + make the execution deterministic. + * Virtual real time clock. This clock is similar to real time clock but + it is used only for increasing virtual clock while virtual machine is + sleeping. Due to its nature it is also non-deterministic as the host cl= ock + and has to be logged too. + All virtual devices should use virtual clock for timers that change the gu= est state. Virtual clock is deterministic, therefore such timers are determini= stic too. @@ -26,14 +155,50 @@ but its speed depends on the guest execution. This clo= ck is used by the virtual devices (e.g., slirp routing device) that lie outside the replayed guest. =20 +Block devices +------------- + +Block devices record/replay module (``blkreplay``) intercepts calls of +bdrv coroutine functions at the top of block drivers stack. + +All block completion operations are added to the queue in the coroutines. +When the queue is flushed the information about processed requests +is recorded to the log. In replay phase the queue is matched with +events read from the log. Therefore block devices requests are processed +deterministically. + Bottom halves ------------- =20 Bottom half callbacks, that affect the guest state, should be invoked thro= ugh -replay_bh_schedule_event or replay_bh_schedule_oneshot_event functions. +``replay_bh_schedule_event`` or ``replay_bh_schedule_oneshot_event`` funct= ions. Their invocations are saved in record mode and synchronized with the exist= ing log in replay mode. =20 +Disk I/O events are completely deterministic in our model, because +in both record and replay modes we start virtual machine from the same +disk state. But callbacks that virtual disk controller uses for reading and +writing the disk may occur at different moments of time in record and repl= ay +modes. + +Reading and writing requests are created by CPU thread of QEMU. Later these +requests proceed to block layer which creates "bottom halves". Bottom +halves consist of callback and its parameters. They are processed when +main loop locks the global mutex. These locks are not synchronized with +replaying process because main loop also processes the events that do not +affect the virtual machine state (like user interaction with monitor). + +That is why we had to implement saving and replaying bottom halves callbac= ks +synchronously to the CPU execution. When the callback is about to execute +it is added to the queue in the replay module. This queue is written to the +log when its callbacks are executed. In replay mode callbacks are not proc= essed +until the corresponding event is read from the events log file. + +Sometimes the block layer uses asynchronous callbacks for its internal pur= poses +(like reading or writing VM snapshots or disk image cluster tables). In th= is +case bottom halves are not marked as "replayable" and do not saved +into the log. + Saving/restoring the VM state ----------------------------- =20 @@ -42,7 +207,7 @@ should be restored by loadvm to the same values they had= before savevm. =20 Avoid accessing other devices' state, because the order of saving/restoring is not defined. It means that you should not call functions like -'update_irq' in post_load callback. Save everything explicitly to avoid +``update_irq`` in ``post_load`` callback. Save everything explicitly to av= oid the dependencies that may make restoring the VM state non-deterministic. =20 Stopping the VM @@ -52,3 +217,90 @@ Stopping the guest should not interfere with its state = (with the exception of the network connections, that could be broken by the remote timeouts). VM can be stopped at any moment of replay by the user. Restarting the VM after that stop should not break the replay by the unneeded guest state ch= ange. + +Replay log format +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Record/replay log consists of the header and the sequence of execution +events. The header includes 4-byte replay version id and 8-byte reserved +field. Version is updated every time replay log format changes to prevent +using replay log created by another build of qemu. + +The sequence of the events describes virtual machine state changes. +It includes all non-deterministic inputs of VM, synchronization marks and +instruction counts used to correctly inject inputs at replay. + +Synchronization marks (checkpoints) are used for synchronizing qemu threads +that perform operations with virtual hardware. These operations may change +system's state (e.g., change some register or generate interrupt) and +therefore should execute synchronously with CPU thread. + +Every event in the log includes 1-byte event id and optional arguments. +When argument is an array, it is stored as 4-byte array length +and corresponding number of bytes with data. +Here is the list of events that are written into the log: + + - EVENT_INSTRUCTION. Instructions executed since last event. Followed by: + + - 4-byte number of executed instructions. + + - EVENT_INTERRUPT. Used to synchronize interrupt processing. + - EVENT_EXCEPTION. Used to synchronize exception handling. + - EVENT_ASYNC. This is a group of events. When such an event is generated, + it is stored in the queue and processed in icount_account_warp_timer(). + Every such event has it's own id from the following list: + + - REPLAY_ASYNC_EVENT_BH. Bottom-half callback. This event synchronizes + callbacks that affect virtual machine state, but normally called + asynchronously. Followed by: + + - 8-byte operation id. + + - REPLAY_ASYNC_EVENT_INPUT. Input device event. Contains + parameters of keyboard and mouse input operations + (key press/release, mouse pointer movement). Followed by: + + - 9-16 bytes depending of input event. + + - REPLAY_ASYNC_EVENT_INPUT_SYNC. Internal input synchronization event. + - REPLAY_ASYNC_EVENT_CHAR_READ. Character (e.g., serial port) device = input + initiated by the sender. Followed by: + + - 1-byte character device id. + - Array with bytes were read. + + - REPLAY_ASYNC_EVENT_BLOCK. Block device operation. Used to synchroni= ze + operations with disk and flash drives with CPU. Followed by: + + - 8-byte operation id. + + - REPLAY_ASYNC_EVENT_NET. Incoming network packet. Followed by: + + - 1-byte network adapter id. + - 4-byte packet flags. + - Array with packet bytes. + + - EVENT_SHUTDOWN. Occurs when user sends shutdown event to qemu, + e.g., by closing the window. + - EVENT_CHAR_WRITE. Used to synchronize character output operations. Foll= owed by: + + - 4-byte output function return value. + - 4-byte offset in the output array. + + - EVENT_CHAR_READ_ALL. Used to synchronize character input operations, + initiated by qemu. Followed by: + + - Array with bytes that were read. + + - EVENT_CHAR_READ_ALL_ERROR. Unsuccessful character input operation, + initiated by qemu. Followed by: + + - 4-byte error code. + + - EVENT_CLOCK + clock_id. Group of events for host clock read operations.= Followed by: + + - 8-byte clock value. + + - EVENT_CHECKPOINT + checkpoint_id. Checkpoint for synchronization of ussian Academy of Sciences. - -This work is licensed under the terms of the GNU GPL, version 2 or later. -See the COPYING file in the top-level directory. - -Record/replay -------------- - -Record/replay functions are used for the deterministic replay of qemu exec= ution. -Execution recording writes a non-deterministic events log, which can be la= ter -used for replaying the execution anywhere and for unlimited number of time= s. -It also supports checkpointing for faster rewind to the specific replay mo= ment. -Execution replaying reads the log and replays all non-deterministic events -including external input, hardware clocks, and interrupts. - -Deterministic replay has the following features: - * Deterministically replays whole system execution and all contents of - the memory, state of the hardware devices, clocks, and screen of the VM. - * Writes execution log into the file for later replaying for multiple tim= es - on different machines. - * Supports i386, x86_64, and Arm hardware platforms. - * Performs deterministic replay of all operations with keyboard and mouse - input devices. - -Usage of the record/replay: - * First, record the execution with the following command line: - qemu-system-i386 \ - -icount shift=3D7,rr=3Drecord,rrfile=3Dreplay.bin \ - -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct \ - -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkre= play \ - -device ide-hd,drive=3Dimg-blkreplay \ - -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 \ - -object filter-replay,id=3Dreplay,netdev=3Dnet1 - * After recording, you can replay it by using another command line: - qemu-system-i386 \ - -icount shift=3D7,rr=3Dreplay,rrfile=3Dreplay.bin \ - -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct \ - -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkre= play \ - -device ide-hd,drive=3Dimg-blkreplay \ - -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 \ - -object filter-replay,id=3Dreplay,netdev=3Dnet1 - The only difference with recording is changing the rr option - from record to replay. - * Block device images are not actually changed in the recording mode, - because all of the changes are written to the temporary overlay file. - This behavior is enabled by using blkreplay driver. It should be used - for every enabled block device, as described in 'Block devices' section. - * '-net none' option should be specified when network is not used, - because QEMU adds network card by default. When network is needed, - it should be configured explicitly with replay filter, as described - in 'Network devices' section. - * Interaction with audio devices and serial ports are recorded and replay= ed - automatically when such devices are enabled. - -Academic papers with description of deterministic replay implementation: -http://www.computer.org/csdl/proceedings/csmr/2012/4666/00/4666a553-abs.ht= ml -http://dl.acm.org/citation.cfm?id=3D2786805.2803179 - -Modifications of qemu include: - * wrappers for clock and time functions to save their return values in th= e log - * saving different asynchronous events (e.g. system shutdown) into the log - * synchronization of the bottom halves execution - * synchronization of the threads from thread pool - * recording/replaying user input (mouse, keyboard, and microphone) - * adding internal checkpoints for cpu and io synchronization - * network filter for recording and replaying the packets - * block driver for making block layer deterministic - * serial port input record and replay - * recording of random numbers obtained from the external sources - -Locking and thread synchronisation ----------------------------------- - -Previously the synchronisation of the main thread and the vCPU thread -was ensured by the holding of the BQL. However the trend has been to -reduce the time the BQL was held across the system including under TCG -system emulation. As it is important that batches of events are kept -in sequence (e.g. expiring timers and checkpoints in the main thread -while instruction checkpoints are written by the vCPU thread) we need -another lock to keep things in lock-step. This role is now handled by -the replay_mutex_lock. It used to be held only for each event being -written but now it is held for a whole execution period. This results -in a deterministic ping-pong between the two main threads. - -As the BQL is now a finer grained lock than the replay_lock it is almost -certainly a bug, and a source of deadlocks, to take the -replay_mutex_lock while the BQL is held. This is enforced by an assert. -While the unlocks are usually in the reverse order, this is not -necessary; you can drop the replay_lock while holding the BQL, without -doing a more complicated unlock_iothread/replay_unlock/lock_iothread -sequence. - -Non-deterministic events ------------------------- - -Our record/replay system is based on saving and replaying non-deterministic -events (e.g. keyboard input) and simulating deterministic ones (e.g. readi= ng -from HDD or memory of the VM). Saving only non-deterministic events makes -log file smaller and simulation faster. - -The following non-deterministic data from peripheral devices is saved into -the log: mouse and keyboard input, network packets, audio controller input, -serial port input, and hardware clocks (they are non-deterministic -too, because their values are taken from the host machine). Inputs from -simulated hardware, memory of VM, software interrupts, and execution of -instructions are not saved into the log, because they are deterministic and -can be replayed by simulating the behavior of virtual machine starting from -initial state. - -We had to solve three tasks to implement deterministic replay: recording -non-deterministic events, replaying non-deterministic events, and checking -that there is no divergence between record and replay modes. - -We changed several parts of QEMU to make event log recording and replaying. -Devices' models that have non-deterministic input from external devices we= re -changed to write every external event into the execution log immediately. -E.g. network packets are written into the log when they arrive into the vi= rtual -network adapter. - -All non-deterministic events are coming from these devices. But to -replay them we need to know at which moments they occur. We specify -these moments by counting the number of instructions executed between -every pair of consecutive events. - -Instruction counting --------------------- - -QEMU should work in icount mode to use record/replay feature. icount was -designed to allow deterministic execution in absence of external inputs -of the virtual machine. We also use icount to control the occurrence of the -non-deterministic events. The number of instructions elapsed from the last= event -is written to the log while recording the execution. In replay mode we -can predict when to inject that event using the instruction counter. - -Timers ------- - -Timers are used to execute callbacks from different subsystems of QEMU -at the specified moments of time. There are several kinds of timers: - * Real time clock. Based on host time and used only for callbacks that - do not change the virtual machine state. For this reason real time - clock and timers does not affect deterministic replay at all. - * Virtual clock. These timers run only during the emulation. In icount - mode virtual clock value is calculated using executed instructions coun= ter. - That is why it is completely deterministic and does not have to be reco= rded. - * Host clock. This clock is used by device models that simulate real time - sources (e.g. real time clock chip). Host clock is the one of the sourc= es - of non-determinism. Host clock read operations should be logged to - make the execution deterministic. - * Virtual real time clock. This clock is similar to real time clock but - it is used only for increasing virtual clock while virtual machine is - sleeping. Due to its nature it is also non-deterministic as the host cl= ock - and has to be logged too. - -Checkpoints ------------ - -Replaying of the execution of virtual machine is bound by sources of -non-determinism. These are inputs from clock and peripheral devices, -and QEMU thread scheduling. Thread scheduling affect on processing events -from timers, asynchronous input-output, and bottom halves. - -Invocations of timers are coupled with clock reads and changing the state -of the virtual machine. Reads produce non-deterministic data taken from -host clock. And VM state changes should preserve their order. Their relati= ve -order in replay mode must replicate the order of callbacks in record mode. -To preserve this order we use checkpoints. When a specific clock is proces= sed -in record mode we save to the log special "checkpoint" event. -Checkpoints here do not refer to virtual machine snapshots. They are just -record/replay events used for synchronization. - -QEMU in replay mode will try to invoke timers processing in random moment -of time. That's why we do not process a group of timers until the checkpoi= nt -event will be read from the log. Such an event allows synchronizing CPU -execution and timer events. - -Two other checkpoints govern the "warping" of the virtual clock. -While the virtual machine is idle, the virtual clock increments at -1 ns per *real time* nanosecond. This is done by setting up a timer -(called the warp timer) on the virtual real time clock, so that the -timer fires at the next deadline of the virtual clock; the virtual clock -is then incremented (which is called "warping" the virtual clock) as -soon as the timer fires or the CPUs need to go out of the idle state. -Two functions are used for this purpose; because these actions change -virtual machine state and must be deterministic, each of them creates a -checkpoint. icount_start_warp_timer checks if the CPUs are idle and if so -starts accounting real time to virtual clock. icount_account_warp_timer -is called when the CPUs get an interrupt or when the warp timer fires, -and it warps the virtual clock by the amount of real time that has passed -since icount_start_warp_timer. - -Bottom halves -------------- - -Disk I/O events are completely deterministic in our model, because -in both record and replay modes we start virtual machine from the same -disk state. But callbacks that virtual disk controller uses for reading and -writing the disk may occur at different moments of time in record and repl= ay -modes. - -Reading and writing requests are created by CPU thread of QEMU. Later these -requests proceed to block layer which creates "bottom halves". Bottom -halves consist of callback and its parameters. They are processed when -main loop locks the global mutex. These locks are not synchronized with -replaying process because main loop also processes the events that do not -affect the virtual machine state (like user interaction with monitor). - -That is why we had to implement saving and replaying bottom halves callbac= ks -synchronously to the CPU execution. When the callback is about to execute -it is added to the queue in the replay module. This queue is written to the -log when its callbacks are executed. In replay mode callbacks are not proc= essed -until the corresponding event is read from the events log file. - -Sometimes the block layer uses asynchronous callbacks for its internal pur= poses -(like reading or writing VM snapshots or disk image cluster tables). In th= is -case bottom halves are not marked as "replayable" and do not saved -into the log. - -Block devices -------------- - -Block devices record/replay module intercepts calls of -bdrv coroutine functions at the top of block drivers stack. -To record and replay block operations the drive must be configured -as following: - -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct - -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkreplay - -device ide-hd,drive=3Dimg-blkreplay - -blkreplay driver should be inserted between disk image and virtual driver -controller. Therefore all disk requests may be recorded and replayed. - -All block completion operations are added to the queue in the coroutines. -Queue is flushed at checkpoints and information about processed requests -is recorded to the log. In replay phase the queue is matched with -events read from the log. Therefore block devices requests are processed -deterministically. - -Snapshotting ------------- - -New VM snapshots may be created in replay mode. They can be used later -to recover the desired VM state. All VM states created in replay mode -are associated with the moment of time in the replay scenario. -After recovering the VM state replay will start from that position. - -Default starting snapshot name may be specified with icount field -rrsnapshot as follows: - -icount shift=3D7,rr=3Drecord,rrfile=3Dreplay.bin,rrsnapshot=3Dsnapshot_n= ame - -This snapshot is created at start of recording and restored at start -of replaying. It also can be loaded while replaying to roll back -the execution. - -'snapshot' flag of the disk image must be removed to save the snapshots -in the overlay (or original image) instead of using the temporary overlay. - -drive file=3Ddisk.ovl,if=3Dnone,id=3Dimg-direct - -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkreplay - -device ide-hd,drive=3Dimg-blkreplay - -Use QEMU monitor to create additional snapshots. 'savevm ' command -created the snapshot and 'loadvm ' restores it. To prevent corruption -of the original disk image, use overlay files linked to the original image= s. -Therefore all new snapshots (including the starting one) will be saved in -overlays and the original image remains unchanged. - -When you need to use snapshots with diskless virtual machine, -it must be started with 'orphan' qcow2 image. This image will be used -for storing VM snapshots. Here is the example of the command line for this: - - qemu-system-i386 -icount shift=3D3,rr=3Dreplay,rrfile=3Drecord.bin,rrsna= pshot=3Dinit \ - -net none -drive file=3Dempty.qcow2,if=3Dnone,id=3Drr - -empty.qcow2 drive does not connected to any virtual block device and used -for VM snapshots only. - -Network devices ---------------- - -Record and replay for network interactions is performed with the network f= ilter. -Each backend must have its own instance of the replay filter as follows: - -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 - -object filter-replay,id=3Dreplay,netdev=3Dnet1 - -Replay network filter is used to record and replay network packets. While -recording the virtual machine this filter puts all packets coming from -the outer world into the log. In replay mode packets from the log are -injected into the network device. All interactions with network backend -in replay mode are disabled. - -Audio devices -------------- - -Audio data is recorded and replay automatically. The command line for reco= rding -and replaying must contain identical specifications of audio hardware, e.g= .: - -soundhw ac97 - -Serial ports ------------- - -Serial ports input is recorded and replay automatically. The command lines -for recording and replaying must contain identical number of ports in reco= rd -and replay modes, but their backends may differ. -E.g., '-serial stdio' in record mode, and '-serial null' in replay mode. - -Reverse debugging ------------------ - -Reverse debugging allows "executing" the program in reverse direction. -GDB remote protocol supports "reverse step" and "reverse continue" -commands. The first one steps single instruction backwards in time, -and the second one finds the last breakpoint in the past. - -Recorded executions may be used to enable reverse debugging. QEMU can't -execute the code in backwards direction, but can load a snapshot and -replay forward to find the desired position or breakpoint. - -The following GDB commands are supported: - - reverse-stepi (or rsi) - step one instruction backwards - - reverse-continue (or rc) - find last breakpoint in the past - -Reverse step loads the nearest snapshot and replays the execution until -the - replaying to the required breakpoint - 4. else - - proceeding to the p.1 with the earlier snapshot - -Therefore usage of the reverse debugging requires at least one snapshot -created in advance. This can be done by omitting 'snapshot' option -for the block drives and adding 'rrsnapshot' for both record and replay -command lines. -See the "Snapshotting" section to learn more about running record/replay -and creating the snapshot in these modes. - -Replay log format ------------------ - -Record/replay log consists of the header and the sequence of execution -events. The header includes 4-byte replay version id and 8-byte reserved -field. Version is updated every time replay log format changes to prevent -using replay log created by another build of qemu. - -The sequence of the events describes virtual machine state changes. -It includes all non-deterministic inputs of VM, synchronization marks and -instruction counts used to correctly inject inputs at replay. - -Synchronization marks (checkpoints) are used for synchronizing qemu threads -that perform operations with virtual hardware. These operations may change -system's state (e.g., change some register or generate interrupt) and -therefore should execute synchronously with CPU thread. - -Every event in the log includes 1-byte event id and optional arguments. -When argument is an array, it is stored as 4-byte array length -and corresponding number of bytes with data. -Here is the list of events that are written into the log: - - - EVENT_INSTRUCTION. Instructions executed since last event. - Argument: 4-byte number of executed instructions. - - EVENT_INTERRUPT. Used to synchronize interrupt processing. - - EVENT_EXCEPTION. Used to synchronize exception handling. - - EVENT_ASYNC. This is a group of events. When such an event is generated, - it is stored in the queue and processed in icount_account_warp_timer(). - Every such event has it's own id from the following list: - - REPLAY_ASYNC_EVENT_BH. Bottom-half callback. This event synchronizes - callbacks that affect virtual machine state, but normally called - asynchronously. - Argument: 8-byte operation id. - - REPLAY_ASYNC_EVENT_INPUT. Input device event. Contains - parameters of keyboard and mouse input operations - (key press/release, mouse pointer movement). - Arguments: 9-16 bytes depending of input event. - - REPLAY_ASYNC_EVENT_INPUT_SYNC. Internal input synchronization event. - - REPLAY_ASYNC_EVENT_CHAR_READ. Character (e.g., serial port) device = input - initiated by the sender. - Arguments: 1-byte character device id. - Array with bytes were read. - - REPLAY_ASYNC_EVENT_BLOCK. Block device operation. Used to synchroni= ze - operations with disk and flash drives with CPU. - Argument: 8-byte operation id. - - REPLAY_ASYNC_EVENT_NET. Incoming network packet. - Arguments: 1-byte network adapter id. - 4-byte packet flags. - Array with packet bytes. - - EVENT_SHUTDOWN. Occurs when user sends shutdown event to qemu, - e.g., by closing the window. - - EVENT_CHAR_WRITE. Used to synchronize character output operations. - Arguments: 4-byte output function return value. - 4-byte offset in the output array. - - EVENT_CHAR_READ_ALL. Used to synchronize character input operations, - initiated by qemu. - Argument: Array with bytes that were read. - - EVENT_CHAR_READ_ALL_ERROR. Unsuccessful character input operation, - initiated by qemu. - Argument: 4-byte error code. - - EVENT_CLOCK + clock_id. Group of events for host clock read operations. - Argument: 8-byte clock value. - - EVENT_CHECKPOINT + checkpoint_id. Checkpoint for synchronization of - CPU, internal threads, and asynchronous input events. - - EVENT_END. Last event in the log. diff --git a/docs/system/index.rst b/docs/system/index.rst index 23e30e26e5..e3695649c5 100644 --- a/docs/system/index.rst +++ b/docs/system/index.rst @@ -27,6 +27,7 @@ or Hypervisor.Framework. secrets authz gdb + replay managed-startup bootindex cpu-hotplug diff --git a/docs/system/replay.rst b/docs/system/replay.rst new file mode 100644 index 0000000000..3105327423 --- /dev/null +++ b/docs/system/replay.rst @@ -0,0 +1,237 @@ +.. _replay: + +.. + Copyright (c) 2010-2022 Institute for System Programming + of the Russian Academy of Sciences. + + This work is licensed under the terms of the GNU GPL, version 2 or lat= er. + See the COPYING file in the top-level directory. + +Record/replay +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Record/replay functions are used for the deterministic replay of qemu exec= ution. +Execution recording writes a non-deterministic events log, which can be la= ter +used for replaying the execution anywhere and for unlimited number of time= s. +It also supports checkpointing for faster rewind to the specific replay mo= ment. +Execution replaying reads the log and replays all non-deterministic events +including external input, hardware clocks, and interrupts. + +Deterministic replay has the following features: + + * Deterministically replays whole system execution and all contents of + the memory, state of the hardware devices, clocks, and screen of the VM. + * Writes execution log into the file for later replaying for multiple tim= es + on different machines. + * Supports i386, x86_64, ARM, AArch64, Risc-V, MIPS, MIPS64, S390X, Alpha, + PowerPC, PowerPC64, M68000, Microblaze, OpenRISC, Nios II, SPARC, + and Xtensa hardware platforms. + * Performs deterministic replay of all operations with keyboard and mouse + input devices, serial ports, and network. + +Usage of the record/replay: + + * First, record the execution with the following command line: + + .. parsed-literal:: + |qemu_system| \\ + -icount shift=3Dauto,rr=3Drecord,rrfile=3Dreplay.bin \\ + -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct \\ + -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-bl= kreplay \\ + -device ide-hd,drive=3Dimg-blkreplay \\ + -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 \\ + -object filter-replay,id=3Dreplay,netdev=3Dnet1 + + * After recording, you can replay it by using another command line: + + .. parsed-literal:: + |qemu_system| \\ + -icount shift=3Dauto,rr=3Dreplay,rrfile=3Dreplay.bin \\ + -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct \\ + -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-bl= kreplay \\ + -device ide-hd,drive=3Dimg-blkreplay \\ + -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 \\ + -object filter-replay,id=3Dreplay,netdev=3Dnet1 + + The only difference with recording is changing the rr option + from record to replay. + * Block device images are not actually changed in the recording mode, + because all of the changes are written to the temporary overlay file. + This behavior is enabled by using blkreplay driver. It should be used + for every enabled block device, as described in :ref:`block-label` sect= ion. + * ``-net none`` option should be specified when network is not used, + because QEMU adds network card by default. When network is needed, + it should be configured explicitly with replay filter, as described + in :ref:`network-label` section. + * Interaction with audio devices and serial ports are recorded and replay= ed + automatically when such devices are enabled. + +Core idea +--------- + +Record/replay system is based on saving and replaying non-deterministic +events (e.g. keyboard input) and simulating deterministic ones (e.g. readi= ng +from HDD or memory of the VM). Saving only non-deterministic events makes +log file smaller and simulation faster. + +The following non-deterministic data from peripheral devices is saved into +the log: mouse and keyboard input, network packets, audio controller input, +serial port input, and hardware clocks (they are non-deterministic +too, because their values are taken from the host machine). Inputs from +simulated hardware, memory of VM, software interrupts, and execution of +instructions are not saved into the log, because they are deterministic and +can be replayed by simulating the behavior of virtual machine starting from +initial state. + +Instruction counting +-------------------- + +QEMU should work in icount mode to use record/replay feature. icount was +designed to allow deterministic execution in absence of external inputs +of the virtual machine. Record/replay feature is enabled through ``-icount= `` +command-line option, making possible deterministic execution of the machin= e, +interacting with user or network. + +.. _block-label: + +Block devices +------------- + +Block devices record/replay module intercepts calls of +bdrv coroutine functions at the top of block drivers stack. +To record and replay block operations the drive must be configured +as following: + +.. parsed-literal:: + -drive file=3Ddisk.qcow2,if=3Dnone,snapshot,id=3Dimg-direct + -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkrep= lay + -device ide-hd,drive=3Dimg-blkreplay + +blkreplay driver should be inserted between disk image and virtual driver +controller. Therefore all disk requests may be recorded and replayed. + +.. _snapshotting-label: + +Snapshotting +------------ + +New VM snapshots may be created in replay mode. They can be used later +to recover the desired VM state. All VM states created in replay mode +are associated with the moment of time in the replay scenario. +After recovering the VM state replay will start from that position. + +Default starting snapshot name may be specified with icount field +rrsnapshot as follows: + +.. parsed-literal:: + -icount shift=3Dauto,rr=3Drecord,rrfile=3Dreplay.bin,rrsnapshot=3Dsnap= shot_name + +This snapshot is created at start of recording and restored at start +of replaying. It also can be loaded while replaying to roll back +the execution. + +``snapshot`` flag of the disk image must be removed to save the snapshots +in the overlay (or original image) instead of using the temporary overlay. + +.. parsed-literal:: + -drive file=3Ddisk.ovl,if=3Dnone,id=3Dimg-direct + -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkrep= lay + -device ide-hd,drive=3Dimg-blkreplay + +Use QEMU monitor to create additional snapshots. ``savevm `` command +created the snapshot and ``loadvm `` restores it. To prevent corrupt= ion +of the original disk image, use overlay files linked to the original image= s. +Therefore all new snapshots (including the starting one) will be saved in +overlays and the original image remains unchanged. + +When you need to use snapshots with diskless virtual machine, +it must be started with "orphan" qcow2 image. This image will be used +for storing VM snapshots. Here is the example of the command line for this: + +.. parsed-literal:: + |qemu_system| \\ + -icount shift=3Dauto,rr=3Dreplay,rrfile=3Drecord.bin,rrsnapshot=3Din= it \\ + -net none -drive file=3Dempty.qcow2,if=3Dnone,id=3Drr + +``empty.qcow2`` drive does not connected to any virtual block device and u= sed +for VM snapshots only. + +.. _network-label: + +Network devices +--------------- + +Record and replay for network interactions is performed with the network f= ilter. +Each backend must have its own instance of the replay filter as follows: + +.. parsed-literal:: + -netdev user,id=3Dnet1 -device rtl8139,netdev=3Dnet1 + -object filter-replay,id=3Dreplay,netdev=3Dnet1 + +Replay network filter is used to record and replay network packets. While +recording the virtual machine this filter puts all packets coming from +the outer world into the log. In replay mode packets from the log are +injected into the network device. All interactions with network backend +in replay mode are disabled. + +Audio devices +------------- + +Audio data is recorded and replay automatically. The command line for reco= rding +and replaying must contain identical specifications of audio hardware, e.g= .: + +.. parsed-literal:: + -soundhw ac97 + +Serial ports +------------ + +Serial ports input is recorded and replay automatically. The command lines +for recording and replaying must contain identical number of ports in reco= rd +and replay modes, but their backends may differ. +E.g., ``-serial stdio`` in record mode, and ``-serial null`` in replay mod= e. + +Reverse debugging +----------------- + +Reverse debugging allows "executing" the program in reverse direction. +GDB remote protocol supports "reverse step" and "reverse continue" +commands. The first one steps single instruction backwards in time, +and the second one finds the last breakpoint in the past. + +Recorded executions may be used to enable reverse debugging. QEMU can't +execute the code in backwards direction, but can load a snapshot and +replay forward to find the desired position or breakpoint. + +The following GDB commands are supported: + + - ``reverse-stepi`` (or ``rsi``) - step one instruction backwards + - ``reverse-continue`` (or ``rc``) - find last breakpoint in the past + +Reverse step loads the nearest snapshot and replays the execution until +the required instruction is met. + +Reverse continue may include several passes of examining the execution +between the snapshots. Each of the passes include the following steps: + + #. loading the snapshot + #. replaying to examine the breakpoints + #. if breakpoint or watchpoint was met + + * loading the snapshot again + * replaying to the required breakpoint + + #. else + + * proceeding to the p.1 with the earlier snapshot + +Therefore usage of the reverse debugging requires at least one snapshot +created. This can be done by omitting ``snapshot`` option +for the block drives and adding ``rrsnapshot`` for both record and replay +command lines. +See the :ref:`snapshotting-label` section to learn more about running reco= rd/replay +and creating the snapshot in these modes. + +When ``rrsnapshot`` is not used, then snapshot named ``start_debugging`` +created in temporary overlay. This allows using reverse debugging, but with +temporary snapshots (existing within the session). --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528766; cv=none; d=zohomail.com; s=zohoarc; b=Ln76turCkWSOA+3lrbP0w4n8wfco1kcG+LPAOu450aAzLX3YMdq4b4xxcpl4xNjbGyRRUhwHocVvi1MSXknPATuZEAPs3Vj+Nrztig/OQpuQ57/ZDHoxr4Jh/m8B1KZQJwaQI4yb95eBUDsshKEuoqTdOSIJSqd1tl+Jf+GowaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528766; 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=Fh/CmWAPDnDHWATVLpMVxiBBAmG9rkDP5JOt4C8luME=; b=WXVJ/dP5Ts0Kb/SjnrHFRMGNqCMb3/vmV/PbWiPBVq6+hd4RCjf0s94MR/jbCFNAmqVqYBCVEj+HUNoc2ErgpYxtSJkuS51kVnAkC9etBPaLblC4l0oB+26SGug3vpdVHUlukFD37HE2rZlYHXxvAC7IOclLNYipTdjCY4hu5yg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528766424765.1258786263207; Mon, 6 Jun 2022 08:19:26 -0700 (PDT) Received: from localhost ([::1]:54976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEVn-0004Sa-Mv for importer@patchew.org; Mon, 06 Jun 2022 11:19:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrz-0003gZ-34 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:38:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Xo-JM for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:38:14 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-6OMvgc6FMpyznj2frmj5mA-1; Mon, 06 Jun 2022 10:37:11 -0400 Received: by mail-wm1-f70.google.com with SMTP id ay1-20020a05600c1e0100b0039c3a3fc6a4so4861935wmb.4 for ; Mon, 06 Jun 2022 07:37:11 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id r63-20020a1c2b42000000b003971fc23185sm20643288wmr.20.2022.06.06.07.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526232; 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=Fh/CmWAPDnDHWATVLpMVxiBBAmG9rkDP5JOt4C8luME=; b=Z6aH91MPsrj1zg1mGOZDj5wazMWHGIwmPqTMmT47ig5Sdc17MvO9OUZEG2tNhtQyJkTX0B 1+yKfq8qJVHGCJQ+qzLC0D4C1PsdXwl8T0ZTOCbB+xkWXzN6skjGK3dKUFeG7ddI1B6Gdr iwf4HBuTpz1Sz+cdxh84yYGGnmY5/FE= X-MC-Unique: 6OMvgc6FMpyznj2frmj5mA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fh/CmWAPDnDHWATVLpMVxiBBAmG9rkDP5JOt4C8luME=; b=W2eV9CtbSz9JE7m2Tu+4NtYr+ESiH1Lp7dNt+RzNunTRkquTkxewmzCN25mjbSozJe /1PPe86u9giFeViy1OoNI+uGPnQwt0s/gPnrYqEX5c2YQQ4I4gX+a3jEuAzGdNm2ffTY hfTEwNUE2mSY7329HZuACSEgX1yAatLVxnhVU77km4dEVceo9L4mJoksZkQ4R2S21kDE bKrgYa8UDTh84lIgPrEteCklcrzmm+BvTF3W1MCdBBIy6bnER2UwYZVl8bgkLKl8k1lw 9HhWaLD6CuGezs3sNCmcGIhrSKb/gA8fZIJAgARq7w0++M1UvGXRz0CdWI9bulTO0/Df D6cw== X-Gm-Message-State: AOAM533UYgeRBKWb/V27snyps7OxAqbf6trrpfbDH9EHNyUTveQyNvFj gNraB3gSosUt3Kkd7PSnvZA3X/qcpjPLNl8Z7s3uJcFeueSvBQ8QfR/W+TX0j0vAhHYDxwa5DIZ JU2t87fxUIXDMwbJNuW00qapMFrMYiajOfXlQDyHKJC7s1anmIlJJk7n7OPOB7yoGrRM= X-Received: by 2002:adf:e2c9:0:b0:20c:dbc2:a411 with SMTP id d9-20020adfe2c9000000b0020cdbc2a411mr21754744wrj.391.1654526229983; Mon, 06 Jun 2022 07:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU5hmTksslLdjFtxmUVEwoytInUFFmdaWEbatammZ7+x7w6e96amBswk4NaisZaY6wVcA2Ng== X-Received: by 2002:adf:e2c9:0:b0:20c:dbc2:a411 with SMTP id d9-20020adfe2c9000000b0020cdbc2a411mr21754709wrj.391.1654526229611; Mon, 06 Jun 2022 07:37:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk Subject: [PULL 12/29] tests/avocado: update replay_linux test Date: Mon, 6 Jun 2022 16:36:27 +0200 Message-Id: <20220606143644.1151112-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528768298100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk Message-Id: <165364840253.688121.10404266209986316381.stgit@pasha-ThinkPad-= X280> Signed-off-by: Paolo Bonzini --- tests/avocado/replay_linux.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 15953f9e49..1099b5647f 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -32,9 +32,16 @@ class ReplayLinux(LinuxTest): bus =3D 'ide' =20 def setUp(self): - super(ReplayLinux, self).setUp() + # LinuxTest does many replay-incompatible things, but includes + # useful methods. Do not setup LinuxTest here and just + # call some functions. + super(LinuxTest, self).setUp() + self._set_distro() self.boot_path =3D self.download_boot() - self.cloudinit_path =3D self.prepare_cloudinit() + self.phone_server =3D cloudinit.PhoneHomeServer(('0.0.0.0', 0), + self.name) + ssh_pubkey, self.ssh_key =3D self.set_up_existing_ssh_keys() + self.cloudinit_path =3D self.prepare_cloudinit(ssh_pubkey) =20 def vm_add_disk(self, vm, path, id, device): bus_string =3D '' @@ -50,7 +57,9 @@ def launch_and_wait(self, record, args, shift): vm =3D self.get_vm() vm.add_args('-smp', '1') vm.add_args('-m', '1024') - vm.add_args('-object', 'filter-replay,id=3Dreplay,netdev=3Dhub0por= t0') + vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=3Dvnet') + vm.add_args('-object', 'filter-replay,id=3Dreplay,netdev=3Dvnet') if args: vm.add_args(*args) self.vm_add_disk(vm, self.boot_path, 0, self.hdd) @@ -75,8 +84,8 @@ def launch_and_wait(self, record, args, shift): stop_check=3D(lambda : not vm.is_runni= ng())) console_drainer.start() if record: - cloudinit.wait_for_phone_home(('0.0.0.0', self.phone_home_port= ), - self.name) + while not self.phone_server.instance_phoned_back: + self.phone_server.handle_request() vm.shutdown() logger.info('finished the recording with log size %s bytes' % os.path.getsize(replay_path)) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527177; cv=none; d=zohomail.com; s=zohoarc; b=d3BE9Mk3ZXlKmxkTHlwbKazmiBKCKCsU2CYnV5fZR1m+hay48RhcfTu5e+4PrHvZYlw26ZGyrYNe6hh0a7896OQUfKmK44MRTzQ6c3PJ6ioTcM2HRNB9E2hjk9BiVccJlzeE37lf0+VF2zMkF0sFLAjy6jpYP8jzr6NhNzorSnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527177; 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=+t3gkwgGwLSHvcNvt1joAtKEz1aMI4Lc04QL7sM58NE=; b=NXs0yqFLO6uQMw4/vblh7Fl8d7hn+4AImloO8WyeQsa7kujdq4FAIdw2SFbmeoPQsfEL16pRI44EpJ8Vqak0XRZrCAsWWoyFW9MvZvHDfLbhPG6fFWVCHjq0t/1g+eG83rK3EFwKkOZ/oaLjX1B4fgYceueQn8cBJ0CThM+1KNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527177637977.2567058556423; Mon, 6 Jun 2022 07:52:57 -0700 (PDT) Received: from localhost ([::1]:50700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE6B-0003xc-WB for importer@patchew.org; Mon, 06 Jun 2022 10:52:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr7-00025e-Ri for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000Y0-Mg for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:21 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-628-t_RliPABNi2qUlqAq2byxw-1; Mon, 06 Jun 2022 10:37:13 -0400 Received: by mail-wm1-f69.google.com with SMTP id o23-20020a05600c511700b0039743cd8093so7797860wms.6 for ; Mon, 06 Jun 2022 07:37:13 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id bv18-20020a0560001f1200b002183cedbf34sm3176040wrb.73.2022.06.06.07.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526234; 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=+t3gkwgGwLSHvcNvt1joAtKEz1aMI4Lc04QL7sM58NE=; b=EofvFlICZzbvC/sFpu9uXlC/YDOPNA1rYu9D8bt2KI1snCuNY/UEc68aW0LHfUhQYfyqdT AgNdCv+lHmfmZ0LFcelj9H03BeeH8gpK94CCwc1m9HgSwunge0sH9BXRsTukAjN4xuVHGs KSD+gmWenC36k/88GN7rj20TzNF2nGo= X-MC-Unique: t_RliPABNi2qUlqAq2byxw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+t3gkwgGwLSHvcNvt1joAtKEz1aMI4Lc04QL7sM58NE=; b=fRNuGS0szGWHTCmQ5xMZZVYVd/b0hUDwWzy+dFN+HvwyBD42G00YCMOvOBg1DNf94k CqBWKoKyewhEiv+WVsdk3n/L5Qoy4PAZ+1zjOK5r4S0bjw5+x+IQDvM+zk3m7GqT/DK0 d/pbu4AZoXSQiZ6uxccZeBl6k79Mh6biprLZeMr2JMk+t0G7cA42DiC8sS4cge8wf/1l HXrkz9kD7I/7QtO/R4TwaKUqWf4cDOif9Raie/4g5BxF9Xc8JEUCDSLYT9Av8CKhCApR wE6AWkLWqIJbSiNq51Tyj83nzyENm7Aq7o9bnnyp2/M4Fr1Bp11iZLQNlicJhW7lRxQs IXiQ== X-Gm-Message-State: AOAM5321xHKviSWDEVfYd7fYDUypsyuBFPwsrNauworbDtySjWdkgL5Z 4xFKX7JOgSZ+B9IkRWqu6nLvVrzuk1SvdSge4QQJl39jzwheIcK9pGQjZtJ3lyES5aDrYD+17Zm yagC5YWyClKi9YQVm7sF8L29+k5TiqDJDMblGskEh1Hz0dAC1qdrsi0DJL5g+ZCbQ0co= X-Received: by 2002:a05:6000:244:b0:210:cc02:889a with SMTP id m4-20020a056000024400b00210cc02889amr22564052wrz.141.1654526231731; Mon, 06 Jun 2022 07:37:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrXkIGSYB8gyNcDxqlYhKfftHY1+ntg1RcE3h1KbikZh40jqf/nPhptAaZb1Z11xquLGmDrw== X-Received: by 2002:a05:6000:244:b0:210:cc02:889a with SMTP id m4-20020a056000024400b00210cc02889amr22564018wrz.141.1654526231400; Mon, 06 Jun 2022 07:37:11 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk Subject: [PULL 13/29] tests/avocado: add replay Linux tests for virtio machine Date: Mon, 6 Jun 2022 16:36:28 +0200 Message-Id: <20220606143644.1151112-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527179613100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk Message-Id: <165364840811.688121.11931681195199516354.stgit@pasha-ThinkPad-= X280> Signed-off-by: Paolo Bonzini --- tests/avocado/replay_linux.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 1099b5647f..3bb1bc8816 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -123,3 +123,29 @@ def test_pc_q35(self): :avocado: tags=3Dmachine:q35 """ self.run_rr(shift=3D3) + +@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') +class ReplayLinuxX8664Virtio(ReplayLinux): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dvirtio + :avocado: tags=3Daccel:tcg + """ + + hdd =3D 'virtio-blk-pci' + cd =3D 'virtio-blk-pci' + bus =3D None + + chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' + + def test_pc_i440fx(self): + """ + :avocado: tags=3Dmachine:pc + """ + self.run_rr(shift=3D1) + + def test_pc_q35(self): + """ + :avocado: tags=3Dmachine:q35 + """ + self.run_rr(shift=3D3) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527418; cv=none; d=zohomail.com; s=zohoarc; b=JSiG5R/Ex3NXg0/YeOqWYP/TuZTIwfGpk/cm8cNiNsF3hbbQnPCkIeEm9nq0OFc9q2dxjz9juasY6fyDDZhXLakuXxYV5aPSaavC1gC0mreAqomz2yjc/T6lqaSNmtnmUGVHNtB/0v1j++3f9SI7H07fgu/ZBu0RF88ZP8TO69Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527418; 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=8L7JgI2F5oBbZ3TmKr5ty/PB+j+A2om4APNZtjbcNQU=; b=bAH6heLfOAV4EgtIg6Pqbmw468de8m5b/TXJx6GzFS8DQln+jblQ5oOBDEQ2umquCssVJ9zOCFuCieWVodjkfLUQpv8gjNJaMccTXWq1mJfR4VYmel/2kg6LqT3bd3M9tbWkooyD/39LeexmvPgyy5iZCNu9tZ+ig9L/32rmvug= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527418153448.54433581053763; Mon, 6 Jun 2022 07:56:58 -0700 (PDT) Received: from localhost ([::1]:33100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEA4-0002oi-NQ for importer@patchew.org; Mon, 06 Jun 2022 10:56:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr9-00029K-5V for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr4-0000YW-Od for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:22 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-212-rsRQwwntPCi9fqoIAkuJwQ-1; Mon, 06 Jun 2022 10:37:15 -0400 Received: by mail-wm1-f71.google.com with SMTP id k16-20020a7bc310000000b0038e6cf00439so7822488wmj.0 for ; Mon, 06 Jun 2022 07:37:15 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id u4-20020adff884000000b00210288c55d0sm15501769wrp.52.2022.06.06.07.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526236; 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=8L7JgI2F5oBbZ3TmKr5ty/PB+j+A2om4APNZtjbcNQU=; b=S2iBQOO8oHpmtb2C05QlMfP1zXTP8vHyj6W5RddmjA2Xb6F3cDkPvmIsYvVzAu3Qo+qUVk JqLPQVxoyzDICdHXd4bq8CsDex8Bjsjbq6ieAUv3a43V0J/DqSWVNDcIJFclDWLJzZ8YBj skvzj2W9fRH0RGxzuXI5/JFlcoZJqek= X-MC-Unique: rsRQwwntPCi9fqoIAkuJwQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8L7JgI2F5oBbZ3TmKr5ty/PB+j+A2om4APNZtjbcNQU=; b=NkWBu8nldxF6/TZN2OC6wH6owTFAYvADekua0BoANpUADgg0WzZN7wZP4z2mrAgAhy 8D5AuAkFx538tQIRHFGF4tdsY9lkC8WjDQhlEywbHBniuGsPvS7sGWZnyHSpqLze+7Wg Lr7mrzNLk2/KlVCb0vgr4WSY/lutmEnoUWl3NcIZcezkP0WEDBFwbG/KLVKoHDkWCbIC askDYUVXKiBA2IUNFKReGRQIAOnTg2FXxKaybR+sFKYjrbkmqYD5HJbuUAcfl6/Ucw7M fyyqciAKfZ1bTT9lJ6+jPGLgToLxeJI0oXAoNb+8gIZRnbo1KETSSUa4drEx3ZfxTMDT S4qg== X-Gm-Message-State: AOAM530MqVeUn38MjHA5O1Uwto4AhsBK6wRUmEt5TySr5MEaN/kI/aE/ bOlR8a+Wd3TXIIAlRhJQNdFhTlscSlxhlQdDeT9V/NnFQTiBnUb5u1xi7s1mXLm4+wk12z9PYwV dGgMcPwmA7zEtBJIgmoa72uuQy6axFgKu4NCJpDvwrg3ywoHDy2PLDKF0pDPbzuXnjkA= X-Received: by 2002:adf:d1ca:0:b0:218:47c0:c4d2 with SMTP id b10-20020adfd1ca000000b0021847c0c4d2mr2017432wrd.639.1654526233763; Mon, 06 Jun 2022 07:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEu2jNBALN6ezVTbKZjoeNpN7R+6cnXGbMiNigYCAX+g1Ts/Qnx5b/s/sm+sTBXnUyAYq3sw== X-Received: by 2002:adf:d1ca:0:b0:218:47c0:c4d2 with SMTP id b10-20020adfd1ca000000b0021847c0c4d2mr2017393wrd.639.1654526233335; Mon, 06 Jun 2022 07:37:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pavel Dovgalyuk , Pavel Dovgalyuk Subject: [PULL 14/29] tests/avocado: add replay Linux test for Aarch64 machines Date: Mon, 6 Jun 2022 16:36:29 +0200 Message-Id: <20220606143644.1151112-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527418967100001 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk Message-Id: <165364841373.688121.8868079200312201658.stgit@pasha-ThinkPad-X= 280> Signed-off-by: Paolo Bonzini --- tests/avocado/replay_linux.py | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 3bb1bc8816..40e4f6908e 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -13,6 +13,7 @@ import time =20 from avocado import skipUnless +from avocado_qemu import BUILD_DIR from avocado.utils import cloudinit from avocado.utils import network from avocado.utils import vmimage @@ -149,3 +150,42 @@ def test_pc_q35(self): :avocado: tags=3Dmachine:q35 """ self.run_rr(shift=3D3) + +@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') +class ReplayLinuxAarch64(ReplayLinux): + """ + :avocado: tags=3Daccel:tcg + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + :avocado: tags=3Dcpu:max + """ + + chksum =3D '1e18d9c0cf734940c4b5d5ec592facaed2af0ad0329383d5639c997fdf= 16fe49' + + hdd =3D 'virtio-blk-device' + cd =3D 'virtio-blk-device' + bus =3D None + + def get_common_args(self): + return ('-bios', + os.path.join(BUILD_DIR, 'pc-bios', 'edk2-aarch64-code.fd'), + "-cpu", "max,lpa2=3Doff", + '-device', 'virtio-rng-pci,rng=3Drng0', + '-object', 'rng-builtin,id=3Drng0') + + def test_virt_gicv2(self): + """ + :avocado: tags=3Dmachine:gic-version=3D2 + """ + + self.run_rr(shift=3D3, + args=3D(*self.get_common_args(), + "-machine", "virt,gic-version=3D2")) + + def test_virt_gicv3(self): + """ + :avocado: tags=3Dmachine:gic-version=3D3 + """ + + self.run_rr(shift=3D3, + args=3D(*self.get_common_args(), --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527884; cv=none; d=zohomail.com; s=zohoarc; b=DEcshr/sdVfTzCbYp7h5MZVuloAmfvTJqtLXSrNl8JBnSsN9BXwxk6JnZE3lVJS3g02kb2FSmBx9fjHH/VAm04HUA6+r4iG/oHGCcF/cGIuKhIubAoRfUo6zU+0tkX6ZxXxqYFyegEuYUmPLtWx9/t9Hpl4MGjPj0hYQuDHLr4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527884; 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=kM387v1WsabA4prRH3l5I9WuqejFFO0SIdWUvFlOYXs=; b=JbM7U+OdPGp4FbNMHeZBfGWdREsy4By0JNzfmYQw3wPN9vGQv2R0q0rSuSd595N6zF6UsXXTO+SMpQjK/x8lbw+/MksUj7OZkPE9Kuurz7aI9dEfVbBnuntqdfbqcvrzZb9vaioRtvukfOfELRh/DpJn2rlvnVzRl8+cyF2DNF4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527884050764.6107307304032; Mon, 6 Jun 2022 08:04:44 -0700 (PDT) Received: from localhost ([::1]:50240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEHa-0006eZ-UI for importer@patchew.org; Mon, 06 Jun 2022 11:04:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrF-0002O9-HP for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr6-0000aS-IC for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:29 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-300-Q32B0ZCTPnCbL3ywODBvpQ-1; Mon, 06 Jun 2022 10:37:17 -0400 Received: by mail-wr1-f71.google.com with SMTP id d9-20020adfe849000000b00213375a746aso2396029wrn.18 for ; Mon, 06 Jun 2022 07:37:17 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id o17-20020a5d6711000000b00218453adaefsm1551558wru.101.2022.06.06.07.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526239; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kM387v1WsabA4prRH3l5I9WuqejFFO0SIdWUvFlOYXs=; b=TRdEROjVluuUFRuGMT7TRF8co1q/OMGjoUE85n5sXBoBqKNVi7acjUceB2jAv+MD9hHHaV UVIVRGexyDn89/Uamx+X632Z2aZFNDNJZq5QKONy9KmJyP1Rv/TrqczCbASjioo1aKR1hL BTG1BY2cZNojCygyHo8WBPbqZC1Hjow= X-MC-Unique: Q32B0ZCTPnCbL3ywODBvpQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kM387v1WsabA4prRH3l5I9WuqejFFO0SIdWUvFlOYXs=; b=fwaAu8BphpJBzg5NM28oG1O+bY+NVKGToB8uYu7aBBMsE4YBKufMKXLTyDnX1W68fp 2P4OXgR5bOU7hhbWIiLtsaYr8Z1/Agxd0h3KwK+dBoIyMa2FAuXfOPLJymnRwF1wlU31 syzk1YPU46eK1i8j9gwT/sLztRU6/9A0391bjzkjt6gH0Yv71LbcfB+nKvay+0aXs+Il 6/QiWzjQUitOmiV6mXrvfPQpHHuY0kAL1HPNYI8r02t4bo1pTgi2mdkJajhAR/zrBoWA 1JU7z9AqHTdEjs+KTlKRwtwFG2HepORUZmOVBQVT++NUaghn1cB/s4LabgS2jYfQnjfO X3Dw== X-Gm-Message-State: AOAM530EZFdcnHWiPpDxkR7toF2M/RkiDmN18ax7sxD5tVboq1eulbiF nLOsW/v8tIljT4qsU/55eFUcyG3cnYwZXl0jhH0cXYORwZP59biJCCKIQUaM8wLZHtvk4W/E5PP t/I0BvWwybB+BJslAJSmMyDmjBaIMhzxrwTaWXNPJVV6Pl8+zzV6bq5XK5kH1Fnz6iLQ= X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr51975877wmq.169.1654526235525; Mon, 06 Jun 2022 07:37:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZo/4+Ty8kyv3wS9kujdFV6YEXj4aPI/G9D8MnVdvQjyIm2hS2NJXpcp47apaSUQDQ+rh1RA== X-Received: by 2002:a05:600c:4ec9:b0:397:750a:798a with SMTP id g9-20020a05600c4ec900b00397750a798amr51975818wmq.169.1654526235058; Mon, 06 Jun 2022 07:37:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Dario Faggioli , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 15/29] tests/Makefile.include: Fix 'make check-help' output Date: Mon, 6 Jun 2022 16:36:30 +0200 Message-Id: <20220606143644.1151112-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527884528100001 From: Dario Faggioli Since commit 3d2f73ef75e ("build: use "meson test" as the test harness"), check-report.tap is no more, and we have check-report.junit.xml. Update the output of 'make check-help', which was still listing 'check-report.tap', accordingly. Fixes: 3d2f73ef75e Signed-off-by: Dario Faggioli Message-Id: <165366545439.6869.11633009118019728798.stgit@work> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 6a1688e33e..2a1c77440a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -3,28 +3,28 @@ .PHONY: check-help check-help: @echo "Regression testing targets:" - @echo " $(MAKE) check Run block, qapi-schema, unit, softfl= oat, qtest and decodetree tests" - @echo " $(MAKE) bench Run speed tests" + @echo " $(MAKE) check Run block, qapi-schema, unit, soft= float, qtest and decodetree tests" + @echo " $(MAKE) bench Run speed tests" @echo @echo "Individual test suites:" - @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" - @echo " $(MAKE) check-qtest Run qtest tests" - @echo " $(MAKE) check-unit Run qobject tests" - @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" - @echo " $(MAKE) check-block Run block tests" + @echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target" + @echo " $(MAKE) check-qtest Run qtest tests" + @echo " $(MAKE) check-unit Run qobject tests" + @echo " $(MAKE) check-qapi-schema Run QAPI schema tests" + @echo " $(MAKE) check-block Run block tests" ifneq ($(filter $(all-check-targets), check-softfloat),) - @echo " $(MAKE) check-tcg Run TCG tests" - @echo " $(MAKE) check-softfloat Run FPU emulation tests" + @echo " $(MAKE) check-tcg Run TCG tests" + @echo " $(MAKE) check-softfloat Run FPU emulation tests" endif - @echo " $(MAKE) check-avocado Run avocado (integration) tests for = currently configured targets" + @echo " $(MAKE) check-avocado Run avocado (integration) tests fo= r currently configured targets" @echo - @echo " $(MAKE) check-report.tap Generates an aggregated TAP test rep= ort" - @echo " $(MAKE) check-venv Creates a Python venv for tests" - @echo " $(MAKE) check-clean Clean the tests and related data" + @echo " $(MAKE) check-report.junit.xml Generates an aggregated XML test r= eport" + @echo " $(MAKE) check-venv Creates a Python venv for tests" + @echo " $(MAKE) check-clean Clean the tests and related data" @echo @echo "The following are useful for CI builds" - @echo " $(MAKE) check-build Build most test binaries" - @echo " $(MAKE) get-vm-images Downloads all images used by avocado= tests, according to configured targets (~350 MB each, 1.5 GB max)" + @echo " $(MAKE) check-build Build most test binaries" + @echo " $(MAKE) get-vm-images Downloads all images used by avoca= do tests, according to configured targets (~350 MB each, 1.5 GB max)" @echo @echo @echo "The variable SPEED can be set to control the gtester speed setting= ." --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527908; cv=none; d=zohomail.com; s=zohoarc; b=bR/uFot2ZF9UdfFLeK077mCfrwA/lEsLZBjZftZJjD5UDkyamtmBtAp5zXWHBnaP9T/3xbDq+RYVSMXhOjZ84snkJPB3yPE1QNyaX73hrFBzTE3PLGMgpbb7cn5Oe2m80RFD5Ft9MCff6qDqQTTTZhlGu2fayNJnwUFshTuoza8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527908; 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=xA/i6g37O3wV+vzWwv6rsvsUuDKo9ad/3Fy9sdDIcr0=; b=mNwikZ87qx1RrvlAqHE7ndW21UKlWFmKdH02YgYHJcNSyv0/4Xfc7iows/7HtWyPi0M8teqvSItjdb0fxPsYLZyf06bRAjO+CpDJ7A6x9+4cymSsp/djXzL6eJobvfNfUjHi/l8zcJaa3i9lbMPKvq8G+RebACazVOBN4H0LIlw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527908442728.8037529745189; Mon, 6 Jun 2022 08:05:08 -0700 (PDT) Received: from localhost ([::1]:51154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEHz-0007HY-8y for importer@patchew.org; Mon, 06 Jun 2022 11:05:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrM-0002a2-T8 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr6-0000aZ-Mp for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:36 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-X8pGle4JMnCh5aqIEgIquQ-1; Mon, 06 Jun 2022 10:37:19 -0400 Received: by mail-wm1-f70.google.com with SMTP id n18-20020a05600c3b9200b00397335edc7dso11308534wms.7 for ; Mon, 06 Jun 2022 07:37:18 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id s8-20020a5d69c8000000b002102b16b9a4sm15343292wrw.110.2022.06.06.07.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526240; 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=xA/i6g37O3wV+vzWwv6rsvsUuDKo9ad/3Fy9sdDIcr0=; b=XbvtxOTludWlZ1aSqNeT0XUmGR9qzE07U8aU4A8NcqO3Cy73eSEgEDVh0UQVwIgVSyKWMl iVMWh88x/WiIyGpnmfBGSCk3tGNMkLYXDOpLrflMD/Yx/RBho+XfqVAXRRJbpSW6akCd7+ yOlL1xrgFE+axQc6mw1KrBBUDvc590c= X-MC-Unique: X8pGle4JMnCh5aqIEgIquQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xA/i6g37O3wV+vzWwv6rsvsUuDKo9ad/3Fy9sdDIcr0=; b=Qo2FI/bD7uipZ6ApxgR6+Lp/gWo6pFOlv8jkxfKG9UFRkErhbfeP3WHlcdnym8L9NA rWmIkOd971dBQEArqOkB9KIb4gM7XDnKHhSXDMJiRjn1HafiMjfqNNsaiigs1eYFN9x7 BUXND2YyNS5y6QvMMAMo+gsRCQeUfFhs0JSz5TnjkBrq+NNm9aezpZXQx0aanKlIT0Zo Hw/AP50T7lktdGrBlYqI8g/OZgqwACjB4q8+RaTVFZaIjw+1wY1hTFVSCjFdJqY0EvbH 1P0ONFMzjJNYUttpAA92h9EjQZt6r2UZGquJ90dP3kM89gPkW+S3Q3IAsMeaw6Nku4wS 5eIA== X-Gm-Message-State: AOAM533PnW3oCFdho6pwFlVzwoDZ7B5LCqpnv8OWChS2OuVtXeZz8RIx MDNewtqFR7/+jyOodmRaJuum6VHCu1dMUtDxhJ3NXq60Q1ORbf9YeMSgNYMVt2YD17Ue8OKlQX/ bSgXHOOvE2QTMvJ0ILRH1uLTNksNBkSalIHNArSGVqF2Asrm3I11y1IjmfTM9vp1CbBc= X-Received: by 2002:a05:600c:190b:b0:394:880f:ae2c with SMTP id j11-20020a05600c190b00b00394880fae2cmr22769341wmq.79.1654526237239; Mon, 06 Jun 2022 07:37:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNj298zCXzULXjjBPHChhDO2nYNTFoQ9ObBTRKB1Udlb9bA3DIq8R+oNtjG1BFi1PsiCCOfQ== X-Received: by 2002:a05:600c:190b:b0:394:880f:ae2c with SMTP id j11-20020a05600c190b00b00394880fae2cmr22769304wmq.79.1654526236898; Mon, 06 Jun 2022 07:37:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Igor Mammedov Subject: [PULL 16/29] x86: cpu: make sure number of addressable IDs for processor cores meets the spec Date: Mon, 6 Jun 2022 16:36:31 +0200 Message-Id: <20220606143644.1151112-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527910584100001 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Accourding Intel's CPUID[EAX=3D04H] resulting bits 31 - 26 in EAX should be: " **** The nearest power-of-2 integer that is not smaller than (1 + EAX[31:2= 6]) is the number of unique Core_IDs reserved for addressing different processor cores in a physica= l package. Core ID is a subset of bits of the initial APIC ID. " ensure that values stored in EAX[31-26] always meets this condition. Signed-off-by: Igor Mammedov Message-Id: <20220524151020.2541698-2-imammedo@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9fdfec9d8b..94cc4a8700 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5287,7 +5287,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, = uint32_t count, /* QEMU gives out its own APIC IDs, never pass down bits 31..2= 6. */ *eax &=3D ~0xFC000000; if ((*eax & 31) && cs->nr_cores > 1) { - *eax |=3D (cs->nr_cores - 1) << 26; + *eax |=3D (pow2ceil(cs->nr_cores) - 1) << 26; } } else if (cpu->vendor_cpuid_only && IS_AMD_CPU(env)) { *eax =3D *ebx =3D *ecx =3D *edx =3D 0; --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527317; cv=none; d=zohomail.com; s=zohoarc; b=Fh70Wp10iTXBz0NfOFkpDb7sXOxtpH7mXj9LzLmD6M1S1JhJaVW9htW/6l2C7ps5ln95+MD3N7/jdpK6uwG3xaNCxekyll70DtL/uyfe7dXIwfJjGGeOo89XHL7WSn8RFWNGPUOMuVToekoTC/7pkdOmlYWn1/3rJNuzeXPE4Xc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527317; 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=0Lrvdmzz0T81NDthejZxcrRFndwFvF+/chJqMFxJ2sI=; b=Qj2tL5S1H0qKwDULHyRpHd+l/6k0v0WSyQYhqmOJ0fLse18itctK8KFf5JH7EICIrankezzfszC2hLaCIdzlKOqxypwuDR3ckuRttW6OWPOyDH3TDwosPm+XP3BkutNlau2g+7INP1dLQ6PvafkawMCBds7IEVrjacSYiA4/Oh8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527317414281.0476803212166; Mon, 6 Jun 2022 07:55:17 -0700 (PDT) Received: from localhost ([::1]:56976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE8S-00089h-6L for importer@patchew.org; Mon, 06 Jun 2022 10:55:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrA-0002Do-RI for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:47286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDr8-0000bW-Vb for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:24 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-659-pWklu4ZDM7q8yuDv1ZglhA-1; Mon, 06 Jun 2022 10:37:21 -0400 Received: by mail-wr1-f69.google.com with SMTP id m18-20020adff392000000b0021848a78a53so350080wro.19 for ; Mon, 06 Jun 2022 07:37:21 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id c9-20020adfe749000000b002108ab90e5asm15652885wrn.58.2022.06.06.07.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526242; 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=0Lrvdmzz0T81NDthejZxcrRFndwFvF+/chJqMFxJ2sI=; b=Wcu9QOZ0s17qeCGHJFV1HkAa6wIklmV82j4SeMHu5rwHaUqNQzyjPYKF1xCQ2i5VwVosve NXU6rvHUMxfkicW9hgnjR4pCUPgm2DEP4tkhtdDz5fV0cEbqoQ/X5m5G1B1TbjBKpBm3xh Sy7uk++nW8c3ZsL+JJ4A8hwHxiHao4U= X-MC-Unique: pWklu4ZDM7q8yuDv1ZglhA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0Lrvdmzz0T81NDthejZxcrRFndwFvF+/chJqMFxJ2sI=; b=waMTnde5YYw3f5zN7j5U97Iiaxzj5eqPM8eIOQpqIF1Y1Zs4yAB9qAmhZP2juSUR9L NMQdVMQ6oeNRs637LA6BSGlsMLmaeKcPn1KxJL0pMbcmLTmmU01QsMeznKWctdNBuY0f 2cMXnfCggvDl4uz3ZZOBi+n3f+4OSourkjQmXhwUEMwFIU11Gdx7dkn0N8jHCen19FTy q6HXHf55shWNpgkJVjnBQPFis7fBuEkeNCnUxPg2SIzBGFh0rM+A5b3zYhxucVE52tfC YDT8uGpSYcXK9wpbOvWW5Y/7Skod+r+oi5RiGUmEVVjkNThBSP5akt1lqHgXCkfe1so+ /6+w== X-Gm-Message-State: AOAM530D77eyaGGuaWHpZsiI5L8AUxtiZiam6gITZ8e8fEOhSiD26fLY ADRo+jPIb1phkXaqtTL/xcIM/NTslqNV1jjIwZmSFOZdvQfYqP8DGhOjD5hghF/4e32oty1y6IZ fwhzQSvdiDS1n1y4IrmLm8PsIskITUBgHRqNWlvoET0T97MPGTqQT4YYdzMKii8mQSTs= X-Received: by 2002:a05:600c:4e4d:b0:397:5009:bcf1 with SMTP id e13-20020a05600c4e4d00b003975009bcf1mr52168806wmq.66.1654526239251; Mon, 06 Jun 2022 07:37:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5lOX0YqmvEtZHIssRajiSmdSgZoarJMLaMxsThWPFjxdASCibEcuhe8xqyf8488o0uy3oiQ== X-Received: by 2002:a05:600c:4e4d:b0:397:5009:bcf1 with SMTP id e13-20020a05600c4e4d00b003975009bcf1mr52168755wmq.66.1654526238720; Mon, 06 Jun 2022 07:37:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Igor Mammedov Subject: [PULL 17/29] x86: cpu: fixup number of addressable IDs for logical processors sharing cache Date: Mon, 6 Jun 2022 16:36:32 +0200 Message-Id: <20220606143644.1151112-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527318563100001 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov When QEMU is started with '-cpu host,host-cache-info=3Don', it will passthrough host's number of logical processors sharing cache and number of processor cores in the physical package. QEMU already fixes up the later to correctly reflect number of configured cores for VM, however number of logical processors sharing cache is still comes from host CPU, which confuses guest started with: -machine q35,accel=3Dkvm \ -cpu host,host-cache-info=3Don,l3-cache=3Doff \ -smp 20,sockets=3D2,dies=3D1,cores=3D10,threads=3D1 \ -numa node,nodeid=3D0,memdev=3Dram-node0 \ -numa node,nodeid=3D1,memdev=3Dram-node1 \ -numa cpu,socket-id=3D0,node-id=3D0 \ -numa cpu,socket-id=3D1,node-id=3D1 on 2 socket Xeon 4210R host with 10 cores per socket with CPUID[04H]: ... --- cache 3 --- cache type =3D unified cache (3) cache level =3D 0x3 (3) self-initializing cache level =3D true fully associative cache =3D false maximum IDs for CPUs sharing cache =3D 0x1f (31) maximum IDs for cores in pkg =3D 0xf (15) ... that doesn't match number of logical processors VM was configured with and as result RHEL 9.0 guest complains: sched: CPU #10's llc-sibling CPU #0 is not on the same node! [node: 1 != =3D 0]. Ignoring dependency. WARNING: CPU: 10 PID: 0 at arch/x86/kernel/smpboot.c:421 topology_sane.i= sra.0+0x67/0x80 ... Call Trace: set_cpu_sibling_map+0x176/0x590 start_secondary+0x5b/0x150 secondary_startup_64_no_verify+0xc2/0xcb Fix it by capping max number of logical processors to vcpus/socket as it was configured, which fixes the issue. Signed-off-by: Igor Mammedov Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=3D2088311 Message-Id: <20220524151020.2541698-3-imammedo@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 94cc4a8700..6a57ef13af 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5284,10 +5284,22 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index= , uint32_t count, /* cache info: needed for Core compatibility */ if (cpu->cache_info_passthrough) { x86_cpu_get_cache_cpuid(index, count, eax, ebx, ecx, edx); - /* QEMU gives out its own APIC IDs, never pass down bits 31..2= 6. */ - *eax &=3D ~0xFC000000; - if ((*eax & 31) && cs->nr_cores > 1) { - *eax |=3D (pow2ceil(cs->nr_cores) - 1) << 26; + /* + * QEMU has its own number of cores/logical cpus, + * set 24..14, 31..26 bit to configured values + */ + if (*eax & 31) { + int host_vcpus_per_cache =3D 1 + ((*eax & 0x3FFC000) >> 14= ); + int vcpus_per_socket =3D env->nr_dies * cs->nr_cores * + cs->nr_threads; + if (cs->nr_cores > 1) { + *eax &=3D ~0xFC000000; + *eax |=3D (pow2ceil(cs->nr_cores) - 1) << 26; + } + if (host_vcpus_per_cache > vcpus_per_socket) { + *eax &=3D ~0x3FFC000; + *eax |=3D (pow2ceil(vcpus_per_socket) - 1) << 14; + } } } else if (cpu->vendor_cpuid_only && IS_AMD_CPU(env)) { *eax =3D *ebx =3D *ecx =3D *edx =3D 0; --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527679; cv=none; d=zohomail.com; s=zohoarc; b=Q4CsqVtD+pUpRlXr8vElnpMNe2A/cktFohDYjcjBL2aLCexxP/tmpxtfHPL8enhioR26BYZSfpCmSjnFTc+K8wtWotwS7w/DR1D9ZXUnxhXJ0+11B6Fk2NskE+YBHs8RzLuFJgihTd73TkLsHzL7s1TsHUh3gvF+een6GgGeOTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527679; 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=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=Mzb+MeHw88HvxP90iz7WGAylHAogE5j6zFmy9+j4f6EgipAbG178qgxSR8k3u9NYYjA1r/QMj0GXqAUT5O1Hj9WpyVJhspEsQMr2EbvCosHSdw8iTYPpFmY7eYhIf17IewD0pNGGj/kq98hknCWj1Ya959RTzL5WdVO715uYQWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527679707660.183406993264; Mon, 6 Jun 2022 08:01:19 -0700 (PDT) Received: from localhost ([::1]:41558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEEI-0000Lp-AD for importer@patchew.org; Mon, 06 Jun 2022 11:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrC-0002IJ-V1 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrA-0000bp-8x for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:25 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-604-u2arxXBnOqKE-0syQWibAw-1; Mon, 06 Jun 2022 10:37:22 -0400 Received: by mail-wm1-f72.google.com with SMTP id k15-20020a7bc40f000000b0039c4b7f7d09so2042073wmi.8 for ; Mon, 06 Jun 2022 07:37:22 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id l14-20020adfe58e000000b002117ef160fbsm15179552wrm.21.2022.06.06.07.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526243; 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=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=L4htsJbtA+Q/fvL0bKmnncPjkA2fu1yoCogFkD9lTw83qKFd8f6SWQ5R7wTRsB4MF80PUo 3FwZWgYgY+ZjW4G2dt9UwUQQagwHWANt9o3gwOHvzjE+Z8F0/YPO7HfxCo3tHY1JClqyXR cyOwdH5dZik9vkX/Vy7wBrsza2nbrfA= X-MC-Unique: u2arxXBnOqKE-0syQWibAw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D7GE7wKxGfHrqOlyrA6BhbVBFiuUOVNOslDOFIi1kLg=; b=yrCf8d+D3d3+Yo+m9RVajYe2D/OaNEW29k9PcG97Dt4NLW/8YZXzCmRLAaxp/l6etN DR/9XLKU7YEcCJ7AOAarY29+Q6YbFTDfP2xS1OVln4T6ZVnHl0TraFfuiki+fOUFIE1K cUxoLCEETKv+4eiBLP1+UzTGj8VMy9O1MTWCVXYWBlOIBMFVXVHc/ENRJdFMPgdu5l14 mawrt5C48HZAX01eXCj1WGAAfZGPCS+4yz5CRl6caa/bNvWnREL7JEjf337JigK7eviQ M8lLLVs8J3nLXafzkm0sAF+kBf7RE0jpxQlakKzp1OETtTcDeTgL09YHw1f0jw0QAx8I QcOw== X-Gm-Message-State: AOAM531PH/AXaDZM7IAvvh3jshqEu+NU4hsG/TrTqUlRixkRc6LVuz9k oinN7hCcjYQatV2vpL9f5C1NtnwTVjwGL8fv+yM9EijKqtmxDE7wcFJk5HFtPDyVnF2NMeA37RS BFlvP0EpLycKj0dsTEpG99hg2DqWIFZnohGVgwYbeR0sbSdnNsc8DQ1Ttu8j72t9mFno= X-Received: by 2002:a5d:498f:0:b0:215:4d13:477e with SMTP id r15-20020a5d498f000000b002154d13477emr14969372wrq.155.1654526240900; Mon, 06 Jun 2022 07:37:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzITWb9SD9O5mYoBZHn8wf9NkkK4WNMVHcyglNFnyyYQQMbphRbnWAuBUpeMSyx/rtYvgrHWA== X-Received: by 2002:a5d:498f:0:b0:215:4d13:477e with SMTP id r15-20020a5d498f000000b002154d13477emr14969330wrq.155.1654526240439; Mon, 06 Jun 2022 07:37:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 18/29] python: update for mypy 0.950 Date: Mon, 6 Jun 2022 16:36:33 +0200 Message-Id: <20220606143644.1151112-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527680922100001 Content-Type: text/plain; charset="utf-8" From: John Snow typeshed (included in mypy) recently updated to improve the typing for WriteTransport objects. I was working around this, but now there's a version where I shouldn't work around it. Unfortunately this creates some minor ugliness if I want to support both pre- and post-0.950 versions. For now, for my sanity, just disable the unused-ignores warning. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-2-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- python/qemu/qmp/util.py | 4 +++- python/setup.cfg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/util.py b/python/qemu/qmp/util.py index eaa5fc7d5f..ca6225e9cd 100644 --- a/python/qemu/qmp/util.py +++ b/python/qemu/qmp/util.py @@ -40,7 +40,9 @@ async def flush(writer: asyncio.StreamWriter) -> None: drain. The flow control limits are restored after the call is completed. """ - transport =3D cast(asyncio.WriteTransport, writer.transport) + transport =3D cast( # type: ignore[redundant-cast] + asyncio.WriteTransport, writer.transport + ) =20 # https://github.com/python/typeshed/issues/5779 low, high =3D transport.get_write_buffer_limits() # type: ignore diff --git a/python/setup.cfg b/python/setup.cfg index e877ea5647..c2c61c7519 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -79,6 +79,7 @@ strict =3D True python_version =3D 3.6 warn_unused_configs =3D True namespace_packages =3D True +warn_unused_ignores =3D False =20 [mypy-qemu.utils.qom_fuse] # fusepy has no type stubs: --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527449; cv=none; d=zohomail.com; s=zohoarc; b=EfOAGHgH4zIh7lFsMK9k60ILXKgZvryKo5l1+HB4ue4C0M+NQksUdRp1i75bcJUPem5aba6OXQeX90OsrBytmlIEMtFOkEfICuD4Cp+aPeZSvamIgYkao2I20vYGPP7WkVSNnsXa1dS6dGQR7MwTE3s8YR83v+uQ+sACn0uLoiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527449; 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=ydCPV3AL2yJ4gisp+0rL/mAMFC2dKDpKV3qo4Abk2gs=; b=Tyhcp2y5BkA2wA/lsRyTJ6AuUMqjFlL7ZIQJpHTJapIIkw2tJ5izOsnKASFj4L3kuBU7F8CK/2w7FRATo5GP0rhzW/bOzCvs8+hP8zdMoorlKNLfHhKVeEhs4uHaU/eJkK99pUgKixHvuu8UfR7WpOOEvRdSCCZ18CVIWK7WETc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527449390770.66412665925; Mon, 6 Jun 2022 07:57:29 -0700 (PDT) Received: from localhost ([::1]:34326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEAa-0003k2-60 for importer@patchew.org; Mon, 06 Jun 2022 10:57:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrF-0002PI-RJ for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:31861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrD-0000c2-7G for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:29 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-589-XGAZTxrdN8y_MJd9EIx51A-1; Mon, 06 Jun 2022 10:37:24 -0400 Received: by mail-wm1-f72.google.com with SMTP id bi22-20020a05600c3d9600b0039c4144992cso3964983wmb.5 for ; Mon, 06 Jun 2022 07:37:24 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id 186-20020a1c19c3000000b0039c4ec6fdacsm3739358wmz.40.2022.06.06.07.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526245; 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=ydCPV3AL2yJ4gisp+0rL/mAMFC2dKDpKV3qo4Abk2gs=; b=K0c/VZNQm+BRY6pVOHdsplosSoAdfUPzpx0cW84nAyDzuZBrsrVP+koQNS1fu8DXiMzvOR 0U9mDWzMNsSrgaDDIthjs9bjucLs3Z4vASQNf3fQDV/lq52j4Nuv6APHqu2c+yczMhKUUA i7QCwY4zU8AjsnaadiUTKnlB5rnDPC0= X-MC-Unique: XGAZTxrdN8y_MJd9EIx51A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ydCPV3AL2yJ4gisp+0rL/mAMFC2dKDpKV3qo4Abk2gs=; b=WWvmrIUNK07YU1kuavZhNZZBTmI9ciECK5nnlj9Z2/Stnxz6gNqe3sYiYAeNNNUm5a o7Rt7uEfT4ah3Z4loM0e7vfSNgTcIBZ1SajkGKYcjma0oy/ua5jw8CubdAa2zaj/jkft NXnkwDBL2EkGj76Yng+H6n+mVQuj2jmBD9PaR9M9kS9abL6hhlWlTH5932Gs0TqdNTI4 erNFGxP99g6bpSn23ca4fS23xFnxbCqUVQKHSjdVvFn5B/02cKtb5DbGRz60vqoswlD5 Ckt4SybF87Z8jv1t37AgN6vIV6heLUFDq0YXntFZl37sHmRp7tNb9uM0fMmfkBo9+yL6 2IjQ== X-Gm-Message-State: AOAM532Yi+G1d8NNhB/OiYaBUrWqgZlEmSnq10LlGaFpGyFAhm79J6by i6uwJbfFd1kO6R2dkHweP7Z2jjHPIcu0MglWRA8dIsWGuOMutmYgyKOwtjTcMout6DYHkrUBouD VtOuww46SfhhGji/QmrW4WJ0dvVBuZ1Xv3AXxJwV/WDb74W2UJdV62xaYHa434TbvQ1w= X-Received: by 2002:a5d:594a:0:b0:212:3ad0:5bac with SMTP id e10-20020a5d594a000000b002123ad05bacmr21839203wri.393.1654526242729; Mon, 06 Jun 2022 07:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN4XHl+9kQNCYoczYoqZlVVoAsHL+PWrZ4jVsDz7CnuGb3/56Wa6Z5hmRLIP34ppn1ngVBUQ== X-Received: by 2002:a5d:594a:0:b0:212:3ad0:5bac with SMTP id e10-20020a5d594a000000b002123ad05bacmr21839172wri.393.1654526242398; Mon, 06 Jun 2022 07:37:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 19/29] tests: add "TESTS_PYTHON" variable to Makefile Date: Mon, 6 Jun 2022 16:36:34 +0200 Message-Id: <20220606143644.1151112-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527451199100001 Content-Type: text/plain; charset="utf-8" From: John Snow This is a convenience feature: $(PYTHON) points to the Python executable we were instructed to use by the configure script. We use that Python to create a virtual environment with the "check-venv" target in tests/Makefile.include. $(TESTS_PYTHON) points to the Python executable belonging to the virtual environment tied to the build. This Python executable is a symlink to the binary used to create the venv, which will be the version provided at configure time. Using $(TESTS_PYTHON) therefore uses the $(PYTHON) executable, but with paths modified to use packages installed to the venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-3-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 2a1c77440a..50237f073a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,6 +89,7 @@ TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.= fa, $(ninja-targets))) TESTS_VENV_DIR=3D$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=3D$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results +TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python ifndef AVOCADO_TESTS AVOCADO_TESTS=3Dtests/avocado endif @@ -108,7 +109,7 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(PYTHON) -m venv $@, \ VENV, $@) $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV= _REQ), \ + $(TESTS_PYTHON) -m pip -q install -r $(TESTS_VENV_REQ), \ PIP, $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 @@ -126,7 +127,7 @@ FEDORA_31_DOWNLOAD=3D$(filter $(FEDORA_31_ARCHES),$(FED= ORA_31_ARCHES_CANDIDATES)) # download one specific Fedora 31 image get-vm-image-fedora-31-%: check-venv $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado vmimage get \ + $(TESTS_PYTHON) -m avocado vmimage get \ --distro=3Dfedora --distro-version=3D31 --arch=3D$*, \ "AVOCADO", "Downloading avocado tests VM image for $*") =20 @@ -135,7 +136,7 @@ get-vm-images: check-venv $(patsubst %,get-vm-image-fed= ora-31-%, $(FEDORA_31_DOW =20 check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado \ + $(TESTS_PYTHON) -m avocado \ --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ --filter-by-tags-include-empty-key) \ --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527711; cv=none; d=zohomail.com; s=zohoarc; b=Bx5PPPWeeSUZq68MWR6HJBW6BRe1gq0rVChQM65utsKj9i2wmCcikoqdW+ovanqeA4Le5QDektufJspAj/S7wdkdCDeYvwuizVEwB/sdZKhQDYNXghjCm5kaWv+P/y3OZOwA5ex+03/Oa8rz4YGbwBRpxxLr6t6VflAYsWxAytg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527711; 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=eHFAZa0D1mkGaSFNbR5sBnh3O6dLrWaXXrtFWWPw/AY=; b=XtXEWzKR0saTxCziZ/Oz+OwKEjJixWCFqFYe/RCOYejDoXGqEf/upi4MHupYPoZmyElbZndPhT7S00H7cPEyhGXfXNxMIzFrtnOrsJh28bzz5eqPCJJnLQWhnMQ4gkqYH+eFi1Y1cwBFUowAUZpXQV0xLnWFAYbLYkDpgp8aFFU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527711183196.89680159528575; Mon, 6 Jun 2022 08:01:51 -0700 (PDT) Received: from localhost ([::1]:42858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEEo-0001G1-68 for importer@patchew.org; Mon, 06 Jun 2022 11:01:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrG-0002S3-CS for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrD-0000cF-OA for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:30 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-438-9KxOL5P0PpC5TSkNl7emqA-1; Mon, 06 Jun 2022 10:37:25 -0400 Received: by mail-wm1-f70.google.com with SMTP id bg40-20020a05600c3ca800b00394779649b1so11305069wmb.3 for ; Mon, 06 Jun 2022 07:37:25 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id l13-20020a05600c4f0d00b0039c55bc2c97sm809048wmq.16.2022.06.06.07.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526247; 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=eHFAZa0D1mkGaSFNbR5sBnh3O6dLrWaXXrtFWWPw/AY=; b=NMaRBC8QxhC7k0mVEzhmuG1RBHj4t3/ePVNVAk7AjgZOFZTLcxAS/JRZB7P7Hf//aBKSbM JlMJn6sWCdxUyUTZczxuw2/Iu+E5gKDyL2KamRoLOxPm2ZcLSFZ3TIzbXo8CYErFEY+go8 zPNaWTN3yVRjs/ELqCr+5mEjVG9nkAg= X-MC-Unique: 9KxOL5P0PpC5TSkNl7emqA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eHFAZa0D1mkGaSFNbR5sBnh3O6dLrWaXXrtFWWPw/AY=; b=NF5B4lZZk+WyBvVnWGttzS1AWrIJk6jCLgxLPRbW6L7On5ZLvz/K8cmWcX6gI9ldl0 Nb8xPQTVMGc9exwqpbFuOdSuI4annN5IiX3gcX9749aII/MMEFPYLHZUzdQbO3+xTsGi ltkhpZCybqQW1k2W+Xx1/vIQjW+YyRFFlfKo+eEDk34s5hZEMEnEnH41/2sDk6YcVysS QNgMGp1ep6dVPxz0H0qtumrt2gYf255qMllmo7IqHWaGNrmqHrImVbz9MOE2CCt10iXi n0yRvBhuJk19xU1fY5wK49G58LAaZzNTOx//JbLQ5FwoMGaAoMuM2dP6cANkezdXYunX D/0w== X-Gm-Message-State: AOAM530d/Q3Et/PUvFE8aX6/R0z4TBVaxJQJJVJWw+bT4Xmjdx1cxJM2 AiBrD5gNmNRaKIa2eGkoYd03J0G/iV7fYgt5oiQEx/zw8MBTLHxAasjIMSHS1oWA+oNgkFgReGB D9X/xJGkRpFC/DnefSb+kdwDFKl0D+aQg3ZFGkKddm2sCGbUEHtLhqNSFd21pnb4qRjk= X-Received: by 2002:a05:6000:1091:b0:213:b515:f46f with SMTP id y17-20020a056000109100b00213b515f46fmr18841307wrw.632.1654526244458; Mon, 06 Jun 2022 07:37:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGb/evxNnlR9mIEqlUMt1srJhU4QGP1rj7Zuq9PnvyE5QMbnwNWZZHpgi34YVJNn7NwG0RUg== X-Received: by 2002:a05:6000:1091:b0:213:b515:f46f with SMTP id y17-20020a056000109100b00213b515f46fmr18841278wrw.632.1654526244135; Mon, 06 Jun 2022 07:37:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 20/29] tests: use python3 as the python executable name Date: Mon, 6 Jun 2022 16:36:35 +0200 Message-Id: <20220606143644.1151112-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527713169100001 Content-Type: text/plain; charset="utf-8" From: John Snow Use "python3" instead of "python" as per PEP0394: https://peps.python.org/pep-0394/ This should always be defined (in a venv, at least!), matching the preferred python shebang of "#!/usr/bin/env python3". Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-4-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 50237f073a..fae2dd0f3c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,7 +89,7 @@ TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.= fa, $(ninja-targets))) TESTS_VENV_DIR=3D$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=3D$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results -TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python +TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python3 ifndef AVOCADO_TESTS AVOCADO_TESTS=3Dtests/avocado endif --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528470; cv=none; d=zohomail.com; s=zohoarc; b=J3hnSfpwXfkDsy5GE8rsmOTSDVpYbnJnNWAM5GVeXoY3o/Ey8b/hR8LAHHqxVz3V9dzAicCQcMBsEoxgI7AmUU2gaYmnuUsgXJOetKqHr2oFp7MnlFxfhr1T6pvqfvaxTko7dqi90/wzGhQSd4BwWYsZ+Psy5YCkXEwjtBdSUW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528470; 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=TZAV0eg6lDmmxM3ixA7TzgAPz7jYzxfHainhH3CBCcM=; b=gT7mUNNMPl4eRHpz/xy9Gta5XwPSMjvrGWaUEBOtbQnPHhEHOb8rw5Zwrb0wo4Qy+/Bs+hX2NzE1OYiSHs2ZifnwgPqCev5+aPwSjhgkQuYBkap+i8VlCZr8a3W2KUD4Of5Jvih7m1KjYf8M7sizaXWwn3qVjEO1QlfnZA33zDE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528470231420.6948966526369; Mon, 6 Jun 2022 08:14:30 -0700 (PDT) Received: from localhost ([::1]:46320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyER2-0006rx-Ul for importer@patchew.org; Mon, 06 Jun 2022 11:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrV-0002ik-TZ for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrH-0000dt-Ni for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:45 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-i8kKrhiTON6oUNnKc750RQ-1; Mon, 06 Jun 2022 10:37:28 -0400 Received: by mail-wr1-f69.google.com with SMTP id bv8-20020a0560001f0800b002183c5d5c26so745915wrb.20 for ; Mon, 06 Jun 2022 07:37:28 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id m11-20020a5d624b000000b0020ff3a2a925sm19169075wrv.63.2022.06.06.07.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526251; 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=TZAV0eg6lDmmxM3ixA7TzgAPz7jYzxfHainhH3CBCcM=; b=gF7Vfzib8KFhK9En8NpxkS9/yiJwQpA0O5YAgPYqQGBO0hF2WOl/iDP/9/J/64ImzOIWnV 7ox4+0G+544IQ/E6Uv1WF56ntr8WeemwE+8bXggJdaQYdkRw9jEH7FaF4FdkcrNy1hJJ6W d/tZEwzV06xg1/q5L1kxSVIvykurvQk= X-MC-Unique: i8kKrhiTON6oUNnKc750RQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TZAV0eg6lDmmxM3ixA7TzgAPz7jYzxfHainhH3CBCcM=; b=o8CMmI7VzrnfqRhCRD5ZnzRcroVvOCbOb06HX5ese+vxHyhj4Um5JBVi5267ep+MhV /Cxsbc1r6POOefPu+kjylSbMzlC/QMEKNPle6VpzImPH5A6omUbdSI4zwMDe9Cm7AKGA t62t773Dywkqe75Sq78sCoLQQ/HumQPRJolVSuTdOCowtO3I9KAzY5oRSYPnCjkzzUtL +OEkD8+unCZR5oFxng4X4AqEccm/TDr6K3PXjchINxY+jjH8to/sUUQ/j5n1ZIc8Lkq1 luE3gLSIRGhKZgVvg+Uddcy8jbzMDwRFyFgaAW/hkgSSEBTWNY/9u+2DLtqLhISbzbM5 +tOQ== X-Gm-Message-State: AOAM533+sZuUWZ91FcJyCwbZnGohN1Mj0Hl7t+yFIzQCUocEKBgTzsfK N2g9Kp0FOog+oIijqGxGAsDU5NttmwysGOyTHZB4R6caxIt/EQGek5v+BzqKJkhwNRj5GmyYCJL KqRIEM91REp+9Xbob1K0EmbouE6e/KasW+L0tRWCTWP58axLYt83oNZoYOhKavtJrS98= X-Received: by 2002:a05:600c:4f0c:b0:397:6a3a:d3f9 with SMTP id l12-20020a05600c4f0c00b003976a3ad3f9mr23082656wmq.103.1654526246710; Mon, 06 Jun 2022 07:37:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgr46egaN94aMXw/ugNsSW7VemMYiVF+Taa6jN+4cCe/qVEGVaK8uPNj1eLZQnyvvBau3nXw== X-Received: by 2002:a05:600c:4f0c:b0:397:6a3a:d3f9 with SMTP id l12-20020a05600c4f0c00b003976a3ad3f9mr23082621wmq.103.1654526246380; Mon, 06 Jun 2022 07:37:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 21/29] tests: silence pip upgrade warnings during venv creation Date: Mon, 6 Jun 2022 16:36:36 +0200 Message-Id: <20220606143644.1151112-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528471951100001 Content-Type: text/plain; charset="utf-8" From: John Snow Turn off the nag warning coaxing us to upgrade pip. It's not really that interesting to see in CI logs, and as long as nothing is broken -- nothing is broken. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-5-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index fae2dd0f3c..ba9f5bd65c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -109,8 +109,8 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(PYTHON) -m venv $@, \ VENV, $@) $(call quiet-command, \ - $(TESTS_PYTHON) -m pip -q install -r $(TESTS_VENV_REQ), \ - PIP, $(TESTS_VENV_REQ)) + $(TESTS_PYTHON) -m pip -q --disable-pip-version-check install \ + -r $(TESTS_VENV_REQ), PIP, $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 $(TESTS_RESULTS_DIR): --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527380; cv=none; d=zohomail.com; s=zohoarc; b=M+YdMMlG01sPrYcG6XJybuuD0bdFNSy8kIxxjYLpsN3VJAavz77ESMoIv5z5RIExSl5QupLkNSswJOMBo3m8DVR2BBBqmmFFZn6OFESvQCy9Mz1NqO+I+YPmcJP0Qim65Fb/u8VBfkuumgLWLKQl+vEkD8drZDrTshXNppuXtx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527380; 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=HtdG7+moIsVrDLabgHqSVJHSE1P/RLWxJNaayZ41e5w=; b=HRUWioUriuEGQWXTUkVbS6F8pM9/pmQik4Eki5s2/9KDwYTn3fkPRsjlhnOAChME2VwvmmOxWaaL7n5bOsS8Pvm3yLkG2enw9HmlYYsJNRsoxX3QHw/+OHbEGfgGxmFcI+rw7l8tIndHIGRksQRhUEPlJVVaAanzQ8P/w/9XC8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527380872233.47049215095888; Mon, 6 Jun 2022 07:56:20 -0700 (PDT) Received: from localhost ([::1]:59148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyE9T-0001DY-QP for importer@patchew.org; Mon, 06 Jun 2022 10:56:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrL-0002Yi-Au for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrJ-0000dy-Bn for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:34 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-26-Q8xfV6r-Pn-hcYU241Ip9g-1; Mon, 06 Jun 2022 10:37:30 -0400 Received: by mail-wr1-f69.google.com with SMTP id d9-20020adfe849000000b00213375a746aso2396244wrn.18 for ; Mon, 06 Jun 2022 07:37:29 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id n13-20020a05600c500d00b0039c5649018asm508711wmr.3.2022.06.06.07.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526251; 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=HtdG7+moIsVrDLabgHqSVJHSE1P/RLWxJNaayZ41e5w=; b=gtKfrxiJo/9H85NFxztY/Fbb3d4iMQoAZELDP2AshHmCqFzLGEBDUydfOy3rjApKVZERXM hCgqcIjX5BCZaOfzuQfRvnhetaXVRHNqkQo1S1eQ2ot3U1nM0IOC1C7HqvLUZHvbXvP8NT swcwIBf2TVeEJ1kXqXSo5qJAr9buacY= X-MC-Unique: Q8xfV6r-Pn-hcYU241Ip9g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HtdG7+moIsVrDLabgHqSVJHSE1P/RLWxJNaayZ41e5w=; b=Fh30Y5ZtyYi4a/ZLP/DB6KY8/Ev2yhYRGq4b7xE/+lW4JNkXn3tMfqmKBJceYKRKz2 t+HXLrN2jKSEtYIYRmg9GMynCKsuT9TitPE9BHyTtexnL3/g9Iz7a5ZOOgswqR6M8mio 48fo4ZfqnMCCTM71GoP6WTlnRiOVEzzO5C429PNrhdRVMjpDYLcac1/QP5PkYgTiRRIF 9CXlG51dZSWjmnScyRe1Wzr00ubx2m1sZ/O/3WsCi3+Y2141OI4gUYABSS+tMMc92UL7 3b3/qeLHpbmlCLZrfED5NkGMqdZUcBaZX4SxFhcgMAAYoR7PbLJetXFGYZx2GFYeU9tE hgYw== X-Gm-Message-State: AOAM530qa0LVlmI4Ew5LsVq5ak/y24owWISGmTF/I4pHuMrhCmD1m/pf aGM9Sd8/t1Y7GTrk3avUVXgwSw3hMiSJ4faZ/JvGVCIrj7i+M2xAhDpI3cAiWBeiTJn4Ym406L6 0rYXPXHKhpoRkIP/xE5VlgsWi+cbPM9neaXKdBnL3oW0hwLvGYysLOgoEUtKQZK92wMM= X-Received: by 2002:adf:e488:0:b0:20f:d981:4b42 with SMTP id i8-20020adfe488000000b0020fd9814b42mr22407354wrm.455.1654526248482; Mon, 06 Jun 2022 07:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBIp1oeBJl1MUpRg9eHpGbRTMbqKwDJd2qD4rq7TA9AJ5lc/NnP3cgCLukwxqjsZ+XzX+Vjw== X-Received: by 2002:adf:e488:0:b0:20f:d981:4b42 with SMTP id i8-20020adfe488000000b0020fd9814b42mr22407320wrm.455.1654526248124; Mon, 06 Jun 2022 07:37:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 22/29] tests: add quiet-venv-pip macro Date: Mon, 6 Jun 2022 16:36:37 +0200 Message-Id: <20220606143644.1151112-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527382822100001 Content-Type: text/plain; charset="utf-8" From: John Snow Factor out the "test venv pip" macro; rewrite the "check-venv" rule to be a little more compact. Replace the "PIP" pseudo-command output with "VENVPIP" to make it 1% more clear that we are talking about using pip to install something into a venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-6-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ba9f5bd65c..fa46c0c61b 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -104,13 +104,13 @@ else AVOCADO_CMDLINE_TAGS=3D$(addprefix -t , $(AVOCADO_TAGS)) endif =20 +quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run, \ + $(TESTS_PYTHON) -m pip -q --disable-pip-version-check $1, \ + "VENVPIP","$1") + $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) - $(call quiet-command, \ - $(PYTHON) -m venv $@, \ - VENV, $@) - $(call quiet-command, \ - $(TESTS_PYTHON) -m pip -q --disable-pip-version-check install \ - -r $(TESTS_VENV_REQ), PIP, $(TESTS_VENV_REQ)) + $(call quiet-command, $(PYTHON) -m venv $@, VENV, $@) + $(call quiet-venv-pip,install -r $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 $(TESTS_RESULTS_DIR): --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527540; cv=none; d=zohomail.com; s=zohoarc; b=gKxupgwQ/ELJRAktrPDb9CKCcQB9yxRvl8bS0WliPdjVIYK/SnoZ/VDVxmvBmDeCKckRlbjWEoupQlOd84cJtm9qwev9sl0tBebKlDKfQD7smH7X3lDCnp7Z2OuYBcwAJAlYw34UEorkovF2Cm+Y4gyrQIWlDT1sCMKazOrZsd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527540; 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=j6MAMxnLiI0ZXMoEaI2ox4+MmiSbU8k7mfpEeYwLCTE=; b=FjbpwGNMJFxG7gM6C3Qg7T77RH+kcJHxUkyD9QaCsAs/8hp/MvOojix0qGRDsq5S5AI8/XarJqVDKaQCJd3AcH0mEtdH+65jM3Z7Cyp1pJq6v904Fe8xZml/HjT1r6Y79ozWIgbJznxMbFkGFmv+Ydcm9Ogt6Nf8t0+MRI67OFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527540273332.1231549641552; Mon, 6 Jun 2022 07:59:00 -0700 (PDT) Received: from localhost ([::1]:39464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEC3-0007MK-1C for importer@patchew.org; Mon, 06 Jun 2022 10:58:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrL-0002a0-Nt for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrJ-0000eI-NI for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:35 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-484-5DayqEyfPZ6D0vUVm1tWJA-1; Mon, 06 Jun 2022 10:37:32 -0400 Received: by mail-wr1-f72.google.com with SMTP id p8-20020a5d4588000000b0021033f1f79aso2883890wrq.5 for ; Mon, 06 Jun 2022 07:37:31 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id c9-20020adfe749000000b002108ab90e5asm15653282wrn.58.2022.06.06.07.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526253; 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=j6MAMxnLiI0ZXMoEaI2ox4+MmiSbU8k7mfpEeYwLCTE=; b=Q56ZbiPvJsdnobAvn0eIQrBUg9ME/VwIusIUEtxcJJBQkPdTdJeDJ1Bmfx5wj6FLeG95cc vm5j27H9Sqx80sx3ekqcHp9fcRk3957sfeUjgXiSAdYt++CboTlEsZnVpiMsHOmrr0ILzz Agu2IB9nVowPC2wVfBn15PpJeZj7vuw= X-MC-Unique: 5DayqEyfPZ6D0vUVm1tWJA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j6MAMxnLiI0ZXMoEaI2ox4+MmiSbU8k7mfpEeYwLCTE=; b=VwrbGZwdLYC+02JHI71ihrRUY3QuTjBlCJHdLh7L7MgElpngrgu8ZZNFcnnX4urW+E P/MwKeTnCQ3q4WjJZom5TLjtfF8WFIitBYE1DvcL8vQn+43f9D4lXUz/vbQpg2gzMZtL bKl5Ov1a3XeZa9MuwnO9ozsdL6sR+E6zPggpr2UX6bUzsOwpVPLa9m4yX0D6fsVhvArD QZI45Qbn3bmNz+h+3CkQcymlONYZpxX5ve2vWco2KJmUoPaybh58+p3aNNhuGwXdk/bC WiwatWZ+msw6icYdHntN/V8uZQKi6gcnVE/KXh76UBMm4C8K2BCHaItnRbEByzFDZH4f Z0ew== X-Gm-Message-State: AOAM531ZADhM9yvJvuAci0o0HPzqVCxnRXSRQ1ph4y/j4IptsuQuLZ4d c8PLz9a2UcngPuXu3xvazWEMKD0gsl25LvdJg8X1Q6A6zw9MJf9j3sgeoVvHu63K5BfDPdqJ/WB +kj0/TcVj+Eyo6MdYoKbGm2qjZzg0Hk9bY4Ws7oq07otxliDOkDSSR5vpKw5KzwPZblw= X-Received: by 2002:a5d:40c5:0:b0:216:ddde:9c2e with SMTP id b5-20020a5d40c5000000b00216ddde9c2emr10067429wrq.241.1654526250316; Mon, 06 Jun 2022 07:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzeoZAs5CngK7VqHNnwXy2MVz66/VNhoKvse+DecdH55rlfYSrX8lMHhsW47DyYPYnHZ5Iog== X-Received: by 2002:a5d:40c5:0:b0:216:ddde:9c2e with SMTP id b5-20020a5d40c5000000b00216ddde9c2emr10067394wrq.241.1654526249937; Mon, 06 Jun 2022 07:37:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 23/29] tests: install "qemu" namespace package into venv Date: Mon, 6 Jun 2022 16:36:38 +0200 Message-Id: <20220606143644.1151112-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527541818100001 Content-Type: text/plain; charset="utf-8" From: John Snow This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking from the avocado test scripts directly. By doing this, the environment of where to find these packages is managed entirely by the virtual environment and not by the scripts themselves. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-7-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 1 + tests/avocado/avocado_qemu/__init__.py | 11 +++++------ tests/avocado/virtio_check_params.py | 1 - tests/avocado/virtio_version.py | 1 - tests/requirements.txt | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index fa46c0c61b..3accb83b13 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -110,6 +110,7 @@ quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run, \ =20 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(call quiet-command, $(PYTHON) -m venv $@, VENV, $@) + $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/") $(call quiet-venv-pip,install -r $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index 39f15c1d51..b656a70c55 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -21,6 +21,11 @@ from avocado.utils import cloudinit, datadrainer, process, ssh, vmimage from avocado.utils.path import find_command =20 +from qemu.machine import QEMUMachine +from qemu.utils import (get_info_usernet_hostfwd_port, kvm_available, + tcg_available) + + #: The QEMU build root directory. It may also be the source directory #: if building from the source dir, but it's safer to use BUILD_DIR for #: that purpose. Be aware that if this code is moved outside of a source @@ -35,12 +40,6 @@ else: SOURCE_DIR =3D BUILD_DIR =20 -sys.path.append(os.path.join(SOURCE_DIR, 'python')) - -from qemu.machine import QEMUMachine -from qemu.utils import (get_info_usernet_hostfwd_port, kvm_available, - tcg_available) - =20 def has_cmd(name, args=3DNone): """ diff --git a/tests/avocado/virtio_check_params.py b/tests/avocado/virtio_ch= eck_params.py index e869690473..4093da8a67 100644 --- a/tests/avocado/virtio_check_params.py +++ b/tests/avocado/virtio_check_params.py @@ -22,7 +22,6 @@ import re import logging =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) from qemu.machine import QEMUMachine from avocado_qemu import QemuSystemTest from avocado import skip diff --git a/tests/avocado/virtio_version.py b/tests/avocado/virtio_version= .py index 208910bb84..c84e48813a 100644 --- a/tests/avocado/virtio_version.py +++ b/tests/avocado/virtio_version.py @@ -11,7 +11,6 @@ import sys import os =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) from qemu.machine import QEMUMachine from avocado_qemu import QemuSystemTest =20 diff --git a/tests/requirements.txt b/tests/requirements.txt index a21b59b443..0ba561b6bd 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,6 @@ # 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 +# Note that qemu.git/python/ is always implicitly installed. avocado-framework=3D=3D88.1 pycdlib=3D=3D1.11.0 --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654527830; cv=none; d=zohomail.com; s=zohoarc; b=cfymvRiUrFvAAeF+6oz+/Qi2V17EYItDuBuQlFhxUuw0QNIYQ5+D9QSmoQlfE3puZQ/9yxyHGNbjKepJJWqXVOA3gMS4rl7Y1nMaaTgPKCRVq+SEYHeMZkKbiv3HRZErd4hlxNksvT6oFK+mTp6pw1LlsQQMS2WMGizQaMx1xtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654527830; 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=YtlVUesl9728XneFM+M8MhUCvdZtA1uLl7Gr8FIog3E=; b=CdolbDzxr8bxCMTHn6YPBxdR7pcCLUq7cnqf4/pcNE0vAT59ClLZ8pE4qfnfkD8AYCcSPQNabroRXkvPt6Ql7hpUIDK44mvjdS3PKDvJHlmZXu55347ribSc3jnp/sz9Ixu46Jc4Uyh8DPwwzRL/9+sRe7iYm4jMR6i4znalEU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654527830335481.03010100206075; Mon, 6 Jun 2022 08:03:50 -0700 (PDT) Received: from localhost ([::1]:48070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEGj-000594-6P for importer@patchew.org; Mon, 06 Jun 2022 11:03:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrO-0002bn-0y for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrM-0000eg-Gc for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:37 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-522-r2CsJYNnPJG93Val4UC6BA-1; Mon, 06 Jun 2022 10:37:34 -0400 Received: by mail-wm1-f71.google.com with SMTP id bg40-20020a05600c3ca800b00394779649b1so11305238wmb.3 for ; Mon, 06 Jun 2022 07:37:34 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0039c15861001sm15533194wmb.21.2022.06.06.07.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526256; 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=YtlVUesl9728XneFM+M8MhUCvdZtA1uLl7Gr8FIog3E=; b=SdDaTtoJ7T/A1o6CEY/57VTMVzGwgEpdLn3AsKrL8fhyOVhmDks0oP51BZW9Utz1TTQs5U 4yxREq302ot6bOYy5TrIz2rmccTtjEi21c0AEl/dlIxcEdrEeJtMIAw8osnRkBDX3g60eK GrW3iDvt+5edfTeNjDLBwvy3+EQNHCA= X-MC-Unique: r2CsJYNnPJG93Val4UC6BA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YtlVUesl9728XneFM+M8MhUCvdZtA1uLl7Gr8FIog3E=; b=jzWt31+Qe62tHwUJ7RS8+W3q4v/2fD2TOqDmOb9u7VcgdW1jabGmwK8oWWwUmHEvWV u7Tu5akxvqVSHnkJ2ij+vhSP06in8F/E5BJm1EemLIMjRTF0RIExOFWTqGRtGrXQEmYb FHfHmtQVlXWUEbh1OVyf02iTtrPVypB7pu2TUtZQ721wZVR9GHTO0ndGNOT7p7bQ1QUS PWBoH5/jj9BoWIZ4D7XKri9yMPRJR94SkY02YByp5M/fBAxp4Q9+tiuiwqBzyk6pZaHk Ca9ZgpWZuJnPcur5JL7ksM0NXHP+/AQKdFXUwZehxAZAm8uGLtCQdSQV3lR0O5z1ZOEL d+yw== X-Gm-Message-State: AOAM531FWrzFg1A2kecLogx8zDyBxJmL2P5rO2pcTYEqCB6bTyxqm6ML llhNMN/4PpSqQySvo8+4En4t+L1abU9duyXElxdyhE+Acm7hYVVY9aOjTHtoPMRFmwby84hLDbk ky+tmk5c4KJYjhTaKIVADLNNYKsWU/+0lBny1T40AV/muK2caN9CZUOoyDLau8qjpj1Y= X-Received: by 2002:a05:600c:22d9:b0:39c:4b1b:5f99 with SMTP id 25-20020a05600c22d900b0039c4b1b5f99mr9107568wmg.151.1654526252985; Mon, 06 Jun 2022 07:37:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnjhUfOdbuNuNegdmva9LOaL+nwSJUonldJZsqh1XkxfasJ4xz8A3srMLxfBXfgqAL6Q+/GA== X-Received: by 2002:a05:600c:22d9:b0:39c:4b1b:5f99 with SMTP id 25-20020a05600c22d900b0039c4b1b5f99mr9107513wmg.151.1654526252405; Mon, 06 Jun 2022 07:37:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 24/29] tests: use tests/venv to run basevm.py-based scripts Date: Mon, 6 Jun 2022 16:36:39 +0200 Message-Id: <20220606143644.1151112-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654527831958100001 Content-Type: text/plain; charset="utf-8" From: John Snow This patch co-opts the virtual environment being used by avocado tests to also run the basevm.py tests. This is being done in preparation for for the qemu.qmp package being removed from qemu.git. As part of the change, remove any sys.path() hacks and treat "qemu" as a normal third-party import. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-8-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/vm/Makefile.include | 13 +++++++------ tests/vm/basevm.py | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index ae91f5043e..588bc999cc 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -84,10 +84,11 @@ vm-clean-all: =20 $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(SRC_PATH)/tests/vm/basevm.py \ - $(SRC_PATH)/tests/vm/Makefile.include + $(SRC_PATH)/tests/vm/Makefile.include \ + check-venv @mkdir -p $(IMAGES_DIR) $(call quiet-command, \ - $(PYTHON) $< \ + $(TESTS_PYTHON) $< \ $(if $(V)$(DEBUG), --debug) \ $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ @@ -101,9 +102,9 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ =20 =20 # Build in VM $(IMAGE) -vm-build-%: $(IMAGES_DIR)/%.img +vm-build-%: $(IMAGES_DIR)/%.img check-venv $(call quiet-command, \ - $(PYTHON) $(SRC_PATH)/tests/vm/$* \ + $(TESTS_PYTHON) $(SRC_PATH)/tests/vm/$* \ $(if $(V)$(DEBUG), --debug) \ $(if $(DEBUG), --interactive) \ $(if $(J),--jobs $(J)) \ @@ -127,9 +128,9 @@ vm-boot-serial-%: $(IMAGES_DIR)/%.img -device virtio-net-pci,netdev=3Dvnet \ || true =20 -vm-boot-ssh-%: $(IMAGES_DIR)/%.img +vm-boot-ssh-%: $(IMAGES_DIR)/%.img check-venv $(call quiet-command, \ - $(PYTHON) $(SRC_PATH)/tests/vm/$* \ + $(TESTS_PYTHON) $(SRC_PATH)/tests/vm/$* \ $(if $(J),--jobs $(J)) \ $(if $(V)$(DEBUG), --debug) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 254e11c932..d7d0413df3 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -18,9 +18,6 @@ import logging import time import datetime -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import QEMUMachine -from qemu.utils import get_info_usernet_hostfwd_port, kvm_available import subprocess import hashlib import argparse @@ -31,6 +28,9 @@ import traceback import shlex =20 +from qemu.machine import QEMUMachine +from qemu.utils import get_info_usernet_hostfwd_port, kvm_available + SSH_KEY_FILE =3D os.path.join(os.path.dirname(__file__), "..", "keys", "id_rsa") SSH_PUB_KEY_FILE =3D os.path.join(os.path.dirname(__file__), --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528124; cv=none; d=zohomail.com; s=zohoarc; b=fxlZTFb4yLTyAmnGYkvf3rpJinVPh+ee+omJvbE123uM8aFBXVR2ywtMxNN/UUSSF9zruD+WhgyfEb1f3iX1dZeQmb4o8m4/Dn6iKMbYE6DrK/E81pJN8rqKDORFAceSUDJCBAOsnxTlkcjpjWQSvC+laxJix5wDosIox7SWTRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528124; 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=VWlOYBYTglOdWdujOMoqYHm7d3tqistQmPU+kUemLe8=; b=YliGzzawVHEGcjf7DWDuXFYtKXcw3+dRpMaoXLOs+pBYfOybKD0hwdoD6+yskrQKJ3ckpBGPgTkFQyqKObHoR6Vd7NiWY9F10fn4JQvd+9QvDfKoWMoOp9l68aHp+3oFIAPENeDmCzHfHMlufNIUXWVGoUIKzdbrgZ6YHVufUt0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528124395830.8967366794765; Mon, 6 Jun 2022 08:08:44 -0700 (PDT) Received: from localhost ([::1]:59246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyELS-0004cR-VX for importer@patchew.org; Mon, 06 Jun 2022 11:08:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrO-0002bs-Vi for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:56865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrN-0000eo-Ea for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:38 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-18chfRuUNReQW2360J1bKQ-1; Mon, 06 Jun 2022 10:37:35 -0400 Received: by mail-wm1-f70.google.com with SMTP id bg40-20020a05600c3ca800b00394779649b1so11305258wmb.3 for ; Mon, 06 Jun 2022 07:37:35 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id bv18-20020a0560001f1200b002183cedbf34sm3176705wrb.73.2022.06.06.07.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526256; 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=VWlOYBYTglOdWdujOMoqYHm7d3tqistQmPU+kUemLe8=; b=iSsxIMOwIiQP1PhTvu+Iony+NGnzhgsrztfLUq0ndRUBJ6WIXKMunnjK86WEaOqSn9nWAz z4PIWqb0caAolvnWJrrL8w42r+heGWx8eO69zBg5+t6ZQXW1bW3cMBxyjaWfcqeNyQUsoA IBQ6N8ok97FvPxabvQ6olBMQZtKP1/k= X-MC-Unique: 18chfRuUNReQW2360J1bKQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VWlOYBYTglOdWdujOMoqYHm7d3tqistQmPU+kUemLe8=; b=1MU1W0L7qYHzVIso+bxzQYymz2Dj2URv9E0NXKoedgpY+RCot2ELfv0SRZ6Mz2X+Zs rnzt6YJK1g2UTJMhq4IuUfyxXuLb4i/09pOaODlSr4HPAYiSv8W/CUJvtkazcfxLP6go CPexnbp0GPMa2qFVhkkE8O2IteOq6vJmnvgd+2gGSNfgNQnD2Ki+qV5G6IHTqges3AYA gplVJ9YCRI1uDzRVhqMR/5g/g891Crz6z85Ru5ARQiNmwP/H31yHE9rnoubLe7fmh1Ej TfzKWUNsjBldFY64659thHrG6kJW4SGiP8ECUs6KHOM4OXWu00/MUyKMNn5DnULYWGnV iNKQ== X-Gm-Message-State: AOAM5327NVJIF7qes4+85Gil7S9dB7HeVe5upYFzyTWOQEk4bwWitNUU AyWgtvT4QYHnWVhc09vnpmaGAUbf+ks+OhqSFx7ur4MirhEPyiYlVk0wCuC5cfW4Ww9G5AyRWCb CMwJoibsYrHR5+HULgPD+jKMKGWUVsFEkjFTuW9+D8Qm+cesjKTz/2fn25BzOkZB/Wx0= X-Received: by 2002:adf:fa03:0:b0:210:dcda:ee82 with SMTP id m3-20020adffa03000000b00210dcdaee82mr21906142wrr.139.1654526254481; Mon, 06 Jun 2022 07:37:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnLp4HiDdNFNpD9WuBRnwpkFw9npWJkKDjjRPa+fsyX3MJzbSamonjGUASRqwfEFSITHu+4g== X-Received: by 2002:adf:fa03:0:b0:210:dcda:ee82 with SMTP id m3-20020adffa03000000b00210dcdaee82mr21906115wrr.139.1654526254167; Mon, 06 Jun 2022 07:37:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 25/29] tests: add python3-venv to debian10.docker Date: Mon, 6 Jun 2022 16:36:40 +0200 Message-Id: <20220606143644.1151112-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528125994100001 Content-Type: text/plain; charset="utf-8" From: John Snow This is needed to be able to add a venv-building step to 'make check'; the clang-user job in particular needs this to be able to run check-unit. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-9-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- tests/docker/dockerfiles/debian10.docker | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/docker= files/debian10.docker index b414af1b9f..03be923066 100644 --- a/tests/docker/dockerfiles/debian10.docker +++ b/tests/docker/dockerfiles/debian10.docker @@ -34,4 +34,5 @@ RUN apt update && \ python3 \ python3-sphinx \ python3-sphinx-rtd-theme \ + python3-venv \ $(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[al= l]' | cut -d\ -f2) --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528121; cv=none; d=zohomail.com; s=zohoarc; b=JmXWblf8P1Iq2772Hngmg5Rvfo3a6QZ+Mmp3YEBqEzY5R2UKin1KMrweFbQObbFJLCUhq9GxQ28OcUZMxC7/tUUDEdBZLKBHs3MYA7o65JsMj4SmGmrag5z9ZQ7BcNxthE4r6yFyHZstOIArXSPQ3eAY4plOjyuKn41jsh/cXAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528121; 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=YbCITN4WWv2lWDs17REuqnuTLGGVSQp/qDeRaT877jU=; b=A+udTmuDmkW+qlKqHXmSDw8IAajlLZeuMHqrP7rOyRvvcBPkQ2HPMc8icgJp/3shlKGNVrgHlWNwgJoL3J64grHkSTA91q7plmHlvyXyjGvz1V209dgSvp/deDgIvpZFLzZdDakoem1V/YTWPr7ofs58WOQTUcpXrKvq3EC3Ovw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165452812126057.246644933939706; Mon, 6 Jun 2022 08:08:41 -0700 (PDT) Received: from localhost ([::1]:59056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyELP-0004Uu-Qn for importer@patchew.org; Mon, 06 Jun 2022 11:08:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrU-0002i7-SD for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrQ-0000fD-Vx for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:43 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-k0KXds0rPpKkHjW_BdkdqQ-1; Mon, 06 Jun 2022 10:37:38 -0400 Received: by mail-wr1-f72.google.com with SMTP id m18-20020adff392000000b0021848a78a53so350381wro.19 for ; Mon, 06 Jun 2022 07:37:38 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id 186-20020a1c19c3000000b0039c4ec6fdacsm3739931wmz.40.2022.06.06.07.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526259; 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=YbCITN4WWv2lWDs17REuqnuTLGGVSQp/qDeRaT877jU=; b=N8L8bi3jDjETxUnh/ajHudZ2QJQEoSNjmBZoR4UjGOtgQsMhANZ5KEeqt1k75G+wkOnzUr oqK/6D6g2pzsJ6OsO8YsP8SvSNvVexUiT95R4urkhvKvQ00I7y5ywUPFWCKP4rFdJIjFqC BAbo8KX1dPreMClSjyoQOWLa/aNRbWg= X-MC-Unique: k0KXds0rPpKkHjW_BdkdqQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YbCITN4WWv2lWDs17REuqnuTLGGVSQp/qDeRaT877jU=; b=y/dpm2kZf1Y0k1I5SzSA3TuXN6KNZCqee6G958cRRDzR4+Iu93N6/ZwIW7GEWq2sJy u+YEuIsCmdqdTslBQIw8cWSLta+ztWcteM/cTtUhyx7VyHv6YoF46TFfJyR3jPVoz9ym k58FdvWQf+M9lLGZBA95sZFRVm5BL5htXltdANZEDPpyuC9TIluZyCGN+KzUMYV8joDR rv0GUUnvrzSjFJXAoCifA8PmJ/N5lNavJ2z20UDXOsycrOB+OMJlXjFIAtf85Nzlj6pU gY0LBcBUEXM6IrSnWKZ6xiiDGgmhI7XPAnODAo/ofNWtJpbhU3LoPNIiQ57OO5n+qDbd 9f1w== X-Gm-Message-State: AOAM530Awuvmfb+M0JCd2HgpkjYA35HPohrZdSPG/jqfebEkBPS2n2l1 9TVeFEejbnPezdh4e4QA3Y/cI9TcrNbgwireQLvo2YrHPq4xiIp5i0Ofr8/qePJOW9AqKji5M25 aGomYm1tMOT7rccTX2NYquETo4OvPWnPRoBIc5uMpFZfLpchgLNdUYMp9G4m05uSMsWs= X-Received: by 2002:a05:600c:20e:b0:397:697f:172b with SMTP id 14-20020a05600c020e00b00397697f172bmr52867525wmi.84.1654526256043; Mon, 06 Jun 2022 07:37:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFlvRh3T+AJ2NqPMByRmAQyqWjz7ZoP5TqZoBHfW1m2Qdf7fu11UaY6gQsRv6YE4SvqzQYxQ== X-Received: by 2002:a05:600c:20e:b0:397:697f:172b with SMTP id 14-20020a05600c020e00b00397697f172bmr52867480wmi.84.1654526255651; Mon, 06 Jun 2022 07:37:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL 26/29] tests: run 'device-crash-test' from tests/venv Date: Mon, 6 Jun 2022 16:36:41 +0200 Message-Id: <20220606143644.1151112-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528121933100001 Content-Type: text/plain; charset="utf-8" From: John Snow Remove the sys.path hacking from device-crash-test, and add in a little user-friendly message for anyone who was used to running this script directly from the source tree. Modify the GitLab job recipes to create the tests/venv first, then run device-crash-test from that venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-Id: <20220526000921.1581503-10-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 8 +++++--- scripts/device-crash-test | 14 +++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index ecac3ec50c..544385f5be 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -110,7 +110,8 @@ crash-test-debian: IMAGE: debian-amd64 script: - cd build - - scripts/device-crash-test -q ./qemu-system-i386 + - make check-venv + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i3= 86 =20 build-system-fedora: extends: .native_build_job_template @@ -155,8 +156,9 @@ crash-test-fedora: IMAGE: fedora script: - cd build - - scripts/device-crash-test -q ./qemu-system-ppc - - scripts/device-crash-test -q ./qemu-system-riscv32 + - make check-venv + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ri= scv32 =20 build-system-centos: extends: .native_build_job_template diff --git a/scripts/device-crash-test b/scripts/device-crash-test index a203b3fdea..73bcb98693 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -33,10 +33,18 @@ import re import random import argparse from itertools import chain +from pathlib import Path =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.machine import QEMUMachine -from qemu.qmp import ConnectError +try: + from qemu.machine import QEMUMachine + from qemu.qmp import ConnectError +except ModuleNotFoundError as exc: + path =3D Path(__file__).resolve() + print(f"Module '{exc.name}' not found.") + print(" Try 'make check-venv' from your build directory,") + print(" and then one way to run this script is like so:") + print(f' > $builddir/tests/venv/bin/python3 "{path}"') + sys.exit(1) =20 logger =3D logging.getLogger('device-crash-test') dbg =3D logger.debug --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528307; cv=none; d=zohomail.com; s=zohoarc; b=cwxaC6aVKTNyaW+FjbIPPYiK6jZJZgd/w7BnEzdvYbWQ72ZfZn7QFC31mbg7Ui+mKw9RyDaMRgFAhW0hx8VsKq4hFKJExuNfBh0h8cOLoAOR1qVMvqtojMZ1b3z50ty9FQ6Y8VoqPMc1Mx9hqDdgY0neJiikcLrEWhegktofqMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528307; h=Content-Type:Content-Transfer-Encoding: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=IggI1/QSoMlPqgNfMZWIr+E2XBEF7Oe16zLTSBey4e4=; b=lGM2a1isJBwnSFsH/Xj9vIa2vfgFqdtmfO+O3WPlF02Ew9ypifkE0Tko7iSCwa+WPf1sB7dzVrFu8zvbVY6BFd1Q8YpONKo3R4AdEiRhJp+o2dCRaOWCV9PsXKct+e18W8nuJDYg0OkqmFC8RYeIfUFMJBJKam9F1c6nnmSmsiQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528307415752.4637508146791; Mon, 6 Jun 2022 08:11:47 -0700 (PDT) Received: from localhost ([::1]:38832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEOP-0001p0-LQ for importer@patchew.org; Mon, 06 Jun 2022 11:11:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrU-0002i8-Rq for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrQ-0000fI-VY for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:43 -0400 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-168-GpBd3rx3PkOMsMs9bH6Ggg-1; Mon, 06 Jun 2022 10:37:39 -0400 Received: by mail-wr1-f70.google.com with SMTP id p8-20020a5d4588000000b0021033f1f79aso2883997wrq.5 for ; Mon, 06 Jun 2022 07:37:39 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id h24-20020a05600c145800b0039c54bb28f2sm1633051wmi.36.2022.06.06.07.37.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IggI1/QSoMlPqgNfMZWIr+E2XBEF7Oe16zLTSBey4e4=; b=TfGtnEM11EDG1Uu1wIrTJIvoQIFwRQRXQ/5snUe2ivjMT4BPNF4mC1itCNOkb1E6jKhp5R LDFr6FcHC4s8P9P859BmSmdhVAF/ygUx5KxYoZOV/y/TDHac1LrOKQQLGjeHOW0wzo0jaV IAcVq+u+9l85oBk/UfJ9u4gQieDhiDc= X-MC-Unique: GpBd3rx3PkOMsMs9bH6Ggg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IggI1/QSoMlPqgNfMZWIr+E2XBEF7Oe16zLTSBey4e4=; b=N7J3nrSTyUETzM82PWz1KvjZX/oPviNp/OaBsE6fqEpT+SSc4gbC8rM1PuO1E2TL+/ QPurH3CzrM8LlPh7tgmTa+tSCAbuVGr3s63DsKpinJpqnw+/T4i0pV8c+dnB330yT3Tl zDewBUj7lNM68pTdK4eQ7RarnU8qnWSBua/waAS5CshtVgXSezeZIEWyD5epBo//EONH EQzl7E8PO76fPlvYeZ2w2dN5PnuSAQ0RvlZ7K99/b5R8V3YOaIPA1ZWb+6XPCqb5s0eT WmTPc1cHGBXY5dJ/mtRZ4jcW92bYUXNTyfYP0+tMvYfdEMZoyykxjc5yGLtLVqa0biam FbDg== X-Gm-Message-State: AOAM530JWk9Qp83+9Np8SN3OhxHqtQVbfjiwlB9vzQcAbumaHkQFTGOc 2y3LqgHrHPivoi0oD04C11FryLNtDajVBtdxEyJPldNDOJAM3sDmZVkSMkSQojXoqeCc8m5gzqr k7X6BtupxWoNCpHyX9oZlNMmSIO5duSPG2JlW5LD+uxRfRjKsaR72ZBZ0sWtfcTr0wQU= X-Received: by 2002:a05:600c:3d8d:b0:39c:5232:107a with SMTP id bi13-20020a05600c3d8d00b0039c5232107amr3887519wmb.191.1654526257650; Mon, 06 Jun 2022 07:37:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz78bDXzp5uQ5drUA1gLJQYSOgQiSNhs9xKKZ6BLDT8i5XjDA2asd0pPoclA/I5X8SYFlCdPw== X-Received: by 2002:a05:600c:3d8d:b0:39c:5232:107a with SMTP id bi13-20020a05600c3d8d00b0039c5232107amr3887486wmb.191.1654526257322; Mon, 06 Jun 2022 07:37:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 27/29] regenerate meson-buildoptions.sh Date: Mon, 6 Jun 2022 16:36:42 +0200 Message-Id: <20220606143644.1151112-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528308702100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- scripts/meson-buildoptions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 731e5ea1cf..00ea4d8cd1 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -156,13 +156,13 @@ meson_options_help() { printf "%s\n" ' vhost-kernel vhost kernel backend support' printf "%s\n" ' vhost-net vhost-net kernel acceleration support' printf "%s\n" ' vhost-user vhost-user backend support' - printf "%s\n" ' vmnet vmnet.framework network backend support' printf "%s\n" ' vhost-user-blk-server' printf "%s\n" ' build vhost-user-blk server' printf "%s\n" ' vhost-vdpa vhost-vdpa kernel backend support' printf "%s\n" ' virglrenderer virgl rendering support' printf "%s\n" ' virtfs virtio-9p support' printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)' + printf "%s\n" ' vmnet vmnet.framework network backend support' printf "%s\n" ' vnc VNC server' printf "%s\n" ' vnc-jpeg JPEG lossy compression for VNC server' printf "%s\n" ' vnc-sasl SASL authentication for VNC server' @@ -430,6 +430,8 @@ _meson_option_parse() { --disable-virtfs) printf "%s" -Dvirtfs=3Ddisabled ;; --enable-virtiofsd) printf "%s" -Dvirtiofsd=3Denabled ;; --disable-virtiofsd) printf "%s" -Dvirtiofsd=3Ddisabled ;; + --enable-vmnet) printf "%s" -Dvmnet=3Denabled ;; + --disable-vmnet) printf "%s" -Dvmnet=3Ddisabled ;; --enable-vnc) printf "%s" -Dvnc=3Denabled ;; --disable-vnc) printf "%s" -Dvnc=3Ddisabled ;; --enable-vnc-jpeg) printf "%s" -Dvnc_jpeg=3Denabled ;; --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528300; cv=none; d=zohomail.com; s=zohoarc; b=M1GBzFzT6U0YH2VCE78rbBwvXNkryq2SpipU/HtzTRkrCHX0P0KGuy/XQPSIR4eP8L5kkX43vx4wqYs0ZbRCfe918pkAfK3pcrcBVCb1As09Wy3C2cBgkIYnP9LOm95nDwLqFkfGugiQ9GwgsgFpQaLqAoTDjsqPJRGOca9LkDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528300; h=Content-Type:Content-Transfer-Encoding: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=qGkxBUipSzfB6+E2sZAGdDLFTlTNb1Nue4FDrBmMfFQ=; b=gnlHFlk2Wc/CU5tmblAgXC4SyvnglkQTWyBpD5VriKnYJvNaX9GI9SSB+5ClJVjBePcdibjlbsv0u/bB3a1bM/Xo18pGIXz875RDiveLMw0ATlCU4DnCPPxbj9vqYPvJqi9Fp14N/tCSyh/kGmIAqFbYwKyt3+Qx7zupwb72JHI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528300287930.9117456471561; Mon, 6 Jun 2022 08:11:40 -0700 (PDT) Received: from localhost ([::1]:38418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEOJ-0001Y1-5v for importer@patchew.org; Mon, 06 Jun 2022 11:11:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrU-0002i1-Qx for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrS-0000fR-KT for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:43 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-578-ofJzuCo-OUS-Vqqfn6mBUg-1; Mon, 06 Jun 2022 10:37:41 -0400 Received: by mail-wr1-f69.google.com with SMTP id c16-20020a5d4cd0000000b00213b1d4a96cso2301202wrt.1 for ; Mon, 06 Jun 2022 07:37:40 -0700 (PDT) Received: from goa-sendmail ([93.56.169.184]) by smtp.gmail.com with ESMTPSA id i19-20020a1c5413000000b0039c457cea21sm7768036wmb.34.2022.06.06.07.37.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qGkxBUipSzfB6+E2sZAGdDLFTlTNb1Nue4FDrBmMfFQ=; b=ODJcnZ1tryuw7v8mBrEin42eHlPSlIpL8HUj5iamCUXZ0NbxwlzzvO2/phtMYAEARQGyTn uv/5aCFmSgrH2Lb0i/6VapAsfj0tC2QS6rIpXJcj7URiOrN+do3h3V++TJ8XqLmmh8zGlP em+qUwDHxt8DDQzpuGUhmXUpJhqzANA= X-MC-Unique: ofJzuCo-OUS-Vqqfn6mBUg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qGkxBUipSzfB6+E2sZAGdDLFTlTNb1Nue4FDrBmMfFQ=; b=lt744QUDn20m8rWwGZDxXTD6OKltrroeovxoLqjLJdApEUwKe+EihAV/0uyD4KJfMM Ao60cw//O4IEUm7A9GWtBJC8trlK9ZC3aH8DTIFhlKpOW/vZ6FZ3i6Oe6d2MX/FS/4wX PvrJQ1fmBGRJOBsmh1TrJcc8lRveW9nfV5oHJtH/1J+Zd9awpjw6WBlHExsMN3Splwv7 t4+epvUwGtYCvRTaFCxoRZ50PO7h4ZGjEqHwkgh1TBZkerclPWxBqy5VtBnt+SXxPpZX ucT4vy8YpwZgYDtxB8I/u5zl3C+8dRXdW23Nq1IjCQ7OdL1IszObnYQdZWla3V3ULJtk tdtQ== X-Gm-Message-State: AOAM531EVm8+iIbSw+asmwUHYAc8QSFYsMMp2jkcsxrv0lPT4G0SA8JX MC13sb5E7uTeAI+kt1ET45uTgwcV4WdQ6xWK0Oiih6svVOHdaKRsj2MUrp3S8V9G8A02XdejpGA Sn0nYLDq9TypuLBbU8Xivl1V9d7VtRP+BBpG9dUuqJFy49c9t7WgK16QLr27C41WWCs0= X-Received: by 2002:a7b:c3c2:0:b0:394:9229:3b40 with SMTP id t2-20020a7bc3c2000000b0039492293b40mr23719280wmj.195.1654526259577; Mon, 06 Jun 2022 07:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpqeqvt1dlbmYZmlsjo1TQPyb7e/6xbiqogn0B1DXD3ObGGrItzbZBtU46aW01DjIBrm3+Rw== X-Received: by 2002:a7b:c3c2:0:b0:394:9229:3b40 with SMTP id t2-20020a7bc3c2000000b0039492293b40mr23719253wmj.195.1654526259299; Mon, 06 Jun 2022 07:37:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/29] configure: remove reference to removed option Date: Mon, 6 Jun 2022 16:36:43 +0200 Message-Id: <20220606143644.1151112-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528300667100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index b9ccff9067..ac18ed4f3a 100755 --- a/configure +++ b/configure @@ -1035,7 +1035,6 @@ Advanced options (experts only): --with-git-submodules=3Dignore do not update or check git submodules (= default if no .git dir) --static enable static build [$static] --bindir=3DPATH install binaries in PATH - --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] --without-default-features default all --enable-* options to "disabled" --without-default-devices do not include any device that is not needed = to --=20 2.36.1 From nobody Fri May 17 04:49:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654528302; cv=none; d=zohomail.com; s=zohoarc; b=Z5RuoOMzCtzs+WimzKGYsBdsNkJTXvQNBQJkCXIT18Q+V6OZDvp39DbLRcI9qOJw5ylxlxcvGwnctPpRSKUtnK1DGgNNDdiRnNuuA3+zWvBznnktoHU7oedhwZRxkdBBl717px4RnR2NVhC4XYQp8F6oaui3smypi9HMP7tfZ1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654528302; h=Content-Type:Content-Transfer-Encoding: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=REGlmdVS1lYdUH1ngn7i4jdmEYP4WYH5gSTgDPDmR4w=; b=HRcXg2PfAXoGuZNATB3x9Sd1fGSt7Lf0SvtbOi+radWfH5PyPabJ2G2AQzy0+9LD7GhvWX/9UDKSuEcYqHZhoVdvcmifHZDkEb74EeqmXu/9FVK3danTlhTF9MVZ46EnAKafYqaXEaqBCzcZko7AOVJC0/p8dKo/dT4rJqegkpQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1654528302537495.19569662279184; Mon, 6 Jun 2022 08:11:42 -0700 (PDT) Received: from localhost ([::1]:38514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyEOL-0001c5-Ei for importer@patchew.org; Mon, 06 Jun 2022 11:11:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrW-0002il-1O for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:20419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyDrU-0000fq-H4 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 10:37:45 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-645-LbYUEg3GOfS4ux-6Y8SgJg-1; Mon, 06 Jun 2022 10:37:42 -0400 Received: by mail-wm1-f72.google.com with SMTP id az7-20020a05600c600700b0039c3ed7fa89so5529366wmb.8 for ; Mon, 06 Jun 2022 07:37:42 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id t22-20020a05600c41d600b00397550b387bsm20841082wmh.23.2022.06.06.07.37.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 07:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654526263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=REGlmdVS1lYdUH1ngn7i4jdmEYP4WYH5gSTgDPDmR4w=; b=hjmF3M92HVSRndGVv67cAQlQVIPHpi+pc4sKU1zTW+bWxkgHLIq1m2b3P8rhAIW9Y2ykVN 5FE/b1/hXwphNGjPba0w47jhm7s+ZpMWAS+kJVX4Rg2spAk8y98UNVB+inUttIzUJ/Fm18 DWzqB8WawNPYclJDRa+EQkEGLlIeMoo= X-MC-Unique: LbYUEg3GOfS4ux-6Y8SgJg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=REGlmdVS1lYdUH1ngn7i4jdmEYP4WYH5gSTgDPDmR4w=; b=afTRYibquXJ4mnWeSDECuhcbooYmNCkPj5PTZkdVc6aoGAQeI64+yYv9VbLrvf/A1d uyXdgtsILGSvkvg3VhTu+RT7kFDqU3ySalWmBGwMtlg3+mpYXZp6YlflDBD/WFB9IrwJ Q+38GLWkvplM6w5JU8lb6a3ntABIZdMLxGuf2GihbaKqBZQPxB+kvV042gWtDugwKJUP cHpJMdwrag+GfiXLiVjbjkzoSehr54HdpeH5z9owG4eFQ5X14B7hUDitFpW/Basu6mAq /7puW/r1Zpqu2HNAkQG5gdDvqwe5w3KV2i30aSyAV635E3nKcHx0L9plF1JfnC7aOF9o mdgA== X-Gm-Message-State: AOAM530xqI7VSp/0svFRyNFEh1qjbhJ4quFCeZkn/3RPsFGIlXYyhTd+ 6yglp+ceFu6Lg0yHTlj28oVLZF8Ck8py+57sdoIVDZiXWZ9SeVy3h9VrarXh1YcX706FcVwvAic bfnS6tGrP/qKVeQI0hAEttAUZgkXHz3oJIW9f3UkRdGKOTH5+9w40rlQvXuEkgIRkFdA= X-Received: by 2002:adf:fb0c:0:b0:215:6216:6ed2 with SMTP id c12-20020adffb0c000000b0021562166ed2mr15175682wrr.450.1654526261108; Mon, 06 Jun 2022 07:37:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAWEixaPtJHV0Kg7d8kP08xZSm/UJxEAtR2tsijKje1PWeF3MmhVSVfNsDoLoEtlpKQ8whpQ== X-Received: by 2002:adf:fb0c:0:b0:215:6216:6ed2 with SMTP id c12-20020adffb0c000000b0021562166ed2mr15175651wrr.450.1654526260750; Mon, 06 Jun 2022 07:37:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/29] meson: qga: do not use deprecated meson.build_root() Date: Mon, 6 Jun 2022 16:36:44 +0200 Message-Id: <20220606143644.1151112-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606143644.1151112-1-pbonzini@redhat.com> References: <20220606143644.1151112-1-pbonzini@redhat.com> MIME-Version: 1.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654528304665100001 Content-Type: text/plain; charset="utf-8" The function will return the build root of the parent project if called fro= m a subproject; that is irrelevant for QEMU's usage but rarely desirable, and therefore the function was deprecated and replaced by two functions project_build_root() and global_build_root(). Replace it with the former. Signed-off-by: Paolo Bonzini --- qga/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/meson.build b/qga/meson.build index 619ff095bc..65c1e93846 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -125,7 +125,7 @@ if targetos =3D=3D 'windows' wixl, '-o', '@OUTPUT0@', '@INPUT0@', qemu_ga_msi_arch[cpu], qemu_ga_msi_vss, - '-D', 'BUILD_DIR=3D' + meson.build_root(), + '-D', 'BUILD_DIR=3D' + meson.project_build_r= oot(), '-D', 'BIN_DIR=3D' + glib.get_variable('bind= ir'), '-D', 'QEMU_GA_VERSION=3D' + config_host['QE= MU_GA_VERSION'], '-D', 'QEMU_GA_MANUFACTURER=3D' + config_hos= t['QEMU_GA_MANUFACTURER'], --=20 2.36.1