From patchwork Thu Sep 7 12:59:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Tsh6gUBl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKB11NmVz1yh8 for ; Thu, 7 Sep 2023 23:01:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcZ-0002az-To; Thu, 07 Sep 2023 09:00:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcT-0002aX-71 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcK-0006RA-LT for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091614; 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=suF/0D6+0X4K+OiIqd3LL7gSvssUT0iVpfKnhOUhM8s=; b=Tsh6gUBlqSyREJvaVEZ28PrOYODeT+Svj7GqDkTbV44+2ZF+8OTTgGugA9daGciMoA4L+J HEE3Gbh7I+hp0YkpG3zPdkJCNeW4PSVq9xi42Og5d9vBI8g4Wo7E0iU2I/tJoCuTYGchbD PaN0XokiUC4p/h9Pft59IMvzPIIdR1c= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-88-pstJX3M0NGquQYqGAChXFA-1; Thu, 07 Sep 2023 09:00:10 -0400 X-MC-Unique: pstJX3M0NGquQYqGAChXFA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401db25510fso6605085e9.1 for ; Thu, 07 Sep 2023 06:00:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091609; x=1694696409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=suF/0D6+0X4K+OiIqd3LL7gSvssUT0iVpfKnhOUhM8s=; b=k/yN889LFrZzJtruuIIpPOnjN2Jfi9tRUmGHO1UarYQeCPCVVsDuK9uFfcrEo5KP3f 6jtdxJ+/n7aBlByUxuCTrhkB8SCV38Gl+/ezN3jF5/ECnYQ6tOZg9okmmw/5xFjvo1QA FMpvkvJyOfITtpwro6x0uvsRrf2du5TLLJd7kjyIUxMwU2ubfVAZReEKAJPJ1uHJcDPV /haFWYoiOPb2lJIkpVHgn6F/VgTP/sFfbH2hrITx5/mHq+3hC4RObknfyQhgem7hrm9v S8fqUoudFGKDWOPiStPTchH9OFQB3PeJTS8oKiGtKMOF9VgbXxXj/QK6lO/sC+cnJq+w TxvQ== X-Gm-Message-State: AOJu0YxCLY/5kNvjO/In0IhqDHPUS0crlPgmMpKGZRM3Drc41v9MkcKH fs0DZha86eU8Ml7tBDnRhfOFd8jnH/owEt72ggILPqarH0hiUpSTwvEZNPS7RPxLDf9+pAhyAJl wn7PciEqUgJoJYfIhqUvsZqCuF1Ui6VDhfhuKL+1yKAEd6yR1oPz3EQcbie2jqlrwoIPowin8ik I= X-Received: by 2002:a05:600c:285:b0:3fb:b890:128e with SMTP id 5-20020a05600c028500b003fbb890128emr4527073wmk.33.1694091609082; Thu, 07 Sep 2023 06:00:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLmhqrt03UYfPqDFLcT7Q0uzw0VzTi1rxNjx6XzvyhYChHD3O5Y6BJZFv80QsLarVu6Hu9Lw== X-Received: by 2002:a05:600c:285:b0:3fb:b890:128e with SMTP id 5-20020a05600c028500b003fbb890128emr4527052wmk.33.1694091608696; Thu, 07 Sep 2023 06:00:08 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c378500b003fefca26c72sm2490140wmr.23.2023.09.07.06.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:07 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 01/51] linux-user, bsd-user: disable on unsupported host architectures Date: Thu, 7 Sep 2023 14:59:10 +0200 Message-ID: <20230907130004.500601-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Safe signal handling around system calls is mandatory for user-mode emulation, and requires a small piece of handwritten assembly code. So refuse to compile unless the common-user/host subdirectory exists for the host architecture that was detected or selected with --cpu. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/configure b/configure index b9bd008592a..b9af8282293 100755 --- a/configure +++ b/configure @@ -871,30 +871,36 @@ fi default_target_list="" mak_wilds="" -if [ "$linux_user" != no ]; then - if [ "$targetos" = linux ] && [ -n "$host_arch" ]; then - linux_user=yes - elif [ "$linux_user" = yes ]; then - error_exit "linux-user not supported on this architecture" +if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" ]; then + if [ "$linux_user" != no ]; then + if [ "$targetos" = linux ]; then + linux_user=yes + elif [ "$linux_user" = yes ]; then + error_exit "linux-user not supported on this architecture" + fi + if [ "$linux_user" = "yes" ]; then + mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak" + fi fi -fi -if [ "$bsd_user" != no ]; then - if [ "$bsd_user" = "" ]; then - test $targetos = freebsd && bsd_user=yes + if [ "$bsd_user" != no ]; then + if [ "$bsd_user" = "" ]; then + test $targetos = freebsd && bsd_user=yes + fi + if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$targetos" ]; then + error_exit "bsd-user not supported on this host OS" + fi + if [ "$bsd_user" = "yes" ]; then + mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak" + fi fi - if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$targetos" ]; then - error_exit "bsd-user not supported on this host OS" +else + if [ "$linux_user" = yes ] || [ "$bsd_user" = yes ]; then + error_exit "user mode emulation not supported on this architecture" fi fi if [ "$softmmu" = "yes" ]; then mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak" fi -if [ "$linux_user" = "yes" ]; then - mak_wilds="${mak_wilds} $source_path/configs/targets/*-linux-user.mak" -fi -if [ "$bsd_user" = "yes" ]; then - mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak" -fi for config in $mak_wilds; do target="$(basename "$config" .mak)" From patchwork Thu Sep 7 12:59:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JWsBsq1a; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKRb0gHtz1yh1 for ; Thu, 7 Sep 2023 23:12:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEce-0002fa-Uc; Thu, 07 Sep 2023 09:00:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcX-0002b0-Ny for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcS-0006qP-4L for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091622; 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=Xlr45G5C6xexMq0NTZNVR03eFmnGOKr/6t+s6N27Hqc=; b=JWsBsq1a9XhnCTyxlfmcnNP8VqucF0zEAm8fC3NqVbW2Enc7O/HtQb26ZQYa6ISP8KvZHL j3v7lUTPF4O0qWgG7NUFuaQeQoQIuerLUz93UbSdEagKeDPq/bnX5oV/IXeoFNgOZqmmOc 4O4/JrMhzzWrukvBk8M2ZWf3bnSuQTg= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-3QJ_eUvYNF-0GEJDIIrChA-1; Thu, 07 Sep 2023 09:00:15 -0400 X-MC-Unique: 3QJ_eUvYNF-0GEJDIIrChA-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31f5757f489so575279f8f.2 for ; Thu, 07 Sep 2023 06:00:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091613; x=1694696413; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xlr45G5C6xexMq0NTZNVR03eFmnGOKr/6t+s6N27Hqc=; b=Y4bcxepZpdhzQ1AAopvVaxg53CtWl4qevo2yxtN6NjhqluOEMhMAcHd7OgH7FuiDW6 OdEwSYMQpX3hnPnPcbd1QYvx9h6L6YND3Qljh/j8USOCkOH8Oa8xmfBUjnlfmInsyeBk MDe9vxBv2uWSlEctiOOQg7BF7ij3iVm+E0lNYtYx2AcnARDIyqfR0vvb7GQgPkk68eqH r8dsFjTuuoEZGtEKlsTOaeua+OBvZg9LyMFmFiUI2Q5w+LP8m2603ba0x5VCUSR47Cuv mIZJvLYmFz64w+wbVwvJH1iwN4gwQBEjWneKOgjScOpJ3Ql40oT/WVpsjgwj/k0Vbdvl MUzA== X-Gm-Message-State: AOJu0YytN9r49ErUzZKsZfQettmDjcMthFODTo9lNMyewSNiqdxXiU63 LAHzygKIrcAi8xPW8GeKkY+EfNEQjR33ko+LM7KiYUa77y5Cx07wUMoKvHvHSMOcV6TGv1iGXKG Qu4hHDGAqkQtFtpz/2+rAQw87rdiTaXu2kIS54r7sftrH8jBUvMlNv8upFUYc7dV0G0GJ9aITx9 E= X-Received: by 2002:adf:db0f:0:b0:317:f702:70d8 with SMTP id s15-20020adfdb0f000000b00317f70270d8mr4493073wri.67.1694091613444; Thu, 07 Sep 2023 06:00:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHaR8KoqTaBs4QMMVM27YTMz2ib1u+oBtbcxG28ys0ImMJXzgMHNt8rtKly2KrNBXWmBqKA+w== X-Received: by 2002:adf:db0f:0:b0:317:f702:70d8 with SMTP id s15-20020adfdb0f000000b00317f70270d8mr4493047wri.67.1694091612936; Thu, 07 Sep 2023 06:00:12 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id cc11-20020a5d5c0b000000b0031f34a395e7sm17004439wrb.45.2023.09.07.06.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/51] target/i386: raise FERR interrupt with iothread locked Date: Thu, 7 Sep 2023 14:59:11 +0200 Message-ID: <20230907130004.500601-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Otherwise tcg_handle_interrupt() triggers an assertion failure: #5 0x0000555555c97369 in tcg_handle_interrupt (cpu=0x555557434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:83 #6 tcg_handle_interrupt (cpu=0x555557434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:81 #7 0x0000555555b4d58b in pic_irq_request (opaque=, irq=, level=1) at ../hw/i386/x86.c:555 #8 0x0000555555b4f218 in gsi_handler (opaque=0x5555579423d0, n=13, level=1) at ../hw/i386/x86.c:611 #9 0x00007fffa42bde14 in code_gen_buffer () #10 0x0000555555c724bb in cpu_tb_exec (cpu=cpu@entry=0x555557434cb0, itb=, tb_exit=tb_exit@entry=0x7fffe9bfd658) at ../accel/tcg/cpu-exec.c:457 Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1808 Reported-by: NyanCatTW1 Co-developed-by: Richard Henderson ' Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/fpu_helper.c | 6 ++++++ target/i386/tcg/translate.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/fpu_helper.c b/target/i386/tcg/sysemu/fpu_helper.c index 1c3610da3b9..93506cdd94e 100644 --- a/target/i386/tcg/sysemu/fpu_helper.c +++ b/target/i386/tcg/sysemu/fpu_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/main-loop.h" #include "cpu.h" #include "hw/irq.h" @@ -31,7 +32,9 @@ void x86_register_ferr_irq(qemu_irq irq) void fpu_check_raise_ferr_irq(CPUX86State *env) { if (ferr_irq && !(env->hflags2 & HF2_IGNNE_MASK)) { + qemu_mutex_lock_iothread(); qemu_irq_raise(ferr_irq); + qemu_mutex_unlock_iothread(); return; } } @@ -45,6 +48,9 @@ void cpu_clear_ignne(void) void cpu_set_ignne(void) { CPUX86State *env = &X86_CPU(first_cpu)->env; + + assert(qemu_mutex_iothread_locked()); + env->hflags2 |= HF2_IGNNE_MASK; /* * We get here in response to a write to port F0h. The chipset should diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 90c7b32f362..e0a622941cb 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -4619,7 +4619,11 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) case 0x0a: /* grp d9/2 */ switch (rm) { case 0: /* fnop */ - /* check exceptions (FreeBSD FPU probe) */ + /* + * check exceptions (FreeBSD FPU probe) + * needs to be treated as I/O because of ferr_irq + */ + translator_io_start(&s->base); gen_helper_fwait(cpu_env); update_fip = false; break; @@ -5548,6 +5552,8 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) (HF_MP_MASK | HF_TS_MASK)) { gen_exception(s, EXCP07_PREX); } else { + /* needs to be treated as I/O because of ferr_irq */ + translator_io_start(&s->base); gen_helper_fwait(cpu_env); } break; From patchwork Thu Sep 7 12:59:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=acYtVB7s; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKB10gvlz1ygc for ; Thu, 7 Sep 2023 23:01:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcd-0002e5-Si; Thu, 07 Sep 2023 09:00:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcV-0002aq-8f for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcR-0006qI-7q for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091622; 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=r1WiRlJzYZgG+NP4gVjTCKyvNr2I9p2YQt4qg2aGfx4=; b=acYtVB7sK6Jk/ZKDZ2rBRfv2ptoIULCiO5B9qRtaU3QC8oZrbrhwk93PzdDE8pDyNYwFYJ EO/y4ffz+OydgfWOCZ2+lAR4py4NQFULZVOmPJlE5B9dwt0pHeW8BrMYjfgwajxLBet1Wo dmC1gYf+E4Txf4mWqf2e5Mrd7JI1c2I= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-dpoSJq-JOTCfzv_OeIIV7A-1; Thu, 07 Sep 2023 09:00:18 -0400 X-MC-Unique: dpoSJq-JOTCfzv_OeIIV7A-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fd0fa4d08cso6208175e9.1 for ; Thu, 07 Sep 2023 06:00:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091615; x=1694696415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r1WiRlJzYZgG+NP4gVjTCKyvNr2I9p2YQt4qg2aGfx4=; b=lN87glX9ezDzZFS3bas896pYAbeXuszJRW1Up0t+K4tgkpb6JXjFGhcyxxB++wG6UM sj1d6Y13uQrH1j0K1iS32nudCiG9jODGys37p8n/xS5lL1F10J7HSo36cRX6Zms93Bl2 B7DZ2Id4ofIzOxhXMq39E2wipQMB2IoEcjYsVj+r5R8co/RemcaBXpYgWSgQtxYWh7Rh sz9r4egJB6hTvgWtmuIL/7xgGcd7BQc6RpsowBBTxNy1frJ4FdEcIyrS8bX8VAs5yaD4 em5Lm4nP7gNZO0z4qwA2OB7qtE8K3qqb7v8RTy838Lg0fg0hnkJmEUIqjFZKxq5cR52Z /dTw== X-Gm-Message-State: AOJu0YyADDFxJ+Giu9pKmsUTxedFpySMahjy3/JeQLceIK0+ZVfhv6EP +w07HgTfD9LivVUaNm9Lm4kMn5JiNyOHtok9qdI3ccYtvsrZkqbPGP0Us5Dh1FE+AODwdqaA5Bi hUW0WSpF7CxjDItYNJeuxFm3Tyy7Iockpa1oA/q+KAt0+DPpf2TCoSxKekukJTcQzSX03Qv5/Vk I= X-Received: by 2002:a05:600c:2611:b0:3fb:c9f4:150e with SMTP id h17-20020a05600c261100b003fbc9f4150emr4743507wma.14.1694091615671; Thu, 07 Sep 2023 06:00:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFY4Hv6i5KrkVX/L2Dyf6KIrlREB+gvwkgSJk5WvDgFnHoBA6gtaciGl+vQDXLkHkoccvehcg== X-Received: by 2002:a05:600c:2611:b0:3fb:c9f4:150e with SMTP id h17-20020a05600c261100b003fbc9f4150emr4743489wma.14.1694091615206; Thu, 07 Sep 2023 06:00:15 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id k9-20020a05600c0b4900b003fe2b081661sm2457077wmr.30.2023.09.07.06.00.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/51] target/i386: generalize operand size "ph" for use in CVTPS2PD Date: Thu, 7 Sep 2023 14:59:12 +0200 Message-ID: <20230907130004.500601-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org CVTPS2PD only loads a half-register for memory, like CVTPH2PS. It can reuse the "ph" packed half-precision size to load a half-register, but rename it to "xh" because it is now a variation of "x" (it is not used only for half-precision values). Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 6 +++--- target/i386/tcg/decode-new.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index 8f93a239ddb..43c39aad2aa 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -337,7 +337,7 @@ static const X86OpEntry opcodes_0F38_00toEF[240] = { [0x07] = X86_OP_ENTRY3(PHSUBSW, V,x, H,x, W,x, vex4 cpuid(SSSE3) mmx avx2_256 p_00_66), [0x10] = X86_OP_ENTRY2(PBLENDVB, V,x, W,x, vex4 cpuid(SSE41) avx2_256 p_66), - [0x13] = X86_OP_ENTRY2(VCVTPH2PS, V,x, W,ph, vex11 cpuid(F16C) p_66), + [0x13] = X86_OP_ENTRY2(VCVTPH2PS, V,x, W,xh, vex11 cpuid(F16C) p_66), [0x14] = X86_OP_ENTRY2(BLENDVPS, V,x, W,x, vex4 cpuid(SSE41) p_66), [0x15] = X86_OP_ENTRY2(BLENDVPD, V,x, W,x, vex4 cpuid(SSE41) p_66), /* Listed incorrectly as type 4 */ @@ -565,7 +565,7 @@ static const X86OpEntry opcodes_0F3A[256] = { [0x15] = X86_OP_ENTRY3(PEXTRW, E,w, V,dq, I,b, vex5 cpuid(SSE41) zext0 p_66), [0x16] = X86_OP_ENTRY3(PEXTR, E,y, V,dq, I,b, vex5 cpuid(SSE41) p_66), [0x17] = X86_OP_ENTRY3(VEXTRACTPS, E,d, V,dq, I,b, vex5 cpuid(SSE41) p_66), - [0x1d] = X86_OP_ENTRY3(VCVTPS2PH, W,ph, V,x, I,b, vex11 cpuid(F16C) p_66), + [0x1d] = X86_OP_ENTRY3(VCVTPS2PH, W,xh, V,x, I,b, vex11 cpuid(F16C) p_66), [0x20] = X86_OP_ENTRY4(PINSRB, V,dq, H,dq, E,b, vex5 cpuid(SSE41) zext2 p_66), [0x21] = X86_OP_GROUP0(VINSERTPS), @@ -1104,7 +1104,7 @@ static bool decode_op_size(DisasContext *s, X86OpEntry *e, X86OpSize size, MemOp *ot = s->vex_l ? MO_256 : MO_128; return true; - case X86_SIZE_ph: /* SSE/AVX packed half precision */ + case X86_SIZE_xh: /* SSE/AVX packed half register */ *ot = s->vex_l ? MO_128 : MO_64; return true; diff --git a/target/i386/tcg/decode-new.h b/target/i386/tcg/decode-new.h index cb6b8bcf678..a542ec16813 100644 --- a/target/i386/tcg/decode-new.h +++ b/target/i386/tcg/decode-new.h @@ -92,7 +92,7 @@ typedef enum X86OpSize { /* Custom */ X86_SIZE_d64, X86_SIZE_f64, - X86_SIZE_ph, /* SSE/AVX packed half precision */ + X86_SIZE_xh, /* SSE/AVX packed half register */ } X86OpSize; typedef enum X86CPUIDFeature { From patchwork Thu Sep 7 12:59:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WTP9WCGS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKCw5075z1ygc for ; Thu, 7 Sep 2023 23:02:52 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcj-0002hr-Rb; Thu, 07 Sep 2023 09:00:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcg-0002gZ-RC for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcd-00079k-7b for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091632; 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=VcQp4Nu7qms1E618oj3yKlSa39t/aiTfJUe0HGYoCPA=; b=WTP9WCGST0YZKQF5KT37FNktaKRqzNQEJGsuC8ELE+Gu5hy27mJrrfoS4YL2dManvcuLBf CFWixWM1Pe2X3uJ70+TXW3crScQVJ5rc9stas0vfNbTfrzCTbbmtYpGRu5BDNwF4DsftPW ieN1Qb+yGcUfzfgfr1c3LfIkpF/DwkQ= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-3oA6t2L5P2W8kvVmOH8Q3Q-1; Thu, 07 Sep 2023 09:00:26 -0400 X-MC-Unique: 3oA6t2L5P2W8kvVmOH8Q3Q-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fefea09bd0so6263385e9.0 for ; Thu, 07 Sep 2023 06:00:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091617; x=1694696417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VcQp4Nu7qms1E618oj3yKlSa39t/aiTfJUe0HGYoCPA=; b=XddcftyT6D3eI0LO7/BaOs685pjzRqM+t4bWFWD58TtJd069VBCzSRwodoW2HvLW1Z rCj7OphYN1Df6U+/FCi6cvqUMo5jDKKp7HCwyr4LJt6eEiHdfPlIoPvrJ12Ec8tjBDUE HxqE57tUNqMEh9AwFPEnH0aMf+wVITBpMJ2vcFtEki+rJva8LV0hDBxoOvb04WkZgcp6 WBnmkWtaRnxCxPiCEmz/s9yWXM5lvpRNtoq1mcs/Ru6LNVsRzwND7V9Ndcyhwlr/tOTH 250XpKGzzgDlP+0qx86gWsgJ6TNPgH8am1tU7k0N9iDT/6juDrePzuK+TSPVPjr3EWAW nAIA== X-Gm-Message-State: AOJu0YxpXn2ajGZ6c2oC+r7BBP9QDCgZVGtw0xfzCQErALIbhEGpV7FI 79TCDhdrsoDGMPkjl/5OE0Tl6Fsv8sVNyjAGtAJT4c/LHfsGARH002jWUTxn9PzJbHIcDlDxGRV PX/VDJ3lHbcl4UKJeiH1Ee7qmz/Kb/Qxp0EtjCWYlOAp13Xsj0B2+GU7jGbMS3XkvZESyON9bsU U= X-Received: by 2002:a5d:6548:0:b0:317:71bb:7ccd with SMTP id z8-20020a5d6548000000b0031771bb7ccdmr4750824wrv.52.1694091617314; Thu, 07 Sep 2023 06:00:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8tkYMaOrZgfrRZouugKg1n/Ksvi+CNftQMS7XHjQIP05ndvrMGiBPUEjGITkYn9zYRTOwPw== X-Received: by 2002:a5d:6548:0:b0:317:71bb:7ccd with SMTP id z8-20020a5d6548000000b0031771bb7ccdmr4750809wrv.52.1694091616975; Thu, 07 Sep 2023 06:00:16 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id h8-20020a5d4fc8000000b0031ae8d86af4sm23106908wrw.103.2023.09.07.06.00.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/51] target/i386: fix memory operand size for CVTPS2PD Date: Thu, 7 Sep 2023 14:59:13 +0200 Message-ID: <20230907130004.500601-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org CVTPS2PD only loads a half-register for memory, unlike the other operations under 0x0F 0x5A. "Unpack" the group into separate emission functions instead of using gen_unary_fp_sse. Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 14 ++++++++++++-- target/i386/tcg/emit.c.inc | 30 +++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index 43c39aad2aa..0db19cda3b7 100644 --- a/target/i386/tcg/decode-new.c.inc +++ b/target/i386/tcg/decode-new.c.inc @@ -805,10 +805,20 @@ static void decode_sse_unary(DisasContext *s, CPUX86State *env, X86OpEntry *entr case 0x51: entry->gen = gen_VSQRT; break; case 0x52: entry->gen = gen_VRSQRT; break; case 0x53: entry->gen = gen_VRCP; break; - case 0x5A: entry->gen = gen_VCVTfp2fp; break; } } +static void decode_0F5A(DisasContext *s, CPUX86State *env, X86OpEntry *entry, uint8_t *b) +{ + static const X86OpEntry opcodes_0F5A[4] = { + X86_OP_ENTRY2(VCVTPS2PD, V,x, W,xh, vex2), /* VCVTPS2PD */ + X86_OP_ENTRY2(VCVTPD2PS, V,x, W,x, vex2), /* VCVTPD2PS */ + X86_OP_ENTRY3(VCVTSS2SD, V,x, H,x, W,x, vex2_rep3), /* VCVTSS2SD */ + X86_OP_ENTRY3(VCVTSD2SS, V,x, H,x, W,x, vex2_rep3), /* VCVTSD2SS */ + }; + *entry = *decode_by_prefix(s, opcodes_0F5A); +} + static void decode_0F5B(DisasContext *s, CPUX86State *env, X86OpEntry *entry, uint8_t *b) { static const X86OpEntry opcodes_0F5B[4] = { @@ -891,7 +901,7 @@ static const X86OpEntry opcodes_0F[256] = { [0x58] = X86_OP_ENTRY3(VADD, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2), [0x59] = X86_OP_ENTRY3(VMUL, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2), - [0x5a] = X86_OP_GROUP3(sse_unary, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2), /* CVTPS2PD */ + [0x5a] = X86_OP_GROUP0(0F5A), [0x5b] = X86_OP_GROUP0(0F5B), [0x5c] = X86_OP_ENTRY3(VSUB, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2), [0x5d] = X86_OP_ENTRY3(VMIN, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2), diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index 4fe8dec4274..45a3e55cbfb 100644 --- a/target/i386/tcg/emit.c.inc +++ b/target/i386/tcg/emit.c.inc @@ -1914,12 +1914,22 @@ static void gen_VCOMI(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) set_cc_op(s, CC_OP_EFLAGS); } -static void gen_VCVTfp2fp(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) +static void gen_VCVTPD2PS(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) { - gen_unary_fp_sse(s, env, decode, - gen_helper_cvtpd2ps_xmm, gen_helper_cvtps2pd_xmm, - gen_helper_cvtpd2ps_ymm, gen_helper_cvtps2pd_ymm, - gen_helper_cvtsd2ss, gen_helper_cvtss2sd); + if (s->vex_l) { + gen_helper_cvtpd2ps_ymm(cpu_env, OP_PTR0, OP_PTR2); + } else { + gen_helper_cvtpd2ps_xmm(cpu_env, OP_PTR0, OP_PTR2); + } +} + +static void gen_VCVTPS2PD(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) +{ + if (s->vex_l) { + gen_helper_cvtps2pd_ymm(cpu_env, OP_PTR0, OP_PTR2); + } else { + gen_helper_cvtps2pd_xmm(cpu_env, OP_PTR0, OP_PTR2); + } } static void gen_VCVTPS2PH(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) @@ -1936,6 +1946,16 @@ static void gen_VCVTPS2PH(DisasContext *s, CPUX86State *env, X86DecodedInsn *dec } } +static void gen_VCVTSD2SS(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) +{ + gen_helper_cvtsd2ss(cpu_env, OP_PTR0, OP_PTR1, OP_PTR2); +} + +static void gen_VCVTSS2SD(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) +{ + gen_helper_cvtss2sd(cpu_env, OP_PTR0, OP_PTR1, OP_PTR2); +} + static void gen_VCVTSI2Sx(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode) { int vec_len = vector_len(s, decode); From patchwork Thu Sep 7 12:59:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830865 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dqAnlUDr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKBK3p3nz1yh8 for ; Thu, 7 Sep 2023 23:01:29 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcj-0002hq-RC; Thu, 07 Sep 2023 09:00:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEch-0002gh-BF for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcZ-000780-T5 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091630; 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=q6ODDnQNN/yca4TsH5pqpBUjMw+REKkxizVyjE0ZBfg=; b=dqAnlUDrZu0xQ7S26WveNFvKPSRvIXHqx4lTTUQAtatTzmwioIc1F2T0XU4k4ERLTdD8mj trj2xBkgyZfCx+tAxyO5Wn4pYvQjsnCPnotwXri/ST74/heNUrBqrvP8+R5Iitfr+pcdFa qqEynu3GAYtFZUkYMXToleARhL9MS/4= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-AqLoWeLrOZmS0wwOPbakNg-1; Thu, 07 Sep 2023 09:00:27 -0400 X-MC-Unique: AqLoWeLrOZmS0wwOPbakNg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31aca0c0d63so565076f8f.0 for ; Thu, 07 Sep 2023 06:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091619; x=1694696419; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q6ODDnQNN/yca4TsH5pqpBUjMw+REKkxizVyjE0ZBfg=; b=JUOqDfvdkmktJoAc/JeC+GYn0PLqSJ5YulWGkfDH9Sffa8UY89trlemoAJLXR8NaBG 94WSXISfYxCAi0g8+KO6PPpxa5m0KydBlAxNcytUROAvYw5F2dBX/IhirrZ0wgp47Qif BthlGzGjdgk7qEBVXI98RG+5OPWXmTrba7n6EbZKINiPpscbspqO5GgkKtxmcQbkLnVW gy2p8qIJkqvLKac4DaAn/UnoAgveyLNUZtSctpLYYAbMfgXxJ2dydCYqn+vKo6xvLLyT 0D1NMWMVvQXnOVjaR6gdYrqpM7YG31S9Pq4koot83KzH5kcINUtSPdV8pu7azBDQz51M rgIw== X-Gm-Message-State: AOJu0YxHaNmG9Ms677phHGcl5B0yn+mh/34Yd60eEsJoNEu8W+ZeP2cr muI+QjFeR+nLLBmJgl1TEzvZGjlznSjznMcKFq3Zt+x42ms3iDsboqYgKm914aBIytPtQPXl0ke vu1yRkAyibNBSAM6b4zMAc3MoBpxIcUFBxS1MPsqZ+mcaqq6JwKik0OS6tfsJ1Th14ZZ5fSDvVV w= X-Received: by 2002:adf:fd06:0:b0:315:ad1a:5abc with SMTP id e6-20020adffd06000000b00315ad1a5abcmr5561411wrr.5.1694091619286; Thu, 07 Sep 2023 06:00:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHze0OkGh7yu4Q8mO+r0q0bX8hz+yoprXIGinl4dTrhZs8QoUFeSnQrjS2YHUVNSoeAa43Pg== X-Received: by 2002:adf:fd06:0:b0:315:ad1a:5abc with SMTP id e6-20020adffd06000000b00315ad1a5abcmr5561388wrr.5.1694091618859; Thu, 07 Sep 2023 06:00:18 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id s12-20020a5d4ecc000000b0031423a8f4f7sm23466471wrv.56.2023.09.07.06.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Tao Su , Xiaoyao Li Subject: [PULL 05/51] target/i386: Add support for AMX-COMPLEX in CPUID enumeration Date: Thu, 7 Sep 2023 14:59:14 +0200 Message-ID: <20230907130004.500601-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Tao Su Latest Intel platform GraniteRapids-D introduces AMX-COMPLEX, which adds two instructions to perform matrix multiplication of two tiles containing complex elements and accumulate the results into a packed single precision tile. AMX-COMPLEX is enumerated via CPUID.(EAX=7,ECX=1):EDX[bit 8]. Add the CPUID definition for AMX-COMPLEX, AMX-COMPLEX will be enabled automatically when using '-cpu host' and KVM advertises AMX-COMPLEX to userspace. Signed-off-by: Tao Su Reviewed-by: Xiaoyao Li Message-ID: <20230830074324.84059-1-tao1.su@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 00f913b6382..24ee67b42d0 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -980,7 +980,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { .feat_names = { NULL, NULL, NULL, NULL, "avx-vnni-int8", "avx-ne-convert", NULL, NULL, - NULL, NULL, NULL, NULL, + "amx-complex", NULL, NULL, NULL, NULL, NULL, "prefetchiti", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index a6000e93bd8..fbb05eace57 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -930,6 +930,8 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord w, #define CPUID_7_1_EDX_AVX_VNNI_INT8 (1U << 4) /* AVX NE CONVERT Instructions */ #define CPUID_7_1_EDX_AVX_NE_CONVERT (1U << 5) +/* AMX COMPLEX Instructions */ +#define CPUID_7_1_EDX_AMX_COMPLEX (1U << 8) /* PREFETCHIT0/1 Instructions */ #define CPUID_7_1_EDX_PREFETCHITI (1U << 14) From patchwork Thu Sep 7 12:59:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hngdydl6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKBf11fvz1ygc for ; Thu, 7 Sep 2023 23:01:46 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEck-0002iJ-LX; Thu, 07 Sep 2023 09:00:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcj-0002hc-4o for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcg-0007EY-96 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091637; 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=dKa/HTgjgxw/QaVwksImsBsboXLveUKajuIt62ZHnTE=; b=hngdydl6Tz4SnV9d8Lt4cdkou1STORP/rBJw3kvzZrA0V53LyOO5RR4AD0pIimbnVlUnVK tcC1ip1Usba7Flmtrfl/peNaeBWcTRPG2RekhEXrLDc+NYZWQgc8aGZ9iBqiLidj3Ao8Dq bv3KepA2RS6qfyxh3dxaE5mbRPPueFY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-512-B3Bp31TdOLWXFs9scuKQjQ-1; Thu, 07 Sep 2023 09:00:31 -0400 X-MC-Unique: B3Bp31TdOLWXFs9scuKQjQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-31c5cc3b512so604532f8f.1 for ; Thu, 07 Sep 2023 06:00:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091621; x=1694696421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dKa/HTgjgxw/QaVwksImsBsboXLveUKajuIt62ZHnTE=; b=c4FiMoBr0gu6Mi+ToUapBlFkH/reSyeKSjgISamwCUgg7JG3Cej9lfq45tSv+PleIz PH58b6aQUZ8DVduh+w2YV8BZT4SonqsQ4fDcSi+NHog5ngMENDW7QGtMh2NQKFr08LoF PFRkQBiaQt2gGSSjiRUcdOG8k1WWPnIZFihOD8AG4xkcCTvyGpr5XmvBMj1aSrUn3o9s rjVUn3QCy7MEyVJXFEur7dTREDM8pAi+mqeMhpSWbq3o0jsIhD4cHe4fMop4S+51b3WE vE/miwEYfDfLIubSxCJR0Ct6oCg2tfZUH6UoIehuL/aQ70mhSNW3ZgO8M/VjrjLNc9VI ofLA== X-Gm-Message-State: AOJu0YxTzol2MQ/fy0RLI7Ww7YntOW+w8w8H/uQZsKttPMzcRjsEQQ+B muOaSGejVQgKwaXzFVSOE59lwROcmc40q+dfbvkOFa4hlQEOzgUXprwl8GCWItKWuBjSvNOUxNk Ebc4YG9RW10aKL5xZcvwf3SrRjWuPEUD42Dlu6b2o309fgblPEaHfVafx64yZ+30LyC/rPIsiSd k= X-Received: by 2002:a5d:4d8f:0:b0:319:755c:3c1e with SMTP id b15-20020a5d4d8f000000b00319755c3c1emr4222567wru.11.1694091621695; Thu, 07 Sep 2023 06:00:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFv4vhKu/v26kqFcgjkP13AcaJpgYaEoffmZll1pnEBYk6Rzg8MO2nVcaXxDnCa/o2IiN9MyQ== X-Received: by 2002:a5d:4d8f:0:b0:319:755c:3c1e with SMTP id b15-20020a5d4d8f000000b00319755c3c1emr4222548wru.11.1694091621380; Thu, 07 Sep 2023 06:00:21 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id m18-20020a056000181200b00317f29ad113sm23119268wrh.32.2023.09.07.06.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 06/51] include/sysemu/os-posix.h: move *daemonize* declarations together Date: Thu, 7 Sep 2023 14:59:15 +0200 Message-ID: <20230907130004.500601-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-2-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 1030d39904a..65b9c94e919 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -47,13 +47,12 @@ void os_set_line_buffering(void); void os_setup_early_signal_handling(void); void os_set_proc_name(const char *s); void os_setup_signal_handling(void); +int os_set_daemonize(bool d); +bool is_daemonized(void); void os_daemonize(void); void os_setup_post(void); int os_mlock(void); -int os_set_daemonize(bool d); -bool is_daemonized(void); - /** * qemu_alloc_stack: * @sz: pointer to a size_t holding the requested usable stack size From patchwork Thu Sep 7 12:59:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830880 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=A1dmLpnb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKJc1p6cz1ygR for ; Thu, 7 Sep 2023 23:06:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdC-0002tP-Js; Thu, 07 Sep 2023 09:01:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcp-0002mA-9m for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcb-00079e-4m for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091632; 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=apj0wqzDG1HTN7fF4efJ4aV5GoQliv8/RoC2dU7fXXI=; b=A1dmLpnb6O8+1n3xcQLxLe838pF+h6g8zu/5QY8ZEfu+DnO7uvNM3yGWT/fQ/F2wj2YwO6 p0STjanHj6Lj6P0DMbQtBUZnzrcBsLZ085k3rQJYsmZi1H81FVmjigF+PvS6+z+fWMJCdG Wrc1tRmb7sVMiXjnnVjeQUaVH7p0Hqc= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-pNio4c1VPPWu2kAHRChmjw-1; Thu, 07 Sep 2023 09:00:27 -0400 X-MC-Unique: pNio4c1VPPWu2kAHRChmjw-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-31f3233861aso639845f8f.2 for ; Thu, 07 Sep 2023 06:00:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091623; x=1694696423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=apj0wqzDG1HTN7fF4efJ4aV5GoQliv8/RoC2dU7fXXI=; b=Bgt2zoDztHEYZhVb1ThFfD/5ViNsrsexZxv8lMcSFgQf4d6+Zyu/fkMgGfcnprG2Ky D8SMYbQppyY3b4g0kRQAV5mcwtnd75E+7lkuIjbCGDYFe3qFUOJ+IxUkqZruY/bgBPkP LGb8vIBTEmChtjEs07Hyih6tnbHUNM8rYU/kvYxHcvB8b59TPme8mWSCWEvXeeYoTsoY 1BFxiA58yS6MqTKuHgm6lHe/xDRr39Rz9YbxJCVOxS2hVvcZZptZfhxaptJ460jzn4Xc FdblOslOgNsP87bNKds9xf9e4nuNIUhLreeU/CES0q11yYS5XV6Q3krrc0RL5enfrcan IOsg== X-Gm-Message-State: AOJu0YxVYIKerwkAvHKyyyY2ruazXl3ozDwEAcgwTIuVVKjjjUAvJjH6 u0D22J4OAOeQMC0YMsfqPdA6Aji1H387rY6S+2YXY1GzrwYj6v0fQGDig//gWbOBzzuqVH86Dsb ACPssC7KFqG6//mHJKqXq8BeXChZOeNGjD97WAEO6UnB0BowqvelYdLmHd4z4rc9UYArPZJed3w Y= X-Received: by 2002:a05:6000:901:b0:317:67bf:3376 with SMTP id cw1-20020a056000090100b0031767bf3376mr4901169wrb.57.1694091623584; Thu, 07 Sep 2023 06:00:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsb3vkCbR5ju2oPyvM0m3aM74jGqGiBL0Yl9WyfZsawGMVIPWy+fDbibu03Jzmli/yWJ4KNg== X-Received: by 2002:a05:6000:901:b0:317:67bf:3376 with SMTP id cw1-20020a056000090100b0031767bf3376mr4901147wrb.57.1694091623281; Thu, 07 Sep 2023 06:00:23 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id f12-20020adffccc000000b003143c9beeaesm23194222wrs.44.2023.09.07.06.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake , Richard Henderson Subject: [PULL 07/51] os-posix.c: create and export os_set_runas() Date: Thu, 7 Sep 2023 14:59:16 +0200 Message-ID: <20230907130004.500601-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Reviewed-by: Richard Henderson Message-ID: <20230901101302.3618955-3-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 1 + os-posix.c | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 65b9c94e919..d32630f9e76 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -50,6 +50,7 @@ void os_setup_signal_handling(void); int os_set_daemonize(bool d); bool is_daemonized(void); void os_daemonize(void); +bool os_set_runas(const char *optarg); void os_setup_post(void); int os_mlock(void); diff --git a/os-posix.c b/os-posix.c index cfcb96533c1..f0ee5c8b002 100644 --- a/os-posix.c +++ b/os-posix.c @@ -102,8 +102,14 @@ void os_set_proc_name(const char *s) #endif } - -static bool os_parse_runas_uid_gid(const char *optarg) +/* + * Prepare to change user ID. optarg can be one of 3 forms: + * - a username, in which case user ID will be changed to its uid, + * with primary and supplementary groups set up too; + * - a numeric uid, in which case only the uid will be set; + * - a pair of numeric uid:gid. + */ +bool os_set_runas(const char *optarg) { unsigned long lv; const char *ep; @@ -111,6 +117,13 @@ static bool os_parse_runas_uid_gid(const char *optarg) gid_t got_gid; int rc; + user_pwd = getpwnam(optarg); + if (user_pwd) { + user_uid = -1; + user_gid = -1; + return true; + } + rc = qemu_strtoul(optarg, &ep, 0, &lv); got_uid = lv; /* overflow here is ID in C99 */ if (rc || *ep != ':' || got_uid != lv || got_uid == (uid_t)-1) { @@ -137,11 +150,7 @@ int os_parse_cmd_args(int index, const char *optarg) { switch (index) { case QEMU_OPTION_runas: - user_pwd = getpwnam(optarg); - if (user_pwd) { - user_uid = -1; - user_gid = -1; - } else if (!os_parse_runas_uid_gid(optarg)) { + if (!os_set_runas(optarg)) { error_report("User \"%s\" doesn't exist" " (and is not :)", optarg); From patchwork Thu Sep 7 12:59:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LaZUuf4V; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKPy1PNRz1yh1 for ; Thu, 7 Sep 2023 23:11:34 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcm-0002k4-14; Thu, 07 Sep 2023 09:00:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEci-0002hK-Sh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcd-0007Dm-T7 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091635; 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=cFc/BqGdfw0tOBKRYWZej0aZEHYoNuS3b5fNkajvzKI=; b=LaZUuf4VxFqUpr0Hfuo608yiP1SPCrdnwqMpRSooJdJ+K5Mdk+H2E8e3depEyI7sUmAIhn b0th0FY48OP899/eDSH7JtF8XtwU9VMT+LyXUj3lTIQNJ6RkwrFoikH+EznzVdlCc9VT7U e5qqlfIN/jk5yeqqU28mkkmRRF+r1DA= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-31kPkkS3N4mftT6YNDtueA-1; Thu, 07 Sep 2023 09:00:33 -0400 X-MC-Unique: 31kPkkS3N4mftT6YNDtueA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fefea09bd0so6264685e9.0 for ; Thu, 07 Sep 2023 06:00:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091625; x=1694696425; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cFc/BqGdfw0tOBKRYWZej0aZEHYoNuS3b5fNkajvzKI=; b=M65AVMywun6xJGdaOLr7Kck3QMxHG4LB6nQkbGREDVXSm6Q1xbRmcJBzK98cMWkhwC cBM55CKr9YH7yN2NNBM3E6EKoLtzTfmq1PWIQ3RRtbhgJAGm/wyPLKJlZw4qssXq7K17 K50/ueLjQAWlbh1+TunBk0ZlRoYpy5rpgxe3iAmC3BhUzNL9guhLw+uYUHb4f5+CU3eX px7Irgt0IjeHqG4IUrF1P67VP8TGVat7sZiGVqwFUKKF39YG4xnT0hLuUCa3Boo0eu6X IkbvRpabnedy2TNGL5gB7/uuqp8OtsJ4SguFbloDtDQPJbBtdPhzDw5b5PbvIYY/agJG ZBbA== X-Gm-Message-State: AOJu0Yyij6rETMd94KSBgmMFcSVAl1PW7QEgvUFqhQriDZDeps595eHg EEOYt7ot2Vml2u6a4aPide8FqaxVs2KS6DKsfVa83Xjqww342teIENqoA58PCTCn+f/bJ6DkK+u qZkG1J7g+N+ZfVRV3jEnav0QrQazjsylBDuSlLBVTRiS2F4oljOQg6u8Rlf/mLgKTsaBz1y3LE8 c= X-Received: by 2002:a7b:c389:0:b0:3ff:28b8:c53d with SMTP id s9-20020a7bc389000000b003ff28b8c53dmr4592326wmj.33.1694091625478; Thu, 07 Sep 2023 06:00:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFbZcpkSC3JKCV1b7jchYVsp4YqnGbzzW72o8bXkXfiRqPEOfBNxvmMMHVOk0gvFeh0egU3w== X-Received: by 2002:a7b:c389:0:b0:3ff:28b8:c53d with SMTP id s9-20020a7bc389000000b003ff28b8c53dmr4592305wmj.33.1694091625168; Thu, 07 Sep 2023 06:00:25 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id u2-20020a7bc042000000b003fbc30825fbsm2438452wmc.39.2023.09.07.06.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 08/51] os-posix.c: create and export os_set_chroot() Date: Thu, 7 Sep 2023 14:59:17 +0200 Message-ID: <20230907130004.500601-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-4-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 1 + os-posix.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index d32630f9e76..8a667633953 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -51,6 +51,7 @@ int os_set_daemonize(bool d); bool is_daemonized(void); void os_daemonize(void); bool os_set_runas(const char *optarg); +void os_set_chroot(const char *optarg); void os_setup_post(void); int os_mlock(void); diff --git a/os-posix.c b/os-posix.c index f0ee5c8b002..ed0787ecfd9 100644 --- a/os-posix.c +++ b/os-posix.c @@ -159,7 +159,7 @@ int os_parse_cmd_args(int index, const char *optarg) break; case QEMU_OPTION_chroot: warn_report("option is deprecated, use '-run-with chroot=...' instead"); - chroot_dir = optarg; + os_set_chroot(optarg); break; case QEMU_OPTION_daemonize: daemonize = 1; @@ -184,7 +184,7 @@ int os_parse_cmd_args(int index, const char *optarg) #endif str = qemu_opt_get(opts, "chroot"); if (str) { - chroot_dir = str; + os_set_chroot(str); } break; } @@ -232,6 +232,11 @@ static void change_process_uid(void) } } +void os_set_chroot(const char *optarg) +{ + chroot_dir = optarg; +} + static void change_root(void) { if (chroot_dir) { From patchwork Thu Sep 7 12:59:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H8BiGGhd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKBK3f6qz1ygc for ; Thu, 7 Sep 2023 23:01:29 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEco-0002kq-JF; Thu, 07 Sep 2023 09:00:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcl-0002ji-Eh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEci-0007F1-Si for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091640; 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=aYuXssgBTkUCtCv1DH+hKuG0uKZ+en2/n30kR0Kci5k=; b=H8BiGGhdHDlFCWJPuRMe8zmTWINnflCVrvEC7rXt0DPPYQe0uIgMTGmYfri5hlociy6ZJm W9eH5JPgSgh7E49xVeEUNdqazfjdGdqMdrcypB4pqSfyp5PVqAoTcBGWOhXb8gS+OhL5bh odCrL5c0cOJMiyniHFy7RtN7lSntb+U= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-n0iaXSqsMm2HpJBVxw97sA-1; Thu, 07 Sep 2023 09:00:35 -0400 X-MC-Unique: n0iaXSqsMm2HpJBVxw97sA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4011fa32e99so6671495e9.0 for ; Thu, 07 Sep 2023 06:00:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091627; x=1694696427; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aYuXssgBTkUCtCv1DH+hKuG0uKZ+en2/n30kR0Kci5k=; b=MKu2ub30lzNB7yJa1BqwUgX3IWomOJTNv4ircI0nhwSnsDiFLZPsPXMaqXAyoLw3Ua wW+KL3mWQZBKjvybsiq4ablv0LfLF4hPTBF94w1C1yIj1MsnAtx0451zd2MgxmIx+VpB VeQuqAN1wonVET14uWuWlaL6RhxbeCjGTDis3u2U2AnwPz1o3lhzt0JzFny+WP6dvhE0 KJJ14NPeHU2esLMXChe93sILy0nc91Kf8lGT6SQ9etCwlCltJT4yKYe1lFOjbdZTlWps JJ7FUiN5m7IWGyTDQc6CjOae4JKx0gTS/Z7qk/xnAA/vq0BbF4w/j+/YDoPI9p/VBrlM aRww== X-Gm-Message-State: AOJu0Ywvp8LCVZC/gr8+4QYWyS4Czj6jRzJPtxwAritnaCmr1z/bNbn4 cASMBUQPeQRqG+/BbDzQP/UorklModbgjIeg+q3WhuSK2zDDIdMzrfJnuiz8cvz8VV5RGneExGY huBYXwXBVlpx+ila8DyLO/SyymDtWk0FL9iXYr5/DQJlDM7cWaj/lRTyV7IMaQmyRE4GilQCY82 k= X-Received: by 2002:a05:600c:25cc:b0:401:a0b1:aef6 with SMTP id 12-20020a05600c25cc00b00401a0b1aef6mr4703710wml.2.1694091627436; Thu, 07 Sep 2023 06:00:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQgPKYqV4bab8/tJ2S4KkoxQ7Tc+0Mw+G+yPqL/pu0kVT3/Z+tMOOQtyj7PJ9n7HQfwQ0f/w== X-Received: by 2002:a05:600c:25cc:b0:401:a0b1:aef6 with SMTP id 12-20020a05600c25cc00b00401a0b1aef6mr4703679wml.2.1694091627026; Thu, 07 Sep 2023 06:00:27 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id g17-20020a7bc4d1000000b003fc02e8ea68sm2497696wmk.13.2023.09.07.06.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 09/51] os-posix.c, softmmu/vl.c: move os_parse_cmd_args() into qemu_init() Date: Thu, 7 Sep 2023 14:59:18 +0200 Message-ID: <20230907130004.500601-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev This will stop linking softmmu-specific os_parse_cmd_args() into every qemu executable which happens to use other functions from os-posix.c, such as os_set_line_buffering() or os_setup_signal_handling(). Also, since there's no win32-specific options, *all* option parsing is now done in softmmu/vl.c:qemu_init(), which is easier to read without extra indirection, - all options are in the single function now. This effectively reverts commit 59a5264b99434. Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-5-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 1 - include/sysemu/os-win32.h | 1 - os-posix.c | 82 --------------------------------------- softmmu/vl.c | 76 ++++++++++++++++++++++++++++++++++-- 4 files changed, 73 insertions(+), 87 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 8a667633953..6dfdcbb0863 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -42,7 +42,6 @@ extern "C" { #endif -int os_parse_cmd_args(int index, const char *optarg); void os_set_line_buffering(void); void os_setup_early_signal_handling(void); void os_set_proc_name(const char *s); diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 91aa0d7ec04..8ae30fac159 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -101,7 +101,6 @@ static inline void os_setup_signal_handling(void) {} static inline void os_daemonize(void) {} static inline void os_setup_post(void) {} static inline void os_set_proc_name(const char *dummy) {} -static inline int os_parse_cmd_args(int index, const char *optarg) { return -1; } void os_set_line_buffering(void); void os_setup_early_signal_handling(void); diff --git a/os-posix.c b/os-posix.c index ed0787ecfd9..fc2883ff82c 100644 --- a/os-posix.c +++ b/os-posix.c @@ -31,18 +31,13 @@ /* Needed early for CONFIG_BSD etc. */ #include "net/slirp.h" -#include "qemu/qemu-options.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "sysemu/runstate.h" #include "qemu/cutils.h" -#include "qemu/config-file.h" -#include "qemu/option.h" -#include "qemu/module.h" #ifdef CONFIG_LINUX #include -#include "qemu/async-teardown.h" #endif /* @@ -142,59 +137,6 @@ bool os_set_runas(const char *optarg) return true; } -/* - * Parse OS specific command line options. - * return 0 if option handled, -1 otherwise - */ -int os_parse_cmd_args(int index, const char *optarg) -{ - switch (index) { - case QEMU_OPTION_runas: - if (!os_set_runas(optarg)) { - error_report("User \"%s\" doesn't exist" - " (and is not :)", - optarg); - exit(1); - } - break; - case QEMU_OPTION_chroot: - warn_report("option is deprecated, use '-run-with chroot=...' instead"); - os_set_chroot(optarg); - break; - case QEMU_OPTION_daemonize: - daemonize = 1; - break; -#if defined(CONFIG_LINUX) - /* deprecated */ - case QEMU_OPTION_asyncteardown: - init_async_teardown(); - break; -#endif - case QEMU_OPTION_run_with: { - const char *str; - QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"), - optarg, false); - if (!opts) { - exit(1); - } -#if defined(CONFIG_LINUX) - if (qemu_opt_get_bool(opts, "async-teardown", false)) { - init_async_teardown(); - } -#endif - str = qemu_opt_get(opts, "chroot"); - if (str) { - os_set_chroot(str); - } - break; - } - default: - return -1; - } - - return 0; -} - static void change_process_uid(void) { assert((user_uid == (uid_t)-1) || user_pwd == NULL); @@ -371,27 +313,3 @@ int os_mlock(void) return -ENOSYS; #endif } - -static QemuOptsList qemu_run_with_opts = { - .name = "run-with", - .head = QTAILQ_HEAD_INITIALIZER(qemu_run_with_opts.head), - .desc = { -#if defined(CONFIG_LINUX) - { - .name = "async-teardown", - .type = QEMU_OPT_BOOL, - }, -#endif - { - .name = "chroot", - .type = QEMU_OPT_STRING, - }, - { /* end of list */ } - }, -}; - -static void register_runwith(void) -{ - qemu_add_opts(&qemu_run_with_opts); -} -opts_init(register_runwith); diff --git a/softmmu/vl.c b/softmmu/vl.c index b0b96f67fac..0a74810ca32 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -49,6 +49,7 @@ #include "qemu/error-report.h" #include "qemu/sockets.h" #include "qemu/accel.h" +#include "qemu/async-teardown.h" #include "hw/usb.h" #include "hw/isa/isa.h" #include "hw/scsi/scsi.h" @@ -748,6 +749,33 @@ static QemuOptsList qemu_smp_opts = { }, }; +#if defined(CONFIG_POSIX) +static QemuOptsList qemu_run_with_opts = { + .name = "run-with", + .head = QTAILQ_HEAD_INITIALIZER(qemu_run_with_opts.head), + .desc = { +#if defined(CONFIG_LINUX) + { + .name = "async-teardown", + .type = QEMU_OPT_BOOL, + }, +#endif + { + .name = "chroot", + .type = QEMU_OPT_STRING, + }, + { /* end of list */ } + }, +}; + +#define qemu_add_run_with_opts() qemu_add_opts(&qemu_run_with_opts) + +#else + +#define qemu_add_run_with_opts() + +#endif /* CONFIG_POSIX */ + static void realtime_init(void) { if (enable_mlock) { @@ -2704,6 +2732,7 @@ void qemu_init(int argc, char **argv) qemu_add_opts(&qemu_semihosting_config_opts); qemu_add_opts(&qemu_fw_cfg_opts); qemu_add_opts(&qemu_action_opts); + qemu_add_run_with_opts(); module_call_init(MODULE_INIT_OPTS); error_init(argv[0]); @@ -3522,11 +3551,52 @@ void qemu_init(int argc, char **argv) case QEMU_OPTION_nouserconfig: /* Nothing to be parsed here. Especially, do not error out below. */ break; - default: - if (os_parse_cmd_args(popt->index, optarg)) { - error_report("Option not supported in this build"); +#if defined(CONFIG_POSIX) + case QEMU_OPTION_runas: + if (!os_set_runas(optarg)) { + error_report("User \"%s\" doesn't exist" + " (and is not :)", + optarg); exit(1); } + break; + case QEMU_OPTION_chroot: + warn_report("option is deprecated," + " use '-run-with chroot=...' instead"); + os_set_chroot(optarg); + break; + case QEMU_OPTION_daemonize: + os_set_daemonize(true); + break; +#if defined(CONFIG_LINUX) + /* deprecated */ + case QEMU_OPTION_asyncteardown: + init_async_teardown(); + break; +#endif + case QEMU_OPTION_run_with: { + const char *str; + opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"), + optarg, false); + if (!opts) { + exit(1); + } +#if defined(CONFIG_LINUX) + if (qemu_opt_get_bool(opts, "async-teardown", false)) { + init_async_teardown(); + } +#endif + str = qemu_opt_get(opts, "chroot"); + if (str) { + os_set_chroot(str); + } + break; + } +#endif /* CONFIG_POSIX */ + + default: + error_report("Option not supported in this build"); + exit(1); } } } From patchwork Thu Sep 7 12:59:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830863 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L5QQ25GA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKB12VS6z1ynd for ; Thu, 7 Sep 2023 23:01:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEco-0002l8-K1; Thu, 07 Sep 2023 09:00:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcl-0002jq-KW for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcj-0007FL-FH for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091640; 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=pyHPuQhAMnD4vefU4v6HxJjdvupVxPNtPBr93+Lu97A=; b=L5QQ25GA3rUAuw0uTl0OucFaNIKmhUoJFix90RuBabDquf4vgTr70dwChRA+UrSsR9Ttll BdhM1JX0xPq1MaXy28sAMOB1f2WVN116g+sOi2x83jJhC9QiH2rAmIlhQbh5XRNoJVQAFZ Tr3jjFVzPNDuU1E7I1CnOQYXn9oI7HI= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-364-47_sljUYN7i1taHaEjmqCA-1; Thu, 07 Sep 2023 09:00:39 -0400 X-MC-Unique: 47_sljUYN7i1taHaEjmqCA-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3180237cef3so625112f8f.0 for ; Thu, 07 Sep 2023 06:00:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091629; x=1694696429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pyHPuQhAMnD4vefU4v6HxJjdvupVxPNtPBr93+Lu97A=; b=ieaD3Gu98mHKimu7Ri0QcQw9XqrH1V/bwBJKJDhfLX7SGDwiQKcqCAp3d4fYcNPwbT 5Oi095fLF1+7JK985OBwWh1y6oHXGieH2vhK83vpNvz+XEo4x1vhhw3qjewcyn6+Z6xD 1pq96Gy0tnz2PoIEpjJSwF4HZD5+WaKnqZp2dWEbA9ddmq97F32qwpxCzlS54OrqRm0b ya533bfkbMbMS/0fsI35/kDWrcWIzMvP1UOcMW8X0cDEgbO3DZhjWOYhGYByo+QkQdDA P+tbYn5daAryEQInYYfRzRFs0Ft95Y3vn90qQzRbLciN6m0HDPynpHvIuj7+RmD/wiYR Vc6A== X-Gm-Message-State: AOJu0YyUnjNi4Gt00ysZJvBqeNiBYFQj4E78S1ar603AN+KGlYTx1K3F OyjO+Tx82LlL5R65DU3YDMzWxJg7comkkT/9JpgOJZ/H0gtH54dZdhkKPyMjAQHsUUdYAC+fZh/ AS7aPbtLafSzBX8W/XvfHiAfRHWUFNH3CjArpaJ3yOPnhiWhUZNTUZPrJi7UTyCjt37WKLVoG0s w= X-Received: by 2002:adf:f3ca:0:b0:317:57f0:fae with SMTP id g10-20020adff3ca000000b0031757f00faemr4579499wrp.63.1694091629583; Thu, 07 Sep 2023 06:00:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeKfdZCrgpDmY3US/XX3FWfc14Cmx8ibPKB8YZB+34k8Stpm3l2Ju6hGg/f6HO9WiqrNdTKQ== X-Received: by 2002:adf:f3ca:0:b0:317:57f0:fae with SMTP id g10-20020adff3ca000000b0031757f00faemr4579463wrp.63.1694091629151; Thu, 07 Sep 2023 06:00:29 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id m6-20020adfa3c6000000b0031f300a4c26sm18184768wrb.93.2023.09.07.06.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 10/51] os-posix.c: move code around Date: Thu, 7 Sep 2023 14:59:19 +0200 Message-ID: <20230907130004.500601-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev this moves code blocks so that functions and variables which belongs to the same concept are now close to each other. There's no actual code changes in there. Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-6-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- os-posix.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/os-posix.c b/os-posix.c index fc2883ff82c..a8e38c02988 100644 --- a/os-posix.c +++ b/os-posix.c @@ -40,17 +40,6 @@ #include #endif -/* - * Must set all three of these at once. - * Legal combinations are unset by name by uid - */ -static struct passwd *user_pwd; /* NULL non-NULL NULL */ -static uid_t user_uid = (uid_t)-1; /* -1 -1 >=0 */ -static gid_t user_gid = (gid_t)-1; /* -1 -1 >=0 */ - -static const char *chroot_dir; -static int daemonize; -static int daemon_pipe; void os_setup_early_signal_handling(void) { @@ -97,6 +86,15 @@ void os_set_proc_name(const char *s) #endif } + +/* + * Must set all three of these at once. + * Legal combinations are unset by name by uid + */ +static struct passwd *user_pwd; /* NULL non-NULL NULL */ +static uid_t user_uid = (uid_t)-1; /* -1 -1 >=0 */ +static gid_t user_gid = (gid_t)-1; /* -1 -1 >=0 */ + /* * Prepare to change user ID. optarg can be one of 3 forms: * - a username, in which case user ID will be changed to its uid, @@ -174,6 +172,9 @@ static void change_process_uid(void) } } + +static const char *chroot_dir; + void os_set_chroot(const char *optarg) { chroot_dir = optarg; @@ -194,6 +195,21 @@ static void change_root(void) } + +static int daemonize; +static int daemon_pipe; + +bool is_daemonized(void) +{ + return daemonize; +} + +int os_set_daemonize(bool d) +{ + daemonize = d; + return 0; +} + void os_daemonize(void) { if (daemonize) { @@ -287,17 +303,6 @@ void os_set_line_buffering(void) setvbuf(stdout, NULL, _IOLBF, 0); } -bool is_daemonized(void) -{ - return daemonize; -} - -int os_set_daemonize(bool d) -{ - daemonize = d; - return 0; -} - int os_mlock(void) { #ifdef HAVE_MLOCKALL From patchwork Thu Sep 7 12:59:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Pt5atFom; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKCz5jKtz1ygc for ; Thu, 7 Sep 2023 23:02:55 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdM-0003EK-T8; Thu, 07 Sep 2023 09:01:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcv-0002py-Qb for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcs-0007HA-7w for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091649; 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=LVEgJtYPmZuVdcSMpVwNKTJ5Fk4pgDhwPpWaXsj8Fow=; b=Pt5atFomUjttjizjpIta/+eKjYoDhtQts16Z3uXOci2mgS2K43dIl/1rfqcPIM0Qek6eeD ST5jgc6P+8mTuSjH/hJTC76UUElWZOo8zVpYboNS7B4YGW5mafXeQoOQtO2qX3YddZv4/Z GEXtIgG5TozMxNfZk040VvpRb9G9WI4= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453-AUbLWZ1EN1atZRXnkcgo9w-1; Thu, 07 Sep 2023 09:00:34 -0400 X-MC-Unique: AUbLWZ1EN1atZRXnkcgo9w-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bce272ebdfso10791761fa.1 for ; Thu, 07 Sep 2023 06:00:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091631; x=1694696431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LVEgJtYPmZuVdcSMpVwNKTJ5Fk4pgDhwPpWaXsj8Fow=; b=l8MQOsicqkyHKdfilhr0nkIYD/BZDNBn8j3pXw62ZWug2AsZ3vXk0eR7vL2Ts1xVVD TgU1YIc8Ik59i1b5S77qOb18OijGa7Lp34wWPbqMMk7yQzQ5LUVULXU+GN13VzxPBw0F AwRlremf6dFfq61rCRFifP+G4bLlKd5uUnuUMhsZYD2m2eoZ1qBh4f4uqoS3S5ChO2vO 9tlp9pDTpplpCk44rM3LUaWqhs81YP923gZXiMWyOGLeJxmdKT2Jc4PBxAoFhSREJCIK 5XRqEfq+uc4jcZ6bCRpmCLavwT7irZQvB7XfoEeg07nfFZJOi0GVv9VvgRDdQ/ir6fin Cajg== X-Gm-Message-State: AOJu0Yy2PJM9w06Mw76xiaaEThp52/MD7Ec9qKFqEby6coha0TS7JmWK sEpHpnpcmPoqVQ4gIWhOdS8xGZZ5J08RUFG2TRiQx5iqwuNck+ruT8HOl7mqeOui2n013Pi3t/f LO2OMFeTDgRbsPejJ3FRtQcApY+JnwEoHkmqyt9HHy+cCAwrWSK93H3L629U2+Gn1S+1WJ+dwIm s= X-Received: by 2002:a05:6512:118f:b0:4fe:15b5:a5f9 with SMTP id g15-20020a056512118f00b004fe15b5a5f9mr6124300lfr.54.1694091631554; Thu, 07 Sep 2023 06:00:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLzZrNgik3gJQQoMMrcT1kSbfywFG9u11hjDOiAq0ygxpWOiTTWrRWUbz5KXZ2knu7tYyo8A== X-Received: by 2002:a05:6512:118f:b0:4fe:15b5:a5f9 with SMTP id g15-20020a056512118f00b004fe15b5a5f9mr6124270lfr.54.1694091631198; Thu, 07 Sep 2023 06:00:31 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id g17-20020a7bc4d1000000b003fc02e8ea68sm2497859wmk.13.2023.09.07.06.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 11/51] os-posix.c: remove unneeded #includes Date: Thu, 7 Sep 2023 14:59:20 +0200 Message-ID: <20230907130004.500601-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-7-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- os-posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/os-posix.c b/os-posix.c index a8e38c02988..f90dfda9b0d 100644 --- a/os-posix.c +++ b/os-posix.c @@ -29,8 +29,6 @@ #include #include -/* Needed early for CONFIG_BSD etc. */ -#include "net/slirp.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "sysemu/runstate.h" From patchwork Thu Sep 7 12:59:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iH/Rvv/v; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKDK5glBz1yh8 for ; Thu, 7 Sep 2023 23:03:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdJ-0003B6-S2; Thu, 07 Sep 2023 09:01:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcp-0002mF-PJ for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcm-0007Fp-Cb for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091643; 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=yioP/nXneuDSCiJJHSA9x2f5GhZOCJ1auXXR4f8hYLQ=; b=iH/Rvv/vych0AUgX+p00qTe9KDIvT7GsoRaxvYZ3pceQjQWuiHgo4Co1BM+idGH0sH3jGh 1BPLoHRQ3p9ZfYfhzgHW1AaXTuiM5FrUtQXtTNS0kr6ZnTDIuoRU3o47hXmnmTmNa1/7IH s+25503/tv2yUgyK7lj9jJbIwAYZ+Pw= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-8fzqgCMrNRuDN0ZptZ4iRw-1; Thu, 07 Sep 2023 09:00:39 -0400 X-MC-Unique: 8fzqgCMrNRuDN0ZptZ4iRw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fbdf341934so6557765e9.3 for ; Thu, 07 Sep 2023 06:00:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091633; x=1694696433; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yioP/nXneuDSCiJJHSA9x2f5GhZOCJ1auXXR4f8hYLQ=; b=C7WmnOg+6DL/YAJr1ONPLLQg5vv+oh5k5xWu7aNJgO7bzMZIh9qOWCc57S4tNkKY41 acgvbwTCKmJej3v7mVYMUWP09EIvr8gdwm0jMDrjBZSkKFJQSttWy1hlXpVNyivnjsWi GXjqspR5hwdOVwwVoSyssSvoDiVMb+fDTb6DoAscClsPuyMFUe7NGOgqeUt9gztEU35n Ifk+ZDh/Jfk+Ix6uCXr1pllKIUQUJlb9x9dp95lTIWytVmAkrSpe9k+zetGwo3hBxpHy Xmt1y2hlEWhAfR7Gr+UJGrCy0xUPOeG++Moz9/fvV/u1jY4SYXPfP41lQZT7Zk0f2Brw Lv8g== X-Gm-Message-State: AOJu0YxNN4+WprK/w/DwzgoHLQLsZnJ7Zi6XEA9bhSN8f0/HDvSnbmNy ZKq30le+io09dgF+Wl13O+Bdpu9e2qo4/lJ4Zj2MAaP7ARonn0ve79TRZU9SuNnLDCRIikAAdH8 JcrGAnPw0dPCoW91wl5xvetbek8g5DuFtSBSX4+JcpY/QKRP3s6CUc4sWatJsjYGl6u6wFW8ocJ k= X-Received: by 2002:a05:600c:2308:b0:401:d803:6243 with SMTP id 8-20020a05600c230800b00401d8036243mr4759848wmo.32.1694091633454; Thu, 07 Sep 2023 06:00:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHl/Z8wWWHXS2yIejoFGXn95eJWfaY6Dtg953tIGUZGRTxLxDdolIRrOKRIuKp+QCtKqUYmtw== X-Received: by 2002:a05:600c:2308:b0:401:d803:6243 with SMTP id 8-20020a05600c230800b00401d8036243mr4759820wmo.32.1694091633083; Thu, 07 Sep 2023 06:00:33 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id a21-20020a05600c225500b003fed78b03b4sm2459592wmm.20.2023.09.07.06.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 12/51] softmmu/vl.c: inline include/qemu/qemu-options.h into vl.c Date: Thu, 7 Sep 2023 14:59:21 +0200 Message-ID: <20230907130004.500601-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev qemu-options.h just includes qemu-options.def with some #defines. We already do this in vl.c in other place. Since no other file includes qemu-options.h anymore, just inline it in vl.c. This effectively reverts second half of commit 59a5264b99434. Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-8-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/qemu/qemu-options.h | 41 ------------------------------------- softmmu/vl.c | 11 +++++++++- 2 files changed, 10 insertions(+), 42 deletions(-) delete mode 100644 include/qemu/qemu-options.h diff --git a/include/qemu/qemu-options.h b/include/qemu/qemu-options.h deleted file mode 100644 index 4a62c83c453..00000000000 --- a/include/qemu/qemu-options.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * qemu-options.h - * - * Defines needed for command line argument processing. - * - * Copyright (c) 2003-2008 Fabrice Bellard - * Copyright (c) 2010 Jes Sorensen - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef QEMU_OPTIONS_H -#define QEMU_OPTIONS_H - -enum { - -#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ - opt_enum, -#define DEFHEADING(text) -#define ARCHHEADING(text, arch_mask) - -#include "qemu-options.def" -}; - -#endif diff --git a/softmmu/vl.c b/softmmu/vl.c index 0a74810ca32..78b6570f19c 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -91,7 +91,6 @@ #include "qapi/qobject-input-visitor.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "qemu/qemu-options.h" #include "qemu/main-loop.h" #ifdef CONFIG_VIRTFS #include "fsdev/qemu-fsdev.h" @@ -894,6 +893,16 @@ static void help(int exitcode) exit(exitcode); } +enum { + +#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \ + opt_enum, +#define DEFHEADING(text) +#define ARCHHEADING(text, arch_mask) + +#include "qemu-options.def" +}; + #define HAS_ARG 0x0001 typedef struct QEMUOption { From patchwork Thu Sep 7 12:59:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Az111191; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ21V0zz1yh8 for ; Thu, 7 Sep 2023 23:11:38 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdG-000350-M6; Thu, 07 Sep 2023 09:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcr-0002mj-B7 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEco-0007GF-0b for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091645; 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=bSigBqSUZKr66KwDywctiPhcrHXhPWqZwNq20QZJZus=; b=Az111191J5oG4W8hQyFnkiK18AFy03RQ7DXpPsMykFVvhLUOqk1jeJPxLiA1ZD3TUMMb/w egww/dMb0/R3rQbNEMkJgabVAFAsAr1IKUDoPIKFKRfsYtH1opia7FRhO2qIOSihlAlBMF ybvc+2B2w+NO3GAwoY4kKZ2ORA2eBCE= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-Ln_UjslVODiEEULfI2WAyQ-1; Thu, 07 Sep 2023 09:00:42 -0400 X-MC-Unique: Ln_UjslVODiEEULfI2WAyQ-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31dc8f0733dso575102f8f.3 for ; Thu, 07 Sep 2023 06:00:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091635; x=1694696435; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bSigBqSUZKr66KwDywctiPhcrHXhPWqZwNq20QZJZus=; b=SPXlz/tkTiKxsx93SYMekxURFhj3GLnvduevwJXCwr9kHM+DMsRXHlDl0UObY7i/PR 25yChc2+41jlPVSHb7g6ccbTML049IrG1zUyAg1pBkf6AlmXu7bw7gnR4J2CqnV2Zc6Q JDephEomoDv4jnLI0yyzYhvABOeQIREtDLvJywQ5PhG/dhRbOEE+d4gJr0ZnBU03Ksjs Kc0/cmG4Va0cyKIUeSBXfab8hLCspdoBEf6r7yAdGGIcwNJMGiWyWA85rlTR+Jmc04rB /95och4UqMiJ0k/6BuQckDZJ2+McNLiL20FpqyrN5ok4aLHTF4tXkixvYX6M87aajApj 42Pw== X-Gm-Message-State: AOJu0YxN3//Rt6Vz8KFoGeh0bpJXcfWuZdbiIfTiyP07RQGkQ2Epvw08 Oa5jJK6/JZoMG25VGbBrG2eQHU2Nvsm/haIac4bT2wv1211dE9QCx7Qq9092aEC+UnNoRw32CpS pjUiXQcJSTbDBRNx6yYVTVRlOYes5kHYd89kubJexG8k/hwIFeW5ya4TD9YE7UnSyZh/vbRBqtR E= X-Received: by 2002:a5d:63cb:0:b0:317:6e62:b124 with SMTP id c11-20020a5d63cb000000b003176e62b124mr4924878wrw.18.1694091635361; Thu, 07 Sep 2023 06:00:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdkoqSw/pENJqQKOCcfvpRD8kqP1NZYQV3K5cc2Cz+jiZJzu3PRjx6102Op20iDDybqF0NCA== X-Received: by 2002:a5d:63cb:0:b0:317:6e62:b124 with SMTP id c11-20020a5d63cb000000b003176e62b124mr4924854wrw.18.1694091635001; Thu, 07 Sep 2023 06:00:35 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id j14-20020adfe50e000000b0031c52e81490sm23264417wrm.72.2023.09.07.06.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Michael Tokarev , Eric Blake Subject: [PULL 13/51] util/async-teardown.c: move to softmmu/, only build it when system build is requested Date: Thu, 7 Sep 2023 14:59:22 +0200 Message-ID: <20230907130004.500601-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-9-mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini --- {util => softmmu}/async-teardown.c | 0 softmmu/meson.build | 1 + util/meson.build | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename {util => softmmu}/async-teardown.c (100%) diff --git a/util/async-teardown.c b/softmmu/async-teardown.c similarity index 100% rename from util/async-teardown.c rename to softmmu/async-teardown.c diff --git a/softmmu/meson.build b/softmmu/meson.build index ea5603f0218..c18b7ad7382 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -37,3 +37,4 @@ endif system_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) system_ss.add(when: fdt, if_true: files('device_tree.c')) +system_ss.add(when: 'CONFIG_LINUX', if_true: files('async-teardown.c')) diff --git a/util/meson.build b/util/meson.build index a3751602869..c4827fd70aa 100644 --- a/util/meson.build +++ b/util/meson.build @@ -3,7 +3,6 @@ util_ss.add(files('thread-context.c'), numa) if not config_host_data.get('CONFIG_ATOMIC64') util_ss.add(files('atomic64.c')) endif -util_ss.add(when: 'CONFIG_LINUX', if_true: files('async-teardown.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c')) util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c')) if config_host_data.get('CONFIG_EPOLL_CREATE1') From patchwork Thu Sep 7 12:59:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YvpQZgVT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKBD6V27z1ygc for ; Thu, 7 Sep 2023 23:01:24 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdA-0002sT-Lq; Thu, 07 Sep 2023 09:01:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcn-0002kx-Gf for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEck-0007FV-Qb for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091642; 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=UW0LYVBQ86z9c2cV3F6pmV9ZwvsvlDsGKOMCu7v7vrc=; b=YvpQZgVTXW1NZgsm0/e4m4Lvw8n9fWfskyIR3v0bQitpcb07bWi5aGui4e+hiGQDYdwFXR jYxxAvhMJ6KZuZvegql6sSkicrY+hrSpCUr/ZqJ+80XOdzZqwSQmb1mAOhEtG66gNAlVQL srhHXMmrIFF3KnG6Y73nGBmEIRCUWzE= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-INjB6wiPNimZNdnkT1x8EA-1; Thu, 07 Sep 2023 09:00:39 -0400 X-MC-Unique: INjB6wiPNimZNdnkT1x8EA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-402493d2997so5976725e9.0 for ; Thu, 07 Sep 2023 06:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091637; x=1694696437; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UW0LYVBQ86z9c2cV3F6pmV9ZwvsvlDsGKOMCu7v7vrc=; b=X4++IaGkFQECTjSmEpLKhng7uJobyTUamc6gtPLLsXnXZLTvkxl5CbjBhtz6TEXsYE EV7ukTUVplLdL63Y+9618kjsEMvuZAqqZZKwFpzV9uAMZNtShOvITJHHcX9oSc5dP5aX 5KssWWfPbhDHdlIDrD0W6WxEQZEEQTCar0ne+qPbLmTn1n1s982+i0xd19gJ3iEUZ+z0 hGIM57iydPGbnIsMR0OK3b7TsNIbtgqGBxfdzw0Cm7yLbjRllJxgGDxjkx1vNhAxUB4x 5EJeSN/WN02xwKnQKh+YjLVQmeImNes4KfT9ya9uA34wO6Jf5vzY2t9Shz5oN4CSu8Vo bUFg== X-Gm-Message-State: AOJu0YyCHrMyjZfbdEQN/pKvNH0xDJetn3k3Zva3uimpMxfoq+Z/q/GW Ph1YEeCXNGflw9O8bUpCfxH//6jIp9uzVa4jx6cHWsKtmdgeLrPoFRHWxsYtcqm+614Z2ylOllO Okh/ykxrIqv6pDGEnLoKu5IRhv/0Ye5jKAptiLfMwxa+Mp00/Y0q0aj8RaROuOcoMUwyDJSaTS8 w= X-Received: by 2002:a1c:721a:0:b0:401:519:c5 with SMTP id n26-20020a1c721a000000b00401051900c5mr4652251wmc.41.1694091637595; Thu, 07 Sep 2023 06:00:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGadIFPf+o/BgY2ZYe5zmx9484TGqJKwELEYrbVEHTqvdOnu0bk/fcIpAlcvWJp/FLlNQ5RqQ== X-Received: by 2002:a1c:721a:0:b0:401:519:c5 with SMTP id n26-20020a1c721a000000b00401051900c5mr4652216wmc.41.1694091637029; Thu, 07 Sep 2023 06:00:37 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l10-20020a5d4bca000000b003180155493esm23243650wrt.67.2023.09.07.06.00.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/51] contrib/plugins: remove -soname argument Date: Thu, 7 Sep 2023 14:59:23 +0200 Message-ID: <20230907130004.500601-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org -soname is not needed for runtime-loaded modules. For example, Meson says: if not isinstance(target, build.SharedModule) or target.force_soname: # Add -Wl,-soname arguments on Linux, -install_name on OS X commands += linker.get_soname_args( self.environment, target.prefix, target.name, target.suffix, target.soversion, target.darwin_versions) (force_soname is set is shared modules are linked into a build target, which is not the case here. Signed-off-by: Paolo Bonzini --- contrib/plugins/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index b2b9db9f51a..db1bd04dfa6 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -37,7 +37,7 @@ all: $(SONAMES) $(CC) $(CFLAGS) -c -o $@ $< lib%.so: %.o - $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) + $(CC) -shared -o $@ $^ $(LDLIBS) clean: rm -f *.o *.so *.d From patchwork Thu Sep 7 12:59:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=O2nwXzzk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKCk3wv2z1yh8 for ; Thu, 7 Sep 2023 23:02:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdG-00034Q-Gq; Thu, 07 Sep 2023 09:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0002sG-IG for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcu-0007Im-HU for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091651; 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=YUBmQE/WZcRmgCjgL8iIiSyqO6NGliX6M17Mh1v8/jk=; b=O2nwXzzk1eS+Q3NUMWLDhu8pCtXrQKkLq+fLkBD44MBbszbRgls4uT+MGY7aU8OZupKk8G bfwQJxObBbXfm4z9kA3f9YEwWuvFoQ4hkAIkGaz6e2HKVio594J19dnH+80a48yG0znbXG /+Meeztp9FhWK2qt+4sru8eacg1Zveo= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-dzICH9lANAiFpPb4ZWOk7A-1; Thu, 07 Sep 2023 09:00:46 -0400 X-MC-Unique: dzICH9lANAiFpPb4ZWOk7A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-31c5c47807aso580450f8f.1 for ; Thu, 07 Sep 2023 06:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091640; x=1694696440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YUBmQE/WZcRmgCjgL8iIiSyqO6NGliX6M17Mh1v8/jk=; b=Wlelh/cNIvRdG5P4K8f8LbeNRh+FxbrAYU4VC0OGZGjzTzxvfXxqU9cB45PNCfek4W t1+ZZSgUwYAictjpNMKfGszReZsIhXFm3rDQYT605JtJDy+lTSjRkmr2h82jId50poZD O/M1xphFCzv6J0YfpOEfBlvjeen4q3Dy3RCDHJ6XWZM6rJsdWhMmDxx+KgoFnx50Z3Oz YOIwBcFLaB0oOdrW32bmgUTR72sg8fviVBHwLDQiUfvE5WB/FUbfWXubNlCRbAPsiKmY Pm4sR5ZlSYDCchzwPwGNIvHxyPU+yIgSRqPc10wZ8erRaaShFljDUSeHbND7V4O/z2fi bUZg== X-Gm-Message-State: AOJu0YxX2bhT0NZNvzYfxq0rPpGv09NaS6CF+W1zepmOxv2Ea0EuinI1 VgaxxYIFVxty7me/Hq034zgm8ehih0Gq5sRFGW2Fe8aRVtrMkh9sHWtvaFEf/cIiOnIdczeYJdm br9HhhEoTMiQG/DcIuZvxLszIxgpJEIUtb4Pacf8eYXCHWLkwztH7PZ748Zh1v9fPC5XXka6Rqj s= X-Received: by 2002:adf:dc8e:0:b0:317:634c:46e9 with SMTP id r14-20020adfdc8e000000b00317634c46e9mr4898581wrj.43.1694091640090; Thu, 07 Sep 2023 06:00:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IES1+35XqUUMoWIo7m/NtEp23RxaJLxv1trYjRr5Ecvr0/Wc6nwy7isZEt4y0e23nbLW8k1FQ== X-Received: by 2002:adf:dc8e:0:b0:317:634c:46e9 with SMTP id r14-20020adfdc8e000000b00317634c46e9mr4898553wrj.43.1694091639788; Thu, 07 Sep 2023 06:00:39 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id b4-20020adfde04000000b0031aef72a021sm23106658wrm.86.2023.09.07.06.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/51] contrib/plugins/cache: Fix string format Date: Thu, 7 Sep 2023 14:59:24 +0200 Message-ID: <20230907130004.500601-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/cache.c:550:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_daccess, ^~~~~~~~~~ plugins/cache.c:551:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_dmisses, ^~~~~~~~~~ plugins/cache.c:553:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_iaccess, ^~~~~~~~~~ plugins/cache.c:554:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_imisses, ^~~~~~~~~~ plugins/cache.c:560:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_access, ^~~~~~~~~ plugins/cache.c:561:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_misses, ^~~~~~~~~ plugins/cache.c:665:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:678:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:695:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, ~~~ ^~~~~~~~~~~~~~~ %llu Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/cache.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 5036213f1b8..0b636d53ae9 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -545,8 +545,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, l1_dmiss_rate = ((double) l1_dmisses) / (l1_daccess) * 100.0; l1_imiss_rate = ((double) l1_imisses) / (l1_iaccess) * 100.0; - g_string_append_printf(line, "%-14lu %-12lu %9.4lf%% %-14lu %-12lu" - " %9.4lf%%", + g_string_append_printf(line, "%-14" PRIu64 " %-12" PRIu64 " %9.4lf%%" + " %-14" PRIu64 " %-12" PRIu64 " %9.4lf%%", l1_daccess, l1_dmisses, l1_daccess ? l1_dmiss_rate : 0.0, @@ -556,7 +556,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, if (use_l2) { l2_miss_rate = ((double) l2_misses) / (l2_access) * 100.0; - g_string_append_printf(line, " %-12lu %-11lu %10.4lf%%", + g_string_append_printf(line, + " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, l2_misses, l2_access ? l2_miss_rate : 0.0); @@ -662,8 +663,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_dmisses, insn->disas_str); } miss_insns = g_list_sort(miss_insns, icmp); @@ -675,8 +676,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_imisses, insn->disas_str); } if (!use_l2) { @@ -692,8 +693,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l2_misses, insn->disas_str); } finish: From patchwork Thu Sep 7 12:59:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UD9sJgcQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN01RBqz1ygR for ; Thu, 7 Sep 2023 23:09:52 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdG-00034S-H5; Thu, 07 Sep 2023 09:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd6-0002si-GO for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0007JJ-Ak for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091654; 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=SNGxCcskM5CtdJOrttdHLKr3u4GjeZuEossSiUwH/70=; b=UD9sJgcQk76pyMobEK3v2fhtacUQR0hkQLW9XJct0ApC5x43BDaxq9dK8BccMKlfjKJiWV wU7iM+Ew+iRAUqnWEeR/BSKCIMJXhJjtf0ZuDqdP4+o+/eX9a+tr2cqxW1zEl8oUWd7qBv /6Q085ZVnRTDnRbrsC9HRCsnGsB375k= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-VdnSzAf-NLi9K5siCC7TZg-1; Thu, 07 Sep 2023 09:00:51 -0400 X-MC-Unique: VdnSzAf-NLi9K5siCC7TZg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-401be705672so6871295e9.2 for ; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091642; x=1694696442; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SNGxCcskM5CtdJOrttdHLKr3u4GjeZuEossSiUwH/70=; b=dsUgj9W6tmwneVLPJnpPCrcz2qYlCzteyTjGgN/1VGjV7QV8prMz/Qu7f9xJG4spFz 0EGdDHFT5h+NMXvbehyy/YXHeg22FbhnHcOceiZMpjvXcv4EhEN8CLCxc6WzfPG1Ra+Z 7ZatritKnQvyKtPtk2X+vnuYioC2IDvg/faOUQsQ5X+gFNTq2QHUVYmTMeVODMQHYfC7 O/gZ53NmDKai8rOMTDJlVmsP4sAsOeSGOqVk3DbyUyCDQcQ0nQMuT/liMRVBD+XmoQet ZlxSttVsWBqnCzo/3ASNC4Bg+n+MfxyeA4J+fKrj8Xa3zQo5dbqZ2jV+r9SIMMVGNMfu Lw6g== X-Gm-Message-State: AOJu0Yz2WYlhIh9uXb8EmTfDJ+tW24cIJEzuA1nvVsMMxF22h8Vu7OBY rXeUCLPV8OXb81QUbJpzQX/R78fTBmx5z/BGe0H+X60gG7ZLRndVgvkm7X7cAd8vteGAYnWqG7g VqdfMkcfxLCkTE7Fmab58DxuTxymMhCyQ8g6MDqDz/VD+BaTWGkuP+hawKVleugcE/pr0CAGxTv g= X-Received: by 2002:a1c:7718:0:b0:3fe:1679:ba7b with SMTP id t24-20020a1c7718000000b003fe1679ba7bmr5177783wmi.24.1694091642511; Thu, 07 Sep 2023 06:00:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgVhlWBz6V9whbR5+0BbKiFNSsbaih55hkIy2p82bSOO9zPpXkqNOkn7EWXDK5tMEDibGyqQ== X-Received: by 2002:a1c:7718:0:b0:3fe:1679:ba7b with SMTP id t24-20020a1c7718000000b003fe1679ba7bmr5177742wmi.24.1694091641771; Thu, 07 Sep 2023 06:00:41 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id x16-20020a05600c21d000b003fbca942499sm2480623wmj.14.2023.09.07.06.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 16/51] contrib/plugins/drcov: Fix string format Date: Thu, 7 Sep 2023 14:59:25 +0200 Message-ID: <20230907130004.500601-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/drcov.c:52:13: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~~~ plugins/drcov.c:52:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~ plugins/drcov.c:52:35: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-3-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/drcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 686ae0a537d..5edc94dcaf6 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -48,7 +48,7 @@ static void printf_header(unsigned long count) uint64_t start_code = qemu_plugin_start_code(); uint64_t end_code = qemu_plugin_end_code(); uint64_t entry = qemu_plugin_entry_code(); - fprintf(fp, "0, 0x%lx, 0x%lx, 0x%lx, %s\n", + fprintf(fp, "0, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64 ", %s\n", start_code, end_code, entry, path); fprintf(fp, "BB Table: %ld bbs\n", count); } From patchwork Thu Sep 7 12:59:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AUdoE8w2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKNV1t4Lz1yh1 for ; Thu, 7 Sep 2023 23:10:18 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdP-0003FM-6v; Thu, 07 Sep 2023 09:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd4-0002sR-Gc for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd1-0007JY-4E for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091656; 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=deDGl1ZSdh4eDpSF5HH/DX8AUIwg+yuy4UZLXOALgvk=; b=AUdoE8w2OCdxWpE24ZbSDTzBJDcstuqMbyNknNI3KsDB9Q1R1vuOTAfA5/jU2CtZUUuklC HA5JFDJ3ukJoIfEKNWJGvFuw4XvkZA5GfSNPTVjCh17ZmJzHzQpteZF2Id0bknTkxeUIUA TKQMXErrNRule6tNVaEGwlUfEItrEn0= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-tjAS4tBRP1SWgRwVVfhlLg-1; Thu, 07 Sep 2023 09:00:52 -0400 X-MC-Unique: tjAS4tBRP1SWgRwVVfhlLg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401dba99384so6530935e9.3 for ; Thu, 07 Sep 2023 06:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091644; x=1694696444; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=deDGl1ZSdh4eDpSF5HH/DX8AUIwg+yuy4UZLXOALgvk=; b=SiAxBXh40CFy8toATTuO6kw7p/nnPJV1BtHbfeDQeXUu8d767lOI/bnW7jAwBj/oqW FjAKdw4FHBZvLuC/vQWm/dMOCpMSPGP4W85cWVFyn8e/7IeqY895qnC59AFutSUgf59m Rg8CpqVZgZBKzL1xhx4Y2/y96WBbgf8bKuYdUTc+eEslooQvWV97rqlTTqS6GSbtlT9x WwKw+uBdzt1jS6MQm7kZqiF9EacmvfkiQmjIO2bMZH3dKaQTLY75kxOdHUj8OdqYChK9 LLurlbXAMDuVyihyMCC0vDQU/6eLAUhVlCuDY3xbsSXqYakG3BCw6p+s/BqPtZmmigBR G3Lw== X-Gm-Message-State: AOJu0YwLCvoWBuWK1MSA1cU4Jpvayart1ogunXEtQvLXGys8S0dbvVYR ACvwMNyya4SAbTGgVfIjn+sMLsPhY9PQ54YDD4R0rA8WozVn2Xm5LTt1JCfXAbNKcXe+pqxcWsK Lm+H9hN1VoAf3kP7OwukO4exGqvrEdKpNiUJPiaCOC69wXX8JhcZaGixl2LxU3ZkF1GvfkaCHq2 Q= X-Received: by 2002:a05:600c:21d0:b0:3fe:1548:264f with SMTP id x16-20020a05600c21d000b003fe1548264fmr4727852wmj.22.1694091644455; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHR2gYroLEBo+gJJAkyzuEObtS/aSjAejDpMJaJuZmLHL/VCKHXe/xfaYumt+hKxx8XwfFB6w== X-Received: by 2002:a05:600c:21d0:b0:3fe:1548:264f with SMTP id x16-20020a05600c21d000b003fe1548264fmr4727828wmj.22.1694091644066; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id w7-20020a05600c474700b003fed9b1a1f4sm1662943wmo.1.2023.09.07.06.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 17/51] contrib/plugins/howvec: Fix string format Date: Thu, 7 Sep 2023 14:59:26 +0200 Message-ID: <20230907130004.500601-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/howvec.c:186:40: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] class->count); ^~~~~~~~~~~~ plugins/howvec.c:213:36: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] rec->count, ^~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-4-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/howvec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 0ed01ea931e..644a7856bb2 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -181,7 +181,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) switch (class->what) { case COUNT_CLASS: if (class->count || verbose) { - g_string_append_printf(report, "Class: %-24s\t(%ld hits)\n", + g_string_append_printf(report, + "Class: %-24s\t(%" PRId64 " hits)\n", class->class, class->count); } @@ -208,7 +209,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) i++, counts = g_list_next(counts)) { InsnExecCount *rec = (InsnExecCount *) counts->data; g_string_append_printf(report, - "Instr: %-24s\t(%ld hits)\t(op=0x%08x/%s)\n", + "Instr: %-24s\t(%" PRId64 " hits)" + "\t(op=0x%08x/%s)\n", rec->insn, rec->count, rec->opcode, From patchwork Thu Sep 7 12:59:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830902 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cUYpHGF0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ606P9z1yh1 for ; Thu, 7 Sep 2023 23:11:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdQ-0003NO-8u; Thu, 07 Sep 2023 09:01:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd6-0002sw-Sz for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0007JG-B1 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091654; 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=qSTq9iC4n1L9oUzK6f1smjHpV+ZLU2lzqzefWCqatbA=; b=cUYpHGF0fJP9gXBSAgZaBqlWLbTEPYtMXV1HGTYUnkbf+qHmBr1fX3GVf6QEhXbVlPGsGm U3C++BKnuYcdVgfZgJ+pINXWa3u2SjWwjxOLl3UtriCXghvc5i19hSa3Q507l7H83edVDX j4ZlOsn9TNw1nCpJWrsbE4mW7MdeEG0= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-WgfwpV59Pzu4chMVsdFb8g-1; Thu, 07 Sep 2023 09:00:51 -0400 X-MC-Unique: WgfwpV59Pzu4chMVsdFb8g-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-500a10289e3so961091e87.2 for ; Thu, 07 Sep 2023 06:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091648; x=1694696448; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qSTq9iC4n1L9oUzK6f1smjHpV+ZLU2lzqzefWCqatbA=; b=QVf5oKXbqf5qMwLzMwFpn7Hq05YKXqZyzia8mvRqYILOpzMkicyCVGtb8ZbwfVq0ub 16EBDgq+wC5/JlpK8NtwUkCYHdaY2s80gUlxnyVff7IoVDrO3NIzDIwvgEw94cH4d7L9 3cY9J3f67eAjR7D1OZsCUXBkyJbP1/delSm/6AUHhhakPyJIfOjYRfmghsoY7f+KBk6o uLCDyzXm3C0B6Up3Vdzx4Ycc5U+LMbCEbDQkhIC/tluiERt2HfgTN7Q9ro/NTMa32W7g WbwJMz+78UIjvambQR8unqVZAciEo/R3IhNR+FAusMinnG7HiNTPtUdAst+T2exy8a+Q HIRw== X-Gm-Message-State: AOJu0Yx4toMistxcU9MbbbgNasnBwY1qPCCKizZMzhro57XwOOMobucQ JalSzkio00bl4wx9aG70qvqMF1/0L85XoX693itvZQwp12BPu9pgV0NarS/IB3WaBBU/5WxGDYQ pyuamiMD1dJRhXTRNkwNTkal/5PRy1iAwpqMgt0aaI8VFvgYM9WNl2AGpQtgqkQvlBjFbbTOrxU g= X-Received: by 2002:ac2:4a66:0:b0:4fb:89b3:3373 with SMTP id q6-20020ac24a66000000b004fb89b33373mr4340762lfp.43.1694091647732; Thu, 07 Sep 2023 06:00:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFK6KQ0VsnC4tW2uPpXF50icu/Hb3NSxS5mzBkRdKCn0jWkQQGvsqy0QwdF1NYlkTIjXpiO+Q== X-Received: by 2002:ac2:4a66:0:b0:4fb:89b3:3373 with SMTP id q6-20020ac24a66000000b004fb89b33373mr4340713lfp.43.1694091646549; Thu, 07 Sep 2023 06:00:46 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o7-20020a05600c378700b003fe4548188bsm2451233wmr.48.2023.09.07.06.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 18/51] contrib/plugins/lockstep: Fix string format Date: Thu, 7 Sep 2023 14:59:27 +0200 Message-ID: <20230907130004.500601-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~ plugins/lockstep.c:138:33: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~~~ plugins/lockstep.c:148:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~ plugins/lockstep.c:148:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~~~ plugins/lockstep.c:156:36: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~ plugins/lockstep.c:156:53: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/lockstep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 3614c3564c2..57748e86eb3 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n", + g_string_printf(out, + "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + " (%d/%d since last)\n", us->pc, them->pc, g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); @@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx (%ld)\n", + g_string_printf(out, + "Δ insn_count @ 0x%016" PRIx64 + " (%ld) vs 0x%016" PRIx64 " (%ld)\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0; @@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them) entry = g_slist_next(entry), i++) { ExecInfo *prev = (ExecInfo *) entry->data; g_string_append_printf(out, - " previously @ 0x%016lx/%ld (%ld insns)\n", + " previously @ 0x%016" PRIx64 "/%" PRId64 + " (%ld insns)\n", prev->block->pc, prev->block->insns, prev->insn_count); } From patchwork Thu Sep 7 12:59:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OehsFquA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKBm4LM6z1ygc for ; Thu, 7 Sep 2023 23:01:52 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdI-00039o-WD; Thu, 07 Sep 2023 09:01:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd8-0002tO-A4 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd3-0007KR-JG for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091660; 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=dArbTK+KzhT/gOPgG3uYUWvS6zno8A51atqiaGekGRM=; b=OehsFquAz7bnHDTudj97wn8olxUNqLvyskijMcsBKlVOrxah31qo9j6CE4/vCL9xmwCcDR WO6ZWUGHZTxZrNWPcP3dLoyFVmZP1ZsmLa/7XprbpgRz39Sfk+8A8kumRRL49L2YN0+2k/ VzO8htix5oLymX5VT1m8cePlOF/65Is= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-383-TZvHyHd4NYG0g3XwHTTcvw-1; Thu, 07 Sep 2023 09:00:54 -0400 X-MC-Unique: TZvHyHd4NYG0g3XwHTTcvw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31c470305cfso553572f8f.3 for ; Thu, 07 Sep 2023 06:00:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091651; x=1694696451; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dArbTK+KzhT/gOPgG3uYUWvS6zno8A51atqiaGekGRM=; b=bFEi5NhV5Frpv+UgavmaNziAoz9mbWk1LnX+S4br0rCaEQNBEuO4HCtONd7fqfattv U89AJl/yRvfl6orCQRUt1+3b8cnMCZsX0LvADFtZBYmypt1zjezhrdXQgnllc6t7yTLn I+V83FihNtjMrPDDB+DJPM8DqZmZqICoKB/H/4UJl10n3dk49uylofQsFNj3j2A7Bzka EirUinkstMHVq6b5TgxLwimU45FUIyD76XsZaWyAshhl4DN1DSyZ4dO+E25oF6OV1pCP dBzkENSxqX0Qu7rR5wq7lgI2hdagAtPMe0syYvVYL/nfOAPDAfGttVltR2gp8UtegaOi tWAQ== X-Gm-Message-State: AOJu0YyhAUHD5uXDfBIunIygm7fimMHcT3qK4KMXfzdidTWMXe4sYSP/ 6Vdnf3k8lZZQDAcCBPSCYSavGoce/Gf6YMcjdid+a9P2zahtKrUSA5+KaTSUuJoOEySGkYwvyyQ 6Mgf9pl6UgszmhJczzGEyD/Lt4KigRMBQAdoBq3RMpgNg9mDGC/N7zSlHEJr/QLPX+C3GiWqBVk A= X-Received: by 2002:a5d:4243:0:b0:317:49a2:1f89 with SMTP id s3-20020a5d4243000000b0031749a21f89mr4769442wrr.1.1694091651627; Thu, 07 Sep 2023 06:00:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0kIaqZoL9BebiIrPjIpKQKQfzaisxvzqQonxEoD4mAsFcCHX0vQ/1y1DtqTQAdBBqmz/t9g== X-Received: by 2002:a5d:4243:0:b0:317:49a2:1f89 with SMTP id s3-20020a5d4243000000b0031749a21f89mr4769389wrr.1.1694091650532; Thu, 07 Sep 2023 06:00:50 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id k11-20020a5d6d4b000000b0031ad2663ed0sm23259304wri.66.2023.09.07.06.00.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 19/51] contrib/plugins: add Darwin support Date: Thu, 7 Sep 2023 14:59:28 +0200 Message-ID: <20230907130004.500601-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Under Darwin, using -shared makes it impossible to have undefined symbols and -bundle has to be used instead; so detect the OS and use different options. Based-on: <20230907101811.469236-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- contrib/plugins/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index db1bd04dfa6..c26fa08441e 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -37,7 +37,11 @@ all: $(SONAMES) $(CC) $(CFLAGS) -c -o $@ $< lib%.so: %.o +ifeq ($(CONFIG_DARWIN),y) + $(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS) +else $(CC) -shared -o $@ $^ $(LDLIBS) +endif clean: rm -f *.o *.so *.d From patchwork Thu Sep 7 12:59:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=euynrRY8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKV61Pnrz1ygc for ; Thu, 7 Sep 2023 23:15:10 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdQ-0003Mp-2n; Thu, 07 Sep 2023 09:01:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd6-0002sj-Iw for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0007Jh-B1 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091658; 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=MjIkCF5qgOZQn7olwlUoun7cKywGIXhs+Hi0nn+kw18=; b=euynrRY8PKuPVpHT1dB8MBYgehNDJOoXVWx3Wd4mZsJUEUw0IExhv9PsOFA7nJ/4OwWU+u uIBpYpokdk1AhLdHI1fA+x2QlsWJXF3hDSq+jouzmlTjcLAsROtmTiHJcPMMf0+jmBitLa vQx21xrSmYJXSQr/KMzp3yxTIkePzlU= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-yCwsWAd_OveSJMBfVWCHEA-1; Thu, 07 Sep 2023 09:00:56 -0400 X-MC-Unique: yCwsWAd_OveSJMBfVWCHEA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-401c4f03b00so7062125e9.1 for ; Thu, 07 Sep 2023 06:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091654; x=1694696454; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MjIkCF5qgOZQn7olwlUoun7cKywGIXhs+Hi0nn+kw18=; b=ePS7yStu38sa2WcmgtD4kHT9Ua8P2HofOfzH/crzIeQc0W4QaJM5ywqT5vhvf43ds2 Dwud6mpxyx4Yqz0A1P2fu87Na98Zgb1ZfTLEF/0CH6d5hpZfn2/z9zRP4Ovakisv0Ppq vdRJ5ec+hCAmiwHQ/YUkPRNZftGi9/Q7H9CPN+h7bWY5334VcpaLppiMS8r2HEuJe1mL PqWvJpaE9XGcsBiRtQFkyIZAYIZCTLuv/TQ3Ga5Ye2m2HBWhSlh5/Iego1CCb/oSCmNL JycYCx7amI6GkvQoGhqNsHtcActpnrchpZBoowfKdvwjiRDvJj26uajMBHxSsIvIOHAn +y2A== X-Gm-Message-State: AOJu0YyexvfJkTIVRi2P0Mrvh7IniYbnI+Zs4r4pdks0AASodh5n1+uX Lp2hR2mPQwglHFrRxv6Jf16V0HDRfx3hwOV9lQmJQhdkBuC2UQROWHPTCWXIqHjwztKHYJlI+zr fV4DVrR8R66JvmzI+0LDlyVeYe2jR9TtwNiEerx8v0P7J6viSWCJ384QGpOKNbYZL/acNm+q/yG c= X-Received: by 2002:a05:600c:245:b0:400:2dc5:1fed with SMTP id 5-20020a05600c024500b004002dc51fedmr4739926wmj.33.1694091653833; Thu, 07 Sep 2023 06:00:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlc5opgKDaGAwC5ssDpVmYSpwoZ//r5v6uf8mt7S6YHZlGMFeJbv7hlywVo1ulisVW04cEuw== X-Received: by 2002:a05:600c:245:b0:400:2dc5:1fed with SMTP id 5-20020a05600c024500b004002dc51fedmr4739903wmj.33.1694091653533; Thu, 07 Sep 2023 06:00:53 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id c19-20020a05600c0ad300b003fe2bea77ccsm2212848wmr.5.2023.09.07.06.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:52 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 20/51] meson: do not unnecessarily use cmake for dependencies Date: Thu, 7 Sep 2023 14:59:29 +0200 Message-ID: <20230907130004.500601-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Both gvnc and sysprof-capture come with pkg-config files, so specify the method to find them. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- tests/migration/meson.build | 2 +- tests/qtest/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/migration/meson.build b/tests/migration/meson.build index ac71f132901..a91aa61c659 100644 --- a/tests/migration/meson.build +++ b/tests/migration/meson.build @@ -1,4 +1,4 @@ -sysprof = dependency('sysprof-capture-4', required: false) +sysprof = dependency('sysprof-capture-4', method: 'pkg-config', required: false) glib_static = dependency('glib-2.0', version: glib_req_ver, required: false, method: 'pkg-config', static: true) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index b071d400b37..df63909ee51 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -321,7 +321,7 @@ qtests = { } if vnc.found() - gvnc = dependency('gvnc-1.0', required: false) + gvnc = dependency('gvnc-1.0', method: 'pkg-config', required: false) if gvnc.found() qtests += {'vnc-display-test': [gvnc]} qtests_generic += [ 'vnc-display-test' ] From patchwork Thu Sep 7 12:59:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ba11yOXB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKD1738fz1ygc for ; Thu, 7 Sep 2023 23:02:57 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdH-00038c-Ig; Thu, 07 Sep 2023 09:01:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd9-0002tV-KO for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd6-0007Kz-95 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091663; 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=RSIhgwdtPAh7ZASQK5Mkn904aeMaclvME+5f1ujXt2U=; b=ba11yOXB2nEpzsI0HXaRp9yOuv6qt0wqqH207WjG3zHrvDTnDPY1LcoGEhUd51stFA8AwT vatvGI6EOhKbyxjeb9CtlAnNvL+oUsR8uSrV5Egli/IGXW3J1qcXO5ua2ttBYJt1XfQe+I 7LGQrlsYJiv2o2SnsKo+cDDdcgA5Zac= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-IuMvGeiaOWGYlqjW2eTZow-1; Thu, 07 Sep 2023 09:01:01 -0400 X-MC-Unique: IuMvGeiaOWGYlqjW2eTZow-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401dba99384so6532135e9.3 for ; Thu, 07 Sep 2023 06:00:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091656; x=1694696456; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RSIhgwdtPAh7ZASQK5Mkn904aeMaclvME+5f1ujXt2U=; b=EzqQgle/rHjv24WRn6/DNYIvRB4lxTIeL3WE7Hn37QlgDgXOoTlVLqKEVFPBdBXK5i +7MgWOASI1dnRZ0Z1X7iIKlwUm3Q+QrD0oFDAlbSJrHD8BjzR5cMQdMqqP5+onnODjbc RzbRm1HlEV2uQdHDz48G3oLm3MIsiR1YV31+Pb61Sa2ESYCvh0CwSHZe+K3DIwx2PODp ApBPSeY+SdUPg+qztAf+rOtaSv0qhzsvgRoimMb+xiSuJJrdN8X+9lylCRL2Z5wO5gfW y2ehDSBfYmOJcB2hB9qd6cMR+CC8DxgzeB6qC8CJvPXeH2vEJyyZyMxtSeLigGgldV0y OK7g== X-Gm-Message-State: AOJu0YzmEJnY/oXUWhu2ONtZcZZ5ZY78qRNj1+tKyX6DU3XgnEr8LOyy U2afKUbCD4Tan5SZpHlublM1O+xsgr55Q+HNUTn4J7GFfCllqz2yjzmCG+Yc51iotv24MveTCjh KSaRJpgHZzeFRUtjQGh8nSkz++HXgq/exqAIUk9aMFPhF44coRf832RVcxwg1DdTc8AMKMKZL3p I= X-Received: by 2002:a1c:ed08:0:b0:3ff:516b:5c65 with SMTP id l8-20020a1ced08000000b003ff516b5c65mr4225155wmh.30.1694091655971; Thu, 07 Sep 2023 06:00:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEV5OQ7bChc7GWb+ZnwKtA81RIgMPq3FdVhqi1KtAxPQ2zE+gym52ODYry3gWTp/SRUeE+PsQ== X-Received: by 2002:a1c:ed08:0:b0:3ff:516b:5c65 with SMTP id l8-20020a1ced08000000b003ff516b5c65mr4225143wmh.30.1694091655607; Thu, 07 Sep 2023 06:00:55 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id x16-20020a05600c21d000b003fbca942499sm2481151wmj.14.2023.09.07.06.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:54 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PULL 21/51] meson: update unsupported host/CPU messages Date: Thu, 7 Sep 2023 14:59:30 +0200 Message-ID: <20230907130004.500601-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Unsupported CPU and OSes are not really going away, but the project simply does not guarantee that they work. Rephrase the messages accordingly. While at it, move the warning for TCI performance at the end where it is more visible. Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- meson.build | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index 98e68ef0b1e..13f21fd24de 100644 --- a/meson.build +++ b/meson.build @@ -678,9 +678,7 @@ endif tcg_arch = host_arch if get_option('tcg').allowed() if host_arch == 'unknown' - if get_option('tcg_interpreter') - warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu)) - else + if not get_option('tcg_interpreter') error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu)) endif elif get_option('tcg_interpreter') @@ -4317,28 +4315,37 @@ summary_info += {'selinux': selinux} summary_info += {'libdw': libdw} summary(summary_info, bool_yn: true, section: 'Dependencies') -if not supported_cpus.contains(cpu) +if host_arch == 'unknown' message() - warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!') + warning('UNSUPPORTED HOST CPU') message() - message('CPU host architecture ' + cpu + ' support is not currently maintained.') - message('The QEMU project intends to remove support for this host CPU in') - message('a future release if nobody volunteers to maintain it and to') - message('provide a build host for our continuous integration setup.') - message('configure has succeeded and you can continue to build, but') - message('if you care about QEMU on this platform you should contact') - message('us upstream at qemu-devel@nongnu.org.') + message('Support for CPU host architecture ' + cpu + ' is not currently') + message('maintained. The QEMU project does not guarantee that QEMU will') + message('compile or work on this host CPU. You can help by volunteering') + message('to maintain it and providing a build host for our continuous') + message('integration setup.') + if get_option('tcg').allowed() and target_dirs.length() > 0 + message() + message('configure has succeeded and you can continue to build, but') + message('QEMU will use a slow interpreter to emulate the target CPU.') + endif endif if not supported_oses.contains(targetos) message() - warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!') + warning('UNSUPPORTED HOST OS') message() - message('Host OS ' + targetos + 'support is not currently maintained.') - message('The QEMU project intends to remove support for this host OS in') - message('a future release if nobody volunteers to maintain it and to') - message('provide a build host for our continuous integration setup.') + message('Support for host OS ' + targetos + 'is not currently maintained.') message('configure has succeeded and you can continue to build, but') - message('if you care about QEMU on this platform you should contact') - message('us upstream at qemu-devel@nongnu.org.') + message('the QEMU project does not guarantee that QEMU will compile or') + message('work on this operating system. You can help by volunteering') + message('to maintain it and providing a build host for our continuous') + message('integration setup. This will ensure that future versions of QEMU') + message('will keep working on ' + targetos + '.') +endif + +if host_arch == 'unknown' or not supported_oses.contains(targetos) + message() + message('If you want to help supporting QEMU on this platform, please') + message('contact the developers at qemu-devel@nongnu.org.') endif From patchwork Thu Sep 7 12:59:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ftm2rBB4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQN5lvXz1ynb for ; Thu, 7 Sep 2023 23:11:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdH-00038Y-C4; Thu, 07 Sep 2023 09:01:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd8-0002tS-IW for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd5-0007KZ-5C for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091661; 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=p/UaO2tdvyoA4JIJQgWAGmd+D1MVsgHmpLvvBwYxVwg=; b=ftm2rBB4FIbnXWbIR2PIPY/IiSvWlGDvIvbrnkNQdw2bMtk8HhsOkGjdUSPotfPWGL5UTN DG1/Vo2NqAuXJiTyuCDbxQab7MYM7ZErhNB55P7k6gVBKlyHiUPGdJwWE7PJ8VwV8jc/IY GVPrU191WzEWZKsS2bTa++l6YH/4TOQ= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-mSIaphdDNped7UAAHG_LbA-1; Thu, 07 Sep 2023 09:01:00 -0400 X-MC-Unique: mSIaphdDNped7UAAHG_LbA-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-5009121067cso957803e87.2 for ; Thu, 07 Sep 2023 06:00:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091658; x=1694696458; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p/UaO2tdvyoA4JIJQgWAGmd+D1MVsgHmpLvvBwYxVwg=; b=RjzByUfadxB9MycA44ZJF6H88gZAyS4U98nb0gZVBR4dAuWpFrXA7ntBMT0t+FLFID hR+4Slmd1esgFDDjwGyasynojejbJxLUUlMFhJfJpvmdkMFPzqS2G2bPkS6I7nk8fLQb smay87PRK5IdQntEB6OoHQljKjVe85cOf2+Doz1XYCpkaNaZ6a3M69R4d2ffUSP5rxAe wr7yDzFZOxttKYPR52D87U47tOh3fhPBT/kkjm/ujamWBJgiZWn4apBvydHS5Vy+PMsu bIoGqsJO3P6cjeJeirddL7u9sfmD+K+AKDLSZQLoFpYCmUgT91fQAfosMH6ntlDb+mIR vRvg== X-Gm-Message-State: AOJu0YzxeUaa+9aHtC7DXg4vGcb9Aqcnzww2/OWxH91AxVWahDc1GIwL IaOuBBf427YuO0EsTEqE7REXfQ74e94mIQB6VMvhr6OmM3y8LmKbSuXx5XjN0Wo2gCkAbMUrDfI PqPSiIzkqxBjB6rFc6EG7gKB6Azdyh75OkwENcfFddGxrIo3KXaP4kHV5hOadB/yiAVHgl/utx2 c= X-Received: by 2002:ac2:554a:0:b0:4fb:89f2:594d with SMTP id l10-20020ac2554a000000b004fb89f2594dmr4541914lfk.63.1694091658153; Thu, 07 Sep 2023 06:00:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGm9RDpIlG5cyXSAMWkW8fUjEZ70DoyJf4q+uQX4/S+13bBRrlZ/XnfPVFllf8Ij/oY7J94Mg== X-Received: by 2002:ac2:554a:0:b0:4fb:89f2:594d with SMTP id l10-20020ac2554a000000b004fb89f2594dmr4541881lfk.63.1694091657616; Thu, 07 Sep 2023 06:00:57 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id z20-20020a1c4c14000000b00402e942561fsm2449504wmf.38.2023.09.07.06.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:56 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P_=2E?= =?utf-8?q?_Berrang=C3=A9?= Subject: [PULL 22/51] configure: remove HOST_CC Date: Thu, 7 Sep 2023 14:59:31 +0200 Message-ID: <20230907130004.500601-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org $(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be used instead now that there is a Tricore C compiler. Remove the variable from config-host.mak. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure | 1 - tests/tcg/tricore/Makefile.softmmu-target | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index b9af8282293..7743c18f2fe 100755 --- a/configure +++ b/configure @@ -1800,7 +1800,6 @@ fi mkdir -p tests/tcg echo "# Automatically generated by configure - do not modify" > $config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak -echo "HOST_CC=$host_cc" >> $config_host_mak # versioned checked in the main config_host.mak above if test -n "$gdb_bin"; then diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index aff7c1b5802..2ec0bd36225 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -28,7 +28,7 @@ TESTS += test_context_save_areas.c.tst QEMU_OPTS += -M tricore_testboard -cpu tc27x -nographic -kernel %.pS: $(ASM_TESTS_PATH)/%.S - $(HOST_CC) -E -o $@ $< + $(CC) -E -o $@ $< %.o: %.pS $(AS) $(ASFLAGS) -o $@ $< From patchwork Thu Sep 7 12:59:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830889 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KFx2qR+J; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN55rylz1ygR for ; Thu, 7 Sep 2023 23:09:57 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdR-0003On-2B; Thu, 07 Sep 2023 09:01:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdE-00031b-G4 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd9-0007M2-If for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091666; 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=eTC08l5E2LHxzBEzXg14rY8tH1ESV2HYzTzj23bXChc=; b=KFx2qR+JEXbgqtvSNpZGKt283iX5CllZnEoPVVnvwsTDuDm/N8DW6JWynnOmucBV10VZL4 je1CW4W/u1OUssVvsjfiX5DvhLu2JwV3uQupeZiGC9m81Dg027DWEYUgFmdTcT3GRAr0px j1i/FCCgGj6yn71rXAgGmauTTvA7d50= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-407-QcLKb9HVPp-A9PHU9FokkQ-1; Thu, 07 Sep 2023 09:01:04 -0400 X-MC-Unique: QcLKb9HVPp-A9PHU9FokkQ-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-401d8873904so7455145e9.0 for ; Thu, 07 Sep 2023 06:01:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091660; x=1694696460; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eTC08l5E2LHxzBEzXg14rY8tH1ESV2HYzTzj23bXChc=; b=aSqhvLzMnA18CMXUlMac4tuqbyC7x4BWN5LW/ldNZCsEAp6tQ89lPoHUkOa7ATozP7 zZq7Dsdqme0+Eh6ydToMN0/ds9nd3WFTNE6DkRBZqcYJXy0FKaRhjlNwlpVRVlSa3SCE 3FuL8clSPpW5U/rZ3/DRVMdJ8WiO72RuSaul59n4mQ/iMDTgfI4JPeaxT2md7ku+aZyC Rgs+/qQNjDbK0QuZPdmci28GUIRe8jeKLSrneq3a4lbBd2yv/mPRpTDWDM9fYUDzVzqB amy9qEODAHPyRL5xcffcVAz5anUc2FOqjBsaBVM8/jkQRBLODaPBJEgD1kWcOa8ukVW4 7srQ== X-Gm-Message-State: AOJu0YzHgHuFAr6H9ip5fyW8HMMEe6dA7rpVl5Fk4gtkOXLRfYZeTIXH Z6yWS0NlHuBm92WAHeV6lr+Warj3NdaNPUuSp60aqMA8/ynh7TeMzEdmtpF5O9eUxceBDDfex1w JuUfdnaRfZNsi32YrkJkM3+nPn63D83J+bnz9kgMzy2lZKvApfMTcevdJYz6Uhs+KIr6dgFXwFg M= X-Received: by 2002:a5d:6a47:0:b0:31a:e21f:37ee with SMTP id t7-20020a5d6a47000000b0031ae21f37eemr4321458wrw.67.1694091660446; Thu, 07 Sep 2023 06:01:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmkHX/8WZfepA/atmGhfXGk9m0D8OxIZ0DbISmr8Pb64iZomeGNSuQBjoa5AEfyrIc26Jldg== X-Received: by 2002:a5d:6a47:0:b0:31a:e21f:37ee with SMTP id t7-20020a5d6a47000000b0031ae21f37eemr4321440wrw.67.1694091660140; Thu, 07 Sep 2023 06:01:00 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id q12-20020adffecc000000b00316eb7770b8sm23521272wrs.5.2023.09.07.06.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:58 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P_=2E?= =?utf-8?q?_Berrang=C3=A9?= Subject: [PULL 23/51] configure: create native file with contents of $host_cc Date: Thu, 7 Sep 2023 14:59:32 +0200 Message-ID: <20230907130004.500601-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The argument of --host-cc is not obeyed when cross compiling. To avoid this issue, place it in a configuration file and pass it to meson with --native-file. While at it, clarify that --host-cc is not obeyed anyway when _not_ cross compiling, because cc="$host_cc" is placed before --host-cc is processed. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 7743c18f2fe..378a0de9fb6 100755 --- a/configure +++ b/configure @@ -288,7 +288,7 @@ static="no" # ${cross_prefix}gcc (if cross-prefix specified) # system compiler if test -z "${CC}${cross_prefix}"; then - cc="$host_cc" + cc="cc" else cc="${CC-${cross_prefix}gcc}" fi @@ -927,8 +927,8 @@ Advanced options (experts only): -Dmesonoptname=val passthrough option to meson unmodified --cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix] --cc=CC use C compiler CC [$cc] - --host-cc=CC use C compiler CC [$host_cc] for code run at - build time + --host-cc=CC when cross compiling, use C compiler CC for code run + at build time [$host_cc] --cxx=CXX use C++ compiler CXX [$cxx] --objcc=OBJCC use Objective-C compiler OBJCC [$objcc] --extra-cflags=CFLAGS append extra C compiler flags CFLAGS @@ -1892,7 +1892,6 @@ if test "$skip_meson" = no; then echo "windres = [$(meson_quote $windres)]" >> $cross echo "windmc = [$(meson_quote $windmc)]" >> $cross if test "$cross_compile" = "yes"; then - cross_arg="--cross-file config-meson.cross" echo "[host_machine]" >> $cross echo "system = '$targetos'" >> $cross case "$cpu" in @@ -1909,6 +1908,14 @@ if test "$skip_meson" = no; then else echo "endian = 'little'" >> $cross fi + cross_arg="--cross-file config-meson.cross" + + native="config-meson.native.new" + echo "# Automatically generated by configure - do not modify" > $native + echo "[binaries]" >> $native + echo "c = [$(meson_quote $host_cc)]" >> $native + mv $native config-meson.native + cross_arg="$cross_arg --native-file config-meson.native" else cross_arg="--native-file config-meson.cross" fi From patchwork Thu Sep 7 12:59:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i9vdWX+K; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKNQ08QTz1yh1 for ; Thu, 7 Sep 2023 23:10:14 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdR-0003Oq-3i; Thu, 07 Sep 2023 09:01:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdG-00034w-Hk for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdE-0007MQ-7W for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091669; 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=9aPc6QuIQUSjFgfjtGm1gBlb1gbxgW+SxTCr4ISfE8k=; b=i9vdWX+KuwvfTyz3Gu058pYujZlIufOUHp3HQv6MgTnMiPm+OQRhKSoNtuwYs2yRRDpxbi jrSmfC5ri40jnDr3g/CPNwBc6elkOPdonCCUfoKT1f3MFJ0fKD+Gr/EqyRoDtn1As3VF1A 6Nw0Yip5g7xxf5NO7+e54BKBr4FXPgY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-7P5iIZPSOP-WnzFrWedf6A-1; Thu, 07 Sep 2023 09:01:05 -0400 X-MC-Unique: 7P5iIZPSOP-WnzFrWedf6A-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4005f0a53c5so7317275e9.3 for ; Thu, 07 Sep 2023 06:01:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091662; x=1694696462; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9aPc6QuIQUSjFgfjtGm1gBlb1gbxgW+SxTCr4ISfE8k=; b=lxo8W5oQE9hOyTjY2jEMlgCifMrs1bCKt1pJcnW1ApnXztIRBbyDu3GscCgbDPQOjw 18gyp+txQNnBvKF8v2Tx/fZxu41bzeYwoWwK55UTq6FVx5WqLccyVtxmZrE4Z8Qf8vBT DE/pd2CYOs6wGwEgSYoLG5WP3uhYMeRKBNnNBKEnKxdq2zf9C0eSyCZOTWT5WY4ILjXc Z+7LOUnj4I1Pr8bg8LOYwREeqWhPhpmYvkN6NoZDW0YcHkeMylxKPhPzURNXUEM0rPz8 S3eEcs3PC2si/BHS1URji19oe/6k7RaCy+NrxO7eh4+Y9t7aqRrqlptXAMo27KtKUxS6 lTFA== X-Gm-Message-State: AOJu0YwUuwaE86BcrCWV/a5LaGN/fZmgZF1PXQhs2Kdf5/Ao2XonGFVn lLqvPlSWHk6fHe9FO5dC+dxUwlzkiwVjvb0EMzzMB7AXzbH8WFOvR2O6OalOfIqGvQs3Mec2Qsk ewF5fJ8/05+Pi39taGE4OB5MgcjsAvQCRAtluIplPfn0jkIHQ8E2NmjplZi1J+yW+68iBkeTytz Q= X-Received: by 2002:a05:600c:378c:b0:401:8225:14ee with SMTP id o12-20020a05600c378c00b00401822514eemr4712834wmr.41.1694091662443; Thu, 07 Sep 2023 06:01:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4rQOKbuE7DSiXMO4/yZfpgZ19rVvee6SeH45ms5GT89v7+aoihQafeIS6M9P1MZmbAeLtkQ== X-Received: by 2002:a05:600c:378c:b0:401:8225:14ee with SMTP id o12-20020a05600c378c00b00401822514eemr4712822wmr.41.1694091662203; Thu, 07 Sep 2023 06:01:02 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l23-20020a1c7917000000b003fe17901fcdsm2440260wme.32.2023.09.07.06.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 24/51] meson: compile bundled device trees Date: Thu, 7 Sep 2023 14:59:33 +0200 Message-ID: <20230907130004.500601-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If dtc is available, compile the .dts files in the pc-bios directory instead of using the precompiled binaries. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- pc-bios/Makefile | 19 ------------------- pc-bios/meson.build | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 23 deletions(-) delete mode 100644 pc-bios/Makefile diff --git a/pc-bios/Makefile b/pc-bios/Makefile deleted file mode 100644 index 315288df84e..00000000000 --- a/pc-bios/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# NOTE: only compilable with x86 cross compile tools -# -include ../config-host.mak - -DEFINES= - -TARGETS= - -all: $(TARGETS) - -%.o: %.S - $(CC) $(DEFINES) -c -o $@ $< - -%.dtb: %.dts - dtc -I dts -O dtb -o $@ $< - -clean: - rm -f $(TARGETS) *.o *~ diff --git a/pc-bios/meson.build b/pc-bios/meson.build index a7224ef4699..e67fa433a1b 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -57,10 +57,6 @@ blobs = [ 'efi-e1000e.rom', 'efi-vmxnet3.rom', 'qemu-nsis.bmp', - 'bamboo.dtb', - 'canyonlands.dtb', - 'petalogix-s3adsp1800.dtb', - 'petalogix-ml605.dtb', 'multiboot.bin', 'multiboot_dma.bin', 'linuxboot.bin', @@ -84,6 +80,27 @@ blobs = [ 'vof-nvram.bin', ] +dtc = find_program('dtc', required: false) +foreach f : [ + 'bamboo.dts', + 'canyonlands.dts', + 'petalogix-s3adsp1800.dts', + 'petalogix-ml605.dts', +] + out = fs.replace_suffix(f, '.dtb') + if dtc.found() + custom_target(f, + build_by_default: have_system, + input: files(f), + output: out, + install: get_option('install_blobs'), + install_dir: qemu_datadir, + command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' ]) + else + blobs += out + endif +endforeach + if get_option('install_blobs') install_data(blobs, install_dir: qemu_datadir) endif From patchwork Thu Sep 7 12:59:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GHPzgwbd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKCj446jz1ygc for ; Thu, 7 Sep 2023 23:02:41 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdI-000399-3o; Thu, 07 Sep 2023 09:01:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdG-00035b-Lg for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdE-0007MX-8Q for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091669; 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=EdLsJG62Ze4MUY0tKyHT3F9g6F8Ou2/1hureqaW2AWw=; b=GHPzgwbdhGcVjJsd4KSyb2pHxPKPVQTdFGMWLey5ltG8hTtiXehM3v5mm39LaN/7Aa0Qx9 u3C4ST5y10r3P5k4i933IBbAPJK7G6yk1Ubth3yqovN+ghVACLS/XXJTunl8OaFlP6TmGA QzGjJ+vRFy/OhT6PfS+4gCC9X/H/+UQ= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-295-JDz9IDv4PISQlR11pg67vA-1; Thu, 07 Sep 2023 09:01:07 -0400 X-MC-Unique: JDz9IDv4PISQlR11pg67vA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fef3606d8cso7403235e9.1 for ; Thu, 07 Sep 2023 06:01:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091665; x=1694696465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EdLsJG62Ze4MUY0tKyHT3F9g6F8Ou2/1hureqaW2AWw=; b=M9DojuDXYrcb5pMN2XA4pi007j7n+KpykrU1KUnz3hPY2dsDWSrqkW78Qzmkj3ZbsO gerkLSxQQQq8Ld8Mwb5Tt+0+dgVKpHJEfm2AXQ5xZ5pWOw31tJl/jt+XOsoVeMFrvVSp b+58LU/zgK6UkXymQkemM5YwJn3TQpwekhpWqr5xbNqlo466H+DNYdxNkJpTxgvkwssZ hD/Lc6MOzHB0W/Sf23SsIJ6SkfAVBX2VnkefYwLBoAX8YuxKznTKs9gNSyU77jsGvF+F WN4JqebasWjZjW0l5S8Gs6VO+82iZo4ECC6TNeuUU2aYf4oGS89OFgmX6Ys/pBhviL0A DqfQ== X-Gm-Message-State: AOJu0YyQlAjHcbBktE1v0E1vKUduJ0bYtMszTDH6etZQsLTzW9x9xFt7 UE9272usXecxavWxPZtGdBouenCa9c0CRYkBKNzqlfCIuMz5KaPYKRwrbqpqhwCfFAtgPJqxd/k P5oJeWZOnS3hsoHWxdCdv5gR3vmHghqmAfPZc2zd5wjFmDnp0uFfhUxLTO0CLJ9/O7JKdMe47b5 I= X-Received: by 2002:a5d:4b87:0:b0:315:964b:89b9 with SMTP id b7-20020a5d4b87000000b00315964b89b9mr4721515wrt.52.1694091664878; Thu, 07 Sep 2023 06:01:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDDlKG4fLa0mQ1N5Ze/m8kgUyChtZBloth/2zn81MSIP99BvAGljmV10e+b4Ju9xmuSWH8Rw== X-Received: by 2002:a5d:4b87:0:b0:315:964b:89b9 with SMTP id b7-20020a5d4b87000000b00315964b89b9mr4721493wrt.52.1694091664538; Thu, 07 Sep 2023 06:01:04 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id r17-20020a05600c299100b003fe26244858sm2424084wmd.46.2023.09.07.06.01.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:03 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 25/51] configure: remove boolean variables for targets Date: Thu, 7 Sep 2023 14:59:34 +0200 Message-ID: <20230907130004.500601-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Just use $targetos always. Signed-off-by: Paolo Bonzini --- configure | 55 +++++++++++++------------------------------------------ 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/configure b/configure index 378a0de9fb6..f96f7359a83 100755 --- a/configure +++ b/configure @@ -374,45 +374,14 @@ fi # OS specific -mingw32="no" -bsd="no" -linux="no" -solaris="no" case $targetos in windows) - mingw32="yes" plugins="no" pie="no" ;; -gnu/kfreebsd) - bsd="yes" -;; -freebsd) - bsd="yes" - # needed for kinfo_getvmmap(3) in libutil.h -;; -dragonfly) - bsd="yes" -;; -netbsd) - bsd="yes" -;; -openbsd) - bsd="yes" -;; -darwin) - bsd="yes" - darwin="yes" -;; -sunos) - solaris="yes" -;; haiku) pie="no" ;; -linux) - linux="yes" -;; esac if test ! -z "$cpu" ; then @@ -627,7 +596,7 @@ do fi done -if test "$mingw32" = "yes" ; then +if test "$targetos" = "windows" ; then EXESUF=".exe" prefix="/qemu" bindir="" @@ -809,7 +778,7 @@ for opt do ;; --enable-download) download="enabled"; git_submodules_action=update; ;; - --enable-plugins) if test "$mingw32" = "yes"; then + --enable-plugins) if test "$targetos" = "windows"; then error_exit "TCG plugins not currently supported on Windows platforms" else plugins="yes" @@ -1080,7 +1049,7 @@ fi # by default. Only enable by default for git builds if test -z "$werror" ; then if test -e "$source_path/.git" && \ - { test "$linux" = "yes" || test "$mingw32" = "yes"; }; then + { test "$targetos" = linux || test "$targetos" = "windows"; }; then werror="yes" else werror="no" @@ -1718,7 +1687,7 @@ echo all: >> $config_host_mak if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi -if test "$mingw32" = "yes" ; then +if test "$targetos" = "windows"; then echo "CONFIG_WIN32=y" >> $config_host_mak echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO-Linux}" >> $config_host_mak @@ -1727,24 +1696,26 @@ else echo "CONFIG_POSIX=y" >> $config_host_mak fi -if test "$linux" = "yes" ; then +if test "$targetos" = "linux" ; then echo "CONFIG_LINUX=y" >> $config_host_mak fi -if test "$darwin" = "yes" ; then +if test "$targetos" = "darwin" ; then echo "CONFIG_DARWIN=y" >> $config_host_mak fi -if test "$solaris" = "yes" ; then +if test "$targetos" = "sunos" ; then echo "CONFIG_SOLARIS=y" >> $config_host_mak fi echo "SRC_PATH=$source_path" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak # XXX: suppress that -if [ "$bsd" = "yes" ] ; then - echo "CONFIG_BSD=y" >> $config_host_mak -fi +case $targetos in + gnu/kfreebsd | freebsd | dragonfly | netbsd | openbsd | darwin) + echo "CONFIG_BSD=y" >> $config_host_mak + ;; +esac if test "$plugins" = "yes" ; then echo "CONFIG_PLUGIN=y" >> $config_host_mak @@ -1774,7 +1745,7 @@ echo "CC=$cc" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak # use included Linux headers for KVM architectures -if test "$linux" = "yes" && test -n "$linux_arch"; then +if test "$targetos" = "linux" && test -n "$linux_arch"; then symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm fi From patchwork Thu Sep 7 12:59:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830923 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DonoBV6e; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKWJ3vYCz1ygc for ; Thu, 7 Sep 2023 23:16:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdT-0003QK-Om; Thu, 07 Sep 2023 09:01:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdQ-0003Og-Qf for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdO-0007P6-Bh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091681; 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=xO8PrK9ireQp6JlWOrTfu2NpnIcqw9jxYoX6Yf3VkkY=; b=DonoBV6ebovl0ch3QQ+LoHIfp8g5X7i5BmrPfqKOBkhxB2LhpynxhYASNRuUEc7If4od/G eWlUY/nakZo1UCu3HCoksCp4Dc6SqqHlBopO/K8UpR9lZ7vD2J4zpwsqLaaF8CD+WMRm7/ 4VgY2lcEqS0F/RGSvV8ELdHHBF6ZyGk= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-d-HNnDcqN96DQKJiuleuzA-1; Thu, 07 Sep 2023 09:01:14 -0400 X-MC-Unique: d-HNnDcqN96DQKJiuleuzA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2b961c3af8fso11327001fa.0 for ; Thu, 07 Sep 2023 06:01:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091667; x=1694696467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xO8PrK9ireQp6JlWOrTfu2NpnIcqw9jxYoX6Yf3VkkY=; b=GCyD0lpMfZ7Gtr8QK51MIupIElLyFnop0azHUwayYSj8e2G1xXi+pAg8GcqSosXNi+ Y9VqObrVCTxUN4y7ydg4+d5Vcvy/n9a6VlCTqjU8xgZav5JsjyxU1BXR4p7OXTjBS3iv IwfemN2lQVcDt/jxnxCJI/BfWI5yYAgIJg5ZVEyMcsKN2QxfUn0V46Pg9+fyfazxwGG6 3URY3HtsC8HnhImostoDtRNIavsdnV0Q2nhPZDV/9ZzgtpEZK6T7ShY/EQ852jbvM8S7 7EcBjP59GAQ0VhcdFLpEJsSDgRiTE+dhMkUkbaiG7ST0kyTaBCeUXR06fBahnjt/1VJD 0j/A== X-Gm-Message-State: AOJu0YwvA2M5VyymngHGlAx7nvjOIac9WX/jPsDi/AxcCrcA4EUmWvij b/9XAiVeIjC1ROPTC9FFhT2kyotzZBZ9cvSqSLo6iRbhb/6rTnhtDuxzmonGxA1A8NLWDjLQL/Q QuqKbGShCzjhGeNNgaQdb/9GbdFlL0lKHc0HWCeZXgg8XVqUmWl4APdwTsAHF2hVoQJywcVX4w4 c= X-Received: by 2002:a19:674e:0:b0:501:b97a:9f50 with SMTP id e14-20020a19674e000000b00501b97a9f50mr4709117lfj.65.1694091667093; Thu, 07 Sep 2023 06:01:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFp8gpwesdoBiS5aDeFF8957Em9ZTyImvBU+/v+E9g0O2JYhuRTfSD14iJsGFcxOlnLVqx+Wg== X-Received: by 2002:a19:674e:0:b0:501:b97a:9f50 with SMTP id e14-20020a19674e000000b00501b97a9f50mr4709085lfj.65.1694091666543; Thu, 07 Sep 2023 06:01:06 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id x3-20020a05600c2a4300b003feea62440bsm2433877wme.43.2023.09.07.06.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson , Peter Maydell Subject: [PULL 26/51] configure: move --enable-debug-tcg to meson Date: Thu, 7 Sep 2023 14:59:35 +0200 Message-ID: <20230907130004.500601-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- configure | 11 +---------- meson.build | 3 ++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/configure b/configure index f96f7359a83..afd6121b616 100755 --- a/configure +++ b/configure @@ -248,7 +248,6 @@ done git_submodules_action="update" git="git" -debug_tcg="no" docs="auto" EXESUF="" prefix="/usr/local" @@ -727,13 +726,9 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --enable-debug-tcg) debug_tcg="yes" - ;; - --disable-debug-tcg) debug_tcg="no" - ;; --enable-debug) # Enable debugging options that aren't excessively noisy - debug_tcg="yes" + meson_option_parse --enable-debug-tcg "" meson_option_parse --enable-debug-graph-lock "" meson_option_parse --enable-debug-mutex "" meson_option_add -Doptimization=0 @@ -933,7 +928,6 @@ cat << EOF linux-user all linux usermode emulation targets bsd-user all BSD usermode emulation targets pie Position Independent Executables - debug-tcg TCG debugging (default is disabled) NOTE: The object files are built at the place where configure is launched EOF @@ -1684,9 +1678,6 @@ echo >> $config_host_mak echo all: >> $config_host_mak -if test "$debug_tcg" = "yes" ; then - echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak -fi if test "$targetos" = "windows"; then echo "CONFIG_WIN32=y" >> $config_host_mak echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak diff --git a/meson.build b/meson.build index 13f21fd24de..4c3918a34ec 100644 --- a/meson.build +++ b/meson.build @@ -2199,6 +2199,7 @@ config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool) config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock')) config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex')) config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage')) +config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg')) config_host_data.set('CONFIG_GPROF', get_option('gprof')) config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed()) config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug')) @@ -4156,7 +4157,7 @@ if config_all.has_key('CONFIG_TCG') summary_info += {'TCG backend': 'native (@0@)'.format(cpu)} endif summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')} - summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')} + summary_info += {'TCG debug enabled': get_option('debug_tcg')} endif summary_info += {'target list': ' '.join(target_dirs)} if have_system diff --git a/meson_options.txt b/meson_options.txt index aaea5ddd779..5d6b889554c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -83,6 +83,8 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto', description: 'Xen PCI passthrough support') option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') +option('debug_tcg', type: 'boolean', value: false, + description: 'TCG debugging') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') option('safe_stack', type: 'boolean', value: false, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 9da3fe299b7..5567fd29985 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -29,6 +29,7 @@ meson_options_help() { printf "%s\n" ' --enable-debug-mutex mutex debugging support' printf "%s\n" ' --enable-debug-stack-usage' printf "%s\n" ' measure coroutine stack usage' + printf "%s\n" ' --enable-debug-tcg TCG debugging' printf "%s\n" ' --enable-fdt[=CHOICE] Whether and how to find the libfdt library' printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' @@ -276,6 +277,8 @@ _meson_option_parse() { --disable-debug-mutex) printf "%s" -Ddebug_mutex=false ;; --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=true ;; --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;; + --enable-debug-tcg) printf "%s" -Ddebug_tcg=true ;; + --disable-debug-tcg) printf "%s" -Ddebug_tcg=false ;; --enable-dmg) printf "%s" -Ddmg=enabled ;; --disable-dmg) printf "%s" -Ddmg=disabled ;; --docdir=*) quote_sh "-Ddocdir=$2" ;; From patchwork Thu Sep 7 12:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=I96FNYDi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKW410fZz1yh8 for ; Thu, 7 Sep 2023 23:16:00 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdT-0003Pu-05; Thu, 07 Sep 2023 09:01:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdI-00039t-Ul for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdF-0007NR-RO for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091673; 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=7vC+s/1c/aD+R+OU0sMKhncoUeeIumfmEoRZ3URXLr0=; b=I96FNYDioKB7eWVBShK1AqT2zQww/x2rXdlI52N4PO8RWd1c6531ye2oItBdfumt3JbN5x 2sZnJ3H5upwTYj5ThyT/eY4WSn1gzfoSYVhE+qHn17ujDfEXHJXN3/UowR7I1erjYThcBF bA7jDNUsMS1O77c9Mc45T5pfOc0Q9G8= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-BeVbmmCeMT-Glc0VU6iAjQ-1; Thu, 07 Sep 2023 09:01:11 -0400 X-MC-Unique: BeVbmmCeMT-Glc0VU6iAjQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4020645b2a2so5892485e9.2 for ; Thu, 07 Sep 2023 06:01:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091669; x=1694696469; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7vC+s/1c/aD+R+OU0sMKhncoUeeIumfmEoRZ3URXLr0=; b=N+BASJige5qdkvdqH+xDArJ50KrSjzbdBbg5YGuien1nRpUdk+JyAQ+RRyzAy2rHph lwslip2b+QZ0ke8ovL/WI46EQSNVXyFaZ+faN0iwSNOY3cQZLMoMKQrWP9u0+ozOy3lw PJDpPGPpwoPWPReUOqBh46UtH/JehI2niIHnkDty+ariNXeO3TmF3uXwWOA9qrBVEWfa IoDrpADd5xZF5f2TK4McEBHS9g9UsRI2BHhbfeAWcRyGZHOei/F5E038y31IAe+7dar8 6OG6eSBtzCG7tbCLEwAaeOdNQbzbHrrP9Gd6nqzuv1jlW4CrYFsFHyDC7JqILM4DqNiR rd3w== X-Gm-Message-State: AOJu0YyToGTAwWBKAy6lJ6BY30irPIFidmQ+0eBlLDlXSBOdWmf1UQ/E KK7NbQNMxA/R6v/4wbZNcsR1zTLjt16B+KloruFcWtyxXZQa3b0hVkQ8IK5EeyDOlFxHpprOXu0 tQDU0cayUiySH3etvfKCg+OampfII/NtgY9Gyml/NPOMCW0UKHS0R2gwNy4PKprtZnk/y0dOyAo s= X-Received: by 2002:a7b:c855:0:b0:400:57d1:4915 with SMTP id c21-20020a7bc855000000b0040057d14915mr4380683wml.37.1694091669371; Thu, 07 Sep 2023 06:01:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGauUA/hrxYq021ycEzjQ676BBMeT8S7Uq60/fg36DFmGZkUpHR6OhdVhguWIX/77a2wZFSGw== X-Received: by 2002:a7b:c855:0:b0:400:57d1:4915 with SMTP id c21-20020a7bc855000000b0040057d14915mr4380666wml.37.1694091668997; Thu, 07 Sep 2023 06:01:08 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id k16-20020a05600c1c9000b003feae747ff2sm2514236wms.35.2023.09.07.06.01.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 27/51] contrib/plugins: use an independent makefile Date: Thu, 7 Sep 2023 14:59:36 +0200 Message-ID: <20230907130004.500601-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The initial reason to write this patch was to remove the last use of CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG plugins are unrelated to --enable-debug-tcg, and instead they should be the same as those used to build emulators (the plugins are not build via meson for demonstration reasons only). However, since contrib/plugins/Makefile is also the last case of doing a compilation job using config-host.mak, go a step further and make it use a completely separate configuration file, removing all references to compilers from the toplevel config-host.mak. Clean up references to empty variables, and use .SECONDARY so that intermediate object files are not deleted. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure | 15 ++++++++++++--- contrib/plugins/Makefile | 16 ++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/configure b/configure index afd6121b616..849cd3c0385 100755 --- a/configure +++ b/configure @@ -245,7 +245,7 @@ for opt do esac done - +default_cflags='-O2 -g' git_submodules_action="update" git="git" docs="auto" @@ -732,6 +732,7 @@ for opt do meson_option_parse --enable-debug-graph-lock "" meson_option_parse --enable-debug-mutex "" meson_option_add -Doptimization=0 + default_cflags='-O0 -g' ;; --disable-tcg) tcg="disabled" plugins="no" @@ -1731,8 +1732,6 @@ echo "PYTHON=$python" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "NINJA=$ninja" >> $config_host_mak -echo "PKG_CONFIG=${pkg_config}" >> $config_host_mak -echo "CC=$cc" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak # use included Linux headers for KVM architectures @@ -1757,6 +1756,16 @@ if test "$ccache_cpp2" = "yes"; then echo "export CCACHE_CPP2=y" >> $config_host_mak fi +# contrib/plugins configuration +echo "# Automatically generated by configure - do not modify" > contrib/plugins/$config_host_mak +echo "SRC_PATH=$source_path/contrib/plugins" >> contrib/plugins/$config_host_mak +echo "PKG_CONFIG=${pkg_config}" >> contrib/plugins/$config_host_mak +echo "CC=$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak +echo "CFLAGS=${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins/$config_host_mak +if test "$targetos" = darwin; then + echo "CONFIG_DARWIN=y" >> contrib/plugins/$config_host_mak +fi + # tests/tcg configuration (config_host_mak=tests/tcg/config-host.mak mkdir -p tests/tcg diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index c26fa08441e..8ba78c7a329 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -6,11 +6,11 @@ # programs that the main configure has already done for us. # -BUILD_DIR := $(CURDIR)/../.. +include config-host.mak -include $(BUILD_DIR)/config-host.mak +TOP_SRC_PATH = $(SRC_PATH)/../.. -VPATH += $(SRC_PATH)/contrib/plugins +VPATH += $(SRC_PATH) NAMES := NAMES += execlog @@ -26,15 +26,14 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) # The main QEMU uses Glib extensively so it's perfectly fine to use it # in plugins (which many example do). -CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -CFLAGS += -fPIC -Wall -CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0) -CFLAGS += -I$(SRC_PATH)/include/qemu +PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) +PLUGIN_CFLAGS += -fPIC -Wall +PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu all: $(SONAMES) %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $< lib%.so: %.o ifeq ($(CONFIG_DARWIN),y) @@ -48,3 +47,4 @@ clean: rm -Rf .libs .PHONY: all clean +.SECONDARY: From patchwork Thu Sep 7 12:59:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iOqfUWzE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKDm0syyz1ygc for ; Thu, 7 Sep 2023 23:03:36 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEea-0005nx-9f; Thu, 07 Sep 2023 09:02:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdT-0003QA-38 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdP-0007PG-7w for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091682; 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=iaktLIjVJSqvWsFHPYa1zZxD9ZnUqDBRnUr485Ej9/A=; b=iOqfUWzEPOu4d4OsZwHGBCLWVPC1TsCMJSPnglomOsbfgTHm7weAdFZ+eUVfbSXxnwk72s 2rfo/B65o3cC9NkHwqzIdY0SsFJNGR6NFlI8rQ501Uzv8d+1u4uyA5DsxwrvMrk+vZFv+Y SfUCQFiHELEyKaV+s/8dEwBHzSiArT4= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-BDh9_6fpNO2uHYpDXW2_bg-1; Thu, 07 Sep 2023 09:01:18 -0400 X-MC-Unique: BDh9_6fpNO2uHYpDXW2_bg-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-31f3cfe7269so569713f8f.2 for ; Thu, 07 Sep 2023 06:01:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091671; x=1694696471; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iaktLIjVJSqvWsFHPYa1zZxD9ZnUqDBRnUr485Ej9/A=; b=RSsuNGD+dL19X/IMQjERI9gW5VQtkctTug0NyrhHJ9dXJtRcKrSmHpu+xfUNx46WUc OuK6UjKdOefxdIfrxzslRRJCpP8oz/iyIGjiNNNPcxAt1zuabdTBqRya0LBLRlkhgrgC DiIWRGXRAh1HzZEbPztLZy2RwKsDd1DvFLuf3O/TfdY9hEMHJ3KpGvBnRhek3eXVCiIL 67uycjO6IJfbD1kkbZlsU4SakSdAmNqygNyJsLsc1pI4YT+UICkhBxsOxfIbYNGjVUfu LEf7hypaTuKXg7Wl5Wr6bW+v+RH/OUNcDTDD2Fy/ghbtRD45yBkT/c0o0Jw1M8j4X1qf U7+g== X-Gm-Message-State: AOJu0YylNMHWlXcGRr/2qpn2thWbEAsVNhiOIm4yAjzud/Ju99biinRY nXUf1+lWRk/EJKg4rY7v8ld+EmIbtHBH4bVxQ5GRxw9CgGHdCGsWaN2NSDUEQitRUkJG0XNRUE/ bpfrVgiHDWhyVrA7Dr1Ur2L02uOHwh/ccjRMT51VPILHMTBzHawDGNVNQpDguwFsybU+1jD3/O0 M= X-Received: by 2002:adf:ce8c:0:b0:31c:762b:ceb3 with SMTP id r12-20020adfce8c000000b0031c762bceb3mr4836152wrn.48.1694091671676; Thu, 07 Sep 2023 06:01:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMDVeUzifF2ChTwapyG0zaRFZNMat+bkxtX2EOJV+FvkHZDv7ekmwTyUMeOpAFNoYzD+PI/g== X-Received: by 2002:adf:ce8c:0:b0:31c:762b:ceb3 with SMTP id r12-20020adfce8c000000b0031c762bceb3mr4836109wrn.48.1694091670973; Thu, 07 Sep 2023 06:01:10 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id f3-20020a5d6643000000b00318147fd2d3sm23318716wrw.41.2023.09.07.06.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:10 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/51] configure: unify recursion into sub-Makefiles Date: Thu, 7 Sep 2023 14:59:37 +0200 Message-ID: <20230907130004.500601-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Treat contrib/plugins the same as the firmware. Signed-off-by: Paolo Bonzini --- Makefile | 27 ++++++++++++--------------- configure | 13 ++++++++----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 5d48dfac18a..118c28e80d9 100644 --- a/Makefile +++ b/Makefile @@ -164,14 +164,6 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),) endif endif -ifeq ($(CONFIG_PLUGIN),y) -.PHONY: plugins -plugins: - $(call quiet-command,\ - $(MAKE) $(SUBDIR_MAKEFLAGS) -C contrib/plugins V="$(V)", \ - "BUILD", "example plugins") -endif # $(CONFIG_PLUGIN) - else # config-host.mak does not exist ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) $(error Please call configure before running make) @@ -184,15 +176,20 @@ include $(SRC_PATH)/tests/Makefile.include all: recurse-all -ROMS_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(ROMS))) -.PHONY: $(ROMS_RULES) -$(ROMS_RULES): +SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS))) +.PHONY: $(SUBDIR_RULES) +$(SUBDIR_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) +ifneq ($(filter contrib/plugins, $(SUBDIRS)),) +.PHONY: plugins +plugins: contrib/plugins/all +endif + .PHONY: recurse-all recurse-clean -recurse-all: $(addsuffix /all, $(ROMS)) -recurse-clean: $(addsuffix /clean, $(ROMS)) -recurse-distclean: $(addsuffix /distclean, $(ROMS)) +recurse-all: $(addsuffix /all, $(SUBDIRS)) +recurse-clean: $(addsuffix /clean, $(SUBDIRS)) +recurse-distclean: $(addsuffix /distclean, $(SUBDIRS)) ###################################################################### @@ -296,7 +293,7 @@ help: $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' -ifeq ($(CONFIG_PLUGIN),y) +ifneq ($(filter contrib/plugins, $(SUBDIRS)),) @echo 'Plugin targets:' $(call print-help,plugins,Build the example TCG plugins) @echo '' diff --git a/configure b/configure index 849cd3c0385..a0912e4b268 100755 --- a/configure +++ b/configure @@ -256,6 +256,7 @@ softmmu="yes" linux_user="" bsd_user="" plugins="$default_feature" +subdirs="" ninja="" python= download="enabled" @@ -1067,6 +1068,9 @@ if test "$static" = "yes" ; then fi fi test "$plugins" = "" && plugins=yes +if test "$plugins" = "yes"; then + subdirs="$subdirs contrib/plugins" +fi cat > $TMPC << EOF @@ -1627,12 +1631,11 @@ done echo "# Automatically generated by configure - do not modify" > Makefile.prereqs # Mac OS X ships with a broken assembler -roms= if have_target i386-softmmu x86_64-softmmu && \ test "$targetos" != "darwin" && test "$targetos" != "sunos" && \ test "$targetos" != "haiku" && \ probe_target_compiler i386-softmmu; then - roms="pc-bios/optionrom" + subdirs="$subdirs pc-bios/optionrom" config_mak=pc-bios/optionrom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "TOPSRC_DIR=$source_path" >> $config_mak @@ -1641,7 +1644,7 @@ fi if have_target ppc-softmmu ppc64-softmmu && \ probe_target_compiler ppc-softmmu; then - roms="$roms pc-bios/vof" + subdirs="$subdirs pc-bios/vof" config_mak=pc-bios/vof/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak @@ -1660,7 +1663,7 @@ if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \ echo "WARNING: Your compiler does not support the z900!" echo " The s390-ccw bios will only work with guest CPUs >= z10." fi - roms="$roms pc-bios/s390-ccw" + subdirs="$subdirs pc-bios/s390-ccw" config_mak=pc-bios/s390-ccw/config-host.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak @@ -1727,7 +1730,7 @@ if test "$container" != no; then echo "ENGINE=$container" >> $config_host_mak echo "RUNC=$runc" >> $config_host_mak fi -echo "ROMS=$roms" >> $config_host_mak +echo "SUBDIRS=$subdirs" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak From patchwork Thu Sep 7 12:59:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dgmgYGV/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKSd4Qzpz1yh1 for ; Thu, 7 Sep 2023 23:13:53 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdj-0003iF-DR; Thu, 07 Sep 2023 09:01:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdT-0003QL-7O for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdO-0007Oy-Mg for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091680; 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=7KAKVyFrcBYXAPJJUeQDPVu/lv3v+1SzGW2kz6vGWhI=; b=dgmgYGV/a4BjWOOaT7LqGAuDxlLTeoZk6wjG4qnmhdafFRzin3LQOEaH8Tku7IWg3xd7cd Odd+TSOzMA3ZyvyXPkHqWx+eRHA7C56NZL7jnvcf7qdUdGIpJnwlso76CIL3GiA2a/dYIk +H0AfdzILU6XHaD4de8v/eyM9rO0oEM= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-279-Jt06muvRNXWsLP2ii58Vvg-1; Thu, 07 Sep 2023 09:01:18 -0400 X-MC-Unique: Jt06muvRNXWsLP2ii58Vvg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-402ccac9b1eso6562925e9.0 for ; Thu, 07 Sep 2023 06:01:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091675; x=1694696475; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7KAKVyFrcBYXAPJJUeQDPVu/lv3v+1SzGW2kz6vGWhI=; b=ARvm8inyS4WdhYjy4R41XQtGAKq7ZsuuzZJp4Pdw7c9J/e07ee3Iu/sg2ySEq556SR Ag9yE6zz5QPpTlnJgkwCpdUbOc6GuYpuEU73O/w9l0+ESyY/kVAj5XUrxo9zJqIPlK8+ j4bty7U9N7cOuFhRvDHmhh7x5pX/WsteNSpMlo/q1ZoUEBgJLzDq5Lt+NgU3rcjyTdbP 1yt5smLku8MOf80NxwTV6kDK5e73WU5iQ+RCsSiP3aR2EhLcWHT3EDU6TuZE45Yu1805 HJIhOPRMRSjTyGRZMKKu9DD0y6YCPxRmXmvf1Nkdwmcci4iXABYO++TAPJsaC/WaKMtx TuQQ== X-Gm-Message-State: AOJu0Yxnm915ffSt9HbxWgLoZEG/xpPCY3cXFLKX02jyBYzTWl1lJtVd Y8WyOaawvYNw1g+BPn4Ftrnro5EEiZgUT0BrNBrTzePv75IGz5P+F2doprUbL85u/t2QpHI0n2y v9H0j2lPUZVHAYsQNTwlHfm3cWiSb/6c9imBqyDeadyvJLTVnvZGsOVzvvECl+yOKL+AtuTi50s U= X-Received: by 2002:a05:600c:210f:b0:3fe:1871:1826 with SMTP id u15-20020a05600c210f00b003fe18711826mr4567255wml.27.1694091675401; Thu, 07 Sep 2023 06:01:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvr1pqyUGgXDeQ+BM7sU0r8oWbb1ezLg0+0UugF00D3mlJMOp0W3ziRTOvmwpm8KwhaFOVkA== X-Received: by 2002:a05:600c:210f:b0:3fe:1871:1826 with SMTP id u15-20020a05600c210f00b003fe18711826mr4567137wml.27.1694091673030; Thu, 07 Sep 2023 06:01:13 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id e4-20020adfe7c4000000b0031c6581d55esm23371123wrn.91.2023.09.07.06.01.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/51] configure, meson: move --enable-plugins to meson Date: Thu, 7 Sep 2023 14:59:38 +0200 Message-ID: <20230907130004.500601-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org While the option still needs to be parsed in the configure script (it's needed by tests/tcg, and also to decide about recursing into contrib/plugins), passing it to Meson can be done with -D instead of using config-host.mak. Signed-off-by: Paolo Bonzini --- accel/tcg/meson.build | 4 +++- configure | 5 +---- meson.build | 7 ++++--- meson_options.txt | 2 ++ plugins/meson.build | 12 +++++++----- scripts/meson-buildoptions.sh | 3 +++ tests/Makefile.include | 2 +- tests/meson.build | 6 ++---- 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 166bef173b8..8ace7837079 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -11,7 +11,9 @@ tcg_ss.add(files( )) tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) -tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c')]) +if get_option('plugins') + tcg_ss.add(files('plugin-gen.c')) +endif tcg_ss.add(when: libdw, if_true: files('debuginfo.c')) tcg_ss.add(when: 'CONFIG_LINUX', if_true: files('perf.c')) specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) diff --git a/configure b/configure index a0912e4b268..6b1019ba59c 100755 --- a/configure +++ b/configure @@ -1712,10 +1712,6 @@ case $targetos in ;; esac -if test "$plugins" = "yes" ; then - echo "CONFIG_PLUGIN=y" >> $config_host_mak -fi - if test -n "$gdb_bin"; then gdb_version=$($gdb_bin --version | head -n 1) if version_ge ${gdb_version##* } 9.1; then @@ -1909,6 +1905,7 @@ if test "$skip_meson" = no; then test "$cfi" != false && meson_option_add "-Dcfi=$cfi" test "$docs" != auto && meson_option_add "-Ddocs=$docs" test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE" + test "$plugins" = yes && meson_option_add "-Dplugins=true" test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix" test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd" test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg" diff --git a/meson.build b/meson.build index 4c3918a34ec..a1021fe2a78 100644 --- a/meson.build +++ b/meson.build @@ -730,7 +730,7 @@ glib_cflags = [] if enable_modules gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true, method: 'pkg-config') -elif config_host.has_key('CONFIG_PLUGIN') +elif get_option('plugins') gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true, method: 'pkg-config') else @@ -2115,6 +2115,7 @@ if numa.found() dependencies: numa)) endif config_host_data.set('CONFIG_OPENGL', opengl.found()) +config_host_data.set('CONFIG_PLUGIN', get_option('plugins')) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_RDMA', rdma.found()) config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack')) @@ -3883,7 +3884,7 @@ endforeach # Other build targets -if 'CONFIG_PLUGIN' in config_host +if get_option('plugins') install_headers('include/qemu/qemu-plugin.h') endif @@ -4156,7 +4157,7 @@ if config_all.has_key('CONFIG_TCG') else summary_info += {'TCG backend': 'native (@0@)'.format(cpu)} endif - summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')} + summary_info += {'TCG plugins': get_option('plugins')} summary_info += {'TCG debug enabled': get_option('debug_tcg')} endif summary_info += {'target list': ' '.join(target_dirs)} diff --git a/meson_options.txt b/meson_options.txt index 5d6b889554c..e48086e2562 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -83,6 +83,8 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto', description: 'Xen PCI passthrough support') option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') +option('plugins', type: 'boolean', value: false, + description: 'TCG plugins via shared library loading') option('debug_tcg', type: 'boolean', value: false, description: 'TCG debugging') option('tcg_interpreter', type: 'boolean', value: false, diff --git a/plugins/meson.build b/plugins/meson.build index 752377c66d3..71ed996ed31 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -13,8 +13,10 @@ if not enable_modules endif endif -specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( - 'loader.c', - 'core.c', - 'api.c', -), declare_dependency(link_args: plugin_ldflags)]) +if get_option('plugins') + specific_ss.add(files( + 'loader.c', + 'core.c', + 'api.c', + ), declare_dependency(link_args: plugin_ldflags)) +endif diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 5567fd29985..6b16ad94f4b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -40,6 +40,7 @@ meson_options_help() { printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for' printf "%s\n" ' upgrades' + printf "%s\n" ' --enable-plugins TCG plugins via shared library loading' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and' printf "%s\n" ' getrandom()' printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protection (requires' @@ -401,6 +402,8 @@ _meson_option_parse() { --enable-pipewire) printf "%s" -Dpipewire=enabled ;; --disable-pipewire) printf "%s" -Dpipewire=disabled ;; --with-pkgversion=*) quote_sh "-Dpkgversion=$2" ;; + --enable-plugins) printf "%s" -Dplugins=true ;; + --disable-plugins) printf "%s" -Dplugins=false ;; --enable-png) printf "%s" -Dpng=enabled ;; --disable-png) printf "%s" -Dpng=disabled ;; --enable-pvrdma) printf "%s" -Dpvrdma=enabled ;; diff --git a/tests/Makefile.include b/tests/Makefile.include index 985cda7a945..38987426594 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -73,7 +73,7 @@ $(TCG_TESTS_TARGETS:%=distclean-tcg-tests-%): distclean-tcg-tests-%: build-tcg: $(BUILD_TCG_TARGET_RULES) .PHONY: check-tcg -.ninja-goals.check-tcg = all $(if $(CONFIG_PLUGIN),test-plugins) +.ninja-goals.check-tcg = all check-tcg: $(RUN_TCG_TARGET_RULES) .PHONY: clean-tcg diff --git a/tests/meson.build b/tests/meson.build index 083f2990bde..c2528a88f99 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -80,10 +80,8 @@ if 'CONFIG_TCG' in config_all subdir('fp') endif -if get_option('tcg').allowed() - if 'CONFIG_PLUGIN' in config_host - subdir('plugin') - endif +if get_option('plugins') + subdir('plugin') endif subdir('unit') From patchwork Thu Sep 7 12:59:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L93b491+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKPz5q19z1yh1 for ; Thu, 7 Sep 2023 23:11:35 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdk-0003vH-G2; Thu, 07 Sep 2023 09:01:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdT-0003Q5-06 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdP-0007PE-6W for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091682; 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=HIGgWzpKuQbbtZbqgfwIEtAoUiE/HvOom3y/uVV9Yyk=; b=L93b491+qypGWQ+wKlgZ7DeE4ZuhXGp+RpyNqVT3P8XOaqRWCLR1OwxDHg2msunsxqeXDH XvAGry7TkjZHzytjgjNOm5LulzTfh7/WLMksyK0Y/vdbKvQ8a2c+azB9rCS1o5RgbGNQ9N BvUSM9usyYb0h2XzS/ummnDqqhQPKQY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-Z0kOli0rMlqkRVqomD_7Lw-1; Thu, 07 Sep 2023 09:01:19 -0400 X-MC-Unique: Z0kOli0rMlqkRVqomD_7Lw-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-31f3cfe7269so569777f8f.2 for ; Thu, 07 Sep 2023 06:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091677; x=1694696477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HIGgWzpKuQbbtZbqgfwIEtAoUiE/HvOom3y/uVV9Yyk=; b=O8bErp7b7C3Zu7r6LNW/urAvNjsL7SuDZ0+stx9aFCxDZkPyJAftLz8LGHPzErm/0D GFcrQPBTslvEJtiOqAgL04sQyMSCSJrJAdcUtmCo9hKnBnFzr/XsSPPY2Q/7gQo64cZY D9MSVlHimFNdLTLgEQi9el0ULp+DyyRhSGOlGqzc+yA6PshNfx6Co5tRvyPUomkGktGZ tqw1rHtHzBIEPfLx2LQY5IhPBIi3TEj8QzOBDKh0uphxuayW2f28rx00W7pyYSSCyrvn Kix+947y3RqNrVafk3ibVSr6iBqKBmQQFleDgeNduysH/6Oy/CJTziHMkBjgUVeScLOC +wRw== X-Gm-Message-State: AOJu0YzI3+3psNEWIeycllw9aII7EjzrrkEX/Q6PYzNMZsp42bzciMWI khIiQxpdugZG42e3JmSem204C6Xj1pVsvmww9PjEzuNdj0wNbVFDAUmQU8imGU/2vTxmlQ7ECmu Z0qBfzckKdwN+azMVHXb7Vf6Z10JVdKwuKtwiNDc5T+NvOkuQ1VEjKGH87FzdpjuSq9tBNV2odo M= X-Received: by 2002:a05:6000:14c:b0:314:1ad7:2ea8 with SMTP id r12-20020a056000014c00b003141ad72ea8mr4386710wrx.54.1694091676958; Thu, 07 Sep 2023 06:01:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFf/JUadJbK9GICKLH9otYhJk2rtCrOO6GC5HB9RuhNl2I8hGNTjf3CqLi9OBAFaG4MFgilQA== X-Received: by 2002:a05:6000:14c:b0:314:1ad7:2ea8 with SMTP id r12-20020a056000014c00b003141ad72ea8mr4386695wrx.54.1694091676692; Thu, 07 Sep 2023 06:01:16 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l4-20020adffe84000000b003176eab8868sm23331851wrr.82.2023.09.07.06.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 30/51] configure, meson: remove CONFIG_SOLARIS from config-host.mak Date: Thu, 7 Sep 2023 14:59:39 +0200 Message-ID: <20230907130004.500601-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org CONFIG_SOLARIS is only used to pick tap implementations. But the target OS is invariant and does not depend on the configuration, so move away from config_host and just use unconditional rules in softmmu_ss. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 3 --- meson.build | 1 + net/meson.build | 18 ++++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 6b1019ba59c..a76bdd78623 100755 --- a/configure +++ b/configure @@ -1699,9 +1699,6 @@ if test "$targetos" = "darwin" ; then echo "CONFIG_DARWIN=y" >> $config_host_mak fi -if test "$targetos" = "sunos" ; then - echo "CONFIG_SOLARIS=y" >> $config_host_mak -fi echo "SRC_PATH=$source_path" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak diff --git a/meson.build b/meson.build index a1021fe2a78..a7470b57081 100644 --- a/meson.build +++ b/meson.build @@ -2126,6 +2126,7 @@ if seccomp.found() config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc) endif config_host_data.set('CONFIG_SNAPPY', snappy.found()) +config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos') config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_TSAN', get_option('tsan')) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) diff --git a/net/meson.build b/net/meson.build index bdf564a57b2..d2d70634e5e 100644 --- a/net/meson.build +++ b/net/meson.build @@ -41,15 +41,17 @@ if have_vhost_net_user system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) endif -system_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c')) -system_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c')) -system_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c')) -tap_posix = ['tap.c'] -if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS') - tap_posix += 'tap-stub.c' +if targetos == 'windows' + system_ss.add(files('tap-win32.c')) +elif targetos == 'linux' + system_ss.add(files('tap.c', 'tap-linux.c')) +elif targetos in bsd_oses + system_ss.add(files('tap.c', 'tap-bsd.c')) +elif targetos == 'solaris' + system_ss.add(files('tap.c', 'tap-solaris.c')) +else + system_ss.add(files('tap.c', 'tap-stub.c')) endif -system_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix)) -system_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c')) if have_vhost_net_vdpa system_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-vdpa.c'), if_false: files('vhost-vdpa-stub.c')) system_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-vdpa-stub.c')) From patchwork Thu Sep 7 12:59:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fmjgi136; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKC86rygz1ygc for ; Thu, 7 Sep 2023 23:02:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdl-00041s-Ii; Thu, 07 Sep 2023 09:01:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdV-0003VF-VK for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdS-0007Pu-4c for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091685; 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=HOpLJD4d/iFJqosaXJ0woijBr9D1R6HCS4xj7bDmWbc=; b=fmjgi136uXpyynnHobRuOM7DSk69V3qG+tDbEiqi6pdVvikB2dBCv9Xnl1mIEpcv8l6Tfv kqNL87doqwWXStcYNxyFC7x3HHiqDD4WZMi21Qqkbo1v/EKX3yfTpfJz/ceiwFgBAw5L8I vKsn+lEGoO6X6xThAkRnEvJcqs78JFQ= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-20-057s555rOkuN6RyPcnrBFw-1; Thu, 07 Sep 2023 09:01:23 -0400 X-MC-Unique: 057s555rOkuN6RyPcnrBFw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-401e1c55ddcso7099135e9.0 for ; Thu, 07 Sep 2023 06:01:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091680; x=1694696480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HOpLJD4d/iFJqosaXJ0woijBr9D1R6HCS4xj7bDmWbc=; b=lBazux7sFPZdqI/UnSfwzvoElGupSUkF0hzWBSCJyfZ5ApLoSO3CIrzPKVfsh6MyIR OZrcJ/NGXC4hbM5wQNvMckf0eYsCMLv+0onEbSnXh2mreRfI6axiLcA+3bj25sokasWM uhGMQChBaCVgxQFG2xUIbQUE/urUiMv9XrOwhwUXsYOf1rC4MnCekJJL6BLEH7D2BoB/ WMRzSppMazCS9Lii6apfisE3xzsTOWpYG+h/mScRbvw3ryeHgtFlXKnPUYIJza7/PpmL cUW04fQpj0OGedKewPvV16PeJM0nZPkS4eQoBcDLqH3wvdBhLzBWNMVHciXYDyM7aK1O ESIw== X-Gm-Message-State: AOJu0Yx0PAN0p+Hm3vLciMQy8JIBza2OCehDS9Jor8uTaaBaEx0M0OuQ AxlzpuUmVvAGdqgbSIYNZn9um0v1xn035/Xs7HTJeje3MMEWgJLaJbaZkrA3ilfhWKNX2/SFA0U OKmuu4mLVPY2qp12MEa+Tgm0/Jv9HTGLAH+xYJcoTZMTMrXDE1aLW26mH+DpTt3QKNA6+FKE0Z7 s= X-Received: by 2002:a7b:c7c7:0:b0:3fe:1db2:5179 with SMTP id z7-20020a7bc7c7000000b003fe1db25179mr4618110wmk.19.1694091679682; Thu, 07 Sep 2023 06:01:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbxN6fAxCVgunKwKYopNjGtqtppvzLJwway4V15hqIJe/EV9BxMXLgCRaawAtWZc21P6u1gw== X-Received: by 2002:a7b:c7c7:0:b0:3fe:1db2:5179 with SMTP id z7-20020a7bc7c7000000b003fe1db25179mr4618081wmk.19.1694091679063; Thu, 07 Sep 2023 06:01:19 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c294400b003fbdbd0a7desm2473968wmd.27.2023.09.07.06.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 31/51] configure, meson: remove target OS symbols from config-host.mak Date: Thu, 7 Sep 2023 14:59:40 +0200 Message-ID: <20230907130004.500601-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Stop applying config-host.mak to the sourcesets, since it does not have any more CONFIG_* symbols coming from the command line. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- chardev/meson.build | 2 +- configure | 18 ---------------- docs/devel/kconfig.rst | 2 +- gdbstub/meson.build | 4 ++-- meson.build | 43 ++++++++++++++++++++++++++------------ qga/meson.build | 4 ++-- storage-daemon/meson.build | 2 +- tcg/meson.build | 2 +- tests/meson.build | 2 +- tests/qtest/meson.build | 12 +++++------ tests/unit/meson.build | 6 +++--- 12 files changed, 49 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 118c28e80d9..bfc4b2c8e92 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ endif @echo 'Documentation targets:' $(call print-help,html man,Build documentation in specified format) @echo '' -ifdef CONFIG_WIN32 +ifneq ($(filter msi, $(ninja-targets)),) @echo 'Windows targets:' $(call print-help,installer,Build NSIS-based installer for QEMU) $(call print-help,msi,Build MSI-based installer for qemu-ga) diff --git a/chardev/meson.build b/chardev/meson.build index fb630b429eb..6d56ad32fdb 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -26,7 +26,7 @@ chardev_ss.add(when: 'CONFIG_WIN32', if_true: files( 'char-win.c', )) -chardev_ss = chardev_ss.apply(config_host, strict: false) +chardev_ss = chardev_ss.apply(config_targetos, strict: false) system_ss.add(files( 'char-hmp-cmds.c', diff --git a/configure b/configure index a76bdd78623..ef085376922 100755 --- a/configure +++ b/configure @@ -1683,32 +1683,14 @@ echo >> $config_host_mak echo all: >> $config_host_mak if test "$targetos" = "windows"; then - echo "CONFIG_WIN32=y" >> $config_host_mak echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO-Linux}" >> $config_host_mak echo "QEMU_GA_VERSION=${QEMU_GA_VERSION-$(cat "$source_path"/VERSION)}" >> $config_host_mak -else - echo "CONFIG_POSIX=y" >> $config_host_mak -fi - -if test "$targetos" = "linux" ; then - echo "CONFIG_LINUX=y" >> $config_host_mak -fi - -if test "$targetos" = "darwin" ; then - echo "CONFIG_DARWIN=y" >> $config_host_mak fi echo "SRC_PATH=$source_path" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak -# XXX: suppress that -case $targetos in - gnu/kfreebsd | freebsd | dragonfly | netbsd | openbsd | darwin) - echo "CONFIG_BSD=y" >> $config_host_mak - ;; -esac - if test -n "$gdb_bin"; then gdb_version=$($gdb_bin --version | head -n 1) if version_ge ${gdb_version##* } 9.1; then diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index e3a544e463f..73f52de1067 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -316,6 +316,6 @@ variable:: host_kconfig = \ (have_tpm ? ['CONFIG_TPM=y'] : []) + \ - ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \ + (targetos == 'linux' ? ['CONFIG_LINUX=y'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \ ... diff --git a/gdbstub/meson.build b/gdbstub/meson.build index 77762e0b3e1..9500b9dc4e6 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -14,8 +14,8 @@ gdb_system_ss = ss.source_set() gdb_user_ss.add(files('gdbstub.c', 'user.c')) gdb_system_ss.add(files('gdbstub.c', 'softmmu.c')) -gdb_user_ss = gdb_user_ss.apply(config_host, strict: false) -gdb_system_ss = gdb_system_ss.apply(config_host, strict: false) +gdb_user_ss = gdb_user_ss.apply(config_targetos, strict: false) +gdb_system_ss = gdb_system_ss.apply(config_targetos, strict: false) libgdb_user = static_library('gdb_user', gdb_user_ss.sources() + genh, diff --git a/meson.build b/meson.build index a7470b57081..16f0475955d 100644 --- a/meson.build +++ b/meson.build @@ -2069,10 +2069,15 @@ config_host_data.set('CONFIG_MODULE_UPGRADES', get_option('module_upgrades')) config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools')) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) +config_host_data.set('CONFIG_BSD', targetos in bsd_oses) config_host_data.set('CONFIG_COCOA', cocoa.found()) +config_host_data.set('CONFIG_DARWIN', targetos == 'darwin') config_host_data.set('CONFIG_FUZZ', get_option('fuzzing')) config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) +config_host_data.set('CONFIG_LINUX', targetos == 'linux') +config_host_data.set('CONFIG_POSIX', targetos != 'windows') +config_host_data.set('CONFIG_WIN32', targetos == 'windows') config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_BLKIO', blkio.found()) @@ -2799,6 +2804,18 @@ endif ######################## minikconf = find_program('scripts/minikconf.py') +config_targetos = { + (targetos == 'windows' ? 'CONFIG_WIN32' : 'CONFIG_POSIX'): 'y' +} +if targetos == 'darwin' + config_targetos += {'CONFIG_DARWIN': 'y'} +elif targetos == 'linux' + config_targetos += {'CONFIG_LINUX': 'y'} +endif +if targetos in bsd_oses + config_targetos += {'CONFIG_BSD': 'y'} +endif + config_all = {} config_all_devices = {} config_all_disas = {} @@ -2842,7 +2859,7 @@ host_kconfig = \ (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=y'] : []) + \ (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=y'] : []) + \ (have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \ - ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \ + (targetos == 'linux' ? ['CONFIG_LINUX=y'] : []) + \ (have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \ (multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \ (vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : []) @@ -2863,7 +2880,7 @@ foreach target : target_dirs endif config_target += { 'CONFIG_LINUX_USER': 'y' } elif target.endswith('bsd-user') - if 'CONFIG_BSD' not in config_host + if targetos not in bsd_oses if default_targets continue endif @@ -2994,7 +3011,7 @@ target_dirs = actual_target_dirs # pseudo symbol replaces it. config_all += config_all_devices -config_all += config_host +config_all += config_targetos config_all += config_all_disas config_all += { 'CONFIG_XEN': xen.found(), @@ -3341,7 +3358,7 @@ if enable_modules modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO') endif -qom_ss = qom_ss.apply(config_host, strict: false) +qom_ss = qom_ss.apply(config_targetos, strict: false) libqom = static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], name_suffix: 'fa') @@ -3515,7 +3532,7 @@ foreach d, list : target_modules foreach target : target_dirs if target.endswith('-softmmu') config_target = config_target_mak[target] - config_target += config_host + config_target += config_targetos target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] c_args = ['-DNEED_CPU_H', '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), @@ -3576,7 +3593,7 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', capture: true, command: [undefsym, nm, '@INPUT@']) -authz_ss = authz_ss.apply(config_host, strict: false) +authz_ss = authz_ss.apply(config_targetos, strict: false) libauthz = static_library('authz', authz_ss.sources() + genh, dependencies: [authz_ss.dependencies()], name_suffix: 'fa', @@ -3585,7 +3602,7 @@ libauthz = static_library('authz', authz_ss.sources() + genh, authz = declare_dependency(link_whole: libauthz, dependencies: qom) -crypto_ss = crypto_ss.apply(config_host, strict: false) +crypto_ss = crypto_ss.apply(config_targetos, strict: false) libcrypto = static_library('crypto', crypto_ss.sources() + genh, dependencies: [crypto_ss.dependencies()], name_suffix: 'fa', @@ -3594,7 +3611,7 @@ libcrypto = static_library('crypto', crypto_ss.sources() + genh, crypto = declare_dependency(link_whole: libcrypto, dependencies: [authz, qom]) -io_ss = io_ss.apply(config_host, strict: false) +io_ss = io_ss.apply(config_targetos, strict: false) libio = static_library('io', io_ss.sources() + genh, dependencies: [io_ss.dependencies()], link_with: libqemuutil, @@ -3610,7 +3627,7 @@ migration = declare_dependency(link_with: libmigration, dependencies: [zlib, qom, io]) system_ss.add(migration) -block_ss = block_ss.apply(config_host, strict: false) +block_ss = block_ss.apply(config_targetos, strict: false) libblock = static_library('block', block_ss.sources() + genh, dependencies: block_ss.dependencies(), link_depends: block_syms, @@ -3621,7 +3638,7 @@ block = declare_dependency(link_whole: [libblock], link_args: '@block.syms', dependencies: [crypto, io]) -blockdev_ss = blockdev_ss.apply(config_host, strict: false) +blockdev_ss = blockdev_ss.apply(config_targetos, strict: false) libblockdev = static_library('blockdev', blockdev_ss.sources() + genh, dependencies: blockdev_ss.dependencies(), name_suffix: 'fa', @@ -3630,7 +3647,7 @@ libblockdev = static_library('blockdev', blockdev_ss.sources() + genh, blockdev = declare_dependency(link_whole: [libblockdev], dependencies: [block, event_loop_base]) -qmp_ss = qmp_ss.apply(config_host, strict: false) +qmp_ss = qmp_ss.apply(config_targetos, strict: false) libqmp = static_library('qmp', qmp_ss.sources() + genh, dependencies: qmp_ss.dependencies(), name_suffix: 'fa', @@ -3645,7 +3662,7 @@ libchardev = static_library('chardev', chardev_ss.sources() + genh, chardev = declare_dependency(link_whole: libchardev) -hwcore_ss = hwcore_ss.apply(config_host, strict: false) +hwcore_ss = hwcore_ss.apply(config_targetos, strict: false) libhwcore = static_library('hwcore', sources: hwcore_ss.sources() + genh, name_suffix: 'fa', build_by_default: false) @@ -3702,7 +3719,7 @@ foreach target : target_dirs '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)] link_args = emulator_link_args - config_target += config_host + config_target += config_targetos target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] if targetos == 'linux' target_inc += include_directories('linux-headers', is_system: true) diff --git a/qga/meson.build b/qga/meson.build index dd18092f561..59cae0cc6ee 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -85,7 +85,7 @@ qga_ss.add(when: 'CONFIG_WIN32', if_true: files( 'vss-win32.c' )) -qga_ss = qga_ss.apply(config_host, strict: false) +qga_ss = qga_ss.apply(config_targetos, strict: false) gen_tlb = [] qga_libs = [] @@ -180,7 +180,7 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) # the leak detector in build-oss-fuzz Gitlab CI test. we should re-enable # this when an alternative is implemented or when the underlying glib # issue is identified/fix -#if 'CONFIG_POSIX' in config_host +#if targetos != 'windows' if false srcs = [files('commands-posix-ssh.c')] i = 0 diff --git a/storage-daemon/meson.build b/storage-daemon/meson.build index 49c9d2eac91..5e90cd32b40 100644 --- a/storage-daemon/meson.build +++ b/storage-daemon/meson.build @@ -5,7 +5,7 @@ qsd_ss.add(blockdev, chardev, qmp, qom, qemuutil, gnutls) subdir('qapi') if have_tools - qsd_ss = qsd_ss.apply(config_host, strict: false) + qsd_ss = qsd_ss.apply(config_targetos, strict: false) qsd = executable('qemu-storage-daemon', qsd_ss.sources(), dependencies: qsd_ss.dependencies(), diff --git a/tcg/meson.build b/tcg/meson.build index c0252c41988..0014dca7d4f 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -22,7 +22,7 @@ if get_option('tcg_interpreter') tcg_ss.add(files('tci.c')) endif -tcg_ss = tcg_ss.apply(config_host, strict: false) +tcg_ss = tcg_ss.apply(config_targetos, strict: false) libtcg_user = static_library('tcg_user', tcg_ss.sources() + genh, diff --git a/tests/meson.build b/tests/meson.build index c2528a88f99..debaa4505eb 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -68,7 +68,7 @@ test_deps = { 'test-qht-par': qht_bench, } -if have_tools and have_vhost_user and 'CONFIG_LINUX' in config_host +if have_tools and have_vhost_user and targetos == 'linux' executable('vhost-user-bridge', sources: files('vhost-user-bridge.c'), dependencies: [qemuutil, vhost_user]) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index df63909ee51..383bdfeda96 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -38,8 +38,8 @@ qtests_cxl = \ # for the availability of the default NICs in the tests qtests_filter = \ (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : []) + \ - (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ - (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) + (get_option('default_devices') and targetos != 'windows' ? ['test-filter-mirror'] : []) + \ + (get_option('default_devices') and targetos != 'windows' ? ['test-filter-redirector'] : []) qtests_i386 = \ (slirp.found() ? ['pxe-test'] : []) + \ @@ -48,7 +48,7 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) + \ (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) + \ - (config_host.has_key('CONFIG_LINUX') and \ + (targetos == 'linux' and \ config_all_devices.has_key('CONFIG_ISA_IPMI_BT') and config_all_devices.has_key('CONFIG_IPMI_EXTERN') ? ['ipmi-bt-test'] : []) + \ (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) + \ @@ -74,7 +74,7 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ - (config_host.has_key('CONFIG_POSIX') and \ + (targetos != 'windows' and \ config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \ (config_all_devices.has_key('CONFIG_PCIE_PORT') and \ config_all_devices.has_key('CONFIG_VIRTIO_NET') and \ @@ -275,7 +275,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_SERIAL') qos_test_ss.add(files('virtio-serial-test.c')) endif -if config_host.has_key('CONFIG_POSIX') +if targetos != 'windows' qos_test_ss.add(files('e1000e-test.c')) endif if have_virtfs @@ -308,7 +308,7 @@ qtests = { 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], 'migration-test': migration_files, 'pxe-test': files('boot-sector.c'), - 'qos-test': [chardev, io, qos_test_ss.apply(config_host, strict: false).sources()], + 'qos-test': [chardev, io, qos_test_ss.apply(config_targetos, strict: false).sources()], 'tpm-crb-swtpm-test': [io, tpmemu_files], 'tpm-crb-test': [io, tpmemu_files], 'tpm-tis-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], diff --git a/tests/unit/meson.build b/tests/unit/meson.build index 93977cc32d2..0299ef6906c 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -98,7 +98,7 @@ if have_block } if gnutls.found() and \ tasn1.found() and \ - 'CONFIG_POSIX' in config_host + targetos != 'windows' tests += { 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, crypto, gnutls], @@ -113,7 +113,7 @@ if have_block if xts == 'private' tests += {'test-crypto-xts': [crypto, io]} endif - if 'CONFIG_POSIX' in config_host + if targetos != 'windows' tests += { 'test-image-locking': [testblock], 'test-nested-aio-poll': [testblock], @@ -148,7 +148,7 @@ if have_system # are not runnable under TSan due to a known issue. # https://github.com/google/sanitizers/issues/1116 if not get_option('tsan') - if 'CONFIG_POSIX' in config_host + if targetos != 'windows' tests += { 'test-char': ['socket-helpers.c', qom, io, chardev] } From patchwork Thu Sep 7 12:59:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VM5fZRh2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ20r0tz1yh1 for ; Thu, 7 Sep 2023 23:11:37 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdk-0003tK-2e; Thu, 07 Sep 2023 09:01:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdW-0003VM-Qr for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdU-0007QY-Ha for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091687; 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=qAYgh80D2/9tY4w2B9vStIRJ3whg/M/jMo9CcVK8jZk=; b=VM5fZRh2JqyEtwKunmslNR26hrmptS1YbzDHQ+cA7HhrQgH4aIIiIIVkXF8h0FKVIbKtVz QN81E+7QjwIiMCUPHSGkyoy5yjUHUAKb2btClo09AkYzjFb6sxgeAcyqfM9NYtonUQrHmK OfMWhVcWzaoB5eQphQA9NRChD5cGWjs= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-VfxP4UDaMJ6zinttu3snNw-1; Thu, 07 Sep 2023 09:01:25 -0400 X-MC-Unique: VfxP4UDaMJ6zinttu3snNw-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2b8405aace3so10659941fa.3 for ; Thu, 07 Sep 2023 06:01:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091682; x=1694696482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qAYgh80D2/9tY4w2B9vStIRJ3whg/M/jMo9CcVK8jZk=; b=Bj0Wv30dgMgpsw1E9kT9k6Lh/EkPn01cjB/8quXQk/6mJs1/JU5vRidOUqC3JCxopr rVGVJpZSKovgCM8xcjtaEtU5v4i30UD+8Yse4/mi6iuL6Uamabg5LVa8AC/dWy3Zw8wY AVeLM1LxUpQBVYW7nclZFMz0gKHlVhvT4NdOA0aU+E5+lPKdcdHs3HWj4gQEM+Wm/acp 8xm1t/h04PNQ25BE8CfqALUiG1K3Eb9GkIQchlnXeoUCGbBKIWfdibRwpQ2wO1CSXtOh fXv4B9I+rGjWhSuavcRwssGsmSQ8SR8dSraJB2v7FLuAylWkJTWXquZVHNb2ZNBM0JLo H+Fw== X-Gm-Message-State: AOJu0YwSxwnOpTYz7q+3I3QN9u7kM5V4xhU7QJdYWsmXJoVa7cEMxZK2 4i/g7suXze+iz+rhat2Di+8f3B802zOaAPim6R7MZOeg0Z8f+E542OAmLDoTuL/gyZgHm/Qakth TMLoUtrCwhl8tmcw/CI0ifvrt6lArZGxMQBGHlzw78LNP3+CGw+V3OrEWLEWOSeVRdrZ9Szv4cm g= X-Received: by 2002:a2e:b013:0:b0:2bd:d31:cf32 with SMTP id y19-20020a2eb013000000b002bd0d31cf32mr4313360ljk.15.1694091682233; Thu, 07 Sep 2023 06:01:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfqrbHuS8J2QDHfhaVbAadoYw1EYTetXAHinSk7pKqXNGfm78PHCY7hiHjeKdKawid/wkVVg== X-Received: by 2002:a2e:b013:0:b0:2bd:d31:cf32 with SMTP id y19-20020a2eb013000000b002bd0d31cf32mr4313337ljk.15.1694091681713; Thu, 07 Sep 2023 06:01:21 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l16-20020adfe9d0000000b00317e77106dbsm23221588wrn.48.2023.09.07.06.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 32/51] meson: list leftover CONFIG_* symbols Date: Thu, 7 Sep 2023 14:59:41 +0200 Message-ID: <20230907130004.500601-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org There are no config-host.mak symbols anymore that are needed in config-host.h; the only symbols that are included in config_host_data via the foreach loop are: - CONFIG_DEFAULT_TARGETS, which is not used by C code. - CONFIG_TCG and CONFIG_TCG_INTERPRETER, which are not part of config-host.mak So, list these two symbols explicitly. Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst | 8 ++------ meson.build | 12 ++++-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 64efa26b905..0f990bb3e90 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -460,17 +460,13 @@ Built by configure: ``config-host.mak`` When configure has determined the characteristics of the build host it - will write them to this file for use in ``Makefile`` and to a smaller - extent ``meson.build``. These include the paths to various tools and a - variety of ``CONFIG_*`` variables related to optionally enabled features. + will write the paths to various tools to this file, for use in ``Makefile`` + and to a smaller extent ``meson.build``. ``config-host.mak`` is also used as a dependency checking mechanism. If make sees that the modification timestamp on configure is newer than that on ``config-host.mak``, then configure will be re-run. - The variables defined here apply to all QEMU - build outputs. - ``config-meson.cross`` A Meson "cross file" (or native file) used to communicate the paths to diff --git a/meson.build b/meson.build index 16f0475955d..c24ea69f774 100644 --- a/meson.build +++ b/meson.build @@ -691,7 +691,6 @@ if get_option('tcg').allowed() endif if get_option('tcg_interpreter') tcg_arch = 'tci' - config_host += { 'CONFIG_TCG_INTERPRETER': 'y' } elif host_arch == 'x86_64' tcg_arch = 'i386' elif host_arch == 'ppc64' @@ -701,7 +700,6 @@ if get_option('tcg').allowed() language: all_languages) accelerators += 'CONFIG_TCG' - config_host += { 'CONFIG_TCG': 'y' } endif if 'CONFIG_KVM' not in accelerators and get_option('kvm').enabled() @@ -2132,6 +2130,10 @@ if seccomp.found() endif config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos') +if get_option('tcg').allowed() + config_host_data.set('CONFIG_TCG', 1) + config_host_data.set('CONFIG_TCG_INTERPRETER', tcg_arch == 'tci') +endif config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_TSAN', get_option('tsan')) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) @@ -2760,12 +2762,6 @@ if targetos == 'windows' and 'cpp' in all_languages endif config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) -foreach k, v: config_host - if k.startswith('CONFIG_') - config_host_data.set(k, v == 'y' ? 1 : v) - endif -endforeach - # Older versions of MinGW do not import _lock_file and _unlock_file properly. # This was fixed for v6.0.0 with commit b48e3ac8969d. if targetos == 'windows' From patchwork Thu Sep 7 12:59:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NuTw4tM0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKFf1874z1ygc for ; Thu, 7 Sep 2023 23:04:22 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdo-0004En-UQ; Thu, 07 Sep 2023 09:01:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdi-0003h8-6I for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEde-0007Re-Hg for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091697; 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=WgNpBuRZhKdrrSPMd3wYRYwFLY/kG5N6eWJAhKeC32o=; b=NuTw4tM0omTMz9PUBqZhfSTI5bI6tTkREnC1gzZvf3lrplpZruE7eQpuZdXUmnovX6OUrK KlLZxGUQOzie7JnoFjtINlMkkxrPrFm/6b1ZkAIEK3II/ACtpZusHKohJSOi5/AuqpqYHP cTtmXB2VOeXH18SALSrxIz7X5oKonQ0= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-JoJxpVuFN66OMTp06xAg_w-1; Thu, 07 Sep 2023 09:01:32 -0400 X-MC-Unique: JoJxpVuFN66OMTp06xAg_w-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-401db0c9d3eso6895685e9.3 for ; Thu, 07 Sep 2023 06:01:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091684; x=1694696484; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WgNpBuRZhKdrrSPMd3wYRYwFLY/kG5N6eWJAhKeC32o=; b=iHqOuq819unGxFH6tuxziFJ/mF6HFqdfzr53UAkfvAZCXBkpaO9rPTiR0M6QMwQRzT 9iGK3BvuginFXr8Lg+x7LdnCVx/2ODQ6k1kHe9jA3ZPdd1YpKWEmCOVd/ap5Hqd+Iexi HhJRvFXXtghnSWMFQnD3FqXrtPc3yr5WxutzGw7hqm/t/stXJzaKCYeHfyD2CE95wPqP fRAv8Vd+Wo4U74wQi5tcDm1tOCB6B8BvRzarZ3IIwv3n9zBqeCmmUYx0t0LtdNWClPzb 5K11HYFbWjTOUuW+5z/AJddAEUzvwJNKqC0Q5900Hw4Wz2KNHDhGb8Xd2nnaX/XOjeYD hOSA== X-Gm-Message-State: AOJu0YxCa8J8cP0DYn509iOtp7CecLd2LglbW952lten60wqpk766QR6 wwT6cULsEBZdvXZA+fc0SAU0N9orE1l/cT/SG6vMYArZ0Pm9N6KMcaX+SveXVOJe1rvv3gNvKlZ Zh7YoHKssl7ln5ia5LOQzjwPhPwulQbVupyejWO8bTAR2R7YUwdteAfpTe9ZIJV/5cpUv2iM8aC I= X-Received: by 2002:a05:600c:3641:b0:401:bf87:9898 with SMTP id y1-20020a05600c364100b00401bf879898mr5167750wmq.25.1694091684504; Thu, 07 Sep 2023 06:01:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrlKY2TvzHPkpNdgmVDoIdakdgiUpS8jDigqGvgN+3iRLvRtGAYkwly6XG33acEs3M/Xj/BA== X-Received: by 2002:a05:600c:3641:b0:401:bf87:9898 with SMTP id y1-20020a05600c364100b00401bf879898mr5167717wmq.25.1694091683907; Thu, 07 Sep 2023 06:01:23 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id n10-20020adffe0a000000b003140f47224csm23191913wrr.15.2023.09.07.06.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 33/51] configure: remove dead code Date: Thu, 7 Sep 2023 14:59:42 +0200 Message-ID: <20230907130004.500601-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- configure | 8 -------- 1 file changed, 8 deletions(-) diff --git a/configure b/configure index ef085376922..48ae0fc05ab 100755 --- a/configure +++ b/configure @@ -1126,14 +1126,6 @@ else done fi -# see if system emulation was really requested -case " $target_list " in - *"-softmmu "*) softmmu=yes - ;; - *) softmmu=no - ;; -esac - if test "$tcg" = "auto"; then if test -z "$target_list"; then tcg="disabled" From patchwork Thu Sep 7 12:59:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gJAwFWxn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQF0G9Hz1yh1 for ; Thu, 7 Sep 2023 23:11:49 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdl-0003yg-2v; Thu, 07 Sep 2023 09:01:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdg-0003cC-Jd for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdb-0007RA-Bx for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091694; 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=JObfOMUfiKmSxE4EE7U/B9LeLOcbPewGoVRQKbqkoB8=; b=gJAwFWxn9vxRmPWp5duo5wAI/ESTI2ExsxeOizjToH6KlgdZTVR8a60TZK9jFjhCmhl1pH akdWb5Gk9l2PifS1rJFk575gsNWgV2t0iPjvjj0uUS8YiZW9NmzMx79hajtk3sdlytrvh/ rny5gO/QE1xEY2cMRzFnhJIfCuQYgXU= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-4y0lFzuzMPCAy3tBxfH5Hg-1; Thu, 07 Sep 2023 09:01:31 -0400 X-MC-Unique: 4y0lFzuzMPCAy3tBxfH5Hg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4011f56165eso8833915e9.0 for ; Thu, 07 Sep 2023 06:01:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091686; x=1694696486; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JObfOMUfiKmSxE4EE7U/B9LeLOcbPewGoVRQKbqkoB8=; b=RatG+j2wG2+KGFV1Sf0JwEYmwhFKfWqtNa1VciV1oAviPNu5xIfbpundQGLHBYGHZg Bp1hXamW8gpA8gf4JtOgbeR6rHINhinaCuGgFFV7e+Di06oH08IJnoRSG0kBZhnSZzQk Ki9HHGP7PBkuXRU2uHlQq7pq3by5EBq3MQgXu2bNA6UlA4Vgk90opC93eq76Sxp5Q+RW ECcK+Xuvj/f+S2e+Wgpc6J7ercytRQKIyWr4oyVpYT7ga0s9E3MtnmXXB56MTHdflDKj ZM1yDd/oaePX3twnt9eShLiTqKL088E/KXK9Aday8CpaAA9Nn0FSUPG/XVOSYYNCHpuS 63Kw== X-Gm-Message-State: AOJu0YwTdDHU13IpIzayliAxbjwWLCoaIXLKXVXCuUtdYjMrCUUdPzsn Hnkhtu9n7rlglRsek5DyQHDReAfk2m8RraiplznjOCDKowFOTYHpMwPoaMZmNVKkXh3su7R8a3E 93+gT0qE8bRPNkOKeFBte4Iw/lWedMi+egoiYQqL/u8VB4/H5xC8ycPT+NoYbkAjJIIgrcloObF Q= X-Received: by 2002:a7b:cd8c:0:b0:401:b24b:8279 with SMTP id y12-20020a7bcd8c000000b00401b24b8279mr2062093wmj.1.1694091686539; Thu, 07 Sep 2023 06:01:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSI6HVP33PxzZTFqn42jBS3oOdsVO6AzcJA/lte9Z90ohHIglV4jiRyZL/Lgv7PUfiEDVx9Q== X-Received: by 2002:a7b:cd8c:0:b0:401:b24b:8279 with SMTP id y12-20020a7bcd8c000000b00401b24b8279mr2062066wmj.1.1694091686010; Thu, 07 Sep 2023 06:01:26 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id v15-20020a1cf70f000000b003fee849df23sm2480857wmh.22.2023.09.07.06.01.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 34/51] Python: Drop support for Python 3.7 Date: Thu, 7 Sep 2023 14:59:43 +0200 Message-ID: <20230907130004.500601-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Debian 10 is not anymore a supported distro, since Debian 12 was released on June 10, 2023. Our supported build platforms as of today all support at least 3.8 (and all of them except for Ubuntu 20.04 support 3.9): openSUSE Leap 15.5: 3.6.15 (3.11.2) CentOS Stream 8: 3.6.8 (3.8.13, 3.9.16, 3.11.4) CentOS Stream 9: 3.9.17 (3.11.4) Fedora 37: 3.11.4 Fedora 38: 3.11.4 Debian 11: 3.9.2 Debian 12: 3.11.2 Alpine 3.14, 3.15: 3.9.16 Alpine 3.16, 3.17: 3.10.10 Ubuntu 20.04 LTS: 3.8.10 Ubuntu 22.04 LTS: 3.10.12 NetBSD 9.3: 3.9.13* FreeBSD 12.4: 3.9.16 FreeBSD 13.1: 3.9.18 OpenBSD 7.2: 3.9.17 Note: NetBSD does not appear to have a default meta-package, but offers several options, the lowest of which is 3.7.15. However, "python39" appears to be a pre-requisite to one of the other packages we request in tests/vm/netbsd. Since it is safe under our supported platform policy, bump our minimum supported version of Python to 3.8. The two most interesting features to have by default include: - the importlib.metadata module, whose lack is responsible for over 100 lines of code in mkvenv.py - improvements to asyncio, for example asyncio.CancelledError inherits from BaseException rather than Exception In addition, code can now use the assignment operator ':=' Because mypy now learns about importlib.metadata, a small change to mkvenv.py is needed to pass type checking. Signed-off-by: Paolo Bonzini --- configure | 8 ++++---- python/Makefile | 8 ++++---- python/scripts/mkvenv.py | 5 ++++- python/setup.cfg | 7 +++---- python/tests/minreqs.txt | 2 +- scripts/qapi/mypy.ini | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 48ae0fc05ab..e08127045d0 100755 --- a/configure +++ b/configure @@ -552,16 +552,16 @@ if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arc fi check_py_version() { - # We require python >= 3.7. + # We require python >= 3.8. # NB: a True python conditional creates a non-zero return code (Failure) - "$1" -c 'import sys; sys.exit(sys.version_info < (3,7))' + "$1" -c 'import sys; sys.exit(sys.version_info < (3,8))' } first_python= if test -z "${PYTHON}"; then # A bare 'python' is traditionally python 2.x, but some distros # have it as python 3.x, so check in both places. - for binary in python3 python python3.11 python3.10 python3.9 python3.8 python3.7; do + for binary in python3 python python3.11 python3.10 python3.9 python3.8; do if has "$binary"; then python=$(command -v "$binary") if check_py_version "$python"; then @@ -952,7 +952,7 @@ then fi if ! check_py_version "$python"; then - error_exit "Cannot use '$python', Python >= 3.7 is required." \ + error_exit "Cannot use '$python', Python >= 3.8 is required." \ "Use --python=/path/to/python to specify a supported Python." \ "Maybe try:" \ " openSUSE Leap 15.3+: zypper install python39" \ diff --git a/python/Makefile b/python/Makefile index 7c70dcc8d14..1fa4ba2498e 100644 --- a/python/Makefile +++ b/python/Makefile @@ -9,13 +9,13 @@ help: @echo "make check-minreqs:" @echo " Run tests in the minreqs virtual environment." @echo " These tests use the oldest dependencies." - @echo " Requires: Python 3.7" - @echo " Hint (Fedora): 'sudo dnf install python3.7'" + @echo " Requires: Python 3.8" + @echo " Hint (Fedora): 'sudo dnf install python3.8'" @echo "" @echo "make check-tox:" @echo " Run tests against multiple python versions." @echo " These tests use the newest dependencies." - @echo " Requires: Python 3.7 - 3.11, and tox." + @echo " Requires: Python 3.8 - 3.11, and tox." @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.11'" @echo " The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra" @echo " arguments to tox". @@ -59,7 +59,7 @@ PIP_INSTALL = pip install --disable-pip-version-check min-venv: $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate: setup.cfg tests/minreqs.txt @echo "VENV $(QEMU_MINVENV_DIR)" - @python3.7 -m venv $(QEMU_MINVENV_DIR) + @python3.8 -m venv $(QEMU_MINVENV_DIR) @( \ echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \ . $(QEMU_MINVENV_DIR)/bin/activate; \ diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index 4f2349fbb65..57a24948031 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -435,6 +435,7 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]: try: # First preference: Python 3.8+ stdlib from importlib.metadata import ( # type: ignore + EntryPoint, PackageNotFoundError, distribution, ) @@ -442,6 +443,7 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]: logger.debug("%s", str(exc)) # Second preference: Commonly available PyPI backport from importlib_metadata import ( # type: ignore + EntryPoint, PackageNotFoundError, distribution, ) @@ -449,7 +451,8 @@ def _gen_importlib(packages: Sequence[str]) -> Iterator[str]: def _generator() -> Iterator[str]: for package in packages: try: - entry_points = distribution(package).entry_points + entry_points: Iterator[EntryPoint] = \ + iter(distribution(package).entry_points) except PackageNotFoundError: continue diff --git a/python/setup.cfg b/python/setup.cfg index e74b58a8c24..f6d2d8a1362 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -14,7 +14,6 @@ classifiers = Natural Language :: English Operating System :: OS Independent Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -22,7 +21,7 @@ classifiers = Typing :: Typed [options] -python_requires = >= 3.7 +python_requires = >= 3.8 packages = qemu.qmp qemu.machine @@ -76,7 +75,7 @@ exclude = __pycache__, [mypy] strict = True -python_version = 3.7 +python_version = 3.8 warn_unused_configs = True namespace_packages = True warn_unused_ignores = False @@ -192,7 +191,7 @@ multi_line_output=3 # of python available on your system to run this test. [tox:tox] -envlist = py37, py38, py39, py310, py311 +envlist = py38, py39, py310, py311 skip_missing_interpreters = true [testenv] diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt index 979461be6bb..a3f423efd84 100644 --- a/python/tests/minreqs.txt +++ b/python/tests/minreqs.txt @@ -1,5 +1,5 @@ # This file lists the ***oldest possible dependencies*** needed to run -# "make check" successfully under ***Python 3.7***. It is used primarily +# "make check" successfully under ***Python 3.8***. It is used primarily # by GitLab CI to ensure that our stated minimum versions in setup.cfg # are truthful and regularly validated. # diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 3463307ddc7..56e0dfb1327 100644 --- a/scripts/qapi/mypy.ini +++ b/scripts/qapi/mypy.ini @@ -1,7 +1,7 @@ [mypy] strict = True disallow_untyped_calls = False -python_version = 3.7 +python_version = 3.8 [mypy-qapi.schema] disallow_untyped_defs = False From patchwork Thu Sep 7 12:59:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GIogjwsu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKKg0mfVz1ygR for ; Thu, 7 Sep 2023 23:07:51 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdm-00049I-S0; Thu, 07 Sep 2023 09:01:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdg-0003cB-JP for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdc-0007RK-Io for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091695; 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=tF/gOVBt9Bwzbb1VjYdSOIoeRtnKVGuWbCyNBO/28Qg=; b=GIogjwsu03p3Crp6sbP8Oz8npp7t0y1AUt7ahDD7K5IhaXdLPbRe2w25yUYulNV0GXkOyV 9PavX21v3D+StiJaVEWbRe/WqLtQK24AWoNfjgNG446BRv3/MLgeNwv6bt/YLXJqanETdF v/IPHuhTcc+G3r13qJpLsv8MJ6+H33M= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-142-CjjcaP9ZO8ugQEAYEzylxg-1; Thu, 07 Sep 2023 09:01:34 -0400 X-MC-Unique: CjjcaP9ZO8ugQEAYEzylxg-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-401b8089339so6418315e9.3 for ; Thu, 07 Sep 2023 06:01:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091689; x=1694696489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tF/gOVBt9Bwzbb1VjYdSOIoeRtnKVGuWbCyNBO/28Qg=; b=BQTUo5zFkUqbGwR0EFYRfxCE/9Eo+j3qqlWQvXdiv/bifdONAHwk59W8ROm65W8dTk jXvwpWJEMdPu8dXjCV0Em6+tlMYSKVC/aGYYpQcR5Ef8ihSXXVWNNTNcjVNZKIQ90iM3 Swi/w033IK93aLumLhe2PNYbgsJSvNMV7YyB0gX0xxb3MCzIh5mgc4r/lznqp8mOurD3 9Ee0nnb5I7bDrqvcWlM6fqoR4qTWaoS4GheILzUdCdBkRWTIgbFMz+8h8EgdY1zFih63 Om0jQ/48tZarXC8UtE5e71jfZQTF9tA8etJYPJWhSU80DzM1lLJeZre2bTdG/0B0C2iJ Rb1A== X-Gm-Message-State: AOJu0YzCIklMgS6T6baLjyqL8A71TlJpK2ZdQryKol/iMKpkS3tz4AHk 8suGc0wLns53Reo9XfwkviRDBtZqV0TZ1vrFuGN6OVbBlciy3B+pF6kVMLJ8cRpWHa5s9HTwHK3 YdINF97B6zUSijiCpVAEVxnPnbsxDWuY34KOUUeAsACBbDSykpKp4ohyY4E0KUJSfb5pWrDuO32 c= X-Received: by 2002:a1c:4c0f:0:b0:401:b705:ebe6 with SMTP id z15-20020a1c4c0f000000b00401b705ebe6mr4611869wmf.32.1694091688944; Thu, 07 Sep 2023 06:01:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/+DB+4d6ruqdHo7tq/RGWWhegJuvqa7JHa2bVgQyXwnMTGEyIfYxbkpr1BEaXyp12DYrkeg== X-Received: by 2002:a1c:4c0f:0:b0:401:b705:ebe6 with SMTP id z15-20020a1c4c0f000000b00401b705ebe6mr4611841wmf.32.1694091688397; Thu, 07 Sep 2023 06:01:28 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c198e00b003fefcbe7fa8sm2488653wmq.28.2023.09.07.06.01.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 35/51] mkvenv: assume presence of importlib.metadata Date: Thu, 7 Sep 2023 14:59:44 +0200 Message-ID: <20230907130004.500601-36-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org importlib.metadata is included in Python 3.8, so there is no need to fallback to either importlib-metadata or pkgresources when generating console script shims. Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 197 ++++++--------------------------------- python/setup.cfg | 9 -- 2 files changed, 28 insertions(+), 178 deletions(-) diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index 57a24948031..6797e12e349 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -61,7 +61,6 @@ """ -# The duplication between importlib and pkg_resources does not help # pylint: disable=too-many-lines # Copyright (C) 2022-2023 Red Hat, Inc. @@ -74,6 +73,13 @@ # later. See the COPYING file in the top-level directory. import argparse +from importlib.metadata import ( + Distribution, + EntryPoint, + PackageNotFoundError, + distribution, + version, +) from importlib.util import find_spec import logging import os @@ -428,25 +434,7 @@ def _stringify(data: Union[str, bytes]) -> str: print(builder.get_value("env_exe")) -def _gen_importlib(packages: Sequence[str]) -> Iterator[str]: - # pylint: disable=import-outside-toplevel - # pylint: disable=no-name-in-module - # pylint: disable=import-error - try: - # First preference: Python 3.8+ stdlib - from importlib.metadata import ( # type: ignore - EntryPoint, - PackageNotFoundError, - distribution, - ) - except ImportError as exc: - logger.debug("%s", str(exc)) - # Second preference: Commonly available PyPI backport - from importlib_metadata import ( # type: ignore - EntryPoint, - PackageNotFoundError, - distribution, - ) +def _get_entry_points(packages: Sequence[str]) -> Iterator[str]: def _generator() -> Iterator[str]: for package in packages: @@ -468,24 +456,6 @@ def _generator() -> Iterator[str]: return _generator() -def _gen_pkg_resources(packages: Sequence[str]) -> Iterator[str]: - # pylint: disable=import-outside-toplevel - # Bundled with setuptools; has a good chance of being available. - import pkg_resources - - def _generator() -> Iterator[str]: - for package in packages: - try: - eps = pkg_resources.get_entry_map(package, "console_scripts") - except pkg_resources.DistributionNotFound: - continue - - for entry_point in eps.values(): - yield str(entry_point) - - return _generator() - - def generate_console_scripts( packages: Sequence[str], python_path: Optional[str] = None, @@ -510,30 +480,11 @@ def generate_console_scripts( if not packages: return - def _get_entry_points() -> Iterator[str]: - """Python 3.7 compatibility shim for iterating entry points.""" - # Python 3.8+, or Python 3.7 with importlib_metadata installed. - try: - return _gen_importlib(packages) - except ImportError as exc: - logger.debug("%s", str(exc)) - - # Python 3.7 with setuptools installed. - try: - return _gen_pkg_resources(packages) - except ImportError as exc: - logger.debug("%s", str(exc)) - raise Ouch( - "Neither importlib.metadata nor pkg_resources found, " - "can't generate console script shims.\n" - "Use Python 3.8+, or install importlib-metadata or setuptools." - ) from exc - maker = distlib.scripts.ScriptMaker(None, bin_path) maker.variants = {""} maker.clobber = False - for entry_point in _get_entry_points(): + for entry_point in _get_entry_points(packages): for filename in maker.make(entry_point): logger.debug("wrote console_script '%s'", filename) @@ -587,57 +538,6 @@ def pkgname_from_depspec(dep_spec: str) -> str: return match.group(0) -def _get_path_importlib(package: str) -> Optional[str]: - # pylint: disable=import-outside-toplevel - # pylint: disable=no-name-in-module - # pylint: disable=import-error - try: - # First preference: Python 3.8+ stdlib - from importlib.metadata import ( # type: ignore - PackageNotFoundError, - distribution, - ) - except ImportError as exc: - logger.debug("%s", str(exc)) - # Second preference: Commonly available PyPI backport - from importlib_metadata import ( # type: ignore - PackageNotFoundError, - distribution, - ) - - try: - return str(distribution(package).locate_file(".")) - except PackageNotFoundError: - return None - - -def _get_path_pkg_resources(package: str) -> Optional[str]: - # pylint: disable=import-outside-toplevel - # Bundled with setuptools; has a good chance of being available. - import pkg_resources - - try: - return str(pkg_resources.get_distribution(package).location) - except pkg_resources.DistributionNotFound: - return None - - -def _get_path(package: str) -> Optional[str]: - try: - return _get_path_importlib(package) - except ImportError as exc: - logger.debug("%s", str(exc)) - - try: - return _get_path_pkg_resources(package) - except ImportError as exc: - logger.debug("%s", str(exc)) - raise Ouch( - "Neither importlib.metadata nor pkg_resources found. " - "Use Python 3.8+, or install importlib-metadata or setuptools." - ) from exc - - def _path_is_prefix(prefix: Optional[str], path: str) -> bool: try: return ( @@ -647,65 +547,14 @@ def _path_is_prefix(prefix: Optional[str], path: str) -> bool: return False -def _is_system_package(package: str) -> bool: - path = _get_path(package) - return path is not None and not ( +def _is_system_package(dist: Distribution) -> bool: + path = str(dist.locate_file(".")) + return not ( _path_is_prefix(sysconfig.get_path("purelib"), path) or _path_is_prefix(sysconfig.get_path("platlib"), path) ) -def _get_version_importlib(package: str) -> Optional[str]: - # pylint: disable=import-outside-toplevel - # pylint: disable=no-name-in-module - # pylint: disable=import-error - try: - # First preference: Python 3.8+ stdlib - from importlib.metadata import ( # type: ignore - PackageNotFoundError, - distribution, - ) - except ImportError as exc: - logger.debug("%s", str(exc)) - # Second preference: Commonly available PyPI backport - from importlib_metadata import ( # type: ignore - PackageNotFoundError, - distribution, - ) - - try: - return str(distribution(package).version) - except PackageNotFoundError: - return None - - -def _get_version_pkg_resources(package: str) -> Optional[str]: - # pylint: disable=import-outside-toplevel - # Bundled with setuptools; has a good chance of being available. - import pkg_resources - - try: - return str(pkg_resources.get_distribution(package).version) - except pkg_resources.DistributionNotFound: - return None - - -def _get_version(package: str) -> Optional[str]: - try: - return _get_version_importlib(package) - except ImportError as exc: - logger.debug("%s", str(exc)) - - try: - return _get_version_pkg_resources(package) - except ImportError as exc: - logger.debug("%s", str(exc)) - raise Ouch( - "Neither importlib.metadata nor pkg_resources found. " - "Use Python 3.8+, or install importlib-metadata or setuptools." - ) from exc - - def diagnose( dep_spec: str, online: bool, @@ -731,7 +580,11 @@ def diagnose( bad = False pkg_name = pkgname_from_depspec(dep_spec) - pkg_version = _get_version(pkg_name) + pkg_version: Optional[str] = None + try: + pkg_version = version(pkg_name) + except PackageNotFoundError: + pass lines = [] @@ -868,19 +721,25 @@ def _do_ensure( constraint = _make_version_constraint(info, False) matcher = distlib.version.LegacyMatcher(name + constraint) print(f"mkvenv: checking for {matcher}", file=sys.stderr) - ver = _get_version(name) + + dist: Optional[Distribution] = None + try: + dist = distribution(matcher.name) + except PackageNotFoundError: + pass + if ( - ver is None + dist is None # Always pass installed package to pip, so that they can be # updated if the requested version changes - or not _is_system_package(name) - or not matcher.match(distlib.version.LegacyVersion(ver)) + or not _is_system_package(dist) + or not matcher.match(distlib.version.LegacyVersion(dist.version)) ): absent.append(name + _make_version_constraint(info, True)) if len(absent) == 1: canary = info.get("canary", None) else: - logger.info("found %s %s", name, ver) + logger.info("found %s %s", name, dist.version) present.append(name) if present: diff --git a/python/setup.cfg b/python/setup.cfg index f6d2d8a1362..8c67dce4579 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -108,15 +108,6 @@ ignore_missing_imports = True [mypy-pygments] ignore_missing_imports = True -[mypy-importlib.metadata] -ignore_missing_imports = True - -[mypy-importlib_metadata] -ignore_missing_imports = True - -[mypy-pkg_resources] -ignore_missing_imports = True - [mypy-distlib] ignore_missing_imports = True From patchwork Thu Sep 7 12:59:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830877 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HCigZUn6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKDK5crYz1ygc for ; Thu, 7 Sep 2023 23:03:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdy-0004OF-7J; Thu, 07 Sep 2023 09:02:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEde-0003c9-NT for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdb-0007RC-Fi for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091694; 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=uCpyOpb2XemYy0/+vgrwsX+DzVxiyGspyte7b/RQvBM=; b=HCigZUn6sHWtnihdg/+RH/lZsmT7ieZZpWH5vTi3FBUVQ1ZhohSAM4v63ahUFKfASf13Un SbWVmkxxLUzS51QZs7kyxHaxT4mDiQABCJ/iodE/UzRR7GaDqoXn2lrIN936FzxIZv6jOy 9wOIMJtwQ2mmbH6iqW0oIftkVtJUPdo= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-fbtP4pfbNHCeQil0xGHO0w-1; Thu, 07 Sep 2023 09:01:33 -0400 X-MC-Unique: fbtP4pfbNHCeQil0xGHO0w-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-31aea5cf0f5so647523f8f.1 for ; Thu, 07 Sep 2023 06:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091691; x=1694696491; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCpyOpb2XemYy0/+vgrwsX+DzVxiyGspyte7b/RQvBM=; b=drZwgUtNwEhOmc+Gc7gSo1uyVhFiZ3eDOUAypG3jyISt/ftK802LxWxgvnZCoCCGvb VWQLUyKLn/37437QiT52mqXhTQTtNjx2+2pSAZaDWanywxJV6KqxsOCZbp6ca/DIHA3K FMV4EJZ+QgCpYTlhxwjinLUfSWvbwLu7iUSKyLSmWSqN1f3miqczsQhSIEqVYje+Qwfa uqrUpNdz035b8w1n3QB8hORTxNzw4g2tZPOLOITXUPPIbJeoR8LDT0ZiBOMO2T2W1PNH AoAensO2dVSsxtCI5VKIsVVbPSPkZZXQ4i9S/xWf+xVwrB5b+aLIJHatLcAN9FU7RCa4 plAQ== X-Gm-Message-State: AOJu0YxnA8Q17FnRJYnXmrIK6kSeSTw5iDIL6btDZ9Kl4Vnbnp+eeZUU SGobU0X1GYdD1CVwqwJVjUnvVcsWtuB3OZVVH7ZRMiM94TsdMxH5oaK8XqaPcfK2wjkMNHqd3SK ihHGa2SyCZPdBTtJc1XI1jmLR4Cbr4XkTinrNYjB2MLPLKwOZ6Wgqy9dxTtnfhS/VcoHaaK0jVY E= X-Received: by 2002:adf:e74c:0:b0:317:7062:32d2 with SMTP id c12-20020adfe74c000000b00317706232d2mr4612761wrn.54.1694091691633; Thu, 07 Sep 2023 06:01:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHaVdNvI5ybCBWpDVzC/QPX9wzT+Tl+BHS5gOIUe6PpaPu/NkZ6S0MU6WFhApZ4a4//YqmFA== X-Received: by 2002:adf:e74c:0:b0:317:7062:32d2 with SMTP id c12-20020adfe74c000000b00317706232d2mr4612740wrn.54.1694091691046; Thu, 07 Sep 2023 06:01:31 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id x12-20020a5d54cc000000b00315af025098sm23320841wrv.46.2023.09.07.06.01.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 36/51] Revert "mkvenv: work around broken pip installations on Debian 10" Date: Thu, 7 Sep 2023 14:59:45 +0200 Message-ID: <20230907130004.500601-37-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Debian 10 has Python 3.7, so it is not possible to use it anymore now that Python 3.8 is required. Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 74 +++++++++------------------------------- 1 file changed, 16 insertions(+), 58 deletions(-) diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index 6797e12e349..d0b9c215ca2 100644 --- a/python/scripts/mkvenv.py +++ b/python/scripts/mkvenv.py @@ -61,8 +61,6 @@ """ -# pylint: disable=too-many-lines - # Copyright (C) 2022-2023 Red Hat, Inc. # # Authors: @@ -195,7 +193,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: ): kwargs["with_pip"] = False else: - check_ensurepip(suggest_remedy=True) + check_ensurepip() super().__init__(*args, **kwargs) @@ -300,7 +298,7 @@ def need_ensurepip() -> bool: return True -def check_ensurepip(prefix: str = "", suggest_remedy: bool = False) -> None: +def check_ensurepip() -> None: """ Check that we have ensurepip. @@ -311,15 +309,12 @@ def check_ensurepip(prefix: str = "", suggest_remedy: bool = False) -> None: "Python's ensurepip module is not found.\n" "It's normally part of the Python standard library, " "maybe your distribution packages it separately?\n" - "(Debian puts ensurepip in its python3-venv package.)\n" + "Either install ensurepip, or alleviate the need for it in the " + "first place by installing pip and setuptools for " + f"'{sys.executable}'.\n" + "(Hint: Debian puts ensurepip in its python3-venv package.)" ) - if suggest_remedy: - msg += ( - "Either install ensurepip, or alleviate the need for it in the" - " first place by installing pip and setuptools for " - f"'{sys.executable}'.\n" - ) - raise Ouch(prefix + msg) + raise Ouch(msg) # ensurepip uses pyexpat, which can also go missing on us: if not find_spec("pyexpat"): @@ -327,15 +322,12 @@ def check_ensurepip(prefix: str = "", suggest_remedy: bool = False) -> None: "Python's pyexpat module is not found.\n" "It's normally part of the Python standard library, " "maybe your distribution packages it separately?\n" - "(NetBSD's pkgsrc debundles this to e.g. 'py310-expat'.)\n" + "Either install pyexpat, or alleviate the need for it in the " + "first place by installing pip and setuptools for " + f"'{sys.executable}'.\n\n" + "(Hint: NetBSD's pkgsrc debundles this to e.g. 'py310-expat'.)" ) - if suggest_remedy: - msg += ( - "Either install pyexpat, or alleviate the need for it in the " - "first place by installing pip and setuptools for " - f"'{sys.executable}'.\n" - ) - raise Ouch(prefix + msg) + raise Ouch(msg) def make_venv( # pylint: disable=too-many-arguments @@ -489,38 +481,6 @@ def generate_console_scripts( logger.debug("wrote console_script '%s'", filename) -def checkpip() -> bool: - """ - Debian10 has a pip that's broken when used inside of a virtual environment. - - We try to detect and correct that case here. - """ - try: - # pylint: disable=import-outside-toplevel,unused-import,import-error - # pylint: disable=redefined-outer-name - import pip._internal # type: ignore # noqa: F401 - - logger.debug("pip appears to be working correctly.") - return False - except ModuleNotFoundError as exc: - if exc.name == "pip._internal": - # Uh, fair enough. They did say "internal". - # Let's just assume it's fine. - return False - logger.warning("pip appears to be malfunctioning: %s", str(exc)) - - check_ensurepip("pip appears to be non-functional, and ") - - logger.debug("Attempting to repair pip ...") - subprocess.run( - (sys.executable, "-m", "ensurepip"), - stdout=subprocess.DEVNULL, - check=True, - ) - logger.debug("Pip is now (hopefully) repaired!") - return True - - def pkgname_from_depspec(dep_spec: str) -> str: """ Parse package name out of a PEP-508 depspec. @@ -877,12 +837,10 @@ def post_venv_setup() -> None: This is intended to be run *inside the venv* after it is created. """ logger.debug("post_venv_setup()") - # Test for a broken pip (Debian 10 or derivative?) and fix it if needed - if not checkpip(): - # Finally, generate a 'pip' script so the venv is usable in a normal - # way from the CLI. This only happens when we inherited pip from a - # parent/system-site and haven't run ensurepip in some way. - generate_console_scripts(["pip"]) + # Generate a 'pip' script so the venv is usable in a normal + # way from the CLI. This only happens when we inherited pip from a + # parent/system-site and haven't run ensurepip in some way. + generate_console_scripts(["pip"]) def _add_create_subcommand(subparsers: Any) -> None: From patchwork Thu Sep 7 12:59:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fwxqnZq0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKKk0Vkbz1ygR for ; Thu, 7 Sep 2023 23:07:54 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEe3-0004Ow-Lv; Thu, 07 Sep 2023 09:02:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdi-0003gl-2A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEde-0007RR-G5 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091697; 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=PgF+PG80iyOuIUfn5Y8pnguhmR9BA/NiFCqaB6x+twA=; b=fwxqnZq0M+c6QajCM2hT3gfCYomFw0+R+O4oSc3GRkjhqwa5S9LnKutUhuy2/gjB9iKNfj YE3d6I7i168bRBWqSVORXvnyFFkVLVPZzfi7Mr+S4q/Qt7ilXp5FX5kBk5r7yWjK4lZ2+/ VPQuHlDAMTgPU+kWlolT354uYAAg2VI= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-414-kcit7G3nMQy0SloaBqPzUQ-1; Thu, 07 Sep 2023 09:01:35 -0400 X-MC-Unique: kcit7G3nMQy0SloaBqPzUQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4011fa32e99so6679535e9.0 for ; Thu, 07 Sep 2023 06:01:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091693; x=1694696493; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PgF+PG80iyOuIUfn5Y8pnguhmR9BA/NiFCqaB6x+twA=; b=G+U6apbtMwzWVoLUCZTox5mi9UO3aSJ80mLT29YtioOiORJnCo0fST132j9OgklohA vd/cp27R8QXhMRXnXgcgCKW+9tvG1fiEMSLg7tcO7HH83urBnGiyRMxVdtxCq7WABHD7 1SYuWKPj245OqZxXIuY4n7/dHzR+LWugpQnZM75683WL98hiGuuHtyoINkt3tYjcyG8c cyBW1ezDkAV0ViDM9yeIEFDvm/b0XDDmAhruIq9v08uF9tlsMiQvdxZVzE/2CokQIXvF X85m5mDRxAuqMfwP4MYZPlVxzJiCoP7dNSWPiB9IK/Yu7QnqzO04GI/nKuPb87wcLVzf P/HQ== X-Gm-Message-State: AOJu0YwN2x7zPC+DVDXb7PJXduDmI0QwoI6NM+xJ7NYc91KwDFYYVpER rHFqrdZV+eShgVeo1FHaldZEDYu4kzsOtwZWrZu75ehnkxynuRY82xe2YKWk21H6oMKwCMA8c6r /KZ5fppaxG4hxIMkaiVsyDO/lBeWIQxvOYjRaObbQIQPRlqNXgBl3KoRWbZG6TgB65+PTl7MmRe s= X-Received: by 2002:a05:600c:45c8:b0:402:ee67:45d1 with SMTP id s8-20020a05600c45c800b00402ee6745d1mr1183840wmo.36.1694091693246; Thu, 07 Sep 2023 06:01:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuhtsM5LG38bfJGbPEQhxHbv1D1I4ec5SJZZifbAh+nliX61UNefx3ehCu2YuC3DroO0ZttA== X-Received: by 2002:a05:600c:45c8:b0:402:ee67:45d1 with SMTP id s8-20020a05600c45c800b00402ee6745d1mr1183826wmo.36.1694091692971; Thu, 07 Sep 2023 06:01:32 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c378500b003fefca26c72sm2493496wmr.23.2023.09.07.06.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 37/51] hw/i386/pc: Include missing 'sysemu/tcg.h' header Date: Thu, 7 Sep 2023 14:59:46 +0200 Message-ID: <20230907130004.500601-38-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Since commit 6f529b7534 ("target/i386: move FERR handling to target/i386") pc_q35_init() calls tcg_enabled() which is declared in "sysemu/tcg.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/pc_q35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 37c4814bedf..43413dd1ac4 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,6 +34,7 @@ #include "hw/loader.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" +#include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" From patchwork Thu Sep 7 12:59:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FYi+k/lQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ417MYz1yh1 for ; Thu, 7 Sep 2023 23:11:40 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeY-0005e1-SZ; Thu, 07 Sep 2023 09:02:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdk-0003tz-6A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdh-0007SV-Qj for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091701; 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=f5QQm0oilMjeexogAgNze3HLGFf4cWGHlkML0hXaL90=; b=FYi+k/lQIC1kMy/9WLSSaMgkjoS7ki1VD2yUs7gJwHoWnpv7DKs/1VOPG6oz8An0AuTozu 4/0KhTIp1LlOxYGUMSVWa/61Ck0hNG2H0IpaKMSOdvDx3m6cGO+SewToTTyNv68Hgfvqst f5dlS7o787S5Uc9GbnfWU9xrPcvrYkc= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-29-7tOSXF9xOECLA_xICvG19Q-1; Thu, 07 Sep 2023 09:01:38 -0400 X-MC-Unique: 7tOSXF9xOECLA_xICvG19Q-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ba1949656bso11289741fa.0 for ; Thu, 07 Sep 2023 06:01:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091695; x=1694696495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f5QQm0oilMjeexogAgNze3HLGFf4cWGHlkML0hXaL90=; b=CWhMN9EZn8UJrQDXgIXEBo1lAe+TOPTdCxOaGN9tCkzKOuJ2tTmoh0QI4YjvqlgRCm KphjHkE3k6TWYgtYGuq3MC1TWtx1RJc2KdAA6Z3+9WvZ0rKB00FCBlgU2VEZr7Klk3Oi aZJgJf7dq8AospLfuHclAiSnYmi9Sq5x2pfWBr5Zz91YvJ0ONAtNu2Q4VwCigx5/7zfR YMF3WkHyWy4cMRqgNKGxGOoUDDg7q2/3hC7GJtnU83C425uGUxhoFVsRC/AG6n3wkZp3 POXNpTcOF+jKq5kONwNmlVJumh5WirEP/evsDwl0SZYdlExFmtQCcD/pl9Ain8hRU6br 7emw== X-Gm-Message-State: AOJu0YzM98Ie56hSLouEpWhvN+XGOizgfDM/5ZtAh1bZwNIPrMM2ywAk 5vWQamXVpQyQUoUn/LOvQQqmMTvaNwmlWckyYeshIMT17DJZ0JtySVl3zoa/Nff3oH7B9fRQdv2 0GAlUaM3rs41LzG/TnGQGunaDyJMmLsI9b5l0JcsME4MRAew5/vS7KvpPRPKWLtfSsFv7xylSpN E= X-Received: by 2002:a2e:87cd:0:b0:2bc:d097:2b72 with SMTP id v13-20020a2e87cd000000b002bcd0972b72mr4796096ljj.48.1694091695510; Thu, 07 Sep 2023 06:01:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5Q7BFQOh5+plnqBPbuOFINJU5aPGkpsA0EMlL3US6VloZV1INGkBu8PHpKUOp6gTgB3lhyQ== X-Received: by 2002:a2e:87cd:0:b0:2bc:d097:2b72 with SMTP id v13-20020a2e87cd000000b002bcd0972b72mr4796079ljj.48.1694091695189; Thu, 07 Sep 2023 06:01:35 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y25-20020a7bcd99000000b0040210a27e29sm2454449wmj.32.2023.09.07.06.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 38/51] hw/i386/pc: Include missing 'cpu.h' header Date: Thu, 7 Sep 2023 14:59:47 +0200 Message-ID: <20230907130004.500601-39-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Both pc_piix.c and pc_q35.c files use CPU_VERSION_LEGACY which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-3-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ce1ac952749..f0df12f6fa8 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -69,6 +69,7 @@ #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" #include "kvm/kvm-cpu.h" +#include "target/i386/cpu.h" #define MAX_IDE_BUS 2 #define XEN_IOAPIC_NUM_PIRQS 128ULL diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 43413dd1ac4..8ecc78c822b 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -58,6 +58,7 @@ #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" +#include "target/i386/cpu.h" /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 From patchwork Thu Sep 7 12:59:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EHaO1mm8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKW33gQWz1ygc for ; Thu, 7 Sep 2023 23:15:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeQ-00057o-Sf; Thu, 07 Sep 2023 09:02:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdj-0003sW-Pp for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdh-0007SR-EK for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091700; 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=CnS6kpClTYzSsSYS2ANTQx/6JTtxTxc5WwCUea/91dA=; b=EHaO1mm8JnPB/jNqccufYvV9hU3021Iv43aejodScqYR2hwJd4YBRDvpSjHk8PvH28jwYO Jtk9GIalYe1TpJ6MDJ0Qagup5CL8ONy8tfYLCgFtYe1hrx2NTehQyDhw1AlsOdcvzGy+n/ jrTBEqcCyNDT1Pg4o6AS+jOqmfPdvvw= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-fBhRkRu_ORWjz22ExgsuOg-1; Thu, 07 Sep 2023 09:01:38 -0400 X-MC-Unique: fBhRkRu_ORWjz22ExgsuOg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401c19fc097so6611805e9.1 for ; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091697; x=1694696497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CnS6kpClTYzSsSYS2ANTQx/6JTtxTxc5WwCUea/91dA=; b=SIeVFItEn/o8GORbYUvTqfCO5MjVuBO2iYT2tABD6Og0nDd4Xj6gWKNk/tjFurtj5Y 6X9flav/tV6mr88IZiH7ZcGCCpgHc/t5MGypGpTAjMluefif6dUT+0CSTKOiuyecW7RO 2Q6hEPfhKqtqLD9Ge2i2il0mSUqXksD/87SFnSzmlWyYay8Kz6beErkMsJtUXMWQb33f VD9BOCf0tW5aS/kg7cWVFXubxtI+jcKhsuxVC4IUFgXqeJAcZNJnyjJ1Jua4n08sp9V/ RA7pcqUhdnCfBgpiSYnI3BwXio5ANb6hJqeISjWtaK1JoY467C6CqI0rLuqXq211z3pQ aoeQ== X-Gm-Message-State: AOJu0Yy8JkEpfS0b1MXOjPD3vHHIJ7usaQd8nKaLTVHZXRRUtVVTc9Sk dXR1lDP9HG+tzhCvAdTxQ0jx+BJS92joG4p7aWSM0JbncT9XWIO8dA9Pbcel6zSrlD9vXLuY2CF OElM8paOnPWEdJYRBqVfDBJFmprQJXpmR18Y8tIpmN+YE+w87E/w8yZ4IK4QpBHqZGhM9z6dbf/ I= X-Received: by 2002:a7b:cd97:0:b0:401:c944:a4d6 with SMTP id y23-20020a7bcd97000000b00401c944a4d6mr4510546wmj.28.1694091697251; Thu, 07 Sep 2023 06:01:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFN6D55okrC2bHuKtz5+ID0fcdbiMVH11CrMv6zXhpyqFtEth7GADN9gXgEtjKB3RQM7MM2pA== X-Received: by 2002:a7b:cd97:0:b0:401:c944:a4d6 with SMTP id y23-20020a7bcd97000000b00401c944a4d6mr4510531wmj.28.1694091696931; Thu, 07 Sep 2023 06:01:36 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o8-20020a1c7508000000b003fed7fa6c00sm2516617wmc.7.2023.09.07.06.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 39/51] hw/i386/fw_cfg: Include missing 'cpu.h' header Date: Thu, 7 Sep 2023 14:59:48 +0200 Message-ID: <20230907130004.500601-40-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-4-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/fw_cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index 72a42f3c66d..7362daa45a6 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -24,6 +24,7 @@ #include "kvm/kvm_i386.h" #include "qapi/error.h" #include CONFIG_DEVICES +#include "target/i386/cpu.h" struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; From patchwork Thu Sep 7 12:59:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Qc3J0NIp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKWK0xGkz1ynb for ; Thu, 7 Sep 2023 23:16:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeT-0005QQ-Ns; Thu, 07 Sep 2023 09:02:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdm-00046p-63 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdj-0007Sr-Pr for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091703; 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=2HNKEIMd5+PbfiqiQhNPm82diOnCV8my5uMrbrI4ek8=; b=Qc3J0NIpFmJgcFvQQ1/A+IBbzBLhHtgGwmCPVomwlAOQKrwtWMRFKs2Cs1oC4fwOJYbMKD UdhpMIxvOJslrQ9qEpy6sJKS7Cy9RBNj3nZ/Ukpkj5qeZuqWUGWmzdx9HAedjzbHypQcUY jQ9EttpKLlMWxSg+8+TIKDlypxv1hoo= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-BsdP6BHHMkm68t5rjRtxGw-1; Thu, 07 Sep 2023 09:01:41 -0400 X-MC-Unique: BsdP6BHHMkm68t5rjRtxGw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f42bcef2acso6997215e9.2 for ; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091699; x=1694696499; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2HNKEIMd5+PbfiqiQhNPm82diOnCV8my5uMrbrI4ek8=; b=ceVNAlzeS4xcs+JcbusQ7IGZRWN3ErpdQBJmrcx5q/X14Yju+QiT8uBzRrhhUb37ID 8YLcfu1+bTXoiNxCj3sUBVCRbXd+kPU93kMeHVUedohKHEz2th5ltx4AKywQR9ZgxfiC DZsFo4ucODUNTLFyg+8Gc0Jg+mQJXWQ2U5zA9WEK+e/MNp3ycFT060x6iaelublZcvSG QGe5/nKQg7+czdkQVkmDKJVRPhUvPnTWyM5miT4wE/z91gXpKQKFnoaHsDFJLjyV8Yb4 jLprzVqg1JyqJpIqnUlN1dLO/FtgPdRRSEcTqSMf02CRmHiyoyHQ+6vpC6G3rxS8Dntr Z7UQ== X-Gm-Message-State: AOJu0YzG/AcXuu5jEZi046a/sko+AC2dqmFz/kSIcyCTu0E919mH1ldI 1TLE0rICK3eP/M00CObO8bFRXbU9o0APa7BBdLM1hoXB3IdeFzopNcquvaliDLnYEnz2+U3XCsd gIRmPyxJCnFU4dgeDdn8OomcxAAScVldMTEtZnmjdy88vAwevD/HN/nbUoTEMvs4f9NZ3sCLZKk s= X-Received: by 2002:adf:cd86:0:b0:314:152d:f8db with SMTP id q6-20020adfcd86000000b00314152df8dbmr4636255wrj.58.1694091698921; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuPos2+rvK10Y0UOMXDZj1zPBFEMSVN5necgeB+33MGVZ0ripnn3XahIuKQX53ChBqlpGP6w== X-Received: by 2002:adf:cd86:0:b0:314:152d:f8db with SMTP id q6-20020adfcd86000000b00314152df8dbmr4636239wrj.58.1694091698621; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y1-20020adff6c1000000b00317a29af4b2sm23102235wrp.68.2023.09.07.06.01.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 40/51] target/i386/helper: Restrict KVM declarations to system emulation Date: Thu, 7 Sep 2023 14:59:49 +0200 Message-ID: <20230907130004.500601-41-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index 89aa696c6d5..2070dd0dda1 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -22,10 +22,10 @@ #include "cpu.h" #include "exec/exec-all.h" #include "sysemu/runstate.h" -#include "kvm/kvm_i386.h" #ifndef CONFIG_USER_ONLY #include "sysemu/hw_accel.h" #include "monitor/monitor.h" +#include "kvm/kvm_i386.h" #endif #include "qemu/log.h" #ifdef CONFIG_TCG From patchwork Thu Sep 7 12:59:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Dvvdk9st; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKT51l8dz1yh1 for ; Thu, 7 Sep 2023 23:14:17 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Wl-1F; Thu, 07 Sep 2023 09:02:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdo-0004FC-At for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdm-0007TP-5u for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091705; 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=G5NZradxD71uQje+nwhEcOPdnjx/zNavwCfId1yJRzE=; b=Dvvdk9stfeB/nrq6u5SnTwZv66DjMHMj4xwQhFpM3aRA9nuvVNIDzAp4I+72lgtNOhFykY o5sqdH6WC8NERUBELtHgXZDSrtOItL0kzex6g0tnMBj3L/tVtHqf90HNobUPNVoiXV7DfT 6996xpEExok57736ABtRyRC5j4UomRY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-iNSwMGc-PRGsrYmxcQjCrA-1; Thu, 07 Sep 2023 09:01:42 -0400 X-MC-Unique: iNSwMGc-PRGsrYmxcQjCrA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401d9abf21cso7522695e9.0 for ; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091701; x=1694696501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G5NZradxD71uQje+nwhEcOPdnjx/zNavwCfId1yJRzE=; b=NjbXIIG1tv96fzNCHMqTmIOK4/xuNNcyAlHePj1H7hpVMGGF5h6Fe3n7YRpXZKRMKq AZnVMpuXAFgK+LIJG/S4LDVJvuNV3kK6tl4b94iXSB/R2DbO8bpariDgHnnho5qOQBiD ClTNnMebPzveQAp9A3tM1d03Lldd81ru2tMs4FuRyGYEBvZ1Nl0YCwxsah65iG/d8BOG Jzus4Kbp3BoBiq81IJgQZkxId0xOReuuNjA9H20bw5tZV2oy4+Ie4q+2NsjfjsF3QAcg rVN9jpcam6e7FL/LQA0KTVpxDLAu/H+9SzvKX5mVRP7PkJ87RkDwofCPExDzDTIHnO0v I1tQ== X-Gm-Message-State: AOJu0YxM4FlZDRP40uXBrRlvrDk3VyA8L9qzD/Du+srk/VvzvGmJR+O8 3HUUwQ6mEZyzz3aTmWPSBwnpBos/yjnhWG/uA7+9WNcsacH5IpzKq1Lyxno27S+zicSoFSLWtzG 0H6LxDKLDPZVyOcDN4sNgoyrV0kk7+Fvj8CSIMJiY+jY5LuCdbmx2LOmfvLAsuvNRxhkRGWhHH6 Q= X-Received: by 2002:a1c:4c02:0:b0:3fe:111b:7fc4 with SMTP id z2-20020a1c4c02000000b003fe111b7fc4mr5061295wmf.21.1694091700806; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFF32+z0XiunSB4yga9QXq9C5tMvfo7DgQzbzac1MCik/UYregnVbblbzbmx45hl651fQrXA== X-Received: by 2002:a1c:4c02:0:b0:3fe:111b:7fc4 with SMTP id z2-20020a1c4c02000000b003fe111b7fc4mr5061275wmf.21.1694091700492; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id fa9-20020a05600c518900b003ff013a4fd9sm2509978wmb.7.2023.09.07.06.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 41/51] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel() Date: Thu, 7 Sep 2023 14:59:50 +0200 Message-ID: <20230907130004.500601-42-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé In order to have cpu-sysemu.c become accelerator-agnostic, inline kvm_apic_in_kernel() -- which is a simple wrapper to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h" header. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-6-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/cpu-sysemu.c | 4 ++-- target/i386/kvm/kvm_i386.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c index 28115edf44f..2375e48178f 100644 --- a/target/i386/cpu-sysemu.c +++ b/target/i386/cpu-sysemu.c @@ -19,9 +19,9 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "sysemu/kvm.h" #include "sysemu/xen.h" #include "sysemu/whpx.h" -#include "kvm/kvm_i386.h" #include "qapi/error.h" #include "qapi/qapi-visit-run-state.h" #include "qapi/qmp/qdict.h" @@ -253,7 +253,7 @@ APICCommonClass *apic_get_class(Error **errp) /* TODO: in-kernel irqchip for hvf */ if (kvm_enabled()) { - if (!kvm_apic_in_kernel()) { + if (!kvm_irqchip_in_kernel()) { error_setg(errp, "KVM does not support userspace APIC"); return NULL; } diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index e24753abfe6..470627b7504 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -13,8 +13,6 @@ #include "sysemu/kvm.h" -#define kvm_apic_in_kernel() (kvm_irqchip_in_kernel()) - #ifdef CONFIG_KVM #define kvm_pit_in_kernel() \ From patchwork Thu Sep 7 12:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830897 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=h48tif8V; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ00Ss4z1yh8 for ; Thu, 7 Sep 2023 23:11:35 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Yp-C1; Thu, 07 Sep 2023 09:02:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdw-0004WI-II for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdt-0007Vn-MI for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091711; 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=dCbm6ozKk3fuAa8+Z4gDpKuSJgbF8JCXqIUlO58WCyM=; b=h48tif8VJETDT5YKJpwoEqga/ZV/m0xh2D0fEu0nQ/ypSSh3ZvasE+45ZNz3cjWJxwZK3e p2sEelm4MNjVfHje/V7GLQo4AeU3z9eDTiabEn1SIu9B1dIGAo+X9fWKAmnQKvDx9ENCtJ MDC7WKaqkIhkXWf4jUT1eu105zCIASQ= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-167-tIM18cV1MmanC01zsvzoqw-1; Thu, 07 Sep 2023 09:01:50 -0400 X-MC-Unique: tIM18cV1MmanC01zsvzoqw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-50081b0dba6so973579e87.0 for ; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091703; x=1694696503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dCbm6ozKk3fuAa8+Z4gDpKuSJgbF8JCXqIUlO58WCyM=; b=mCz0xe0wG0ovNps4u1VTqkUNW/qwl5Dt6T9GlFWpmgAsLMZ9n467I/4YsyLe5Svi6u mFwlv6pBHVqTbeqxQv2gngeQDTYyjrCzIwcb/SmSOXtqwLWYnrkLY/8xEhtbpHpCJmQU 5zXtatmWUSDfK/yoJcXDR382tfIKETtiq4tVg4bAjFW6xRwTMUmBOkbyRSrlzNU4Wg+V N9AqX82PgjOzDqC+0YwJeFPS/NA47Tvzij87NKM2sF1n4iSuFYIyoOOe2NuICnFdC6M/ g2Xbr6STL+gKE+5C65pwBEzyHWAIZwxYtpT5DZaqNQcI2C5ARJ0YbaTso8J1uJHPYbDm YHXg== X-Gm-Message-State: AOJu0YzIyP9haN+dS3kvSXX7Gi5QIDiPqh09N21i6JHR4mbzJHuGnyTj o57PKqcGBczoLR1QOSWA15LprWyey8NZEnAQ4CDw3EJVjo/ciVc2SNiUqeLGYJe7y/H6Y+gjd4f m7wZNIVGCSNGe64iXT0DEADiumdsDi/EbD8N4YlgywiVQxwj+HzxvEOp7lajCoF5xh/JYOTfFff E= X-Received: by 2002:a19:5054:0:b0:4fe:8ba8:16a9 with SMTP id z20-20020a195054000000b004fe8ba816a9mr4988065lfj.55.1694091702753; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/OxFNG52dsgJioAGC/3m4Wi/ejSjNgPrc8uYimyiv/5dRfB+RF2ruBWFfbE0CMc/b0cypPQ== X-Received: by 2002:a19:5054:0:b0:4fe:8ba8:16a9 with SMTP id z20-20020a195054000000b004fe8ba816a9mr4988046lfj.55.1694091702463; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id a28-20020a5d457c000000b00317f70240afsm23314381wrc.27.2023.09.07.06.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 42/51] target/i386: Remove unused KVM stubs Date: Thu, 7 Sep 2023 14:59:51 +0200 Message-ID: <20230907130004.500601-43-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé All these functions: - kvm_arch_get_supported_cpuid() - kvm_has_smm(() - kvm_hyperv_expand_features() - kvm_set_max_apic_id() are called after checking for kvm_enabled(), which is false when KVM is not built. Since the compiler elides these functions, their stubs are not used and can be removed. Inspired-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-7-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm-stub.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c index e052f1c7b0e..f985d9a1d39 100644 --- a/target/i386/kvm/kvm-stub.c +++ b/target/i386/kvm/kvm-stub.c @@ -10,42 +10,16 @@ * */ #include "qemu/osdep.h" -#include "cpu.h" #include "kvm_i386.h" #ifndef __OPTIMIZE__ -bool kvm_has_smm(void) -{ - return 1; -} - bool kvm_enable_x2apic(void) { return false; } - -/* This function is only called inside conditionals which we - * rely on the compiler to optimize out when CONFIG_KVM is not - * defined. - */ -uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, - uint32_t index, int reg) -{ - abort(); -} #endif bool kvm_hv_vpindex_settable(void) { return false; } - -bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp) -{ - abort(); -} - -void kvm_set_max_apic_id(uint32_t max_apic_id) -{ - return; -} From patchwork Thu Sep 7 12:59:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Y7+SKpN4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN631Kyz1yh8 for ; Thu, 7 Sep 2023 23:09:58 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEei-000710-Az; Thu, 07 Sep 2023 09:02:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe3-0004ap-TC for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe1-0007Wl-5T for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091717; 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=UsfWLScmy6sLnC82kfJQtErbSOoNvAJXLrmyFBPVqo8=; b=Y7+SKpN4QpMteCP0e0k3mPYpxWq1gwPd72LfTOY9VfpmlbabFQesOmmRD2kNWuP9BiSXzO InFxV0uRLqxd05tPEbRKaQgWT0q85ePdAunIht327wcKHiY7+gpWCJly0+iHnUVIk7P52I 6IwwxR/mxyJitkD8OvE7mVmH8Yo3934= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-xecEF51WP2aDSS8dWa0FTA-1; Thu, 07 Sep 2023 09:01:50 -0400 X-MC-Unique: xecEF51WP2aDSS8dWa0FTA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401d9abf21cso7523245e9.0 for ; Thu, 07 Sep 2023 06:01:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091704; x=1694696504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UsfWLScmy6sLnC82kfJQtErbSOoNvAJXLrmyFBPVqo8=; b=cHOvttZa8t/JJxVemg4DlNyu1Q3GvNTH2kMtpv9jqGccWSciW9XEbEiqK7Eh2BvOoH PUPb4BAbEJQDh7Sg7yckz4c15TxbsH/qTyqe74RdtssBbYR4yYeHsSTtaOobFM3nvVNc N+cjuIOOspITZLSRb4IyiAUf6GRzkQuRyqBPLYbAH06UnjwZLwpyKff7Jl08e5ZpG+XN FOVNNJs1CYP3Wt6DYZYBTStWX8G3P+6ozqA7MAqn4peNRZTvwP2HhQZQ3T/l9yi0Zj0D rJghV8M+LEyf270ue7jt2vAEeSUwnWDAc3hBcy9nuHV99U8t9nuUVxwhOsCAMER7eBvk h+4Q== X-Gm-Message-State: AOJu0YxFOOI8F2BkrNFyOb0v4HgxvQGR4NQ8IMIpiRejL5n8oPPCb3jH SqDIVgVQ5dxRHKj7rs9FkIaBIPk6Mj6CLD5SHVlcvePUYbkkSKG/KSHocW5EiTAfyOkR5LvDF+e nzgv+ZG7dc27oiCXtvYxBaIASShK0NRVZ8Y6Mw8KOMGVIEscJeHyNbqnSdnQk+tlMs77qlA4gRz 8= X-Received: by 2002:a5d:54c8:0:b0:313:f33c:24c4 with SMTP id x8-20020a5d54c8000000b00313f33c24c4mr5130102wrv.39.1694091704530; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDyaiRW4nu6INhW0U0YYX6AQWyBEJOuXWr6JMS+giQQPaGuRRCWdwtBW4S0RdvHL14RBmHsA== X-Received: by 2002:a5d:54c8:0:b0:313:f33c:24c4 with SMTP id x8-20020a5d54c8000000b00313f33c24c4mr5130083wrv.39.1694091704194; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4083000000b0031435731dfasm23154975wrp.35.2023.09.07.06.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 43/51] target/i386: Allow elision of kvm_enable_x2apic() Date: Thu, 7 Sep 2023 14:59:52 +0200 Message-ID: <20230907130004.500601-44-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Cleanup the code by simplifying "!xen_enabled() && kvm_enabled()" to just "kvm_enabled()". Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-8-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/intel_iommu.c | 2 +- hw/i386/x86.c | 9 +++------ target/i386/kvm/kvm-stub.c | 7 ------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 3ca71df3693..c9961ef752c 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -4053,7 +4053,7 @@ static bool vtd_decide_config(IntelIOMMUState *s, Error **errp) error_setg(errp, "eim=on requires accel=kvm,kernel-irqchip=split"); return false; } - if (!kvm_enable_x2apic()) { + if (kvm_enabled() && !kvm_enable_x2apic()) { error_setg(errp, "eim=on requires support on the KVM side" "(X2APIC_API, first shipped in v4.7)"); return false; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index a88a126123b..3e86cf3060f 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -129,13 +129,10 @@ void x86_cpus_init(X86MachineState *x86ms, int default_cpu_version) ms->smp.max_cpus - 1) + 1; /* - * Can we support APIC ID 255 or higher? - * - * Under Xen: yes. - * With userspace emulated lapic: no - * With KVM's in-kernel lapic: only if X2APIC API is enabled. + * Can we support APIC ID 255 or higher? With KVM, that requires + * both in-kernel lapic and X2APIC userspace API. */ - if (x86ms->apic_id_limit > 255 && !xen_enabled() && + if (x86ms->apic_id_limit > 255 && kvm_enabled() && (!kvm_irqchip_in_kernel() || !kvm_enable_x2apic())) { error_report("current -smp configuration requires kernel " "irqchip and X2APIC API support."); diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c index f985d9a1d39..62cccebee4f 100644 --- a/target/i386/kvm/kvm-stub.c +++ b/target/i386/kvm/kvm-stub.c @@ -12,13 +12,6 @@ #include "qemu/osdep.h" #include "kvm_i386.h" -#ifndef __OPTIMIZE__ -bool kvm_enable_x2apic(void) -{ - return false; -} -#endif - bool kvm_hv_vpindex_settable(void) { return false; From patchwork Thu Sep 7 12:59:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=c3CQQ1dW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKD862sQz1ygc for ; Thu, 7 Sep 2023 23:03:04 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEea-0005pE-H6; Thu, 07 Sep 2023 09:02:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdw-0004WH-8b for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEds-0007VP-Lv for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091711; 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=oIq/O9qNMjpRAveEr93SV2nGg4KhrTDskMws53vhy7U=; b=c3CQQ1dWLUmAR2Bd+ulPlyQxNA9YCgfOOTSNrsRct1Rq+W0ct9qdOHLsJxwo0V6pxUwvKM MKxc1KGkJS2kxGjLbHn7DX+uw0L6NakWGezSImKv4Uxcgxe8nME31MN/OZXnxZJLqTSIrX 97VBWnGqCEL4xPaJmCrhwKSk7BCnRgk= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-hJAO2njFM-yE4Va-O-Cnaw-1; Thu, 07 Sep 2023 09:01:48 -0400 X-MC-Unique: hJAO2njFM-yE4Va-O-Cnaw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31c5adb698aso574687f8f.2 for ; Thu, 07 Sep 2023 06:01:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091707; x=1694696507; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oIq/O9qNMjpRAveEr93SV2nGg4KhrTDskMws53vhy7U=; b=LI2CQRGCOHmtZQHgmE31XTvzigY63YjcCq3IEPimB/XrCSPz3lrd/NhoT0HaPr/zqP 1FjlL4JJPRQUlkCzUtG3xy71YoTtBzEfrjLo+W5KFL+7x40d+spKvjQCEK6jQp7SEhXg q6uBXKiVeQLpCpYmA0AnaVbjolWes18N8UEqRdrBShbyPQ4ps+76Fv4oKLmPWcOBZS9h vlnunzz2w/T1BjsIHTWLMufizpwljgcZtG9QukEhs9aXtAcSIocLrq3fYx7w1CuvE63x 1FALEgBhzicEyFKta8HoxSvB88fL6F7egXfo6WxbR4uIIQAt8RMwj7N7PL32pUjq29Fi hcqQ== X-Gm-Message-State: AOJu0Yw3E7qh+IQgM4rDLCBsGYKONPARYmVqUQEYO/85SC0Z11RxXQvN Y8Hc6cOPcdVINqPajRu7zWFxiOwpmzQKJbq5wxdrHivpxIVcCARjqBGJ/pZdA/AbSDSeC8B726l AYHEDo7u6DZfdNn7KmA9UR776om/qB0cMGQpuO1Bpwhczu0oib0RQ6saKhjmAlq1WQZzQULWteD 0= X-Received: by 2002:adf:ce8c:0:b0:31a:d112:954e with SMTP id r12-20020adfce8c000000b0031ad112954emr4891376wrn.46.1694091707203; Thu, 07 Sep 2023 06:01:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEavfOSa+12a7Nq8+fQGDEAoqWOA1Si4cgOyqLyV8Tx2AdEJ7xyK6AYBAlDbdlIH4bDjGWhA== X-Received: by 2002:adf:ce8c:0:b0:31a:d112:954e with SMTP id r12-20020adfce8c000000b0031ad112954emr4891356wrn.46.1694091706860; Thu, 07 Sep 2023 06:01:46 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id c1-20020a056000104100b003179b3fd837sm685464wrx.33.2023.09.07.06.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 44/51] target/i386: Allow elision of kvm_hv_vpindex_settable() Date: Thu, 7 Sep 2023 14:59:53 +0200 Message-ID: <20230907130004.500601-45-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Call kvm_enabled() before kvm_hv_vpindex_settable() to let the compiler elide its call. kvm-stub.c is now empty, remove it. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-9-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/x86.c | 2 +- target/i386/kvm/kvm-stub.c | 18 ------------------ target/i386/kvm/meson.build | 2 -- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 target/i386/kvm/kvm-stub.c diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 3e86cf3060f..f034df8bf62 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -421,7 +421,7 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev, cpu->thread_id = topo_ids.smt_id; if (hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX) && - !kvm_hv_vpindex_settable()) { + kvm_enabled() && !kvm_hv_vpindex_settable()) { error_setg(errp, "kernel doesn't allow setting HyperV VP_INDEX"); return; } diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c deleted file mode 100644 index 62cccebee4f..00000000000 --- a/target/i386/kvm/kvm-stub.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * QEMU KVM x86 specific function stubs - * - * Copyright Linaro Limited 2012 - * - * Author: Peter Maydell - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * - */ -#include "qemu/osdep.h" -#include "kvm_i386.h" - -bool kvm_hv_vpindex_settable(void) -{ - return false; -} diff --git a/target/i386/kvm/meson.build b/target/i386/kvm/meson.build index 40fbde96cac..5d9174bbb5d 100644 --- a/target/i386/kvm/meson.build +++ b/target/i386/kvm/meson.build @@ -1,5 +1,3 @@ -i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) - i386_softmmu_kvm_ss = ss.source_set() i386_softmmu_kvm_ss.add(files( From patchwork Thu Sep 7 12:59:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830912 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gEmbZPkI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKRb6tDlz1ynd for ; Thu, 7 Sep 2023 23:12:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEej-0007G5-0I; Thu, 07 Sep 2023 09:02:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdy-0004X7-EP for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdv-0007W6-Bh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091714; 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=SpvS7kXL3QPxpjC9VxkOF+3EPpNlxl8dKSrXGx/rLrM=; b=gEmbZPkIxcWWUEe0TlbkPC6B9jRl9kGD+sT5fgRSe2RpIyewi0qyFcjEO67sKtz/WqDUcu BR6rnH6++DS4FfsEiKLQmQmuPzlCKm657W+w8T2TXlcCzvfDkwrPc85rq92mOS64I70XfW +/cH8BrP/67Q+Key7T3LU44rNCS345c= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113-W3AORoUBNraZhigSKtqqXw-1; Thu, 07 Sep 2023 09:01:52 -0400 X-MC-Unique: W3AORoUBNraZhigSKtqqXw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4011f56165eso8835735e9.0 for ; Thu, 07 Sep 2023 06:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091710; x=1694696510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SpvS7kXL3QPxpjC9VxkOF+3EPpNlxl8dKSrXGx/rLrM=; b=cs+usAVTvyDLcX8XSUaM992Loc7M9aS5UGGfzEItfB3YNLeMbSKIW7SdsDCix2+YKG LISNMAPUfwQ76cxtFL06iS7wqgRNVRVFPgCUm/I4gTqjgvBaII4vAW6akoHKbIpsMudT 8xYWJSf4HCOb7LDRm9h7Xo+duI80F+gsVTHDL9wUpTCXXaxWJY0MuPmRrryp0dajgjlt HYZgJLluDk7Qbz0dNZ9iuDhiaa3txgBMQCuxUReYaERfJg7i/UEDFoltCeoxqIt52Ntb Y7djwiGLv1Of+l/oitLfTnmPpb63idPVfzqY5QEyeLHnwHuKI8LnJPE6hiASJa3Hw4b+ r3cg== X-Gm-Message-State: AOJu0YxcgjFLNLff6RvKwOhK/7gsyKB4jJqjt0r70Bpj45Nj0SUMg/0J uFk5ZehbqzpPLRfzo2DFayFekzQFEpcRh8BWBc/56OzOnOSGYOfs1dn5j0R4//0vfGsn/CIAkHR TfRdbYPf/najtr0ip5Vlmp6AGO/UJhri9IQT4C0oEqgBdE+vMww8oLNBqy0DJnnoKXCjqmSW3Ln M= X-Received: by 2002:a05:600c:1d1c:b0:401:bd94:f45b with SMTP id l28-20020a05600c1d1c00b00401bd94f45bmr2127646wms.4.1694091710487; Thu, 07 Sep 2023 06:01:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6s9uUOr/hwHUE1ZEkt/xj/9GDweoKQoR3gvPkQx78YCjDb6pMbj4sMJ/FxPw2vw+jFc3kCQ== X-Received: by 2002:a05:600c:1d1c:b0:401:bd94:f45b with SMTP id l28-20020a05600c1d1c00b00401bd94f45bmr2127578wms.4.1694091709283; Thu, 07 Sep 2023 06:01:49 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id 17-20020a05600c025100b00402c0a8a084sm2501217wmj.17.2023.09.07.06.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 45/51] target/i386: Restrict declarations specific to CONFIG_KVM Date: Thu, 7 Sep 2023 14:59:54 +0200 Message-ID: <20230907130004.500601-46-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Keep the function accessed by target/i386/ and hw/i386/ exposed, restrict the ones accessed by target/i386/kvm/. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-10-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/kvm/kvm_i386.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 470627b7504..ff309bad25f 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -31,30 +31,35 @@ #endif /* CONFIG_KVM */ bool kvm_has_smm(void); -bool kvm_has_adjust_clock(void); -bool kvm_has_adjust_clock_stable(void); -bool kvm_has_exception_payload(void); -void kvm_synchronize_all_tsc(void); +bool kvm_enable_x2apic(void); +bool kvm_hv_vpindex_settable(void); + +bool kvm_enable_sgx_provisioning(KVMState *s); +bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); + void kvm_arch_reset_vcpu(X86CPU *cs); void kvm_arch_after_reset_vcpu(X86CPU *cpu); void kvm_arch_do_init_vcpu(X86CPU *cs); +void kvm_set_max_apic_id(uint32_t max_apic_id); +void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); + +#ifdef CONFIG_KVM + +bool kvm_has_adjust_clock(void); +bool kvm_has_adjust_clock_stable(void); +bool kvm_has_exception_payload(void); +void kvm_synchronize_all_tsc(void); + void kvm_put_apicbase(X86CPU *cpu, uint64_t value); -bool kvm_enable_x2apic(void); bool kvm_has_x2apic_api(void); bool kvm_has_waitpkg(void); -bool kvm_hv_vpindex_settable(void); -bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); - uint64_t kvm_swizzle_msi_ext_dest_id(uint64_t address); void kvm_update_msi_routes_all(void *private, bool global, uint32_t index, uint32_t mask); -bool kvm_enable_sgx_provisioning(KVMState *s); -void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); - typedef bool QEMURDMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t *val); typedef bool QEMUWRMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t val); typedef struct kvm_msr_handlers { @@ -66,6 +71,6 @@ typedef struct kvm_msr_handlers { bool kvm_filter_msr(KVMState *s, uint32_t msr, QEMURDMSRHandler *rdmsr, QEMUWRMSRHandler *wrmsr); -void kvm_set_max_apic_id(uint32_t max_apic_id); +#endif /* CONFIG_KVM */ #endif From patchwork Thu Sep 7 12:59:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=P+IRII4G; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQ66LvCz1yh8 for ; Thu, 7 Sep 2023 23:11:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEec-0006DK-8L; Thu, 07 Sep 2023 09:02:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe1-0004aJ-RF for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdy-0007Wg-98 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091717; 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=qmixq+DPUWzXn9es08YKOqzSkEEgLhEbQB5clQHVKAY=; b=P+IRII4GqWJGK97BuyQWXPwjPabJwLE8Cjn/OIi7fL0colZs+fb8sFU8AsaS1Zilcapbdf Wpe12GOLGuJegYWo6rWcYV2uBnjslOU6Ecznw1Eq9naMhOGX6l/XnGyXE5ToHH1paWxiCm hllDyW9HeGc2xs/GDiI46n3KTD1f7aQ= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-351-iOdTimzhNO2_CqfpCe2X7A-1; Thu, 07 Sep 2023 09:01:55 -0400 X-MC-Unique: iOdTimzhNO2_CqfpCe2X7A-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2be51691dd5so10224331fa.3 for ; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091712; x=1694696512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qmixq+DPUWzXn9es08YKOqzSkEEgLhEbQB5clQHVKAY=; b=b2BdpqbPrK3vZ9Cgcsp8C+rFji7gXjZR8XZ8zOpGB2iFJppDerHKIXWFIg6UA7SWIJ o4MhYNJ7r5b5ecS90wCzoE+UV7pV96pne6hsioSNlprF+tpa5RTR2czE2uYxFGKitn9v BDCvbKF+TgiunNtPcGYVPC1GrXZf0MZZcEE3EGYmvX5AEmDT8vh9JpK0Juz3scSS1QBf EhZUumiZuawNK9LdqrmtDXLf0s6ak5wJpHszgVXjU5tiAuuwZ+VOTvfcSfpmlX9YrcLu +Wg3YtQ6uulEwP3xh14wDXzD7MI1ZgyZ/KfKeN4CziBJCPjEYAYfj+9TgMfCh2wngwUS H3hQ== X-Gm-Message-State: AOJu0YxXd3le0Yj1szb5NDoPSnFaMDX2904dROEm7es1GGSCK8LN+9Sd S22UCUDWemHMjhjLUjJGcG60WIP535ugtBotvlaj3O4nTUDu8eFWXzrK5vT4XKK4vA8FSOPFBYe oTRBcucPQxYOYkKcI+1EQHcGjhXYazxlsvoK7HnIY/ZL5Tk6owrtc7YrOgQ2BJlMrU+rBRURAVz 4= X-Received: by 2002:a2e:300e:0:b0:2ba:18e5:1064 with SMTP id w14-20020a2e300e000000b002ba18e51064mr4128676ljw.14.1694091712368; Thu, 07 Sep 2023 06:01:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxiEh7n2u3oqq7II17cEomHS9MIIv2eBGbWsUy8DMxvhmEQw8IkqzDZ+j7sTAp33XT1/y0fA== X-Received: by 2002:a2e:300e:0:b0:2ba:18e5:1064 with SMTP id w14-20020a2e300e000000b002ba18e51064mr4128656ljw.14.1694091711913; Thu, 07 Sep 2023 06:01:51 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y11-20020a05600c20cb00b003fc080acf68sm2455738wmm.34.2023.09.07.06.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 46/51] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets Date: Thu, 7 Sep 2023 14:59:55 +0200 Message-ID: <20230907130004.500601-47-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé kvm_arch_get_supported_cpuid() / kvm_arch_get_supported_msr_feature() are only defined for x86 targets (in target/i386/kvm/kvm.c). Their declarations are pointless on other targets. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-11-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 5 ----- target/i386/kvm/kvm_i386.h | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index ebdca410527..a578961a5e4 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -464,11 +464,6 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension); kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, &cap); \ }) -uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, - uint32_t index, int reg); -uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); - - void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len); int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr, diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index ff309bad25f..b78e2feb498 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -40,6 +40,9 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); void kvm_arch_reset_vcpu(X86CPU *cs); void kvm_arch_after_reset_vcpu(X86CPU *cpu); void kvm_arch_do_init_vcpu(X86CPU *cs); +uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, + uint32_t index, int reg); +uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); void kvm_set_max_apic_id(uint32_t max_apic_id); void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); From patchwork Thu Sep 7 12:59:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CNDCatb8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKW11lYwz1ygc for ; Thu, 7 Sep 2023 23:15:57 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Yq-Cg; Thu, 07 Sep 2023 09:02:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe2-0004aK-4t for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdz-0007Wz-Mf for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091718; 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=A7Xqf7ZLFg5wkXV1H3hDfFHEBrjbErGhe3RTeVJ2jls=; b=CNDCatb8vT/rBlpiU8b/r63zkor3xtq0AZHvEGXnknh7BksYQ9z6cOJAL7U5Rf/32Nxz8b Q3d2/djQTj0BIQa4VUYzNBYnH9koruanaRZzzDQ1zyCjlWKGLd+pFH1l7fb0fobLB8YEeB EqEgnN9kS/iDDFtqvVlNOsOtqGHYojY= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-44_jM1cxPGCYsNkW8D2g9g-1; Thu, 07 Sep 2023 09:01:57 -0400 X-MC-Unique: 44_jM1cxPGCYsNkW8D2g9g-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f5df65fa35so6186265e9.3 for ; Thu, 07 Sep 2023 06:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091714; x=1694696514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A7Xqf7ZLFg5wkXV1H3hDfFHEBrjbErGhe3RTeVJ2jls=; b=jwx8xIbtNFmVeB39dxhntrfMqXdVuT60zONrfnQfnCMx1zhLw3QkfWtpzbP/PPZ7Wo Cs+WmJcSCLnImWCdSIZUpcLnsd2oyPUni9gub6cietgr+InM1HxarW/zXaVz9sF0AoN5 FNB+ajlp06Cd+AmiEqZ134JtJVfddkRo3usV5CAl3M2JAcREuzf81irjW7nnj9Z0Ey4b /4dqpYnJyNfTFlsQek/it7Npdf+JcrJbVTKr2SxK+Lj3DN+s9NnpMMni6EehfhTqs+fc LikRLk+zjZ16uBSp6CW0E6mvIgodPzg+vLw870ULxoASUeIEFGsy+Tms6pmBdB0VWQbn YYoQ== X-Gm-Message-State: AOJu0Yyy87pjjXexyzXcOLTr/RMZjazm9FuDBkyvlpQ00ho144eRglGE +g4SQdW0JXaNZ2dw6y7VTi+Y+tW/XR7avsJZHJP7N89Y9I7T71EnIFcviwgmw84YhAjTbM8HupW d20iKxSNZHBgNH90HSH97RCba68l20YOpOgSe8rgleHzOu0mu3a8vQX6wiURkzlUfm3guoir6FM w= X-Received: by 2002:a05:600c:2285:b0:3fe:d630:f568 with SMTP id 5-20020a05600c228500b003fed630f568mr4150914wmf.39.1694091714350; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwQlxsyf10iBIbYuYX/Dz8BXpNVy09nHexQUmiV1Qkh5VsZIH6v7AsTvxChzrgbSyEiNsCow== X-Received: by 2002:a05:600c:2285:b0:3fe:d630:f568 with SMTP id 5-20020a05600c228500b003fed630f568mr4150898wmf.39.1694091714002; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c294400b003fbdbd0a7desm2475470wmd.27.2023.09.07.06.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 47/51] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets Date: Thu, 7 Sep 2023 14:59:56 +0200 Message-ID: <20230907130004.500601-48-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé kvm_get_apic_state() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Since we include "linux-headers/asm-x86/kvm.h", no need to forward-declare 'struct kvm_lapic_state'. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-12-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 3 --- target/i386/kvm/kvm_i386.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index a578961a5e4..4326b53f90f 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -188,7 +188,6 @@ extern bool kvm_msi_use_devid; #endif /* CONFIG_KVM_IS_POSSIBLE */ struct kvm_run; -struct kvm_lapic_state; struct kvm_irq_routing_entry; typedef struct KVMCapabilityInfo { @@ -407,8 +406,6 @@ void kvm_irqchip_add_change_notifier(Notifier *n); void kvm_irqchip_remove_change_notifier(Notifier *n); void kvm_irqchip_change_notify(void); -void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); - struct kvm_guest_debug; struct kvm_debug_exit_arch; diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index b78e2feb498..d4a1239c68e 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -54,6 +54,7 @@ bool kvm_has_adjust_clock_stable(void); bool kvm_has_exception_payload(void); void kvm_synchronize_all_tsc(void); +void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); void kvm_put_apicbase(X86CPU *cpu, uint64_t value); bool kvm_has_x2apic_api(void); From patchwork Thu Sep 7 12:59:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830905 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B3bEX4E2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKQN5SF1z1yh1 for ; Thu, 7 Sep 2023 23:11:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeg-0006rP-A7; Thu, 07 Sep 2023 09:02:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe7-0004fG-0d for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe3-0007Xp-IT for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091722; 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=AIIvR3K4rXWSNaWNDTeRXv+dkuqfOIauPPV/2IMVpP4=; b=B3bEX4E25DJR+mVmTEjY5RIryD/vZLJkSDX2hNqzk14n+eMVdmAHRLAoIsljEAYytGijEU rW2S8FCbVF21yY5ZyNyEbkvE8VH9H/uwE8DLYug4vgHL0Ewn4beC4lCTKzAT8vrcFRsSRW lGyXjYSk6mrK+j7TVDe57y3d1G0FSmU= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-m1YurfUkOiiPL3wqtNeroA-1; Thu, 07 Sep 2023 09:01:58 -0400 X-MC-Unique: m1YurfUkOiiPL3wqtNeroA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4011fa32e99so6681815e9.0 for ; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091716; x=1694696516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AIIvR3K4rXWSNaWNDTeRXv+dkuqfOIauPPV/2IMVpP4=; b=TLgH7T1FlvfOAwVMdD8SsCtpbLHnR8obyUuodQNzytEx6NWTV1zt524GO3tpm4qcNH NVWU1Cl/Kw3q4DXh80Pg9R+5voHxUyOX4qZGLqNwwU/2uA2+J8rQLfyyWu9F+Uuvxy4K nRUVXDTCLfq+IQLmCaL9VSX2RuMH1Q3f2617l/ppcMXiG6rutVeOvzgr9o1Vyua29NoO yPWSq51b3J5J9Ot5BtZIKlZiyRjoM+s94Yv0DdgVZVVLxX4mclweDnQC6oqKvh6xZJNs JMzfpobKh+xEewFXjU9Rs2xNcz9/nOr+8Ro9IcuU98MjLfGyWsKSD4pypCYYzzAm6r4J qlYw== X-Gm-Message-State: AOJu0YwBwFuHXXB0yUwOx6OGG+Ht59nksMfrAl3xRKjwjdNBS+t4O2lD XxlQ2F+eRJC7UD1CoegX4f8b/yHmw8O/QoLAO6qOLR42yAyxsODi+vHfMGBuLcHwJ3Db9J2x5D/ DzrsCop6JewP23RodPyc/IdZ07aEgiVdGYo19pF1+TbOIKfbtqf7Mrirc/svlFkHfbY6Jk+F0ZW 8= X-Received: by 2002:a05:600c:249:b0:400:6bee:f4fe with SMTP id 9-20020a05600c024900b004006beef4femr4610441wmj.21.1694091716273; Thu, 07 Sep 2023 06:01:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElZ43KvTRb+B5vJWThxxqrOJW05UO+FdfFniiWolMYa512bFUTThm2jPTKys6X4mmj+TuM/w== X-Received: by 2002:a05:600c:249:b0:400:6bee:f4fe with SMTP id 9-20020a05600c024900b004006beef4femr4610429wmj.21.1694091715951; Thu, 07 Sep 2023 06:01:55 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l12-20020a7bc44c000000b003fe61c33df5sm2457667wmi.3.2023.09.07.06.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 48/51] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets Date: Thu, 7 Sep 2023 14:59:57 +0200 Message-ID: <20230907130004.500601-49-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé kvm_has_pit_state2() is only defined for x86 targets (in target/i386/kvm/kvm.c). Its declaration is pointless on all other targets. Have it return a boolean. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-13-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/kvm/i8254.c | 1 + include/sysemu/kvm.h | 1 - target/i386/kvm/kvm.c | 4 ++-- target/i386/kvm/kvm_i386.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 6a7383d8774..a649b2b7caf 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -34,6 +34,7 @@ #include "hw/timer/i8254_internal.h" #include "hw/qdev-properties-system.h" #include "sysemu/kvm.h" +#include "target/i386/kvm/kvm_i386.h" #include "qom/object.h" #define KVM_PIT_REINJECT_BIT 0 diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 4326b53f90f..147967422f4 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -221,7 +221,6 @@ int kvm_has_vcpu_events(void); int kvm_has_robust_singlestep(void); int kvm_has_debugregs(void); int kvm_max_nested_state_length(void); -int kvm_has_pit_state2(void); int kvm_has_many_ioeventfds(void); int kvm_has_gsi_routing(void); int kvm_has_intx_set_mask(void); diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 639a242ad8c..e5cd7cc8061 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -154,9 +154,9 @@ static KVMMSRHandlers msr_handlers[KVM_MSR_FILTER_MAX_RANGES]; static RateLimit bus_lock_ratelimit_ctrl; static int kvm_get_one_msr(X86CPU *cpu, int index, uint64_t *value); -int kvm_has_pit_state2(void) +bool kvm_has_pit_state2(void) { - return has_pit_state2; + return !!has_pit_state2; } bool kvm_has_smm(void) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index d4a1239c68e..76e8f952e5f 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -33,6 +33,7 @@ bool kvm_has_smm(void); bool kvm_enable_x2apic(void); bool kvm_hv_vpindex_settable(void); +bool kvm_has_pit_state2(void); bool kvm_enable_sgx_provisioning(KVMState *s); bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); From patchwork Thu Sep 7 12:59:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830891 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XH4MZdkd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN96wTMz1ygR for ; Thu, 7 Sep 2023 23:10:01 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEel-0007Zv-QU; Thu, 07 Sep 2023 09:02:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe7-0004fr-2A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe3-0007Xn-CC for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091722; 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=dnYWCqXFYjnf7iiegsI+BpRqPdw9Nfqs+eiyxPvUq20=; b=XH4MZdkdkB4RYaLdPC+GrrZUYZ6U7ZR+BvSvVBlmtkTx2enJACuHUkr3PNX1ZKXqDgK68x ECEgnqUhTjArQ3mIz/zjVBP6LHHGn0nLmkaCyp9YzvPUlMjU1u1iEgXQbIszgL85yh/gys c7zepviYi6bSsfNj2Uh+4obxICVER7w= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-SUrJEXPzM1OdLuOv1i79-g-1; Thu, 07 Sep 2023 09:02:01 -0400 X-MC-Unique: SUrJEXPzM1OdLuOv1i79-g-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f5df65f9f4so6541135e9.2 for ; Thu, 07 Sep 2023 06:02:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091718; x=1694696518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dnYWCqXFYjnf7iiegsI+BpRqPdw9Nfqs+eiyxPvUq20=; b=Sn/kw7dKJVL/Avj69KeuS3w17W9IytF2Yz7dJEl4qN9cUN6QxDdEFfo323xEWI1n/X oS8Igf/S8pEMhm+/YfAL485G8Ijx5PaR88vlziEjEWgCCNsnrpUiex6PDvzfHgX+3O6I c+P5rtbW8wI1O5OS2ophkJm5eWfGFOlCU7EK1FO4sLcdVp3jEw3s91FRGyY/zZ5JRjJ6 /yULX4dktGztceNCTD16CaiM/k1iHeBvN8dttfLHkFfGOjsplN0SxcwiVAYQx7L6NU/V nZPW7NzCl5qAdw1f23lQbFWC+I36sDU5wMtUDhnHSDriYkiyzc2NfTmg+WjR6T7AyNvn hDhQ== X-Gm-Message-State: AOJu0YyWto9lMUMu6qd1yU6ioWWKjR5q7SkMHePDTLMX09SK7n1GVyfJ mx17JHblpPm7YeTsXRDFhWtkd5DPpfjFIIjtTx6C2SA6LmnNN4OE3CF8KSrO11MpTirpgtBie1Y oW8+8sNJdUl1zsXGN1E8jsKMzep70bFuX9Lxt0sk7FNgas0L6BTsA3aRes7DTetBp7adkssNP+j A= X-Received: by 2002:a7b:c7c7:0:b0:400:57d1:4910 with SMTP id z7-20020a7bc7c7000000b0040057d14910mr4480993wmk.17.1694091718427; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbtsyXh/oj9l9KT4XaBwVZs5dOrL/bKVQ6jKZ9oP/mao/eF7BrlF7C1nNRyq1I1Srllkgkeg== X-Received: by 2002:a7b:c7c7:0:b0:400:57d1:4910 with SMTP id z7-20020a7bc7c7000000b0040057d14910mr4480975wmk.17.1694091718090; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id c7-20020a5d4147000000b0031de43fe9bfsm23505088wrq.0.2023.09.07.06.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 49/51] sysemu/kvm: Restrict kvm_pc_setup_irq_routing() to x86 targets Date: Thu, 7 Sep 2023 14:59:58 +0200 Message-ID: <20230907130004.500601-50-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé kvm_pc_setup_irq_routing() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-14-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/kvm/ioapic.c | 1 + include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index cd5ea5d60b1..409d0c8c766 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -16,6 +16,7 @@ #include "hw/intc/ioapic_internal.h" #include "hw/intc/kvm_irqcount.h" #include "sysemu/kvm.h" +#include "kvm/kvm_i386.h" /* PC Utility function */ void kvm_pc_setup_irq_routing(bool pci_enabled) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 147967422f4..ee9025f8e9e 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -514,7 +514,6 @@ int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, qemu_irq irq); void kvm_irqchip_set_qemuirq_gsi(KVMState *s, qemu_irq irq, int gsi); -void kvm_pc_setup_irq_routing(bool pci_enabled); void kvm_init_irq_routing(KVMState *s); bool kvm_kernel_irqchip_allowed(void); diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 76e8f952e5f..55d4e68c342 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -78,4 +78,6 @@ bool kvm_filter_msr(KVMState *s, uint32_t msr, QEMURDMSRHandler *rdmsr, #endif /* CONFIG_KVM */ +void kvm_pc_setup_irq_routing(bool pci_enabled); + #endif From patchwork Thu Sep 7 12:59:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fGNafF2Z; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN14fH6z1ygR for ; Thu, 7 Sep 2023 23:09:53 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEek-0007Rp-8w; Thu, 07 Sep 2023 09:02:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEeF-000535-NW for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEeD-0007Ys-EF for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091732; 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=KivVqRpe5KN2+Ci3kMr9KmNlhmNtvTwUcH6R6cGFsIU=; b=fGNafF2ZHF4qwwAVknjn/Vvk3u00smHGibgBHHL+PPURITGIkG1U40O0luWIIx8xkvL182 uGIdTDXpipfhx6Rq9xRoveQU8n18y5YrD1xLja8SLjmfvw3QrZK+sOG1ikavBLogXYklEL ZyxQ+Liv1u/Dn3IUNxk4J2RWMKM8VeU= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-685-PZo3rAnmNfqGUkp1Iw6GZg-1; Thu, 07 Sep 2023 09:02:04 -0400 X-MC-Unique: PZo3rAnmNfqGUkp1Iw6GZg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-401d8873904so7464115e9.0 for ; Thu, 07 Sep 2023 06:02:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091721; x=1694696521; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KivVqRpe5KN2+Ci3kMr9KmNlhmNtvTwUcH6R6cGFsIU=; b=BimAtaICn7LNXeRtjgmSwoHnE23pF6VmRBgVujdyY2biLebR2wi9N9Ap7gHppVDqLH cQFMnzKleJrE8OHJHaIdyXP4yEYxJDzK8aZouS6cZF/Y8KyPeuXXd6KfZO8UC8zGgfyE eICWoDcRShIE+m5QySSv3ebsh35AVR+0MEnpr/VQYcqOdnE+9NCd42jrZXy4IMzfBzsB A1pFmik0h5eKpYQrgBlPfchp24nRjf55y9IiMBfHO1IPLyaHfft6ExIEXPqkUW3PKN1m BAZ2kr9LdtzLtljmLgXD2u4vq+GtAtjE7PdFX8vK3EguzmFotEdL2hxcWZhoCgQ8um4w ROfg== X-Gm-Message-State: AOJu0YwUYpVDIM3j47vp47id5oTJYVECWeixLZFNMFZu1ceWSZo/S+Jv 9lUzCLZDFhnML81qXE6bO9VCXMEXSP0PJuP2iF7R7J5CDy5O96NUeip8QEsDdwCCdyRzywK0V5A HMQf+/1D9+2gNhkW7z2+aETydJ412b8d2l0CzVlJafMH4NP2gJx0Dsf3vNdDA9ZX5K5xkVXh7OM o= X-Received: by 2002:a05:600c:378c:b0:401:8225:14ee with SMTP id o12-20020a05600c378c00b00401822514eemr4715530wmr.41.1694091721775; Thu, 07 Sep 2023 06:02:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoM+3phtLz17MuQIQvLSy4FxMANouEawcZiiwBeWrwe0+3whjCP99GMmqaz7c0AaYFo4laNw== X-Received: by 2002:a05:600c:378c:b0:401:8225:14ee with SMTP id o12-20020a05600c378c00b00401822514eemr4715515wmr.41.1694091721477; Thu, 07 Sep 2023 06:02:01 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id z14-20020adff1ce000000b0031c855d52efsm23174798wro.87.2023.09.07.06.02.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:02:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 50/51] subprojects: add wrap file for libblkio Date: Thu, 7 Sep 2023 14:59:59 +0200 Message-ID: <20230907130004.500601-51-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download. Signed-off-by: Paolo Bonzini --- subprojects/libblkio.wrap | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 subprojects/libblkio.wrap diff --git a/subprojects/libblkio.wrap b/subprojects/libblkio.wrap new file mode 100644 index 00000000000..f77af72210c --- /dev/null +++ b/subprojects/libblkio.wrap @@ -0,0 +1,6 @@ +[wrap-git] +url = https://gitlab.com/libblkio/libblkio +revision = f84cc963a444e4cb34813b2dcfc5bf8526947dc0 + +[provide] +blkio = libblkio_dep From patchwork Thu Sep 7 13:00:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1830888 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z7vMda7R; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RhKN34pNgz1ygR for ; Thu, 7 Sep 2023 23:09:55 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeg-0006rK-Ad; Thu, 07 Sep 2023 09:02:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEeI-00056M-Ka for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEeE-0007Z3-V7 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091734; 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=pKDzeQlctpkUAsMmGfN8p0M9I6HUXPerO0NUMxheatc=; b=Z7vMda7RJUZq4cMAP2elgJCQWnNW7rNcAFIzYpxFxvcESHJvUv/4gltuLRIlMxBaCZ3P4i s9VW1pU95C7aQzBty2zSnVZqVcvEpMiERw5ycYOPPUyLrfb06JwtS96Z6ZPf7rlvHV73go H8dZTmEaN9EcCOIWRsCl5VJ3BMLfC8E= 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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-AHSUkkbNPReyjMeTvJJv5w-1; Thu, 07 Sep 2023 09:02:07 -0400 X-MC-Unique: AHSUkkbNPReyjMeTvJJv5w-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fe1dadb5d2so6919535e9.1 for ; Thu, 07 Sep 2023 06:02:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091723; x=1694696523; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pKDzeQlctpkUAsMmGfN8p0M9I6HUXPerO0NUMxheatc=; b=NsgbGDFN8yWSFyobeUKEz1eU9PegCW3CN8NBlMcojXk/Tb+iXgmnEnDvpcCN7ma/Qg H5N383N8+zhunLdgU47U5d1mVwgvoZskMSNO0GSpmB6efFJD9lwK16/jGBC33IFqkSIl 4T2nvd2HxVqNTJP93O0XE+FlzqbPKa3NAgq7QaBRsXims41FWcYjIPqumxQ42Lzb7DA/ yo4VWjNV1vpfPPMmZf56jPfcR0yoTWDHqIRzS8uthza+r9e9+UckibopaRR6ovi/1/ab gMQXXh1oZZ0SHIJx/TSWNXlCcj3YeAIpL/2iUQ8TCBEmdfhSYmcKYatVcCC1LmQTktnp 4hJA== X-Gm-Message-State: AOJu0YwJWXQbopUSAjzNqJnCMpkY6l8K0W/XtghrG0fRqeGT6P1TIi4p aHH7CyfIq5kc4/0sab5Hjcqe8+G28AQbT/qnVoxYNrG+nhlQOJcIknvb/pcI4LZ3Miq6uhNU8+W H+eI53tQMfvtzrIV5DEa3LizPhwi0CT4g+KNHsZM9mdjhK0P0QXSewmkFxFP/gJRUv15r9SG86n s= X-Received: by 2002:a7b:c8d6:0:b0:401:4c61:90ac with SMTP id f22-20020a7bc8d6000000b004014c6190acmr5058151wml.11.1694091723618; Thu, 07 Sep 2023 06:02:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExU/oI2neSkm8bqrOHI8OYHRclQ7ocSMwwwxfuwHaaftKMd3OQVTpavSGuSEtvCgHI1wta5w== X-Received: by 2002:a7b:c8d6:0:b0:401:4c61:90ac with SMTP id f22-20020a7bc8d6000000b004014c6190acmr5058128wml.11.1694091723314; Thu, 07 Sep 2023 06:02:03 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id m18-20020a7bce12000000b003fc01189b0dsm2436081wmc.42.2023.09.07.06.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:02:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PULL 51/51] docs/system/replay: do not show removed command line option Date: Thu, 7 Sep 2023 15:00:00 +0200 Message-ID: <20230907130004.500601-52-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Cc: qemu-trivial@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- docs/system/replay.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/replay.rst b/docs/system/replay.rst index 3105327423c..ca7c17c63da 100644 --- a/docs/system/replay.rst +++ b/docs/system/replay.rst @@ -181,7 +181,7 @@ Audio data is recorded and replay automatically. The command line for recording and replaying must contain identical specifications of audio hardware, e.g.: .. parsed-literal:: - -soundhw ac97 + -audio pa,model=ac97 Serial ports ------------