From patchwork Mon Dec 21 14:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tMAz42rp; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Mt2YyRz9sVw for ; Tue, 22 Dec 2020 01:46:00 +1100 (AEDT) Received: from localhost ([::1]:39912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMRh-0004hD-6G for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:45:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQe-0004gs-Rp for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:52 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQd-0007bw-Dq for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:52 -0500 Received: by mail-wm1-x331.google.com with SMTP id q75so11187841wme.2 for ; Mon, 21 Dec 2020 06:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dlm6bXWaBbuv+Ol2HceMiiYjxW7VEJXnt7yRt9Kk1sI=; b=tMAz42rp1BCf4WjgaIbz7YsZZaMH5qwc079e17akhilZJTCppDd+VyQu5UUQCZ1YWL aydvfo4yZhXUf/Yn/w9VqGTlbq+9sjpIBkSuxf4oSV4p1SIztr9imVqu002LGVvGA39s i4voSkMPkp5m5NDqly5t2XyGhfbdKWp9Nb8V3Ed3yHEZYqd4xM+Up2/0qPvVkp2B1CNj IcTTtCeZzNbj9XPgvg/KzMxPtipQuZSwH30XEHyV7HZXSf3xAVra99yRp0Lb/UvNN9tx hY5eowrkEo7FW4KCe8GOHRWoclfsW2onfO6REieHzafZ55xmlMpOkjVlA0YhO0A3iiTU IftQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Dlm6bXWaBbuv+Ol2HceMiiYjxW7VEJXnt7yRt9Kk1sI=; b=ZhAjBNSAHQIH3ewY2hP0RFCzAyJz3g/rXt0lcteDKDC67OnhuvZ+rO97dx0PQ8iFnN GKKZOV1PgTScWYEuU3YLLEzEPPqei976oKV9aAQ80PuIAo2DzR+W9YbPXNkMbAos6aNZ q0DDPE9ifLUmvN1OcrkJjiwJGQTTOgqG+yofsUF6wj64K6Zc+b4yafoXvImh3HgQI6TQ MB7FZOga4mkYVOfNDpkhhX3tZEi14FR496nXHbxYN2NIV5cuzcu/3Zm50JM7WO5h0HhL 1gs/HN0M9WFC/nyCfMlp2G/AJZGLxhad0tpSlWUg/aLbIa48exjn0PIjllWaCq43hjGt K6fQ== X-Gm-Message-State: AOAM5309g0utS3DTT30MKFwHGwdG9pHP1jTonjM4Zr0eNC9gtgE8OWFI 5FWENCimMJ0bN6Fk9bgMaOOyYubJU0U= X-Google-Smtp-Source: ABdhPJzfqXmOsZq1ENON6Z9i/m6Yt06fE6Ys4R+Ckmk20GcO/R2oFvV9sVP1OCXDVF1bgMIYWPabXg== X-Received: by 2002:a1c:4d12:: with SMTP id o18mr17270621wmh.114.1608561890148; Mon, 21 Dec 2020 06:44:50 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/55] gitlab: include aarch64-softmmu and ppc64-softmmu cross-system-build Date: Mon, 21 Dec 2020 15:43:53 +0100 Message-Id: <20201221144447.26161-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Otherwise we miss coverage of KVM support in the cross build. To balance it out add arm-softmmu (no kvm, subset of aarch64), cris-softmmu and ppc-softmmu to the exclude list which do get coverage elsewhere. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20201210190417.31673-3-alex.bennee@linaro.org> --- .gitlab-ci.d/crossbuilds.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index bd6473a75a..fcc1b95290 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -7,9 +7,9 @@ - cd build - PKG_CONFIG_PATH=$PKG_CONFIG_PATH ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-user - --target-list-exclude="aarch64-softmmu i386-softmmu microblaze-softmmu - mips-softmmu mipsel-softmmu mips64-softmmu ppc64-softmmu sh4-softmmu - xtensa-softmmu" + --target-list-exclude="arm-softmmu cris-softmmu i386-softmmu + microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu + ppc-softmmu sh4-softmmu xtensa-softmmu" - make -j$(expr $(nproc) + 1) all check-build # Job to cross-build specific accelerators. From patchwork Mon Dec 21 14:43:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BECO+yOG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Mt55Cdz9sW0 for ; Tue, 22 Dec 2020 01:46:02 +1100 (AEDT) Received: from localhost ([::1]:39958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMRk-0004j9-KY for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:46:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQg-0004hT-IA for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:54 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQe-0007cn-8M for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:54 -0500 Received: by mail-wr1-x430.google.com with SMTP id 91so11311741wrj.7 for ; Mon, 21 Dec 2020 06:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TUIOh4Q+WvEg2+2buyUeFeWSyxEP3rr0TYbdSrhdRw4=; b=BECO+yOG+vI/hYg6ddf9g7aqWDpPAXsB5O5nQiJNXOpjafZmpdgJqg9xrb5Nm3KLqJ s79F+JwfPj1BmGMslJVKopkvdCsLVmpOD4/zebJyGDVB1fugBJY6AbTiPAMIWa/gI83V KklpyhOAMfes1ryA9en0Wgo3Li1Or/fF+gWoeURTJqRvzjo7Jk4rk4cDyv1623ijkU1G DF3IUcF4ca9AglqmOk5jyCLvJy/ftRq0bjXM/ojduWFtYXCmo1pzztCHVeAthtlOvDN2 5rI/bBwEX9l1PWzWMGf7BuyNterQR8V3EM0GIsvwYqov4KNbXXS04pev1djLkLkZBAZQ BOGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TUIOh4Q+WvEg2+2buyUeFeWSyxEP3rr0TYbdSrhdRw4=; b=FLYQ8tK3PzTmtTdporbecm0QNsY3x8R5mR2kMq9zqoV9ds09uUjs1AbwyUfb1WHt1I JinA1K4a+oRh7QNm8cXVdF5hMMYIgV/Rcodjv/2J5JycQMhdTII+hNKCkSqK54fA/4Ed EOPLhJmLsIsf3akcN4ElKX52ON2qTEQInbEXbICDWe686eYUWFxmTwHeL9QwqbFId6kb t/vpZl5KZhfB+H1HQ743cQ/Wg7BRfhoAUGpGMXdZB/CnHLCje7zOr50Q2Z63Oh0S/p/t 5G6OpB8wcy8gTcSsc9BWORHKr+Ztl9qzANW6eNY4GfS9/wc7U4sqQJZ4afc6Mkf3poS6 5qhA== X-Gm-Message-State: AOAM531d/8gDBfwft1PGLkrCDDYCiFrqRPq3gy6civGhWw8/Fe8sZQOV iMwX2s2pdU3ZQXnbE26DVP67jd65f40= X-Google-Smtp-Source: ABdhPJxYA89aK7KswgQn/QXxwUlWt0URNBjZRAFDLQY/ZyQiefp3n0axW0Nmk3jxU6tpX4wJG3mWnQ== X-Received: by 2002:a5d:4905:: with SMTP id x5mr18778726wrq.75.1608561890980; Mon, 21 Dec 2020 06:44:50 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:50 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/55] configure: move gettext detection to meson.build Date: Mon, 21 Dec 2020 15:43:54 +0100 Message-Id: <20201221144447.26161-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée This will allow meson to honour -Dauto_features=disabled later. Suggested-by: Paolo Bonzini Signed-off-by: Alex Bennée Acked-by: Paolo Bonzini Message-Id: <20201210190417.31673-4-alex.bennee@linaro.org> --- configure | 19 +++---------------- meson_options.txt | 2 +- po/meson.build | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/configure b/configure index c228f7c21e..134f5de5ab 100755 --- a/configure +++ b/configure @@ -448,7 +448,7 @@ libdaxctl="" meson="" ninja="" skip_meson=no -gettext="" +gettext="auto" fuse="auto" fuse_lseek="auto" @@ -1016,9 +1016,9 @@ for opt do ;; --enable-vnc) vnc="enabled" ;; - --disable-gettext) gettext="false" + --disable-gettext) gettext="disabled" ;; - --enable-gettext) gettext="true" + --enable-gettext) gettext="enabled" ;; --oss-lib=*) oss_lib="$optarg" ;; @@ -2847,19 +2847,6 @@ if test "$xen_pci_passthrough" != "disabled"; then fi fi -########################################## -# gettext probe -if test "$gettext" != "false" ; then - if has xgettext; then - gettext=true - else - if test "$gettext" = "true" ; then - feature_not_found "gettext" "Install xgettext binary" - fi - gettext=false - fi -fi - ########################################## # X11 probe if $pkg_config --exists "x11"; then diff --git a/meson_options.txt b/meson_options.txt index 74ac853548..f8f053b5c8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,7 +9,7 @@ option('sphinx_build', type : 'string', value : '', option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') -option('gettext', type : 'boolean', value : true, +option('gettext', type : 'feature', value : 'auto', description: 'Localization of the GTK+ user interface') option('install_blobs', type : 'boolean', value : true, description: 'install provided firmware blobs') diff --git a/po/meson.build b/po/meson.build index 1387fd979a..a863f0575f 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,6 +1,6 @@ i18n = import('i18n') -if get_option('gettext') +if find_program('xgettext', required: get_option('gettext')).found() i18n.gettext(meson.project_name(), args: '--msgid-bugs-address=qemu-devel@nongnu.org', preset: 'glib') From patchwork Mon Dec 21 14:43:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419066 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sn20pyxP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Vm6M4Nz9sVn for ; Tue, 22 Dec 2020 01:52:00 +1100 (AEDT) Received: from localhost ([::1]:56824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMXW-0003k0-PU for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:51:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQi-0004iK-0e for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:56 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:42785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQf-0007ct-4y for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:54 -0500 Received: by mail-wr1-x429.google.com with SMTP id m5so11277937wrx.9 for ; Mon, 21 Dec 2020 06:44:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=sn20pyxPSZu4hBjOh/AYbZrRSZe0VJRFxd/MWd9Y1XBQSAj8YPOUOxIm4oW/eWwuxC iHW5FCbwQtom0TUhenpM1LMKL6FJR9isCdFkOSZHqJc2/K+/OApifRfTo6Tv8x61T3U3 6b4X/FT4UZK+AoHkWXPwc0m995n3c+ZBTAUXz5vM+8wV+g9kvrMG6gMHBjwP9PbJ3V8r ygXH3K+Pp1fsvgsFwVUC4Cka7ODDxV0WuVn6sL46SPuTT4aFI0zlkrTERQ2KgTWRQ4gD fW+S7uefKove0dDgPwt5PkI/LEz8Ige+TfIOUSQ88cHLeindXXoIpUHMuKGuORUQXwXk ZZZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=GkkL/SJpp61WHHGCbGQZkY/k3nDupO8+5/mjOuMlX6bznJmyuXF2UCh/OCWdklSARM ZUqMTKAA2zMqAsvvSjf7ya/aR5AuZOGcHvDoCCCDIidovQ+tm3UVjJmOr5M3nAmOHErH mSqptKi7F7xoj4YseedXQstawB1uFuR96XqEt2MiNuJEYHDEEwiaKpMaR+bt8SQCP/EZ SQYhXxJPGKWE+Vbd3oR8H57LWqBMLxCs5vUtQQeH1y9nHbV+ZZjcjAuRC7+ZxG0Vn2FG APG2LQy606N527rgL9UJ0T0NERs1MfOg0Jfq3XOrRJorrEwL752gvEbfqJ/pCXTNnNmQ 5sdA== X-Gm-Message-State: AOAM532S3ubQX0acU9kj1M9Gysz5DN0S/srZB7dK2cOG/nF8P0D0F+Z9 0GnQi09Mw+nAwmo8f/1OW9y1b+CeCUs= X-Google-Smtp-Source: ABdhPJx+6F406V0zzTNKGXS82Dw7k7eVOR/Cw4avUjyrgHci9K0DZCe9bnxiPVVEgx99A4nwaTxCrA== X-Received: by 2002:adf:c64f:: with SMTP id u15mr17132921wrg.270.1608561891800; Mon, 21 Dec 2020 06:44:51 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:51 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/55] configure: add --without-default-features Date: Mon, 21 Dec 2020 15:43:55 +0100 Message-Id: <20201221144447.26161-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée By default QEMU enables a lot of features if it can probe and find the support libraries. It also enables a bunch of features by default. This patch adds the ability to build --without-default-features which can be paired with a --without-default-devices for a barely functional build. The main use case for this is testing our build assumptions and for minimising the amount of stuff you build if you just want to test a particular feature on your relatively slow emulated test system. On it's own I go from: $ ls -lh qemu-system-aarch64 -rwxr-xr-x 1 alex alex 120M Dec 10 12:45 qemu-system-aarch64* $ ldd qemu-system-aarch64 | wc -l 170 to: $ ls -lh qemu-aarch64 -rwxr-xr-x 1 alex alex 43M Dec 10 12:41 qemu-aarch64* $ ldd qemu-system-aarch64 | wc -l 57 which is still able to run my default Debian ARM64 machine with a lot less fat involved. Signed-off-by: Alex Bennée Acked-by: Thomas Huth Acked-by: Paolo Bonzini Message-Id: <20201210190417.31673-5-alex.bennee@linaro.org> --- configure | 155 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 85 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 134f5de5ab..a5ee2d2a06 100755 --- a/configure +++ b/configure @@ -293,8 +293,19 @@ unset target_list_exclude # Distributions want to ensure that several features are compiled in, and it # is impossible without a --enable-foo that exits if a feature is not found. -brlapi="" -curl="" +default_feature="" +# parse CC options second +for opt do + optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') + case "$opt" in + --without-default-features) + default_feature="no" + ;; + esac +done + +brlapi="$default_feature" +curl="$default_feature" iconv="auto" curses="auto" docs="auto" @@ -303,52 +314,52 @@ netmap="no" sdl="auto" sdl_image="auto" virtiofsd="auto" -virtfs="" +virtfs="$default_feature" libudev="auto" mpath="auto" vnc="enabled" sparse="auto" -vde="" +vde="$default_feature" vnc_sasl="auto" vnc_jpeg="auto" vnc_png="auto" xkbcommon="auto" -xen="" -xen_ctrl_version="" +xen="$default_feature" +xen_ctrl_version="$default_feature" xen_pci_passthrough="auto" -linux_aio="" -linux_io_uring="" -cap_ng="" -attr="" -libattr="" -xfs="" +linux_aio="$default_feature" +linux_io_uring="$default_feature" +cap_ng="$default_feature" +attr="$default_feature" +libattr="$default_feature" +xfs="$default_feature" tcg="enabled" -membarrier="" -vhost_net="" -vhost_crypto="" -vhost_scsi="" -vhost_vsock="" +membarrier="$default_feature" +vhost_net="$default_feature" +vhost_crypto="$default_feature" +vhost_scsi="$default_feature" +vhost_vsock="$default_feature" vhost_user="no" vhost_user_blk_server="auto" -vhost_user_fs="" +vhost_user_fs="$default_feature" kvm="auto" hax="auto" hvf="auto" whpx="auto" -rdma="" -pvrdma="" +rdma="$default_feature" +pvrdma="$default_feature" gprof="no" debug_tcg="no" debug="no" sanitizers="no" tsan="no" -fortify_source="" +fortify_source="$default_feature" strip_opt="yes" tcg_interpreter="no" bigendian="no" mingw32="no" gcov="no" -EXESUF="" +EXESUF="$default_feature" HOST_DSOSUF=".so" modules="no" module_upgrades="no" @@ -370,81 +381,81 @@ pie="" qom_cast_debug="yes" trace_backends="log" trace_file="trace" -spice="" -rbd="" -smartcard="" +spice="$default_feature" +rbd="$default_feature" +smartcard="$default_feature" u2f="auto" -libusb="" -usb_redir="" -opengl="" +libusb="$default_feature" +usb_redir="$default_feature" +opengl="$default_feature" opengl_dmabuf="no" cpuid_h="no" -avx2_opt="" +avx2_opt="$default_feature" capstone="auto" -lzo="" -snappy="" -bzip2="" -lzfse="" -zstd="" -guest_agent="" +lzo="$default_feature" +snappy="$default_feature" +bzip2="$default_feature" +lzfse="$default_feature" +zstd="$default_feature" +guest_agent="$default_feature" guest_agent_with_vss="no" guest_agent_ntddscsi="no" -guest_agent_msi="" -vss_win32_sdk="" +guest_agent_msi="$default_feature" +vss_win32_sdk="$default_feature" win_sdk="no" -want_tools="" -libiscsi="" -libnfs="" +want_tools="$default_feature" +libiscsi="$default_feature" +libnfs="$default_feature" coroutine="" -coroutine_pool="" +coroutine_pool="$default_feature" debug_stack_usage="no" crypto_afalg="no" -seccomp="" -glusterfs="" +seccomp="$default_feature" +glusterfs="$default_feature" glusterfs_xlator_opt="no" glusterfs_discard="no" glusterfs_fallocate="no" glusterfs_zerofill="no" glusterfs_ftruncate_has_stat="no" glusterfs_iocb_has_stat="no" -gtk="" +gtk="$default_feature" gtk_gl="no" tls_priority="NORMAL" -gnutls="" -nettle="" +gnutls="$default_feature" +nettle="$default_feature" nettle_xts="no" -gcrypt="" +gcrypt="$default_feature" gcrypt_hmac="no" gcrypt_xts="no" qemu_private_xts="yes" -auth_pam="" -vte="" -virglrenderer="" -tpm="" -libssh="" -live_block_migration="yes" -numa="" +auth_pam="$default_feature" +vte="$default_feature" +virglrenderer="$default_feature" +tpm="$default_feature" +libssh="$default_feature" +live_block_migration=${default_feature:-yes} +numa="$default_feature" tcmalloc="no" jemalloc="no" -replication="yes" -bochs="yes" -cloop="yes" -dmg="yes" -qcow1="yes" -vdi="yes" -vvfat="yes" -qed="yes" -parallels="yes" +replication=${default_feature:-yes} +bochs=${default_feature:-yes} +cloop=${default_feature:-yes} +dmg=${default_feature:-yes} +qcow1=${default_feature:-yes} +vdi=${default_feature:-yes} +vvfat=${default_feature:-yes} +qed=${default_feature:-yes} +parallels=${default_feature:-yes} sheepdog="no" -libxml2="" +libxml2="$default_feature" debug_mutex="no" -libpmem="" +libpmem="$default_feature" default_devices="yes" plugins="no" fuzzing="no" rng_none="no" -secret_keyring="" -libdaxctl="" +secret_keyring="$default_feature" +libdaxctl="$default_feature" meson="" ninja="" skip_meson=no @@ -455,7 +466,7 @@ fuse_lseek="auto" bogus_os="no" malloc_trim="auto" -# parse CC options first +# parse CC options second for opt do optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') case "$opt" in @@ -798,7 +809,7 @@ Linux) audio_possible_drivers="oss alsa sdl pa" linux="yes" linux_user="yes" - vhost_user="yes" + vhost_user=${default_feature:-yes} ;; esac @@ -942,6 +953,8 @@ for opt do ;; --without-default-devices) default_devices="no" ;; + --without-default-features) # processed above + ;; --enable-gprof) gprof="yes" ;; --enable-gcov) gcov="yes" @@ -1747,7 +1760,8 @@ Advanced options (experts only): --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin] Optional features, enabled with --enable-FEATURE and -disabled with --disable-FEATURE, default is enabled if available: +disabled with --disable-FEATURE, default is enabled if available +(unless built with --without-default-features): system all system emulation targets user supported user emulation targets @@ -6957,6 +6971,7 @@ NINJA=$ninja $meson setup \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ + $(if test "$default_features" = no; then echo "-Dauto_features=disabled"; fi) \ $cross_arg \ "$PWD" "$source_path" From patchwork Mon Dec 21 14:43:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=WgobuO1m; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02NN4q0Tz9sVt for ; Tue, 22 Dec 2020 01:46:28 +1100 (AEDT) Received: from localhost ([::1]:39960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMSA-0004jB-L4 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:46:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQh-0004iJ-WF for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:56 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:36591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQg-0007d5-0V for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:55 -0500 Received: by mail-wr1-x431.google.com with SMTP id t16so11328280wra.3 for ; Mon, 21 Dec 2020 06:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r5CLA88dOWs1evquoz1Iig9Crq4gylWOWQgpaUYxU3E=; b=WgobuO1m6lYHkViujQvRZikWUqAbuNHeLBPgwxP/20StcuD+5ObAroh1n46msg4wZH JdZvWiSqSeGG4KXc8cagS6iyOL2n3fz9Z2ipGV46JgaI41OOobgShjIOSvCE1VD7zhsQ VGiN0gEMEdt+GnmVZq/L0M5C+TrnBIi37qUQA+ETwf0i8SXXc/G3d3N5h1E0anaBADvR UkiSzZgz7+OQ9VDuSewDuBMrzj9ltOfThf9jH01QhY0/THS6XqQKwIfpDaBj7jbrqG9J CCxSQKTKpRUH8CfTZSepDRvES3CfT1jWUd5QX+AjLCET4gKGhm2U93z+M54bkVcMS97g eQPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=r5CLA88dOWs1evquoz1Iig9Crq4gylWOWQgpaUYxU3E=; b=g6fYDTkPDsYQLe+HDqLW3lt/ShktQayMx+OEo1OR/bcCwI2YD6eGouKsOcBcU7Mz1Y rfPm7D2sLYYzw5cgKeP7I3mQ4MhlHQAumFJKW3BvcL7QpxoASLer8/A9g9q7XWnTqv+/ enhkfTkNasr4zvi3p6KldqAVjAX9y0hYjuEWdR5baro0VQkBgmgn78rFGwvXd4jYQIiH ct3YX/cm1wbPypfFOh8p2Hp+Fl2Ya3dlQn887RXWUF3/XyrZ7UeM39r8xGKqpSUUZtlk ed3vpppn7PuVa0y3sxp8228pnI3qUsCv0TUN9JCuFB7/rSks2TQVxdbo7xKpasPNiVH9 PLug== X-Gm-Message-State: AOAM5307tuNW8gUFMv841DVx26RapDlFuTGW9Rg2lL1AepEHjg/mA5FR 6Vvu/rjvTwSDXO1Yk1IBUMsny0/MFVA= X-Google-Smtp-Source: ABdhPJxtetFckBc9l863tG8wro5hCOXfw8mxbwJogjTXhTdELGIl7iB+Hqee3kJCPkUgziT53stqig== X-Received: by 2002:a5d:6a4f:: with SMTP id t15mr19640933wrw.62.1608561892682; Mon, 21 Dec 2020 06:44:52 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:52 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/55] python: add __repr__ to ConsoleSocket to aid debugging Date: Mon, 21 Dec 2020 15:43:56 +0100 Message-Id: <20201221144447.26161-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willian Rampazzo , John Snow , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée While attempting to debug some console weirdness I thought it would be worth making it easier to see what it had inside. Signed-off-by: Alex Bennée Reviewed-by: John Snow Reviewed-by: Willian Rampazzo Message-Id: <20201210190417.31673-6-alex.bennee@linaro.org> --- python/qemu/console_socket.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py index f060d79e06..ac21130e44 100644 --- a/python/qemu/console_socket.py +++ b/python/qemu/console_socket.py @@ -45,6 +45,13 @@ class ConsoleSocket(socket.socket): if drain: self._drain_thread = self._thread_start() + def __repr__(self) -> str: + s = super().__repr__() + s = s.rstrip(">") + s = "%s, logfile=%s, drain_thread=%s>" % (s, self._logfile, + self._drain_thread) + return s + def _drain_fn(self) -> None: """Drains the socket and runs while the socket is open.""" while self._open: From patchwork Mon Dec 21 14:43:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=iKYJoprO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02S907Hnz9sVn for ; Tue, 22 Dec 2020 01:49:45 +1100 (AEDT) Received: from localhost ([::1]:49874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMVK-0000lt-Uh for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:49:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQj-0004j6-7A for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:57 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:35773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQh-0007dW-PU for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:56 -0500 Received: by mail-wm1-x329.google.com with SMTP id e25so11194280wme.0 for ; Mon, 21 Dec 2020 06:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YGnuMthuXcsH6OY9HMnN1qAZ8S8XpiRe9F4Rv2hYwmo=; b=iKYJoprO2vn9jAHCSORrPweZQebTvysy9SW0rfO1xll2voA3XB370cKgmMYiSeNxrA ce1APxMbnmvDtaeAvd0+Rx1PBLOLPAnna332LSuLelI58ee5x9EDhNrNe5Jk/pn1Bziu YnTfJq6qvZjyXQSv57gbv0MLNkCikfdFh2sIxhuCjki53x1w4mDpULah2Z7lmUpqWkPb 4CgDZRqwpf2pEjUslAFIzImBE3QCzk6CBWcYiGEZYvYiR2Kh0u8HgqqNHIjFysX8OTwq NFQTrw6PBeC7lbHWwfUO7zytD1I/R6c1h805LIJPP3H4cuNxzAxT1t8OzGCQHbsYa/Ne aezQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YGnuMthuXcsH6OY9HMnN1qAZ8S8XpiRe9F4Rv2hYwmo=; b=uEahopcOkrVuI+Il0JoF3VV5dHZ+SizondK0Af3lnRdTt+gEzR1TIzjpRHwJFdbtXM MmTIxUpsg+5X+iZaZO9coPsrOfGSiHyHGvSfvcmoAdZ6rvNC1P0MGTO9Ji/ALoeKLKRd sdYcX5bU3Y+s++8drKAsW386D5g3bi40jR3hyUo96FWPOTmhxuEVXH5iuemV4K1ccgCC rwDnur8TlT5kEPqN1MS2BcqHiatUnSwfqOw5g4/5MVTXRUw2HbullkeTESxHZeSHzYZu AK++/qfd11M70jZTi7TqUDhkAgqTqxjOx9aPdxwxAGcZTEPqiHDxhMpt+5lCUWLPEsui 8C2Q== X-Gm-Message-State: AOAM531uM5QBnkVJAcqf6nhnOcDFK8jXfgkg/xPdNuuiZUb3xribLQtb BYVRr1OOFadIH77OaGbJ1YqL5IRNgWc= X-Google-Smtp-Source: ABdhPJxkv9iLZ6zt+Gk1ANxKLrWjuRHd03gH2H1KgLsXQbFFlcLZbOz+z+s30ldrNjgWWI6gJlBfbQ== X-Received: by 2002:a05:600c:208:: with SMTP id 8mr17274498wmi.146.1608561893950; Mon, 21 Dec 2020 06:44:53 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:53 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/55] gitlab: move --without-default-devices build from Travis Date: Mon, 21 Dec 2020 15:43:57 +0100 Message-Id: <20201221144447.26161-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20201210190417.31673-7-alex.bennee@linaro.org> --- .gitlab-ci.yml | 7 +++++++ .travis.yml | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98bff03b47..495ff59340 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -514,6 +514,13 @@ build-trace-ust-system: IMAGE: ubuntu2004 CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu +# Check our reduced build configurations +build-without-default-devices: + <<: *native_build_job_definition + variables: + IMAGE: centos8 + CONFIGURE_ARGS: --without-default-devices --disable-user + check-patch: stage: build image: $CI_REGISTRY_IMAGE/qemu/centos8:latest diff --git a/.travis.yml b/.travis.yml index d01714a5ae..f2a101936c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -205,14 +205,6 @@ jobs: - ${SRC_DIR}/scripts/travis/coverage-summary.sh - # We manually include builds which we disable "make check" for - - name: "GCC without-default-devices (softmmu)" - env: - - CONFIG="--without-default-devices --disable-user" - - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - - TEST_CMD="" - - # Using newer GCC with sanitizers - name: "GCC9 with sanitizers (softmmu)" dist: bionic From patchwork Mon Dec 21 14:43:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419068 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=IBEifJWa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Wc432dz9sVs for ; Tue, 22 Dec 2020 01:52:44 +1100 (AEDT) Received: from localhost ([::1]:58366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMYE-0004NO-7h for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:52:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQk-0004jH-Ok for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:00 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:37967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQi-0007eS-Dw for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:58 -0500 Received: by mail-wm1-x32c.google.com with SMTP id g185so11155101wmf.3 for ; Mon, 21 Dec 2020 06:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TXSA6eUd0by8kp0ro6t2CSTlJGcK5halbz63a1xMae0=; b=IBEifJWa3Ds9CID2Frav66i+0UoImSQ2SWSTnZGZ8JlWehCG88VnHneLQ7tjGzXA5m dK/R7nPDU6CH8IOGdAzE1fkdQQ6MJwT3fqRwwzbyhzr8SkkxBL1SJ1HzkklHQVf8T4I3 0GeN2UpPps4mf09OXagP+sUE2k+qxcxvE25mvA+AThbZs5SvdAFWfjGt3zjtU52NGnCH IJxOKYNv66MBVuvjCN9dwTocp0csZQwdqiFPSjafxU0w/30/YFnAZ5DrSlY7JPuf4HRf Z1Vd0JFp2FhNMYBcie0C8rPrGS1OzqMg+deUpEDeGqQxU2cm72t1BkDYibr3pyHqx3M0 6zyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TXSA6eUd0by8kp0ro6t2CSTlJGcK5halbz63a1xMae0=; b=UB9AcuLYfzaJCFK4N7Ui2c+Pkuqt11ZPjhOg02LraajC+DzA8lOObmcblTA+OLBtjN 3i5mExnpisH6HFqHPuBEqyMopskV4dyyWr51k1q965uFlRHE5KUIvtDGDz+IgpvdcTld ObAgIilc2Q5pGW2QJjO35FDsq6HK3B3PJC4XuYx7yqJL0C8Ji37G/YIKlvhrL5Dlqw12 6Oh2wn2MLpphchmXAyCepK7186mJCrhoVY99ydrez0vePnLA6MXeMqwzV09SqLQ1vgcm 0qb6jKiv7EQZxSah9ETp/DhmgLR16creL1OPzZBRGlKjpw6JWeMpEVaFMJxgunDshO1H B7Pw== X-Gm-Message-State: AOAM532MRlL3XUkuIVBDQ8PSL9NH1P9CFb7TVJwXLsLF5BiSJXXNDHdu ItZJGa1hPTMdzFIitW1PhTxNAxu6qLw= X-Google-Smtp-Source: ABdhPJyQ5Gmh3jy+RdVxweB4bJ7iRuM94riWWlk74RVEhGFgIRgouTjSDCaeqa2PYF22YHsHDFM8hw== X-Received: by 2002:a1c:1d1:: with SMTP id 200mr17414612wmb.98.1608561894934; Mon, 21 Dec 2020 06:44:54 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:54 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/55] gitlab: add --without-default-features build Date: Mon, 21 Dec 2020 15:43:58 +0100 Message-Id: <20201221144447.26161-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_SPACE_RATIO=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20201210190417.31673-8-alex.bennee@linaro.org> --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 495ff59340..6af8af371e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -521,6 +521,13 @@ build-without-default-devices: IMAGE: centos8 CONFIGURE_ARGS: --without-default-devices --disable-user +build-without-default-features: + <<: *native_build_job_definition + variables: + IMAGE: debian-amd64 + CONFIGURE_ARGS: --without-default-features --disable-user + MAKE_CHECK_ARGS: check-unit + check-patch: stage: build image: $CI_REGISTRY_IMAGE/qemu/centos8:latest From patchwork Mon Dec 21 14:43:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Z16ZXaTw; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Zx0kCpz9sVS for ; Tue, 22 Dec 2020 01:55:37 +1100 (AEDT) Received: from localhost ([::1]:37134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMb1-0007JN-2S for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:55:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQk-0004jJ-Ns for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:00 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:37438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQi-0007el-V5 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:58 -0500 Received: by mail-wr1-x429.google.com with SMTP id i9so11317874wrc.4 for ; Mon, 21 Dec 2020 06:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=joAl+PLtHiQUiU+Ypj043BdhAqkjCAPS2HAV23WoUs4=; b=Z16ZXaTwoqHJttCCLhb71YS2/McBCE7pn7LYP8uPFC49OqyHn7nM0hjxbYTH7taip3 L5BmVrRG78+CKP1lApwhbpPOcflmfNGOthKMBWnPQto54nqgV4M9vi1VAjXC25eFXYZe +JwpeUbbysPuA9dVHbHsUo4AJPvrQeHF5COGQ6R36tP/obbNxG8wutGWHyeTLBbFpuuj dgqE7tLHQtCg0p0frCu4y9PgtRD1J4EDuXRvbZAy8bObDEGUycT1lLYpHXkrzTm5dL0b L9P7vKFizlK8EXBdvfuKbiOuhWV350PM6UBjUTkz5zrAN51rCZ7eTaijDNFeU4jYbO11 DGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=joAl+PLtHiQUiU+Ypj043BdhAqkjCAPS2HAV23WoUs4=; b=r7HSmO5HleTEc87jCGkSLZlMsdZxaulVyLR4wgNwnBv/N7tYsu8y4smD2KzwSLC3gs MLRMGbCCtQ2ZfPJWzFN4kb551kjjkRxnAOu3jExzli378qTBl6pJGCcYTwSHl32ew1+n 8JKyRtB2ap0dnaqSKJJbqgVuS+44i1X7sjqD0zwYthxDAH25z2bRGgPaYUgBEPxGPc1t Vv/yDORPelRYd+cTzgLlqZWD6MDt5nZTcQ9OaxowlArlo873xcgx/uA/AmwXC/3098Qx UVDYBcX7mNf3xa2b65w+Z+NYhK7iSFR4G5RjXtbi+N0L5s5pEBuiXlLYqzVHJqinUhX/ YTYg== X-Gm-Message-State: AOAM5326LsLXiqhucPKXwRwTUkGlJKb4xzVaGTe+B72kHm1SKZrSrBMd UMOItUeIeEoAitr1hSXHA56NgkZJ9VU= X-Google-Smtp-Source: ABdhPJyNl+PBqeeNaSD9fh9WpYP1yKeP70Y6JMJEsxho/WXgASIcTQoEJBZNUCWD/D8ScHJP+VhoVg== X-Received: by 2002:adf:dc08:: with SMTP id t8mr18917251wri.195.1608561895798; Mon, 21 Dec 2020 06:44:55 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/55] tests/tcg: build tests with -Werror Date: Mon, 21 Dec 2020 15:43:59 +0100 Message-Id: <20201221144447.26161-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Hopefully this will guard against sloppy code getting into our tests. Suggested-by: Paolo Bonzini Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201210190417.31673-9-alex.bennee@linaro.org> --- tests/tcg/Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 2ae86776cd..24d75a5801 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -94,7 +94,7 @@ ifdef CONFIG_USER_ONLY -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target # Add the common build options -CFLAGS+=-Wall -O0 -g -fno-strict-aliasing +CFLAGS+=-Wall -Werror -O0 -g -fno-strict-aliasing ifeq ($(BUILD_STATIC),y) LDFLAGS+=-static endif From patchwork Mon Dec 21 14:44:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MtemWxNG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02S473Twz9sVn for ; Tue, 22 Dec 2020 01:49:40 +1100 (AEDT) Received: from localhost ([::1]:48444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMVG-000094-Vc for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:49:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQm-0004jp-H4 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:00 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:54847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQk-0007ez-Hi for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:44:59 -0500 Received: by mail-wm1-x32f.google.com with SMTP id c133so10105431wme.4 for ; Mon, 21 Dec 2020 06:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6KQ7Eb2mptyWkstvTdaI21O4im2v6UCc4yqZIm6MzZc=; b=MtemWxNG0/dn5MhX4z4ArxeedGw5r02Zx0FgdNH/jSg4bXwr38UQQeaF1xD1Vu/v+B fJVKZUU+BXi+8XOEiMzgGkAowzGZFBUo8XLK6tmbYkosIbpS7xcvBlnsfOC+0B7E1X4/ Qbsp7nOO/+6cXPIdm/p1CUTENg/iPKJxx2zr+mN8kTEzP3eaqAWaIb61ZbMeGb8iJgPK N6l0a5INC5yyXtSfO4jPTZ7uE/79g8kcvQGHUQ2oPSlLJeJUCV7cu5fnRuiGjexwPgU7 /jHKBjxIF/9pBC12a7QKn4pJchKe1ZI0lkDW83kiDW/B7ddkrJnbfvNhydFvlI06SXhC LCsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6KQ7Eb2mptyWkstvTdaI21O4im2v6UCc4yqZIm6MzZc=; b=DGv2Kpd4aaWQiL5FwR8QQMesSx5F6owT36BLdlRx4mm1AX+YS/0IN7NlqKwj7u52x3 lGUJXEkBiNhrlgk7adMJZEMOk/XFhhhEo7XY9JSnQXePUCP+F7Hd5VPgmqxw8cA17Ue4 NaO1n7muwHHdQQx913A0HamuqVI/rhutJ7wN23xiUZQ9ciM8XiUI7KLz/TqoeJ7TEXyJ iOsoos660Kj5KBr3aYBnDrGgeRIZkRDL0zTbiQJThwzjQui1F5HrWyXi1NN/naoaSRkX vyKtTDQSW9ncrEvYUSufnnOddwmTvJWwojQxD1w16b3q2eh/KW4ILdMnGLNqc3A+lI87 p5Nw== X-Gm-Message-State: AOAM531tVLX9+Pdl8x2ld7TEBPwA6TXNc40JZ9KgShlfXqcWafHREz+B tJlTyZZbWvpc4CQxZ1ll42RNFwh0s0M= X-Google-Smtp-Source: ABdhPJyqMZ/v/aMpe0d2pH294olf8eu+PH2UHMDkS5KbZ1F5Vjr6sBdNb4nUl70LlvXhOTkOEtDdmA== X-Received: by 2002:a1c:630b:: with SMTP id x11mr16833531wmb.138.1608561896639; Mon, 21 Dec 2020 06:44:56 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/55] gitlab-CI: Test 32-bit builds with the fedora-i386-cross container Date: Mon, 21 Dec 2020 15:44:00 +0100 Message-Id: <20201221144447.26161-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth After adding some missing packages, it's possible to check 32-bit builds and tests with the fedora-i386-cross container in the gitlab-CI, too. Unfortunately, the code in subprojects/ ignores the --extra-cflags (on purpose), so the vhost-user part has to be disabled for this. While we're at it, update the container to Fedora 31. Unfortunately the gcc from the later versions emits some very dubious format-truncation warnings, so Fedora 32 and 33 are currently unsuitable for this job. Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20201215083451.92322-1-thuth@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/crossbuilds.yml | 16 ++++++++++++++-- .../dockerfiles/fedora-i386-cross.docker | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index fcc1b95290..66547b6683 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -10,7 +10,7 @@ --target-list-exclude="arm-softmmu cris-softmmu i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu" - - make -j$(expr $(nproc) + 1) all check-build + - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS # Job to cross-build specific accelerators. # @@ -37,7 +37,7 @@ - cd build - PKG_CONFIG_PATH=$PKG_CONFIG_PATH ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-system - - make -j$(expr $(nproc) + 1) all check-build + - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS cross-armel-system: extends: .cross_system_build_job @@ -69,6 +69,18 @@ cross-arm64-user: variables: IMAGE: debian-arm64-cross +cross-i386-system: + extends: .cross_system_build_job + variables: + IMAGE: fedora-i386-cross + MAKE_CHECK_ARGS: check-qtest + +cross-i386-user: + extends: .cross_user_build_job + variables: + IMAGE: fedora-i386-cross + MAKE_CHECK_ARGS: check + cross-mips-system: extends: .cross_system_build_job variables: diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index cd16cd1bfa..a6e411291b 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -1,14 +1,26 @@ -FROM fedora:30 +FROM fedora:31 ENV PACKAGES \ + bzip2 \ + diffutils \ + findutils \ gcc \ + git \ + libtasn1-devel.i686 \ + libzstd-devel.i686 \ + make \ + meson \ + ninja-build \ glib2-devel.i686 \ glibc-devel.i686 \ glibc-static.i686 \ gnutls-devel.i686 \ nettle-devel.i686 \ + perl-Test-Harness \ pixman-devel.i686 \ - zlib-devel.i686 \ - libzstd-devel.i686 + zlib-devel.i686 + +ENV QEMU_CONFIGURE_OPTS --extra-cflags=-m32 --disable-vhost-user +ENV PKG_CONFIG_PATH /usr/lib/pkgconfig RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt From patchwork Mon Dec 21 14:44:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jt+2kJQw; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02dn4JXDz9sVS for ; Tue, 22 Dec 2020 01:58:05 +1100 (AEDT) Received: from localhost ([::1]:47140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMdP-00036J-I4 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:58:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQo-0004ls-Fb for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:04 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQl-0007fD-IH for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:01 -0500 Received: by mail-wm1-x334.google.com with SMTP id 3so11167145wmg.4 for ; Mon, 21 Dec 2020 06:44:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tqrxEsSWBSau0TovEg18afzdUGT7IHMYP0M414V/PPY=; b=jt+2kJQwbess4Wit9WbW9STJaRl7DtucVKLnXW0BmhRdMtq4sj4tYFwkuyf8/et943 pHAWOOA6VeMpKS6xr+AxbIitdDBg1stL99smGlTacg0cBYdDFdHv+tdhjMX31XMpRqSW z0jAmZMLZGV6KfU4AxSz6J3zHp7T68Vcx4mQXCiQ+I4vndRmlvwtLcalWyf3B1D8TlSJ RJS0TveXccf2M/h8Ykn6Xc7AL3uC1ry3Dm1REwIdIlhgOwKc7EjLlEDlFgqtG0UEeyxb mKqw8wVksuoOscCWd3BmMHSoN+WoRuo/GEzXZjiFZVd5QmSNYZH5n8dPgukukjWZP6PH 1ZtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tqrxEsSWBSau0TovEg18afzdUGT7IHMYP0M414V/PPY=; b=dEJCIbJ+G73Tg838kdWh7nMaNqSXaCquArBniURc8xq+I/RjRY6R71BTFc/hMZjexU hnEBuT7zoNC5LnoFMVDwPXU+UAq8xvc+rSmPWPU74HNRM7eyUY5kJru94Mc1/XTMDeL8 zOC2SeWJKeSk5gXudAYU1LxaToThlztUsTwE9RYlcmb/faaTk2bT2d6xxGUr5xms5qzs 20hnDlsgzsgZUhvWHLYIO9yAW9Onc99xesiRAhHKzszp3pDNohOdnMeE+W3megnTBe5B Zlq9oOVmSrJmRHKPEWUuwWMIeEMB91Rlj6BNXb4Mbdds4IbLPJJXFajJ373uxLdhMGU8 CkNg== X-Gm-Message-State: AOAM531SnA57nzMN7hf0klTr5M+5X+GhMihBpWjAD9/QhhTxjTTPrtPF LVIvgvdSN3jwIV/KKpTyiLgDGguJOsE= X-Google-Smtp-Source: ABdhPJzURNCX5e528svwq0uwrgJfUi9v67HRJe2DkFSs8xLehsRDx+S/wA4983Rj5+H9sVMGWrEFxw== X-Received: by 2002:a7b:cc0f:: with SMTP id f15mr17137821wmh.29.1608561897464; Mon, 21 Dec 2020 06:44:57 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:57 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/55] tests/docker: Remove the remainders of debian9 containers from the Makefile Date: Mon, 21 Dec 2020 15:44:01 +0100 Message-Id: <20201221144447.26161-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The Debian 9 containers have been removed a while ago, so we can delete the corresponding entries in the Makefile, too. Fixes: e3755276d1 ("tests/docker: Remove old Debian 9 containers") Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20201215083318.92205-1-thuth@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 02ec92830b..c254ac38d0 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -11,8 +11,7 @@ HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) -DOCKER_PARTIAL_IMAGES := debian9 debian10 debian11 -DOCKER_PARTIAL_IMAGES += debian9-mxe debian-bootstrap +DOCKER_PARTIAL_IMAGES := debian10 debian11 debian-bootstrap DOCKER_IMAGES := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds @@ -96,7 +95,6 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker endif # Enforce dependencies for composite images -docker-image-debian9-mxe: docker-image-debian9 ifeq ($(HOST_ARCH),x86_64) docker-image-debian-amd64: docker-image-debian10 DOCKER_PARTIAL_IMAGES += debian-amd64-cross @@ -104,8 +102,6 @@ else docker-image-debian-amd64-cross: docker-image-debian10 DOCKER_PARTIAL_IMAGES += debian-amd64 endif -docker-image-debian-win32-cross: docker-image-debian9-mxe -docker-image-debian-win64-cross: docker-image-debian9-mxe # For non-x86 hosts not all cross-compilers have been packaged ifneq ($(HOST_ARCH),x86_64) From patchwork Mon Dec 21 14:44:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OBIrY0aV; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02d35l5wz9sVS for ; Tue, 22 Dec 2020 01:57:27 +1100 (AEDT) Received: from localhost ([::1]:45566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMcm-0002TD-3d for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:57:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQo-0004lr-Eu for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:04 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:55812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQm-0007fZ-9P for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:01 -0500 Received: by mail-wm1-x32d.google.com with SMTP id x22so10079607wmc.5 for ; Mon, 21 Dec 2020 06:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2fomZcDwuRjLMH3gjrlh4DIWTPodHY5A219wPcf777M=; b=OBIrY0aVc/+2/T+4EkybKrzDeOTg0PthncdzQ4//0lZXDwq4bAGBKeUQfw9t+k3+Iy p2i4PgNx1EHZwvF/VBFGSqbk7qdMXAVENJm1nl8KBUZw7WLc5tl6+cF/AhTQwewOt9a8 biFxqOGae6T12gGCZImdY4Aatkf1ZSdTo3xoIuO9yoUtmBYhPkrySbmxyM1Y0nNDNvkM VT54Smf50S22HW48hXkXZ72Qqs6xXGC4O6gvv95VwX5xitM83uRkMig+zCLK12OReXVO dR7ZnAJ83ZvUmXuyrnqS2yi8csgloaKe9RlVcRzp2S494SdbwJQTiRKHzltDPrO7lD3H 4zxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2fomZcDwuRjLMH3gjrlh4DIWTPodHY5A219wPcf777M=; b=ALxWFf9lMc3U1AVi8QB8mMU3oko+cpiFiulSKAre7t1tBX9zG0VlgdWNqElLOuj34u zqeBLvEtyOZFeZVFK5QHwU7o0RisAPtzka0L96Q1paqJ3gEHigZE864YiRrWes6YQ/EE KNwRsl/y0INiZGh/jmuTA+Y47wxTgAdVrXMXgoyitWf3bFY3vIaCYw5niWlrMVRnDpN2 nnE1bVMwTpDJCGumCp/Islt7CgDLOfJbYTL15dVUFypDSvpm8fWJtKC1skpdZItRz1Fi WdD6fopmSuxUjI3c9Irp4SWHVytzk3iyr+eGFFMCVEz25s9m9zexsVg3ZEOKJdfMF/Uw r6UQ== X-Gm-Message-State: AOAM531EAvfL9SuHIBLX7z/E7K/LOB5kY6h77CANNgCc7jsar2OGBxlH AZvUdZUEGD2lNiNYOnUR0nOwWg1fDRc= X-Google-Smtp-Source: ABdhPJxaxTBtQuZ+6wjpOWrjPibFK4bW9qVjkpU70XKZxak4T63p8JqYbjXapOXuqItj+0ksmDPDKQ== X-Received: by 2002:a05:600c:2188:: with SMTP id e8mr17074879wme.99.1608561898582; Mon, 21 Dec 2020 06:44:58 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/55] tests: update for rename of CentOS8 PowerTools repo Date: Mon, 21 Dec 2020 15:44:02 +0100 Message-Id: <20201221144447.26161-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_P?= =?utf-8?q?=2E_Berrang=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé This was intentionally renamed recently to be all lowercase: https://bugs.centos.org/view.php?id=17920 https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Yum_repo_file_and_repoid_changes Signed-off-by: Daniel P. Berrangé Reviewed-by: Willian Rampazzo Message-Id: <20201216141653.213980-1-berrange@redhat.com> [AJB: bump up FROM to trigger re-build, add diffutils] Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/centos8.docker | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 54bc6d54cd..64cb7a6eda 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -1,4 +1,4 @@ -FROM centos:8.1.1911 +FROM centos:8.3.2011 RUN dnf -y update ENV PACKAGES \ @@ -6,6 +6,7 @@ ENV PACKAGES \ bzip2 \ bzip2-devel \ dbus-daemon \ + diffutils \ gcc \ gcc-c++ \ genisoimage \ @@ -31,6 +32,6 @@ ENV PACKAGES \ zlib-devel RUN dnf install -y dnf-plugins-core && \ - dnf config-manager --set-enabled PowerTools && \ + dnf config-manager --set-enabled powertools && \ dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt From patchwork Mon Dec 21 14:44:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=AY6dyLG0; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02b22xbpz9sVS for ; Tue, 22 Dec 2020 01:55:42 +1100 (AEDT) Received: from localhost ([::1]:38672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMb6-0007xS-Ab for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:55:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQp-0004ly-0C for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:04 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQm-0007gS-Ih for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:02 -0500 Received: by mail-wr1-x42b.google.com with SMTP id c5so11285762wrp.6 for ; Mon, 21 Dec 2020 06:45:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oIQKgaD3xwYfhJ20ooJ1vtJyxvBvbBs9LrAtT9WqTcY=; b=AY6dyLG0PUx1RiEA6TtYBXTeXAX5QGA6PSZSfZMF+OY3azWz6JmuZyXqFHsJ5dzd0E SDfvoq/Cu/V7aQGiQf/gpfXpi2uCBAIR1woMJiPoh1WRCOhGh4gRQsk4EEURjN9uoKxM 3CDstajpCcSRBZz8eWpxTRbvOYC0jrsoKhq/6qyGSIcEko514RwShvwA4kIdvu8vu33t ywgMFiPrv1IlFjPNwItBWFpHKPJF1F1xw/w5Mfy1E4oyLFqmRjy32lnvsGKQD/0hxeLs 6cV6rapCIR6V3ljJ2lNS1NIrHce0HqqQZ6o7j1AilVFiYjD/gwdFtM3tV5n44SKNVQF9 OsZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=oIQKgaD3xwYfhJ20ooJ1vtJyxvBvbBs9LrAtT9WqTcY=; b=udYtm9iHMFVHW2l1WraTjlmyCOYUY/+UqqaRdPZUIGbJ+vMJo/xW0K5FX/X8hLNHfh WfjRoGdBqUEGFFKC0azEYlHLO3zbkRoFaYVbYDhwXB863wkP5uYIxGmqyrTR85jb2oVo DI7erkRgfvwiEjRPtLE7qwhX5BVkuSfw7wPxqiU/QSaWuYjpiupyyOmTG6f83Pa7Azqb 7W4RVKHeDjL5EGz0xpiajncA7hgz6ZML2j4yualq65je1yw0TTkH+ck0krvH6uYFZ/dY ldF8MyMZNRR7Rp4tuhB95R9791eqSvGH6+8RrZHG3M7QHmSsT/ntnuRF7OWsR+KswZ57 7IQA== X-Gm-Message-State: AOAM533+vd9HeN78iujeB09/dYomNvE48/gWrde0+WfS9XNkMMyY8qWN 8hH9nyJB9AAAeJLKR+LWRoYf3A9raxw= X-Google-Smtp-Source: ABdhPJwYdsC1jq4a189EsusuP8nWPDSdxiSSbYgZ5ZDV8mH9w7DDP1jSac4GVn0I+Th7pK89SSOIUA== X-Received: by 2002:adf:c387:: with SMTP id p7mr18941460wrf.95.1608561899338; Mon, 21 Dec 2020 06:44:59 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:58 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 11/55] configure: document --without-default-{features, devices} Date: Mon, 21 Dec 2020 15:44:03 +0100 Message-Id: <20201221144447.26161-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index a5ee2d2a06..7ec4a11d1f 100755 --- a/configure +++ b/configure @@ -1719,6 +1719,10 @@ Advanced options (experts only): --efi-aarch64=PATH PATH of efi file to use for aarch64 VMs. --with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix] --with-pkgversion=VERS use specified string as sub-version of the package + --without-default-features default all --enable-* options to "disabled" + --without-default-devices do not include any device that is not needed to + start the emulator (only use if you are including + desired devices in default-configs/devices/) --enable-debug enable common debug build options --enable-sanitizers enable default sanitizers --enable-tsan enable thread sanitizer From patchwork Mon Dec 21 14:44:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419065 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=CbWPl941; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Tq5ZK8z9sVn for ; Tue, 22 Dec 2020 01:51:09 +1100 (AEDT) Received: from localhost ([::1]:50962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMWf-0001DO-HL for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:51:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQp-0004lz-5E for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:04 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:42796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQn-0007gZ-Bx for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:02 -0500 Received: by mail-wr1-x433.google.com with SMTP id m5so11278395wrx.9 for ; Mon, 21 Dec 2020 06:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LfsOLhAWMVJ2deCuay3ook5aFVWeXApOj+vJo+lp9yU=; b=CbWPl941A2AOf73zAtC4RGdcaEXbNbJj+u3XJ1UXwy4M5q+Dj/kvxFQjRuiPR4UUgN Rv0FlvFPFLjiv7XIMVTHi1C1AA78nJGFviDgeRNWZOw6mrTiBxm3gBKUe2CPe2uLKYHA VoblwjKqmDkWwO63Ez/qvhhbbQRnMCbnTzm9EN0wloaOXA50//7C0d5Aoija4gP7nRI4 PNescjBgAZIMxlFeH6BiHmSLh0XoonUUa2gI6uFHEDk1bUDY8ZSgNXGKRemDYuMMJ+yV rY/1Yyf1tBtq0lOolYIyfWBe8r4wkQnRVvXc43mqCGx8K0VDQDsrF0gj9nYor5vAjJz4 e/mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LfsOLhAWMVJ2deCuay3ook5aFVWeXApOj+vJo+lp9yU=; b=C5wBJY9v6OFnziwggeqUAR7HxOmOpZ1G4k2viMCTdgejgl+HdmhDsPbWWbGHC3k73o /3bGILgBBM6Is8xxDThuOE7X6hGu4eOlP7Zttn27MRhW51SRi/Bo7HdKJTwU/KUvUNRZ EOdx4obtzPPRM6YZiNQ/E9xe381WmtVjr0dPHF64PIfraQIS1EUlMcdwMek0KCGsGVYK FkW1JDNxg0SvWntwqbWty1g7qsB9Z86+tODe8uIc8OQRwsv79J0L5ZzOECxZQAJvPmB/ 1NBPbjeOb6l977NMOvZ/nb+fjYcumcEQiix6AeI2FNVB7uYc2qX+7F5VNJb48HRRaeVD Pwcw== X-Gm-Message-State: AOAM533EPCgDjDMVGQvGkL1dmXMvGyGV4+XU/n480bfA1RRNRlBUrSOj sHLikMZT6Kt5jd1Y5ZOMxaWthVgN9EM= X-Google-Smtp-Source: ABdhPJzCkQKCGnEQsj1WKQlxKO7fKI3UCmUKgpmbPy5gl5kpAJyodS5jww+Hol189F9x4qdtKtbJuw== X-Received: by 2002:adf:8290:: with SMTP id 16mr18482341wrc.27.1608561900183; Mon, 21 Dec 2020 06:45:00 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:44:59 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/55] vl: initialize displays _after_ exiting preconfiguration Date: Mon, 21 Dec 2020 15:44:04 +0100 Message-Id: <20201221144447.26161-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Howard Spoelstra Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Due to the renumbering of text consoles when graphical consoles are created, init_displaystate must be called after all QemuConsoles are created, i.e. after devices are created. vl.c calls it from qemu_init_displays, while qmp_x_exit_preconfig is where devices are created. If qemu_init_displays is called before it, the VGA graphical console does not come up. Reported-by: Howard Spoelstra Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 0ed5c5ba93..7ddf405d76 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3529,10 +3529,10 @@ void qemu_init(int argc, char **argv, char **envp) exit(0); } - qemu_init_displays(); if (!preconfig_requested) { qmp_x_exit_preconfig(&error_fatal); } + qemu_init_displays(); accel_setup_post(current_machine); os_setup_post(); resume_mux_open(); From patchwork Mon Dec 21 14:44:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GhPflRf0; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02P35ksJz9sVn for ; Tue, 22 Dec 2020 01:47:03 +1100 (AEDT) Received: from localhost ([::1]:42496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMSj-00062z-NU for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:47:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQq-0004m3-18 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:04 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:44686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQo-0007gf-Cm for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:03 -0500 Received: by mail-wr1-x42b.google.com with SMTP id w5so11291697wrm.11 for ; Mon, 21 Dec 2020 06:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g0fGdFEztzm8rAibMt6QoL7YynVwcGLqq1vKO1IDiTA=; b=GhPflRf0FrMecdr7q4aCOBR1BOd8mRN9fk6mkxmDwrgVPlBDQJcni/YDkBF6UF5pQt /oaZ0MrE7FAfVbzvNo4VWdQLV4jR8BEthiwj3/LcZ9ZIRrdPLHyUPyyQoXNnL7IIsSOl dyT1y6TDVGDJIZ289qqixARVVmM0VOtQRaq4kbeJp1Ri3zX4kOmd20dUd3gQCkNlhSd7 V4RUatQeWBp2MAkdjKEyXd02iHaLSaTql7nfggJ30x+SmsXAPqEgXgA0kNOjhRReV0iO KLBMLucA8sVTKK9g0T09f7hbu7KICvC9GBD3WXcxHx1Qi2zBoK/xj8a1p2HiMddiXB6w Gsug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=g0fGdFEztzm8rAibMt6QoL7YynVwcGLqq1vKO1IDiTA=; b=maaCJjDkajVv6Vju0Z2FosbylvPE62Kp7YX2yxGSBJ5HwrzlMRBhiMBLwBI7NC8Fso QlGDWyv92H1Ib+SkfmFoYgfdkZq3uaKZ9lbj9XZWa9Fw86hhtEpcay00v5ESUmokKwQG zI2z9OYvwS1W1ZD0fh/gS7gR4xRymTnc+sgeO3pb5MkRHpB2kxTSEFRKrt0yFtrVXTIv N4nCJKiBWIG9BgeTbOVlEjg3dnXSe9BKwhsbKE8GI+YngZ9t2JI1XRioMhV74ToA5mbg +HRRoVI0AEF1eWktC+R6S+REqipQIkviejBfHzIY/NjUs1AnrwuLSa7XVFzgI9yvT8TR PsVA== X-Gm-Message-State: AOAM53348XnuXfVwOu+vpmw5hJaiO+w3M3msh8TnYTziY+WtzskDtbMA QfVssf2Kvl2t8daC4uhCXKp3nLzQdNw= X-Google-Smtp-Source: ABdhPJxsIZEPQNCm6kSZu7vRm7weyloiA84P/vpFE4HA93z3fKMq9edn22vo5LPjoyVC4Q74ZROLRg== X-Received: by 2002:a05:6000:108b:: with SMTP id y11mr18889352wrw.379.1608561901141; Mon, 21 Dec 2020 06:45:01 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:00 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 13/55] test-char: Destroy chardev correctly at char_file_test_internal() Date: Mon, 21 Dec 2020 15:44:05 +0100 Message-Id: <20201221144447.26161-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Eduardo Habkost commit 1e419ee68fa5 ("chardev: generate an internal id when none given") changed the reference ownership semantics of qemu_chardev_new(NULL, ...): now all chardevs created using qemu_chardev_new() are added to the /chardevs QOM container, and the caller does not own a reference to the newly created object. However, the code at char_file_test_internal() had not been updated and was calling object_unref() on a chardev object it didn't own. This makes the chardev be destroyed, but leaves a dangling pointer in the /chardev container children list, and seems to be the cause of the following char_serial_test() crash: Unexpected error in object_property_try_add() at ../qom/object.c:1220: \ attempt to add duplicate property 'serial-id' to object (type 'container') ERROR test-char - too few tests run (expected 38, got 9) Update the code to use object_unparent() at the end of char_file_test_internal(), to make sure the chardev will be correctly removed from the QOM tree. Fixes: 1e419ee68fa5 ("chardev: generate an internal id when none given") Signed-off-by: Eduardo Habkost Message-Id: <20201215224133.3545901-2-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini --- tests/test-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-char.c b/tests/test-char.c index 953e0d1c1f..06102977b6 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1298,7 +1298,7 @@ static void char_file_test_internal(Chardev *ext_chr, const char *filepath) g_assert(strncmp(contents, "hello!", 6) == 0); if (!ext_chr) { - object_unref(OBJECT(chr)); + object_unparent(OBJECT(chr)); g_unlink(out); } g_free(contents); From patchwork Mon Dec 21 14:44:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ovhp6yns; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02jM5WM4z9sVS for ; Tue, 22 Dec 2020 02:01:11 +1100 (AEDT) Received: from localhost ([::1]:55734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMgP-0006oz-NR for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:01:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQs-0004na-DR for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:10 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:40429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQp-0007hH-H9 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:05 -0500 Received: by mail-wr1-x42a.google.com with SMTP id 91so11312352wrj.7 for ; Mon, 21 Dec 2020 06:45:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rRKE92cmRUgzdGiZ2u19WojcJ5iJ7CYF7vHl9d+yt+c=; b=ovhp6ynsX+uHB/fJ4UlbZYOnd6gP/fi3PcfUnC4VAKjIWzm278u7D5x+UskxG4PB0k I/B8lFHo7UD/aJCFqqHv9am5xOzK1BuTpVE1+6Gytt+FwZegqdin+5LPflo/2xjNB0fV HizLv5D/vKfOFw+0fBYd9CT7auXat88nATzpGKC5rXfTczy6oeZMYZF6otBgCqPxWiwX aRvHWs8fOXIdTGwkdJ7jInusSQT3jDMUwa8U5tpOJ0X9wZTxT1GtzrZkWAzhumXSMOwG BoFwSQK8gak4neOu47gaIndydEGCad1nj7DT14pKKY4IhDMx5PyQ1FXbaL8xtUXkmZ7t 2Usw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rRKE92cmRUgzdGiZ2u19WojcJ5iJ7CYF7vHl9d+yt+c=; b=Au0VehLkGCFYbeMEMIVcbcYxgEyFJ3Fx+ovVsBmJyHwK4UixjbS1Nn5vGcwmsHAkJu tlGz1jIY3OtuprZowZDhcFh2WTFnJh010o3tatd/YwhKipYtbl1L/+oYAXIseUHUgo57 wVj75J3Nn9FtDBNqh5QPBe1uNxyYS202p0wTw0YRsNA38T5yYwdLu0HXatOd9zTX3HkF GxIcG2D7NRn5NYaFFOZ9lxDBslOyd0SfE09nEbbAkDgaYiFpMavVJ2Dy3Z4P8uaVCRk4 CJwFLkNOURAoMYHZOWeqM5UjJ2HrfzCQflkmS9MPa5GFA+PZxLQv72qCpegCi83H9lJh aGUA== X-Gm-Message-State: AOAM531rBN29S9yGdSqXDj2cjQFS70tE52FIiVi1UWoxkdKEAo1Lt26t v8ItMfN5xr2MA9cGjQA4sgFiPPCtIDU= X-Google-Smtp-Source: ABdhPJzPQX5zTIhfQ3IstI819Y16DfUBLeuAEjC1Ka1GfIpsmXTbxpeTfhTcer2b9KFY8ULB+nHCsQ== X-Received: by 2002:a5d:4905:: with SMTP id x5mr18779491wrq.75.1608561901932; Mon, 21 Dec 2020 06:45:01 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/55] qom: Assert that objects being destroyed have no parent Date: Mon, 21 Dec 2020 15:44:06 +0100 Message-Id: <20201221144447.26161-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Eduardo Habkost QOM reference counting bugs are often hard to detect, but there's one kind of bug that's easier: if we are freeing an object but is still attached to a parent, it means the reference count is wrong (because the parent always hold a reference to their children). Add an assertion to make sure we detect those cases. Signed-off-by: Eduardo Habkost Message-Id: <20201215224133.3545901-3-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c b/qom/object.c index f2ae6e6b2a..5cfed6d7c6 100644 --- a/qom/object.c +++ b/qom/object.c @@ -685,6 +685,7 @@ static void object_finalize(void *data) object_deinit(obj, ti); g_assert(obj->ref == 0); + g_assert(obj->parent == NULL); if (obj->free) { obj->free(obj); } From patchwork Mon Dec 21 14:44:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=p8aFyLKR; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02pC38vvz9sVS for ; Tue, 22 Dec 2020 02:05:23 +1100 (AEDT) Received: from localhost ([::1]:38728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMkT-00049B-Du for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:05:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMR0-0004on-NH for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:19 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:50713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQr-0007iq-8v for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:07 -0500 Received: by mail-wm1-x330.google.com with SMTP id 190so10102965wmz.0 for ; Mon, 21 Dec 2020 06:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jM3hkD4CvKdZOABArp0NAjoE5fJXpKMpDEFZ8ZRfbww=; b=p8aFyLKR3J6XHwoqW+v81SVJJcziWaM+dHmi+w5JY3EZZR3d3Z08OoeNa9fopwj6wd eq/sQwFKmpZfAR5/hf2pig2EN8e2tWfu5Wqador1h5Kic/RpBkNXqAjQlzMWG/78yQPi HNQx2mgwNz0L/J5SvtZlELv4ySzvtowpo9jqJL4g6C70hvE2KaiB93LurWLHar1yBZil jJLYTQYq9+97Gv7gROQJ9LLEOOPXx5vYASBzPWGfBQ9eGJtlZXFzB7kYJ1RODQpaWajA 6Y5wgn8aVopOIKVTTIvk2Ehb/tDyiIrvetxbxvIA9dSa3Exjr2dJ3Q4SUA441KDR9laH Xq/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jM3hkD4CvKdZOABArp0NAjoE5fJXpKMpDEFZ8ZRfbww=; b=Ftw6lsqoqsNctCA/B/DUJ8V+EbytZhmYlm0ZiRmzPyc/6aO+G15ORAEnkg/IIpg5T4 9NmFGGynhsBxdJ0Zf0mOjKsWOhg0AX/uf3kRzd/yuPAjvwmI/Wm7yY+USNxjsn74MsO+ zoyZFhbCKBjyWZLMUrS8UiSNAcrxZL5HhrLztmOPyyDzmmO3NJgLU3MQIa/ZzVsONKL8 l4uymQjye+ponB99q8P7gI62zAytNHkhKkfoK8INH8C5l282G+ockVqpLbWRVKDc6225 u4p/9Yu7YiNY8Vsbjx7tlylRkS6gydaoKH6qHkxfXUo5kepGrBZMZ6AjBHP9xL0WCTqz ji/A== X-Gm-Message-State: AOAM532gpLd4NiBz4Qg2LnHz/DUqfYFglDU//grs2cSDhb2ocs3VVeXX stQRnQ1eFhZV9Y5fTNUsgPYF6lTvtpA= X-Google-Smtp-Source: ABdhPJzhl/1wzOaHLn3PyzVJkEJJRyc4XXVJu7ARMwa7luXm4cOkHCIGQF27nvIJGA8c1nh7mXKGUA== X-Received: by 2002:a1c:1c1:: with SMTP id 184mr16961171wmb.112.1608561902836; Mon, 21 Dec 2020 06:45:02 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:02 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 15/55] target/i386: Check privilege level for protected mode 'int N' task gate Date: Mon, 21 Dec 2020 15:44:07 +0100 Message-Id: <20201221144447.26161-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell When the 'int N' instruction is executed in protected mode, the pseudocode in the architecture manual specifies that we need to check: * vector number within IDT limits * selected IDT descriptor is a valid type (interrupt, trap or task gate) * if this was a software interrupt then gate DPL < CPL The way we had structured the code meant that the privilege check for software interrupts ended up not in the code path taken for task gate handling, because all of the task gate handling code was in the 'case 5' of the switch which was checking "is this descriptor a valid type". Move the task gate handling code out of that switch (so that it is now purely doing the "valid type?" check) and below the software interrupt privilege check. The effect of this missing check was that in a guest userspace binary executing 'int 8' would cause a guest kernel panic rather than the userspace binary being handed a SEGV. This is essentially the same bug fixed in VirtualBox in 2012: https://www.halfdog.net/Security/2012/VirtualBoxSoftwareInterrupt0x8GuestCrash/ Note that for QEMU this is not a security issue because it is only present when using TCG. Fixes: https://bugs.launchpad.net/qemu/+bug/1813201 Signed-off-by: Peter Maydell Message-Id: <20201121224445.16236-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- target/i386/tcg/seg_helper.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index 1255efe7e0..5f2ee6aa7e 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -634,6 +634,24 @@ static void do_interrupt_protected(CPUX86State *env, int intno, int is_int, type = (e2 >> DESC_TYPE_SHIFT) & 0x1f; switch (type) { case 5: /* task gate */ + case 6: /* 286 interrupt gate */ + case 7: /* 286 trap gate */ + case 14: /* 386 interrupt gate */ + case 15: /* 386 trap gate */ + break; + default: + raise_exception_err(env, EXCP0D_GPF, intno * 8 + 2); + break; + } + dpl = (e2 >> DESC_DPL_SHIFT) & 3; + cpl = env->hflags & HF_CPL_MASK; + /* check privilege if software int */ + if (is_int && dpl < cpl) { + raise_exception_err(env, EXCP0D_GPF, intno * 8 + 2); + } + + if (type == 5) { + /* task gate */ /* must do that check here to return the correct error code */ if (!(e2 & DESC_P_MASK)) { raise_exception_err(env, EXCP0B_NOSEG, intno * 8 + 2); @@ -661,21 +679,10 @@ static void do_interrupt_protected(CPUX86State *env, int intno, int is_int, SET_ESP(esp, mask); } return; - case 6: /* 286 interrupt gate */ - case 7: /* 286 trap gate */ - case 14: /* 386 interrupt gate */ - case 15: /* 386 trap gate */ - break; - default: - raise_exception_err(env, EXCP0D_GPF, intno * 8 + 2); - break; - } - dpl = (e2 >> DESC_DPL_SHIFT) & 3; - cpl = env->hflags & HF_CPL_MASK; - /* check privilege if software int */ - if (is_int && dpl < cpl) { - raise_exception_err(env, EXCP0D_GPF, intno * 8 + 2); } + + /* Otherwise, trap or interrupt gate */ + /* check valid bit */ if (!(e2 & DESC_P_MASK)) { raise_exception_err(env, EXCP0B_NOSEG, intno * 8 + 2); From patchwork Mon Dec 21 14:44:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=diKeSQEA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Vr1rXkz9sVn for ; Tue, 22 Dec 2020 01:52:04 +1100 (AEDT) Received: from localhost ([::1]:56968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMXa-0003nP-82 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:52:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMQw-0004nw-Mq for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:12 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:37972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQs-0007iy-5J for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:07 -0500 Received: by mail-wm1-x330.google.com with SMTP id g185so11155496wmf.3 for ; Mon, 21 Dec 2020 06:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FRiRMprxEbTuanPFa+vfiS+7oQCln0jPyNHRYMzrFlA=; b=diKeSQEALEaN+HtY4XFypF+GoTZH6GL9qAQGHnbQccOkGWqGLuMlx8isBeU5lVKHju i68yN0RPKY/11djScWIkQiqctHRGXjCKLDxWCpQvGqTBUzO209vnkQV+PJ/x5M+UIj40 EvMnvmPlzW/17YQEsjb2SJHzmWLvGR+d1eSiW002A2r6gXRWhBspxHf12kQpf35B3vDO mKluWJJ3n06wtq9iHGaquCt4ocejlXhuY7KSN5JSgxQj3C4xRmIVh0U/Azw+HqUjS7QB nT4wMaiVnPp2jvk/i90WYn94jmvfdcEtMSPPlvpeZ0V8zEoDgGlixVOricjd67AOUWrW x1rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FRiRMprxEbTuanPFa+vfiS+7oQCln0jPyNHRYMzrFlA=; b=c2mJj23XoYUDLEyfYbHKRwwosrjBYOevaDWGDxOumzFDdB41Dg9I4X2AEOKgY1JPkH uXJ4VA3Kgy9GCUFSgj8QzFKNm2/PKiP7lEBeYMmDMTz/l2oRLmu9P2IQqNRW9hnlk4H7 xDA1SEPJ7YBEyelMLuh2eGwwmbxdiP/rA4dTC+b/wj+ciZE2LS65CGTM4hBjIM2hfGBy nID7qtWwhJmQjgk3PVU+vDKvn+w/TV18DYRcmE8ZLNuigOTyqqyw6Lk+4J88uCu7A3Kx rCmfhlOTaFOa29bZBZ93kKdfEiadNqhMDtDECqFzlJHoS6E2TQexUb5KEI30bhYnOydv vXSw== X-Gm-Message-State: AOAM533e1zhrBlcIOFRVSxLebkLJiaABUl6bsh+tDBiq1wT6yHpFpu9W QS+Mz7Qjjw9r0XiaB+86AuAbN1g72TE= X-Google-Smtp-Source: ABdhPJxLx9Ogjp9ATyLPrIIWKP7NRAf8AhRqxdsTVAgf3vmtpfVbHsHxuwB/4xjCX7mTWrzvA/BLvA== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr17290912wmg.152.1608561903632; Mon, 21 Dec 2020 06:45:03 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:03 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 16/55] configure,meson: add option to enable LTO Date: Mon, 21 Dec 2020 15:44:08 +0100 Message-Id: <20201221144447.26161-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Buono Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono This patch allows to compile QEMU with link-time optimization (LTO). Compilation with LTO is handled directly by meson. This patch only adds the option in configure and forwards the request to meson Tested with all major versions of clang from 6 to 12 Signed-off-by: Daniele Buono Message-Id: <20201204230615.2392-2-dbuono@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini --- configure | 7 +++++++ meson.build | 1 + 2 files changed, 8 insertions(+) diff --git a/configure b/configure index 7ec4a11d1f..55e77bf289 100755 --- a/configure +++ b/configure @@ -242,6 +242,7 @@ host_cc="cc" audio_win_int="" libs_qga="" debug_info="yes" +lto="false" stack_protector="" safe_stack="" use_containers="yes" @@ -1182,6 +1183,10 @@ for opt do ;; --disable-werror) werror="no" ;; + --enable-lto) lto="true" + ;; + --disable-lto) lto="false" + ;; --enable-stack-protector) stack_protector="yes" ;; --disable-stack-protector) stack_protector="no" @@ -1779,6 +1784,7 @@ disabled with --disable-FEATURE, default is enabled if available module-upgrades try to load modules from alternate paths for upgrades debug-tcg TCG debugging (default is disabled) debug-info debugging information + lto Enable Link-Time Optimization. sparse sparse checker safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >= 3.7 and requires coroutine backend ucontext. @@ -6964,6 +6970,7 @@ NINJA=$ninja $meson setup \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ ${staticpic:+-Db_staticpic=$staticpic} \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ + -Db_lto=$lto \ -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \ -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \ -Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \ diff --git a/meson.build b/meson.build index 372576f82c..d05d880114 100644 --- a/meson.build +++ b/meson.build @@ -2080,6 +2080,7 @@ summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')} summary_info += {'sparse enabled': sparse.found()} summary_info += {'strip binaries': get_option('strip')} summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')} +summary_info += {'link-time optimization (LTO)': get_option('b_lto')} summary_info += {'static build': config_host.has_key('CONFIG_STATIC')} if targetos == 'darwin' summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')} From patchwork Mon Dec 21 14:44:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dTZmcNag; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02hb5y35z9sVs for ; Tue, 22 Dec 2020 02:00:31 +1100 (AEDT) Received: from localhost ([::1]:53918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMfl-00061t-PP for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:00:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMR3-0004p2-JV for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:20 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:37443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQs-0007j6-5S for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:09 -0500 Received: by mail-wr1-x42d.google.com with SMTP id i9so11318406wrc.4 for ; Mon, 21 Dec 2020 06:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=15OOeZsk+mcTfoUWFloM2Ma8zdgqacvLaanjGdJWlmI=; b=dTZmcNagvfKMQCOLMim0ZfUdygCcx8YgmGcYIyRvMoC18xniaaQ6XPTmvZP1eX9Uok l4Ho3cksNQoET3br5TFdz327FxcOpJPs1obgIHf7vJPMfdnhBhtwoz/ayQTidBxSdZIQ 0t6auO86niGPWx2fbJvaGH4+M0hJFz2l633+d0gp+99Bfv+mOy1uX9mUaHCBgTpR8PiI ImoaX8mD76Y/WPFCm4SvUUfMGcCEOFLx1ufPoNDHtcD0abrIzWOs533sNzW0a8P3xSzV GdowQ9Y37osVYba3ZjCHnwt263Lz/ZN89ANyTViGAO82Oq5YtzzsDTkixp0dhYGVbBtA z4mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=15OOeZsk+mcTfoUWFloM2Ma8zdgqacvLaanjGdJWlmI=; b=br2VVoiEdfCH6j3FprAFv/XhG70j8vSUknHmUHjBQPECV0xHI95IOywMyumqLfrZX3 8VsZl9fVnxyxMszzcrUEcfgqAHz0yzG2pjW0mwX5zLPxHNd19S++Pu7gea9lOsVIG3lX 43cxggL2Tvg89YDC3a0pUFgPwld3AaD8MNpDR9mtDSiWZaPQUD1B8mPS5/wGxMGJT0hx jhsUscXvfXJxQx8Atr41RqSV8YrHvuPfHMQVDtTxU6dH1wNn4z127fkco5CUhY1uwj6g 2cJ+QzwFiPVchUx4y/gLFqEkyQ6e67RmPlLizZmjXieAsFf8dexo39/ahXf1bEywROIl i8cQ== X-Gm-Message-State: AOAM530k23rvyruqRdJT7Ix8z0ManwrysaSRrNviyXfuw3+rg7EiTgdx gZ+RxBoBtc/J2n3c8UjcjP4kCT2ewW0= X-Google-Smtp-Source: ABdhPJxshuGukNtVKahnAw1lDcYR2piF5psn1isuYtas/s/PE35A8g+D0kBE33ZiG2BwbVp6lbh7Nw== X-Received: by 2002:adf:dc08:: with SMTP id t8mr18917878wri.195.1608561904553; Mon, 21 Dec 2020 06:45:04 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:04 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 17/55] cfi: Initial support for cfi-icall in QEMU Date: Mon, 21 Dec 2020 15:44:09 +0100 Message-Id: <20201221144447.26161-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Buono Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono LLVM/Clang, supports runtime checks for forward-edge Control-Flow Integrity (CFI). CFI on indirect function calls (cfi-icall) ensures that, in indirect function calls, the function called is of the right signature for the pointer type defined at compile time. For this check to work, the code must always respect the function signature when using function pointer, the function must be defined at compile time, and be compiled with link-time optimization. This rules out, for example, shared libraries that are dynamically loaded (given that functions are not known at compile time), and code that is dynamically generated at run-time. This patch: 1) Introduces the CONFIG_CFI flag to support cfi in QEMU 2) Introduces a decorator to allow the definition of "sensitive" functions, where a non-instrumented function may be called at runtime through a pointer. The decorator will take care of disabling cfi-icall checks on such functions, when cfi is enabled. 3) Marks functions currently in QEMU that exhibit such behavior, in particular: - The function in TCG that calls pre-compiled TBs - The function in TCI that interprets instructions - Functions in the plugin infrastructures that jump to callbacks - Functions in util that directly call a signal handler Signed-off-by: Daniele Buono Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c | 11 +++++++++++ include/qemu/compiler.h | 12 ++++++++++++ plugins/core.c | 37 +++++++++++++++++++++++++++++++++++++ plugins/loader.c | 7 +++++++ tcg/tci.c | 7 +++++++ util/main-loop.c | 11 +++++++++++ util/oslib-posix.c | 11 +++++++++++ 7 files changed, 96 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8689c54499..fa325bb3d8 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -26,6 +26,7 @@ #include "exec/exec-all.h" #include "tcg/tcg.h" #include "qemu/atomic.h" +#include "qemu/compiler.h" #include "sysemu/qtest.h" #include "qemu/timer.h" #include "qemu/rcu.h" @@ -144,6 +145,16 @@ static void init_delay_params(SyncClocks *sc, const CPUState *cpu) #endif /* CONFIG USER ONLY */ /* Execute a TB, and fix up the CPU state afterwards if necessary */ +/* + * Disable CFI checks. + * TCG creates binary blobs at runtime, with the transformed code. + * A TB is a blob of binary code, created at runtime and called with an + * indirect function call. Since such function did not exist at compile time, + * the CFI runtime has no way to verify its signature and would fail. + * TCG is not considered a security-sensitive part of QEMU so this does not + * affect the impact of CFI in environment with high security requirements + */ +QEMU_DISABLE_CFI static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb) { CPUArchState *env = cpu->env_ptr; diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 1b9e58e82b..ad4a02db36 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -222,4 +222,16 @@ extern void QEMU_NORETURN QEMU_ERROR("code path is reachable") #define qemu_build_not_reached() g_assert_not_reached() #endif +#ifdef CONFIG_CFI +/* + * If CFI is enabled, use an attribute to disable cfi-icall on the following + * function + */ +#define QEMU_DISABLE_CFI __attribute__((no_sanitize("cfi-icall"))) +#else +/* If CFI is not enabled, use an empty define to not change the behavior */ +#define QEMU_DISABLE_CFI +#endif + + #endif /* COMPILER_H */ diff --git a/plugins/core.c b/plugins/core.c index 51bfc94787..87b823bbc4 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -31,6 +31,7 @@ #include "tcg/tcg-op.h" #include "trace/mem-internal.h" /* mem_info macros */ #include "plugin.h" +#include "qemu/compiler.h" struct qemu_plugin_cb { struct qemu_plugin_ctx *ctx; @@ -90,6 +91,12 @@ void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx, } } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI static void plugin_vcpu_cb__simple(CPUState *cpu, enum qemu_plugin_event ev) { struct qemu_plugin_cb *cb, *next; @@ -111,6 +118,12 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum qemu_plugin_event ev) } } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI static void plugin_cb__simple(enum qemu_plugin_event ev) { struct qemu_plugin_cb *cb, *next; @@ -128,6 +141,12 @@ static void plugin_cb__simple(enum qemu_plugin_event ev) } } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI static void plugin_cb__udata(enum qemu_plugin_event ev) { struct qemu_plugin_cb *cb, *next; @@ -325,6 +344,12 @@ void plugin_register_vcpu_mem_cb(GArray **arr, dyn_cb->f.generic = cb; } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb) { struct qemu_plugin_cb *cb, *next; @@ -339,6 +364,12 @@ void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb) } } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI void qemu_plugin_vcpu_syscall(CPUState *cpu, int64_t num, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a5, @@ -358,6 +389,12 @@ qemu_plugin_vcpu_syscall(CPUState *cpu, int64_t num, uint64_t a1, uint64_t a2, } } +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do not + * have type information + */ +QEMU_DISABLE_CFI void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64_t num, int64_t ret) { struct qemu_plugin_cb *cb, *next; diff --git a/plugins/loader.c b/plugins/loader.c index 5cb9794fda..8550e61184 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -32,6 +32,7 @@ #ifndef CONFIG_USER_ONLY #include "hw/boards.h" #endif +#include "qemu/compiler.h" #include "plugin.h" @@ -150,6 +151,12 @@ static uint64_t xorshift64star(uint64_t x) return x * UINT64_C(2685821657736338717); } +/* + * Disable CFI checks. + * The install and version functions have been loaded from an external library + * so we do not have type information + */ +QEMU_DISABLE_CFI static int plugin_load(struct qemu_plugin_desc *desc, const qemu_info_t *info, Error **errp) { qemu_plugin_install_func_t install; diff --git a/tcg/tci.c b/tcg/tci.c index 82039fd163..5d97b7c71c 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -31,6 +31,7 @@ #include "tcg/tcg.h" /* MAX_OPC_PARAM_IARGS */ #include "exec/cpu_ldst.h" #include "tcg/tcg-op.h" +#include "qemu/compiler.h" /* Marker for missing code. */ #define TODO() \ @@ -475,6 +476,12 @@ static bool tci_compare64(uint64_t u0, uint64_t u1, TCGCond condition) #endif /* Interpret pseudo code in tb. */ +/* + * Disable CFI checks. + * One possible operation in the pseudo code is a call to binary code. + * Therefore, disable CFI checks in the interpreter function + */ +QEMU_DISABLE_CFI uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) { tcg_target_ulong regs[TCG_TARGET_NB_REGS]; diff --git a/util/main-loop.c b/util/main-loop.c index 6470f8eae3..6bfc7c46f5 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -33,6 +33,7 @@ #include "block/aio.h" #include "qemu/error-report.h" #include "qemu/queue.h" +#include "qemu/compiler.h" #ifndef _WIN32 #include @@ -44,6 +45,16 @@ * use signalfd to listen for them. We rely on whatever the current signal * handler is to dispatch the signals when we receive them. */ +/* + * Disable CFI checks. + * We are going to call a signal hander directly. Such handler may or may not + * have been defined in our binary, so there's no guarantee that the pointer + * used to set the handler is a cfi-valid pointer. Since the handlers are + * stored in kernel memory, changing the handler to an attacker-defined + * function requires being able to call a sigaction() syscall, + * which is not as easy as overwriting a pointer in memory. + */ +QEMU_DISABLE_CFI static void sigfd_handler(void *opaque) { int fd = (intptr_t)opaque; diff --git a/util/oslib-posix.c b/util/oslib-posix.c index f15234b5c0..f1e2801b11 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -39,6 +39,7 @@ #include "qemu/thread.h" #include #include "qemu/cutils.h" +#include "qemu/compiler.h" #ifdef CONFIG_LINUX #include @@ -773,6 +774,16 @@ void qemu_free_stack(void *stack, size_t sz) munmap(stack, sz); } +/* + * Disable CFI checks. + * We are going to call a signal hander directly. Such handler may or may not + * have been defined in our binary, so there's no guarantee that the pointer + * used to set the handler is a cfi-valid pointer. Since the handlers are + * stored in kernel memory, changing the handler to an attacker-defined + * function requires being able to call a sigaction() syscall, + * which is not as easy as overwriting a pointer in memory. + */ +QEMU_DISABLE_CFI void sigaction_invoke(struct sigaction *action, struct qemu_signalfd_siginfo *info) { From patchwork Mon Dec 21 14:44:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ecuEK4db; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02Zx37S1z9sVs for ; Tue, 22 Dec 2020 01:55:37 +1100 (AEDT) Received: from localhost ([::1]:37120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMb1-0007Ix-Bu for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:55:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMR3-0004p1-Jd for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:20 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:53398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQs-0007j9-Mc for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:08 -0500 Received: by mail-wm1-x335.google.com with SMTP id k10so10101573wmi.3 for ; Mon, 21 Dec 2020 06:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gYspYSdt30DXBHaBvvLQ4na6ygsYl7WA6Nt+loCvfEg=; b=ecuEK4db4N/XlKiaf0h3DbkhpZT3LM6mAsdkBRc0O19FMmAirCbxIprJo3lUld4DeH 9tNa4AGvIbCg+RHx3EKpclCjZqKbpUhfbSg1qDMdheltmjLx3S2NgMpZVFoI8zsds2LG eZei5Dfa/C0V7EF9XqDcExDy3ZBMIg3y0SDap6IGP8/uxAHsKR7DZx+vL2ng/iANUTzK eVf8XoXVj0K55198cCAEUaODLMUcwANwVwRkgJPcjnw5RuHomm5ZHHSgQ5LyHQDu4zuU TRs2AoO+SAGbba+i68ZokYQF3kglTCu0T8Bx9Rr0/TqpQqdRzWVBO6eBx5dpWc/JW9pK D1vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=gYspYSdt30DXBHaBvvLQ4na6ygsYl7WA6Nt+loCvfEg=; b=ntrZgwy0XZ+lJ0pvnlQVV+VDpW4NQPGu1XsOcgI8yb7+L7Vy55tsBAFlCcq9uyHwWH OA0nccIO4LZV1ibIOdbN2VnpsUHzzqFnR+WeDVpfnIbU5n4N0nWoJwo6Q7fkfCad7YdZ 5HIrE+BKlc0viWRJ9o7W8wueI4XOViVvFSgG052abMmqlKFfhlzTRag+cfAv9R9uoxOo vINzaB4eiQZidLhZUZuzhEDEBmEHrxiTLE7cLS2MS0lsgYqYZb5NObV8EuwhwVlsvo0N BAyPpxAXaGBUw9FKnldhKRzeSvzajh6TFTQQRRzsz1T0fu0vPBrzfsrJJOVrQl6xxbnf fBmA== X-Gm-Message-State: AOAM532rJtLfj/TTfTqtACVRx2D6tMnjghfl8bk0IAhZJsPGxKOexvQj 4uFPrJwOAmoK+dzBSCOu+xihSpK8Yms= X-Google-Smtp-Source: ABdhPJyltpivtxizSGKFwYdujqjEm9OaM8qcqIozO4NLcTPkKeIXAdZvDxMX1p9RpE5qCXNSiPX30Q== X-Received: by 2002:a05:600c:25c2:: with SMTP id 2mr17485130wml.170.1608561905392; Mon, 21 Dec 2020 06:45:05 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:04 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/55] check-block: enable iotests with cfi-icall Date: Mon, 21 Dec 2020 15:44:10 +0100 Message-Id: <20201221144447.26161-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Buono Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono cfi-icall is a form of Control-Flow Integrity for indirect function calls implemented by llvm. It is enabled with a -fsanitize flag. iotests are currently disabled when -fsanitize options is used, with the exception of SafeStack. This patch implements a generic filtering mechanism to allow iotests with a set of known-to-be-safe -fsanitize option. Then marks SafeStack and the new options used for cfi-icall safe for iotests Signed-off-by: Daniele Buono Message-Id: <20201204230615.2392-4-dbuono@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini --- tests/check-block.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/check-block.sh b/tests/check-block.sh index f6b1bda7b9..fb4c1baae9 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -21,14 +21,18 @@ if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then exit 0 fi -# Disable tests with any sanitizer except for SafeStack -CFLAGS=$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) -SANITIZE_FLAGS="" -#Remove all occurrencies of -fsanitize=safe-stack -for i in ${CFLAGS}; do - if [ "${i}" != "-fsanitize=safe-stack" ]; then - SANITIZE_FLAGS="${SANITIZE_FLAGS} ${i}" +# Disable tests with any sanitizer except for specific ones +SANITIZE_FLAGS=$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) +ALLOWED_SANITIZE_FLAGS="safe-stack cfi-icall" +#Remove all occurrencies of allowed Sanitize flags +for j in ${ALLOWED_SANITIZE_FLAGS}; do + TMP_FLAGS=${SANITIZE_FLAGS} + SANITIZE_FLAGS="" + for i in ${TMP_FLAGS}; do + if ! echo ${i} | grep -q "${j}" 2>/dev/null; then + SANITIZE_FLAGS="${SANITIZE_FLAGS} ${i}" fi + done done if echo ${SANITIZE_FLAGS} | grep -q "\-fsanitize" 2>/dev/null; then # Have a sanitize flag that is not allowed, stop From patchwork Mon Dec 21 14:44:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=maPSh4h9; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02m51XHyz9sVS for ; Tue, 22 Dec 2020 02:03:33 +1100 (AEDT) Received: from localhost ([::1]:34138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMih-0001aD-5P for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:03:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMR6-0004pE-RW for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:22 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:37449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQu-0007jK-1z for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:13 -0500 Received: by mail-wr1-x433.google.com with SMTP id i9so11318491wrc.4 for ; Mon, 21 Dec 2020 06:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kJa5b37NoOOjx5BjBu3wk4ktmMHtcJ+x4xO2oRIBMmg=; b=maPSh4h99CFqTPG/1Kl4q/wwdH+JsoVbG3MU5JMg6QLUB3I+ql3w21ILgWM8kyxDyr 9eUhtK7LvZdR7FPhdrZiPPaujYmXJhfJWJd9TrCOcaeeqB19T+72SO7H+bOeTi0pQq02 q0L2DKLPNAMxVeIN7lL/QhsXn1wrkwmZw5gjfmgrfrcdJ0rNJJzYNH6+OyK0FjD/GGFf NI2T4PpPdmlnRiF5YwrW5wy2g5z2B/JtY+7j/ELiM0dfAUDWRAUzxXk73MaJoAyPZ4pP xCyjsZChe/1pcxuQq+SG4qWdVvd23CZV0r+7gUF03JSCl0FIs+vvQy2hjlPyHtSeIZSg t5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kJa5b37NoOOjx5BjBu3wk4ktmMHtcJ+x4xO2oRIBMmg=; b=FwZ6knX114nJBhj24JewFj2WrlYTQbuLeGJJnHpy76HY8li1uDU5Kxeb5Wv9U5yUq2 sgr6cI6oqd4LNaapsycPzh/DWExa8l7GeWaGQC2WOSZwCM9uocKMSC8G4vBm+yTkr5f6 IKTrOq4lEm6Jz3yCcZoXo7nItX2eo0ZkzmMxIrWo0pdZLLVIjMGB7D4o8S26Vrec2B0p Cn2cgd2JIg9i8G2FhhKwde9woHALG12nZqYNhnAedqrPhlst6YinsZxlxtpgAP3RgE0L ILAnbUN60nKzUYHq30fUhHNqhYtky7fj0r0jj4k+BE7g5shbLfIy0wWuxobWQCN3W+Yo 4rkw== X-Gm-Message-State: AOAM531tljx3RAXfpNKj0CwohDdtWpGeqYBDKNM9echpowJCdDMHxq5b YaUTsaHl1jsamqb7NepMAUZQPSXN0jI= X-Google-Smtp-Source: ABdhPJzAmeg4aUZe5u5YjwgVIliOz0FirijPdHYBvUcujy3+9jaMarxaKkOhmo2a22u8z9vmLba+aQ== X-Received: by 2002:adf:f891:: with SMTP id u17mr19249942wrp.253.1608561906240; Mon, 21 Dec 2020 06:45:06 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:05 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 19/55] configure,meson: support Control-Flow Integrity Date: Mon, 21 Dec 2020 15:44:11 +0100 Message-Id: <20201221144447.26161-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LONGWORDS=2.035, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Buono Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono This patch adds a flag to enable/disable control flow integrity checks on indirect function calls. This feature only allows indirect function calls at runtime to functions with compatible signatures. This feature is only provided by LLVM/Clang, and depends on link-time optimization which is currently supported only with LLVM/Clang >= 6.0 We also add an option to enable a debugging version of cfi, with verbose output in case of a CFI violation. CFI on indirect function calls does not support calls to functions in shared libraries (since they were not known at compile time), and such calls are forbidden. QEMU relies on dlopen/dlsym when using modules, so we make modules incompatible with CFI. All the checks are performed in meson.build. configure is only used to forward the flags to meson Signed-off-by: Daniele Buono Message-Id: <20201204230615.2392-5-dbuono@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini --- configure | 22 ++++++++++++++++++++-- meson.build | 44 ++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 4 ++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 55e77bf289..f470cdbe50 100755 --- a/configure +++ b/configure @@ -411,6 +411,8 @@ coroutine="" coroutine_pool="$default_feature" debug_stack_usage="no" crypto_afalg="no" +cfi="false" +cfi_debug="false" seccomp="$default_feature" glusterfs="$default_feature" glusterfs_xlator_opt="no" @@ -1195,6 +1197,16 @@ for opt do ;; --disable-safe-stack) safe_stack="no" ;; + --enable-cfi) + cfi="true"; + lto="true"; + ;; + --disable-cfi) cfi="false" + ;; + --enable-cfi-debug) cfi_debug="true" + ;; + --disable-cfi-debug) cfi_debug="false" + ;; --disable-curses) curses="disabled" ;; --enable-curses) curses="enabled" @@ -1788,7 +1800,13 @@ disabled with --disable-FEATURE, default is enabled if available sparse sparse checker safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >= 3.7 and requires coroutine backend ucontext. - + cfi Enable Control-Flow Integrity for indirect function calls. + In case of a cfi violation, QEMU is terminated with SIGILL + Depends on lto and is incompatible with modules + Automatically enables Link-Time Optimization (lto) + cfi-debug In case of a cfi violation, a message containing the line that + triggered the error is written to stderr. After the error, + QEMU is still terminated with SIGILL gnutls GNUTLS cryptography support nettle nettle cryptography support gcrypt libgcrypt cryptography support @@ -6970,7 +6988,7 @@ NINJA=$ninja $meson setup \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ ${staticpic:+-Db_staticpic=$staticpic} \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ - -Db_lto=$lto \ + -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \ -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \ -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \ -Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \ diff --git a/meson.build b/meson.build index d05d880114..94ef023ad1 100644 --- a/meson.build +++ b/meson.build @@ -773,6 +773,7 @@ elif get_option('vhost_user_blk_server').disabled() or not have_system have_vhost_user_blk_server = false endif + if get_option('fuse').disabled() and get_option('fuse_lseek').enabled() error('Cannot enable fuse-lseek while fuse is disabled') endif @@ -795,6 +796,46 @@ if not get_option('fuse_lseek').disabled() endif endif +if get_option('cfi') + cfi_flags=[] + # Check for dependency on LTO + if not get_option('b_lto') + error('Selected Control-Flow Integrity but LTO is disabled') + endif + if config_host.has_key('CONFIG_MODULES') + error('Selected Control-Flow Integrity is not compatible with modules') + endif + # Check for cfi flags. CFI requires LTO so we can't use + # get_supported_arguments, but need a more complex "compiles" which allows + # custom arguments + if cc.compiles('int main () { return 0; }', name: '-fsanitize=cfi-icall', + args: ['-flto', '-fsanitize=cfi-icall'] ) + cfi_flags += '-fsanitize=cfi-icall' + else + error('-fsanitize=cfi-icall is not supported by the compiler') + endif + if cc.compiles('int main () { return 0; }', + name: '-fsanitize-cfi-icall-generalize-pointers', + args: ['-flto', '-fsanitize=cfi-icall', + '-fsanitize-cfi-icall-generalize-pointers'] ) + cfi_flags += '-fsanitize-cfi-icall-generalize-pointers' + else + error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler') + endif + if get_option('cfi_debug') + if cc.compiles('int main () { return 0; }', + name: '-fno-sanitize-trap=cfi-icall', + args: ['-flto', '-fsanitize=cfi-icall', + '-fno-sanitize-trap=cfi-icall'] ) + cfi_flags += '-fno-sanitize-trap=cfi-icall' + else + error('-fno-sanitize-trap=cfi-icall is not supported by the compiler') + endif + endif + add_project_arguments(cfi_flags, native: false, language: ['c', 'cpp', 'objc']) + add_project_link_arguments(cfi_flags, native: false, language: ['c', 'cpp', 'objc']) +endif + ################# # config-host.h # ################# @@ -831,6 +872,7 @@ config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) config_host_data.set('CONFIG_STATX', has_statx) config_host_data.set('CONFIG_FUSE', fuse.found()) config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found()) +config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) @@ -2195,6 +2237,8 @@ if targetos == 'windows' summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI')} endif summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')} +summary_info += {'CFI support': get_option('cfi')} +summary_info += {'CFI debug support': get_option('cfi_debug')} summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']} summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'} summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')} diff --git a/meson_options.txt b/meson_options.txt index f8f053b5c8..242e0769fb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -35,6 +35,10 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto', description: 'Xen PCI passthrough support') option('tcg', type: 'feature', value: 'auto', description: 'TCG support') +option('cfi', type: 'boolean', value: 'false', + description: 'Control-Flow Integrity (CFI)') +option('cfi_debug', type: 'boolean', value: 'false', + description: 'Verbose errors in case of CFI violation') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') From patchwork Mon Dec 21 14:44:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sepDO8Xw; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02X33DV7z9sVn for ; Tue, 22 Dec 2020 01:53:07 +1100 (AEDT) Received: from localhost ([::1]:59442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMYb-0004oR-EB for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:53:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMR9-0004q8-81 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:39861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMQz-0007kA-6g for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:18 -0500 Received: by mail-wr1-x42a.google.com with SMTP id c5so11286231wrp.6 for ; Mon, 21 Dec 2020 06:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iK8F7/bAs7QXNuU28+Jy5Klkp7u+0KvKwi4P7D41jGA=; b=sepDO8XwQkkCVkuzbURLhLxsfr0NNeRYLUHj2B0aUkqItM/0ZqpYZrMyTkwX6tHo5D F6OlLljyTTqGJjinIKUdUM4k8N84uKkEd+oI9WE/416jY3ytpXPpHBjUKzNGcYM6NNfi BnT2dJ91a8kriif6Qx/lq1hQNa5jBmOGzho7RjdNnCxOPDQGN/oRU1rQpoaRmvpGmyHu Ym3f8hig5A+mcnzH6rprf2/CsgmieGy8oW/TEV6IUqjqN/6IGF7XsseJKHWKozrbgZL+ u93YXymsPLxeyI/j4N1oDRx5FurX5L4hj15Iia1dxW593JaL+JawOELueYHkLjbcMyjR fH6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iK8F7/bAs7QXNuU28+Jy5Klkp7u+0KvKwi4P7D41jGA=; b=kVobrQZ9Z+G9t25aqqie3uVFYMYsqMwEkK76ZdX5nR7kk2LOkfeHfvOvo5vsO7/nCz pTY9dnn8wa+ehUeUY0iDP35699HVX8BVSPo6aXd5kmtksQRv2LfI0ydYaF4dJdTgTlgV X5KSa/ejdV3bD3KS7ZYp0eNuzkzwbcr10edvrEoQkKq+I7FgxgOC6PP9bJ1dGS7XoIoN /3MRAQoh8pB6wQaH81zA140iI+3Gx4eKTPrMZV6x/gi94EUz/kXRzejKDyISw6hND6p6 yAaikAY7FIKBJuxClJrQqeoLxEn/uVkRlLQz8EqXKUX3fDfXBuS8qxYXHTi2PiyVbusy M/bA== X-Gm-Message-State: AOAM530uLGwMQW6DmlGL79ieX5IoBrRoZOC2TNZR5xjZ9Kz66IkGoBqf /WtLNk1dfwED3OUKJfvZH1JhFgNbkj8= X-Google-Smtp-Source: ABdhPJx5qNKXG6AtI8GTtWXCStKbuRvDK6ajNtBVXJX7Qn3wy9kuuqdeSz+gBN4JXiuJgzMCcvY0hw== X-Received: by 2002:a5d:4905:: with SMTP id x5mr18779860wrq.75.1608561907092; Mon, 21 Dec 2020 06:45:07 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:06 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 20/55] docs: Add CFI Documentation Date: Mon, 21 Dec 2020 15:44:12 +0100 Message-Id: <20201221144447.26161-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Buono Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Daniele Buono Document how to compile with CFI and how to maintain CFI-safe code Signed-off-by: Daniele Buono Message-Id: <20201204230615.2392-6-dbuono@linux.vnet.ibm.com> [Make build system section in index.rst and add the new file. - Paolo] Signed-off-by: Paolo Bonzini --- docs/devel/control-flow-integrity.rst | 137 ++++++++++++++++++++++++++ docs/devel/index.rst | 5 +- 2 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 docs/devel/control-flow-integrity.rst diff --git a/docs/devel/control-flow-integrity.rst b/docs/devel/control-flow-integrity.rst new file mode 100644 index 0000000000..d89d70733d --- /dev/null +++ b/docs/devel/control-flow-integrity.rst @@ -0,0 +1,137 @@ +============================ +Control-Flow Integrity (CFI) +============================ + +This document describes the current control-flow integrity (CFI) mechanism in +QEMU. How it can be enabled, its benefits and deficiencies, and how it affects +new and existing code in QEMU + +Basics +------ + +CFI is a hardening technique that focusing on guaranteeing that indirect +function calls have not been altered by an attacker. +The type used in QEMU is a forward-edge control-flow integrity that ensures +function calls performed through function pointers, always call a "compatible" +function. A compatible function is a function with the same signature of the +function pointer declared in the source code. + +This type of CFI is entirely compiler-based and relies on the compiler knowing +the signature of every function and every function pointer used in the code. +As of now, the only compiler that provides support for CFI is Clang. + +CFI is best used on production binaries, to protect against unknown attack +vectors. + +In case of a CFI violation (i.e. call to a non-compatible function) QEMU will +terminate abruptly, to stop the possible attack. + +Building with CFI +----------------- + +NOTE: CFI requires the use of link-time optimization. Therefore, when CFI is +selected, LTO will be automatically enabled. + +To build with CFI, the minimum requirement is Clang 6+. If you +are planning to also enable fuzzing, then Clang 11+ is needed (more on this +later). + +Given the use of LTO, a version of AR that supports LLVM IR is required. +The easies way of doing this is by selecting the AR provided by LLVM:: + + AR=llvm-ar-9 CC=clang-9 CXX=lang++-9 /path/to/configure --enable-cfi + +CFI is enabled on every binary produced. + +If desired, an additional flag to increase the verbosity of the output in case +of a CFI violation is offered (``--enable-debug-cfi``). + +Using QEMU built with CFI +------------------------- + +A binary with CFI will work exactly like a standard binary. In case of a CFI +violation, the binary will terminate with an illegal instruction signal. + +Incompatible code with CFI +-------------------------- + +As mentioned above, CFI is entirely compiler-based and therefore relies on +compile-time knowledge of the code. This means that, while generally supported +for most code, some specific use pattern can break CFI compatibility, and +create false-positives. The two main patterns that can cause issues are: + +* Just-in-time compiled code: since such code is created at runtime, the jump + to the buffer containing JIT code will fail. + +* Libraries loaded dynamically, e.g. with dlopen/dlsym, since the library was + not known at compile time. + +Current areas of QEMU that are not entirely compatible with CFI are: + +1. TCG, since the idea of TCG is to pre-compile groups of instructions at + runtime to speed-up interpretation, quite similarly to a JIT compiler + +2. TCI, where the interpreter has to interpret the generic *call* operation + +3. Plugins, since a plugin is implemented as an external library + +4. Modules, since they are implemented as an external library + +5. Directly calling signal handlers from the QEMU source code, since the + signal handler may have been provided by an external library or even plugged + at runtime. + +Disabling CFI for a specific function +------------------------------------- + +If you are working on function that is performing a call using an +incompatible way, as described before, you can selectively disable CFI checks +for such function by using the decorator ``QEMU_DISABLE_CFI`` at function +definition, and add an explanation on why the function is not compatible +with CFI. An example of the use of ``QEMU_DISABLE_CFI`` is provided here:: + + /* + * Disable CFI checks. + * TCG creates binary blobs at runtime, with the transformed code. + * A TB is a blob of binary code, created at runtime and called with an + * indirect function call. Since such function did not exist at compile time, + * the CFI runtime has no way to verify its signature and would fail. + * TCG is not considered a security-sensitive part of QEMU so this does not + * affect the impact of CFI in environment with high security requirements + */ + QEMU_DISABLE_CFI + static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb) + +NOTE: CFI needs to be disabled at the **caller** function, (i.e. a compatible +cfi function that calls a non-compatible one), since the check is performed +when the function call is performed. + +CFI and fuzzing +--------------- + +There is generally no advantage of using CFI and fuzzing together, because +they target different environments (production for CFI, debug for fuzzing). + +CFI could be used in conjunction with fuzzing to identify a broader set of +bugs that may not end immediately in a segmentation fault or triggering +an assertion. However, other sanitizers such as address and ub sanitizers +can identify such bugs in a more precise way than CFI. + +There is, however, an interesting use case in using CFI in conjunction with +fuzzing, that is to make sure that CFI is not triggering any false positive +in remote-but-possible parts of the code. + +CFI can be enabled with fuzzing, but with some caveats: +1. Fuzzing relies on the linker performing function wrapping at link-time. +The standard BFD linker does not support function wrapping when LTO is +also enabled. The workaround is to use LLVM's lld linker. +2. Fuzzing also relies on a custom linker script, which is only supported by +lld with version 11+. + +In other words, to compile with fuzzing and CFI, clang 11+ is required, and +lld needs to be used as a linker:: + + AR=llvm-ar-11 CC=clang-11 CXX=lang++-11 /path/to/configure --enable-cfi \ + -enable-fuzzing --extra-ldflags="-fuse-ld=lld" + +and then, compile the fuzzers as usual. diff --git a/docs/devel/index.rst b/docs/devel/index.rst index f10ed77e4c..ea0e1e17ae 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -15,14 +15,15 @@ Contents: build-system kconfig + testing + fuzzing + control-flow-integrity loads-stores memory migration atomics stable-process - testing qtest - fuzzing decodetree secure-coding-practices tcg From patchwork Mon Dec 21 14:44:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rcskzjas; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02yM1KZ2z9sVs for ; Tue, 22 Dec 2020 02:12:27 +1100 (AEDT) Received: from localhost ([::1]:55430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMrJ-0002xm-3s for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:12:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRD-0004rU-Aw for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:39290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007kF-SV for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 3so11167696wmg.4 for ; Mon, 21 Dec 2020 06:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k2+lnQdbYW5o2TDgNfADkbUQIgRgyS2w63tb0hudqTs=; b=rcskzjasiVDtwegj4Q69kAvZaojyi9ah0xtSuf66ndPqt+LFcLRZ5D5InM9AoI8WYD +Zr4lnViNQ1ZoAEP9LqfxOXWDCtJsfpLuBKiZkecvWTMrz2R9KoMtY6AuwPO4pATRq9u ZlMwzgwccdTKrJgXyXxAZonYBUfPWmyVxafjXLBTdmjnp7D1//4lXV4+sg1jlwPrJdlr ZPlu4l6yHkaPvwohSUhVFFvxWMk8mUIbc1Igo2I7yeX+2TTCOVFANnVEMNHDqIO68pR7 DytPV4t/06VfyQujGZ9S42DVp9MMzzdjJD6Mj48wL9UicscteGUWLCecLAm3FXlEFmM4 tRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=k2+lnQdbYW5o2TDgNfADkbUQIgRgyS2w63tb0hudqTs=; b=AoAwgN/KFAhpfVHMTwIt3HJctffUWV333GY7DexWxtj+FjJmb0Ad9jZs4+lLep1bXC ZPJ1lWCTTYb6qDh4coPXUSPie1UYWTgSwxoTwyWPOh9iyvBhrPug4gSY4eF0fcE90vQS e/8PHhGv9IrHmNxP3iqNntMM40TAcZF4Bk1qdJY2MZVbtBm6yiAXkSd1edySw/bWP3tV I7f6hZgkjT1GGPN7mQI1PQ5dOTMc/A25Ey2EIjX3kDsJRQp94IKwALf7tho0BJ8F0rEr Cy1nZj29/vDqx0wOedPReRh0PcSx2mA8AgSaKP9cXxCwk6bIo315rKUmBEp8AV455UuC oVbw== X-Gm-Message-State: AOAM532D6kSVPVoYlTLQyMUf0HCzHwKMgzB0DL5Dluoa0dFIlpdCYlqj IubkXSm01NYVxn6W++LdPn6FnhHkOy4= X-Google-Smtp-Source: ABdhPJz295R5Vz144aGh888m7q722pSsKtLsfen5VnA3TlaBWK7J1mc8T0UCecvP3n+eg88YZzYUAQ== X-Received: by 2002:a1c:f405:: with SMTP id z5mr16672408wma.93.1608561907952; Mon, 21 Dec 2020 06:45:07 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:07 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 21/55] build-sys: fix -static linking of libvhost-user Date: Mon, 21 Dec 2020 15:44:13 +0100 Message-Id: <20201221144447.26161-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Fix linking vhost-user binaries with with ./configure -static, by overriding glib-2.0 dependency with configure results. Fixes: 0df750e9d3a5fea5e1 ("libvhost-user: make it a meson subproject") Reported-by: Peter Maydell Signed-off-by: Marc-André Lureau Message-Id: <20201215080319.136228-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 94ef023ad1..ada35d56e1 100644 --- a/meson.build +++ b/meson.build @@ -268,7 +268,11 @@ endif # grandfathered in from the QEMU Makefiles. add_project_arguments(config_host['GLIB_CFLAGS'].split(), native: false, language: ['c', 'cpp', 'objc']) -glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split()) +glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), + link_args: config_host['GLIB_LIBS'].split()) +# override glib dep with the configure results (for subprojects) +meson.override_dependency('glib-2.0', glib) + gio = not_found if 'CONFIG_GIO' in config_host gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), From patchwork Mon Dec 21 14:44:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EIlwpCo8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02mb4WCQz9sVS for ; Tue, 22 Dec 2020 02:03:59 +1100 (AEDT) Received: from localhost ([::1]:34020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMj7-0001Uk-IJ for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:03:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0004x3-Sw for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:35076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007kS-LH for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: by mail-wr1-x431.google.com with SMTP id r3so11336230wrt.2 for ; Mon, 21 Dec 2020 06:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sUsC5XccRN5FSZ4Jz4t0i7Xc2JZJL4oZwyC7G9+iFnU=; b=EIlwpCo884b38gbE2AmrOeFvBhxslytz50wwLdP/zn44DGymD7eoMLscbnaQ5CjHJv 8N5DnYLR2H5TEaeInyQJyfoQviUpqwdl7S/NN++HM5CZYk7ApDsI5MoHCyw98WZi7cxN DcDIeBSFNZmaWTxR/KnGD18rnyg1XNHM8yejazAxMvMEN6yyMrkORdc2SEuq5jRAQ0B2 AxLAs0wm09goXG3q8MxNphSJ6tkBv3xN28izk70bMKY2gBVw3ohdcWDg5BRrlWp+xU/8 IN86fVjWp+ft6HmFeCZUT1JfnIOgcZ5L7jB73sAT5C0Ot7KH2kwxrsECu0sn8RR1EflB ctpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sUsC5XccRN5FSZ4Jz4t0i7Xc2JZJL4oZwyC7G9+iFnU=; b=KsXkg8DQFSvlvTo9Sr4LNzuoF4CivLUckUAEmUY4jI7z+CutjnD1xESi+9gE7hkAt6 DzVAbFlw/FhOe8omKB2rxwQHyoe/MyY3ESwSAmUGPsBcNxA/3ohCAzKGmpJ4LlzqBhlX GPe5RekKHI6CrBgUaEuqjPUh1nPw0bZM/bhaM5rH5rQBfPNJRE1jyFtBTGSLd25vJ236 v5SlnqYKUw6Dx75M9/MtQD/5rVz8lD04uiSKeZPCPN5oYUZQTqUuJwugq1AQeATxaBw6 yZztaRLLyrA55wKKeWV3WyHJOez91yOe+ki4PTogtk50BB4vOCpiEyy0gvkxEVV/aH6O DlHA== X-Gm-Message-State: AOAM533GXX4ZQitWbRSYJIbqsSjCfXMW5msld10Xbp92+00R/I1i97Xr y0qcbqDFn+s/o9LrdCVeGXMFxChZGZ4= X-Google-Smtp-Source: ABdhPJwD5n//eSq8HKG+6Uixs9xXOhChU60XgsVtkVpcZs8KIWB6opX2TV/8UTVOZaYOyVcUZZGSgw== X-Received: by 2002:a5d:42d0:: with SMTP id t16mr19007660wrr.230.1608561908688; Mon, 21 Dec 2020 06:45:08 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:08 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 22/55] remove TCG includes from common code Date: Mon, 21 Dec 2020 15:44:14 +0100 Message-Id: <20201221144447.26161-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Enable removing tcg/$tcg_arch from the include path when TCG is disabled. Move translate-all.h to include/exec, since stubs exist for the functions defined therein. Signed-off-by: Paolo Bonzini --- accel/stubs/tcg-stub.c | 1 - accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- accel/tcg/user-exec.c | 2 +- cpu.c | 2 +- hw/i386/kvmvapic.c | 1 - {accel/tcg => include/exec}/translate-all.h | 0 monitor/misc.c | 1 - softmmu/physmem.c | 3 +-- 9 files changed, 5 insertions(+), 9 deletions(-) rename {accel/tcg => include/exec}/translate-all.h (100%) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index e4bbf997aa..8c18d3eabd 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -12,7 +12,6 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "tcg/tcg.h" #include "exec/exec-all.h" void tb_flush(CPUState *cpu) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 42ab79c1a5..ced3dc077e 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -33,7 +33,7 @@ #include "exec/helper-proto.h" #include "qemu/atomic.h" #include "qemu/atomic128.h" -#include "translate-all.h" +#include "exec/translate-all.h" #include "trace/trace-root.h" #include "trace/mem.h" #ifdef CONFIG_PLUGIN diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index b7d50a73d4..a1803a1026 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -49,7 +49,7 @@ #include "exec/cputlb.h" #include "exec/tb-hash.h" -#include "translate-all.h" +#include "exec/translate-all.h" #include "qemu/bitmap.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 4ebe25461a..abb9555201 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -23,7 +23,7 @@ #include "tcg/tcg.h" #include "qemu/bitops.h" #include "exec/cpu_ldst.h" -#include "translate-all.h" +#include "exec/translate-all.h" #include "exec/helper-proto.h" #include "qemu/atomic128.h" #include "trace/trace-root.h" diff --git a/cpu.c b/cpu.c index 0c485cdf2d..0b245cda2e 100644 --- a/cpu.c +++ b/cpu.c @@ -34,7 +34,7 @@ #include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "sysemu/replay.h" -#include "translate-all.h" +#include "exec/translate-all.h" #include "exec/log.h" uintptr_t qemu_host_page_size; diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 077c3f4866..2c1898032e 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -21,7 +21,6 @@ #include "hw/sysbus.h" #include "hw/boards.h" #include "migration/vmstate.h" -#include "tcg/tcg.h" #include "qom/object.h" #define VAPIC_IO_PORT 0x7e diff --git a/accel/tcg/translate-all.h b/include/exec/translate-all.h similarity index 100% rename from accel/tcg/translate-all.h rename to include/exec/translate-all.h diff --git a/monitor/misc.c b/monitor/misc.c index fde6e36a0b..9a132f73d1 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -77,7 +77,6 @@ #include "qapi/qmp-event.h" #include "sysemu/cpus.h" #include "qemu/cutils.h" -#include "tcg/tcg.h" #if defined(TARGET_S390X) #include "hw/s390x/storage-keys.h" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 2cd1de4a2c..67b53d39e4 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -25,7 +25,6 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/target_page.h" -#include "tcg/tcg.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/boards.h" @@ -53,7 +52,7 @@ #include "qemu/rcu_queue.h" #include "qemu/main-loop.h" -#include "translate-all.h" +#include "exec/translate-all.h" #include "sysemu/replay.h" #include "exec/memory-internal.h" From patchwork Mon Dec 21 14:44:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rkrDrbFD; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02tR0tB6z9sVS for ; Tue, 22 Dec 2020 02:09:03 +1100 (AEDT) Received: from localhost ([::1]:47024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMo1-0007lg-37 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:09:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRA-0004qI-4h for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR3-0007kf-CD for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:22 -0500 Received: by mail-wm1-x329.google.com with SMTP id x22so10080276wmc.5 for ; Mon, 21 Dec 2020 06:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8AQclSjbXSyXo4pzew2rKKN0nwXaQEd9pNOTA41enWQ=; b=rkrDrbFDbBmnXhuoWYfB08fozP9zDLxDnqI5sZSiGY3FyhVt3ewkOwUiUNfJ+ibQBB EhpDiZ9YuMvAo/ggyIZ7qogNpdUwiw9Eqvyqbz42JXe2vB5R2KdpepDvRjXiThlQSFGa fXCCzsU2/H4LeIPmEeEqeNEIlmwGfTHEwDzwExtM4WDvrb63ZCIdkGeEtPrevD8iaH8T pyMp7j8jR6VLl8HHOywiDx3XgaXaB7hExY3Toi5vkVACq+m+KOiA8wm06KssdQAuw21R L66u/OuCOT1JiuyN2nU2Ik5jOvA+IcHun0XjVUoVfqCXtDCIDr5TtHpDoNBwv8EN+Xo6 zSkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8AQclSjbXSyXo4pzew2rKKN0nwXaQEd9pNOTA41enWQ=; b=KktwAGdE9364qkDxbUc6MPPXyOA+jiGwTkd8VMRf63bihqT4q3QH+RuLcc0C8SbnOm FUyAtttwSIJ4pMQ2wr6TJ41veJA6x3oT1/VVGlxChw09D3D1wnScO5lsD3RunAdrKDSM rfSB3Pl4dLTGIX15iJY7XP7Blc1qyIcsGF8UCg8Mt4qBMiLLoTBVVoKsToSOW6Wh9cSI fA/ToGqHO9t5cPTAXM/Sbn83DBMz1aLottk/38NFQKb3vjGhxiAltx4WV511RXDqlLv0 hFu1bwIGy9vdbYYBPmjDfRqiv4cpmtpVdhFqh2D4lGBtYOA0qzSnqnTonkIYzT14b+PE n/Ew== X-Gm-Message-State: AOAM533xaKvgVQjIcZm+anQi07rqWbGECaOolWhwlBxsSNZnKdEOeZXg GUeRa3rvGWDqUN+5mf5VZOo/yKx8v3k= X-Google-Smtp-Source: ABdhPJzUwXC6El/t6mLgPw35poFSa7BMAbosfIiF9i8Hnrc38xCZoWWlQoLxh68NXlCPL8Zc7B2Wjg== X-Received: by 2002:a7b:c85a:: with SMTP id c26mr16514166wml.160.1608561909582; Mon, 21 Dec 2020 06:45:09 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:09 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 23/55] util: Extract flush_icache_range to cacheflush.c Date: Mon, 21 Dec 2020 15:44:15 +0100 Message-Id: <20201221144447.26161-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Joelle van Dyne , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This has been a tcg-specific function, but is also in use by hardware accelerators via physmem.c. This can cause link errors when tcg is disabled. Signed-off-by: Richard Henderson Reviewed-by: Joelle van Dyne Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201214140314.18544-3-richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini --- MAINTAINERS | 2 ++ include/qemu/cacheflush.h | 24 +++++++++++++ softmmu/physmem.c | 1 + tcg/aarch64/tcg-target.h | 5 --- tcg/arm/tcg-target.h | 5 --- tcg/i386/tcg-target.h | 4 --- tcg/mips/tcg-target.h | 11 ------ tcg/ppc/tcg-target.c.inc | 22 ------------ tcg/ppc/tcg-target.h | 1 - tcg/riscv/tcg-target.h | 5 --- tcg/s390/tcg-target.h | 4 --- tcg/sparc/tcg-target.h | 8 ----- tcg/tcg.c | 1 + tcg/tci/tcg-target.h | 4 --- util/cacheflush.c | 71 +++++++++++++++++++++++++++++++++++++++ util/meson.build | 2 +- 16 files changed, 100 insertions(+), 70 deletions(-) create mode 100644 include/qemu/cacheflush.h create mode 100644 util/cacheflush.c diff --git a/MAINTAINERS b/MAINTAINERS index 1e7c8f0488..d7ff660c1e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -119,6 +119,8 @@ F: softmmu/cpus.c F: cpus-common.c F: accel/tcg/ F: accel/stubs/tcg-stub.c +F: util/cacheinfo.c +F: util/cacheflush.c F: scripts/decodetree.py F: docs/devel/decodetree.rst F: include/exec/cpu*.h diff --git a/include/qemu/cacheflush.h b/include/qemu/cacheflush.h new file mode 100644 index 0000000000..58ae488491 --- /dev/null +++ b/include/qemu/cacheflush.h @@ -0,0 +1,24 @@ +/* + * Flush the host cpu caches. + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef QEMU_CACHEFLUSH_H +#define QEMU_CACHEFLUSH_H + +#if defined(__i386__) || defined(__x86_64__) || defined(__s390__) + +static inline void flush_icache_range(uintptr_t start, uintptr_t stop) +{ + /* icache is coherent and does not require flushing. */ +} + +#else + +void flush_icache_range(uintptr_t start, uintptr_t stop); + +#endif + +#endif /* QEMU_CACHEFLUSH_H */ diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 67b53d39e4..8b9ffc41c2 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qemu/cutils.h" +#include "qemu/cacheflush.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/target_page.h" diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 663dd0b95e..8a6b97598e 100644 --- a/tcg/aarch64/tcg-target.h +++ b/tcg/aarch64/tcg-target.h @@ -148,11 +148,6 @@ typedef enum { #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_HAS_MEMORY_BSWAP 1 -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - __builtin___clear_cache((char *)start, (char *)stop); -} - void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); #ifdef CONFIG_SOFTMMU diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 17e771374d..f1955ce4ac 100644 --- a/tcg/arm/tcg-target.h +++ b/tcg/arm/tcg-target.h @@ -134,11 +134,6 @@ enum { #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_HAS_MEMORY_BSWAP 1 -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - __builtin___clear_cache((char *) start, (char *) stop); -} - /* not defined -- call should be eliminated at compile time */ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index abd4ac7fc0..cd067e0b30 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -206,10 +206,6 @@ extern bool have_avx2; #define TCG_TARGET_extract_i64_valid(ofs, len) \ (((ofs) == 8 && (len) == 8) || ((ofs) + (len)) == 32) -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ -} - static inline void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr, uintptr_t addr) { diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h index c6b091d849..92c1d63da3 100644 --- a/tcg/mips/tcg-target.h +++ b/tcg/mips/tcg-target.h @@ -198,20 +198,9 @@ extern bool use_mips32r2_instructions; #define TCG_TARGET_HAS_ext16u_i64 0 /* andi rt, rs, 0xffff */ #endif -#ifdef __OpenBSD__ -#include -#else -#include -#endif - #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_HAS_MEMORY_BSWAP 1 -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - cacheflush ((void *)start, stop-start, ICACHE); -} - void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); #ifdef CONFIG_SOFTMMU diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 18ee989f95..0d068ec8ab 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -3863,25 +3863,3 @@ void tcg_register_jit(void *buf, size_t buf_size) tcg_register_jit_int(buf, buf_size, &debug_frame, sizeof(debug_frame)); } #endif /* __ELF__ */ - -void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - uintptr_t p, start1, stop1; - size_t dsize = qemu_dcache_linesize; - size_t isize = qemu_icache_linesize; - - start1 = start & ~(dsize - 1); - stop1 = (stop + dsize - 1) & ~(dsize - 1); - for (p = start1; p < stop1; p += dsize) { - asm volatile ("dcbst 0,%0" : : "r"(p) : "memory"); - } - asm volatile ("sync" : : : "memory"); - - start &= start & ~(isize - 1); - stop1 = (stop + isize - 1) & ~(isize - 1); - for (p = start1; p < stop1; p += isize) { - asm volatile ("icbi 0,%0" : : "r"(p) : "memory"); - } - asm volatile ("sync" : : : "memory"); - asm volatile ("isync" : : : "memory"); -} diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index be10363956..a509a19628 100644 --- a/tcg/ppc/tcg-target.h +++ b/tcg/ppc/tcg-target.h @@ -175,7 +175,6 @@ extern bool have_vsx; #define TCG_TARGET_HAS_bitsel_vec have_vsx #define TCG_TARGET_HAS_cmpsel_vec 0 -void flush_icache_range(uintptr_t start, uintptr_t stop); void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); #define TCG_TARGET_DEFAULT_MO (0) diff --git a/tcg/riscv/tcg-target.h b/tcg/riscv/tcg-target.h index 032439d806..c1bd52bb9a 100644 --- a/tcg/riscv/tcg-target.h +++ b/tcg/riscv/tcg-target.h @@ -159,11 +159,6 @@ typedef enum { #define TCG_TARGET_HAS_mulsh_i64 1 #endif -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - __builtin___clear_cache((char *)start, (char *)stop); -} - /* not defined -- call should be eliminated at compile time */ void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h index 63c8797bd3..b4feb2f55a 100644 --- a/tcg/s390/tcg-target.h +++ b/tcg/s390/tcg-target.h @@ -145,10 +145,6 @@ enum { TCG_AREG0 = TCG_REG_R10, }; -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ -} - static inline void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr, uintptr_t addr) { diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 633841ebf2..d8b0e32e2e 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -168,14 +168,6 @@ extern bool use_vis3_instructions; #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_HAS_MEMORY_BSWAP 1 -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ - uintptr_t p; - for (p = start & -8; p < ((stop + 7) & -8); p += 8) { - __asm__ __volatile__("flush\t%0" : : "r" (p)); - } -} - void tb_target_set_jmp_target(uintptr_t, uintptr_t, uintptr_t); #define TCG_TARGET_NEED_POOL_LABELS diff --git a/tcg/tcg.c b/tcg/tcg.c index 43c6cf8f52..ebb9466ffc 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -35,6 +35,7 @@ #include "qemu/host-utils.h" #include "qemu/qemu-print.h" #include "qemu/timer.h" +#include "qemu/cacheflush.h" /* Note: the long term plan is to reduce the dependencies on the QEMU CPU definitions. Currently they are used for qemu_ld/st diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h index 8c1c1d265d..b84480f989 100644 --- a/tcg/tci/tcg-target.h +++ b/tcg/tci/tcg-target.h @@ -191,10 +191,6 @@ void tci_disas(uint8_t opc); #define HAVE_TCG_QEMU_TB_EXEC -static inline void flush_icache_range(uintptr_t start, uintptr_t stop) -{ -} - /* We could notice __i386__ or __s390x__ and reduce the barriers depending on the host. But if you want performance, you use the normal backend. We prefer consistency across hosts on this. */ diff --git a/util/cacheflush.c b/util/cacheflush.c new file mode 100644 index 0000000000..2881832a38 --- /dev/null +++ b/util/cacheflush.c @@ -0,0 +1,71 @@ +/* + * Flush the host cpu caches. + * + * 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 "qemu/cacheflush.h" + + +#if defined(__i386__) || defined(__x86_64__) || defined(__s390__) + +/* Caches are coherent and do not require flushing; symbol inline. */ + +#elif defined(__mips__) + +#ifdef __OpenBSD__ +#include +#else +#include +#endif + +void flush_icache_range(uintptr_t start, uintptr_t stop) +{ + cacheflush((void *)start, stop - start, ICACHE); +} + +#elif defined(__powerpc__) + +void flush_icache_range(uintptr_t start, uintptr_t stop) +{ + uintptr_t p, start1, stop1; + size_t dsize = qemu_dcache_linesize; + size_t isize = qemu_icache_linesize; + + start1 = start & ~(dsize - 1); + stop1 = (stop + dsize - 1) & ~(dsize - 1); + for (p = start1; p < stop1; p += dsize) { + asm volatile ("dcbst 0,%0" : : "r"(p) : "memory"); + } + asm volatile ("sync" : : : "memory"); + + start &= start & ~(isize - 1); + stop1 = (stop + isize - 1) & ~(isize - 1); + for (p = start1; p < stop1; p += isize) { + asm volatile ("icbi 0,%0" : : "r"(p) : "memory"); + } + asm volatile ("sync" : : : "memory"); + asm volatile ("isync" : : : "memory"); +} + +#elif defined(__sparc__) + +void flush_icache_range(uintptr_t start, uintptr_t stop) +{ + uintptr_t p; + + for (p = start & -8; p < ((stop + 7) & -8); p += 8) { + __asm__ __volatile__("flush\t%0" : : "r" (p)); + } +} + +#else + +void flush_icache_range(uintptr_t start, uintptr_t stop) +{ + __builtin___clear_cache((char *)start, (char *)stop); +} + +#endif diff --git a/util/meson.build b/util/meson.build index f359af0d46..a3dfc0f966 100644 --- a/util/meson.build +++ b/util/meson.build @@ -21,7 +21,7 @@ util_ss.add(files('envlist.c', 'path.c', 'module.c')) util_ss.add(files('host-utils.c')) util_ss.add(files('bitmap.c', 'bitops.c')) util_ss.add(files('fifo8.c')) -util_ss.add(files('cacheinfo.c')) +util_ss.add(files('cacheinfo.c', 'cacheflush.c')) util_ss.add(files('error.c', 'qemu-error.c')) util_ss.add(files('qemu-print.c')) util_ss.add(files('id.c')) From patchwork Mon Dec 21 14:44:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EJ4AYJjs; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02vK4yGJz9sVH for ; Tue, 22 Dec 2020 02:09:49 +1100 (AEDT) Received: from localhost ([::1]:50568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMol-0000ob-Ll for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:09:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRC-0004r0-Kh for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:34237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR6-0007kn-Iy for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:24 -0500 Received: by mail-wm1-x32d.google.com with SMTP id g25so10375419wmh.1 for ; Mon, 21 Dec 2020 06:45:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=66uOa+emUn//1JHWtuNdfGgMg5Sc0RM3sGBwfJqsotc=; b=EJ4AYJjsM39zAhqcDEFej/7IlTsUzL5M0Tnn6IL2n4uuSQI7JPGnXtUvCzhRRhn81+ yKGPh0M1C4w13gTSBUpqPK1YrTKSLWU6wBluIc0qjAx9oSU39EUSc0RYTVA/8O/H58Nn NIUke3Xt+2V3NtL+YQ3PRE9V8FDVUjVfTNPjdbEvXNvPJk9xX9KKDhNjKKbZu6r1pKXV F3QZ9X1mt3AyA2hlcP/2y31nMnDxHyoM49VQloUmYiAI5dX1sst09nTEjgCAQQoZujEL Hjy6rPGLyO2DeXyWkOH7zOwbCWTMBUhkLBokgza7ouABLY2pu6QdQSXmMXCqrytECOyW HORQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=66uOa+emUn//1JHWtuNdfGgMg5Sc0RM3sGBwfJqsotc=; b=mIthKwAeorm0OqqHqoR+gQCZvTy6cOYToWGAA2ol/m1yslf59YJphOZfBUvNTewopK yekGvlNYe8wBvtzWsSDI4ZpCbn7D1siUVaAc9Y8/sUWxK/cBaGLovlQp3EXEVa9+7Zfp bJ2ttxB/vufxZqvsH/1RwNPfQBP/TRZxRw3cGGbfot80Rjfd0xi0PQhCZPxzqmNysLbK 5d9mzH1VbnY8v3S+1pspG2Wo37AW4Fi+G5cTG9VKW0v2j94yt+HMQbI1Zr/DFW9kZ2XI zHhoxmYiRLUGZOEmsCoVI74CzY2rLt9uEwAupTt/Mdf3qO2r4mcJRtSWXD8H5HC0wjEn Rv0A== X-Gm-Message-State: AOAM531Ulvypt5HpNZfWjKKkYWAyuzSuwC/eqJJMaHRl0G7tsbsLDF0O rHhkWiZHw3NfMu1zD+d0bqCO+jER8M0= X-Google-Smtp-Source: ABdhPJwr8eWKNvl2ELJqntk37wEcG6BQaWlLWnLYHq98OU9c2mgfbzHMpKmT94jKv3lfBTEvh91hzw== X-Received: by 2002:a1c:1d1:: with SMTP id 200mr17415713wmb.98.1608561910381; Mon, 21 Dec 2020 06:45:10 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:09 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 24/55] trace: do not include TCG helper tracepoints in no-TCG builds Date: Mon, 21 Dec 2020 15:44:16 +0100 Message-Id: <20201221144447.26161-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- trace/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace/meson.build b/trace/meson.build index 843ea14495..b19309b327 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -71,7 +71,7 @@ foreach d : [ input: meson.source_root() / 'trace-events', command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ], capture: true) - specific_ss.add(gen) + specific_ss.add(when: 'CONFIG_TCG', if_true: gen) endforeach if 'CONFIG_TRACE_UST' in config_host From patchwork Mon Dec 21 14:44:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Y7MpI3gC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02zd3Xq8z9sVH for ; Tue, 22 Dec 2020 02:13:33 +1100 (AEDT) Received: from localhost ([::1]:59026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMsN-0004RH-Gd for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:13:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRD-0004rQ-0T for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:37967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR8-0007ks-Bg for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: by mail-wm1-x329.google.com with SMTP id g185so11155922wmf.3 for ; Mon, 21 Dec 2020 06:45:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7RAuAOiHtCEg/kAzL1aVWGDPXJpz9DMSzL+PQoGrz8I=; b=Y7MpI3gCpoy1MhCGs2UQxG/zfq7//LHAmbRCZJ4wCFRvqQIzXVuul3aYq1ZsKdkWI9 Wyf335BvR7IX/aRhBVPROhP6tr40956WaS23NN2ucrGUfTcrmtJprwuw26NxFp3RagAi ODSoGMEbM8kFzWtT9HA3QoUx2LfUWI9zwpEhtcSm7UtiK8cNFegeNguf28Vb/WuK70ok dwlup+s08IPqfqDbMY5XrFs9L9sNG9sHIYjyAaAxOLb34bxrPHd7WPTgcLuHV1zengjP +3uoenDCZLza+KfwrObNrP0sZ+PwK6/nZ9KXxRXSiqKsGdZGaTG89VgMhkpdis8ntr3i lhzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7RAuAOiHtCEg/kAzL1aVWGDPXJpz9DMSzL+PQoGrz8I=; b=Q5Qe008rfMwZIm1zdYHbqruDUakY1dVYVpUaKZvkZit/E5Z0L/fTWWIjw06Gw7yWz9 dZLNX+jCb5vuH6cWyvski5GH4WdHBPKz1XhrJBT5TG4N4NFfhGP6mrbgSKZd5bWNFLGC 93MU9Tmuk19pI6bEyM7zSECEftAaVz7dYJUUY2wYDMpAN6torIJIfKceq2Q52Zd44k+T Q907S9MKVsLiSXMJG5h57yrjxCf/xx/UQRkx4kKjtsKydMnZhBBsebJOwwrUKk94bT+c 2340ZcA1eCzWpiJm+DSdGGAsMx5o8l6Wenx4KHPldSHvX7O/pZfINeOr67DcWPj6FdiP OdSA== X-Gm-Message-State: AOAM533SuGHRMcfKDPe7kq+96Q8v8qd8ADCKLoaJTnuwt+N8Aq+9wOy5 a0OTZz/La+ZlBFkYjmfwU+FQR6eAcuw= X-Google-Smtp-Source: ABdhPJxhHd3hS8KL6gF5ZHpisbyPdrbhsTRSwt1FZ8ZCaNNsjIWKfCfNkyC1rkvI1A2kKKlG4Ybwkg== X-Received: by 2002:a7b:cc0f:: with SMTP id f15mr17138797wmh.29.1608561911271; Mon, 21 Dec 2020 06:45:11 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:10 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 25/55] Makefile: add dummy target for build.ninja dependencies Date: Mon, 21 Dec 2020 15:44:17 +0100 Message-Id: <20201221144447.26161-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" The dummy targets ensure that incremental build can be done after deleting a meson.build file. Signed-off-by: Paolo Bonzini --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 76dbb917f5..fb9923ff22 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,7 @@ Makefile.ninja: build.ninja # A separate rule is needed for Makefile dependencies to avoid -n build.ninja: build.ninja.stamp +$(build-files): build.ninja.stamp: meson.stamp $(build-files) $(NINJA) $(if $V,-v,) build.ninja && touch $@ endif From patchwork Mon Dec 21 14:44:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EgsjkKON; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03Q00JyHz9sVH for ; Tue, 22 Dec 2020 02:32:54 +1100 (AEDT) Received: from localhost ([::1]:46886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNB5-0006aL-Ro for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:32:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0004wo-Mi for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007kx-KU for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: by mail-wr1-x434.google.com with SMTP id t30so11339744wrb.0 for ; Mon, 21 Dec 2020 06:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ShYU9aOzFgjl095Tg4E1zebighsrFbmAImMfMf68LL4=; b=EgsjkKON+xfiE8+K8jYLSt0dq86gmG5G9/yGzdlquso/zUQwoUIrLONqMFsg+qre0A 3cDuAXf1gHacgTPZQlyQAPLmD42vmBCo2JSTYKFrf9nJY2eb8WZ5h7RzoliVnkKRjTwa JHf1DeyHbWWk9vIliUvyj0s1FbcmK3oCHV0F6iM+aCfLqUj90pYV8M7NAwEZ1eYG8RBE 9aTm2+Ci7mEUzluYBWwwxBCPRMcX0V9d/8khAduluAKAZNcX2zJFHU7mqodvZT+kv3uD xOG0zeqt4kf63qoBSA40o4+EJ2WYj0jnZBJ1oP7O34aqe7UoRbMPYZN40733LPXOoUaZ qsWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ShYU9aOzFgjl095Tg4E1zebighsrFbmAImMfMf68LL4=; b=O62mfshZAJ6AV1tsJwKW/Bi4uNd95g82VoT9hitgMU839k2a1mRHV40nxjNRyroC0B uKeMyOFCE6YU4+b8IVSHrJc0ZPkog/JnUCLH51rScbh7PjnAiEO/uXmXwCh2hAWLzzML GyRqC4ZpMC1Wt1/fO41Z0+A14VzkPZVJSoXO1H/eTwU5892xD7rcvUUI9ILgI7m6ZBFo YtOnVJjcMrpNmoD7C+eB5SWeBM3hU/kA+bfUi67I5z2n6QZMOx2VADFfYwGelJZuFL01 49TsovELvRYZYpLvAD+E3Skkpk22/wspHAAmMYTUETNbzqtqJvPb6MI8XeAKLXrmV+vv YjjQ== X-Gm-Message-State: AOAM533UgQMdPfhJx877gu7gHiVtVniwXrj2X1D0UiTqt39LDSNbXmOb AmFtlQkv2lr1ib4hnmNx0e0/BC72eVo= X-Google-Smtp-Source: ABdhPJxpfC/OeezRAbUa2C/H+j8R4j55ZpWuDTh+ytAWENNlxGZh4aEXQGz6tg+2qdZlBlFjLKgm8g== X-Received: by 2002:a5d:51c4:: with SMTP id n4mr18711429wrv.67.1608561912082; Mon, 21 Dec 2020 06:45:12 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:11 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 26/55] meson: update submodule to 0.56.0 Date: Mon, 21 Dec 2020 15:44:18 +0100 Message-Id: <20201221144447.26161-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 2 +- meson | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f470cdbe50..0a6de3b8ef 100755 --- a/configure +++ b/configure @@ -1936,7 +1936,7 @@ python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0] python="$python -B" if test -z "$meson"; then - if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.55.3; then + if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.56.0; then meson=meson elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then meson=git diff --git a/meson b/meson index 776acd2a80..f16d31607e 160000 --- a/meson +++ b/meson @@ -1 +1 @@ -Subproject commit 776acd2a805c9b42b4f0375150977df42130317f +Subproject commit f16d31607eb3cd0f281758bd0944e206ef6be387 From patchwork Mon Dec 21 14:44:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uUL875jn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D035f3VrMz9sW0 for ; Tue, 22 Dec 2020 02:18:46 +1100 (AEDT) Received: from localhost ([::1]:41704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMxQ-0000eQ-FU for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:18:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRH-0004s1-9n for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:33424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRB-0007l4-1S for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:30 -0500 Received: by mail-wm1-x330.google.com with SMTP id n16so10368540wmc.0 for ; Mon, 21 Dec 2020 06:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m67FwaeJk/Ye3KqiHPzwkiuVxbFDXaK+wQCs40zqR4Q=; b=uUL875jnpd3xCDM+pUIdsBd8rsvygNa9rrGRYuYJ9u6tk8Ytp+KQAayNTNAyjjM2hH unpvqYFFv++SU2578RrXNuQ23rbof6KHz71kcXU0/DNfQwXG5G+3yfQ0uYnwcPTW6dPd f5Mg0LOH3XjWwoFguTEq1scE6KtVa6wFh+nIJ7krSA4jxEABQ+xgCR6aYqVFJUqiJHwn vJrnxi8dux0gGCMT5cUWPlCTuAIfy/mPCUa0UTAv0B26oa/1MfrX3YUCEace7gefoAsD kKjnzTxRR3zGNu0goNIrZXnyQ6L9lXBL6MXfjsqXjQq1v6Bj1gJ7xKVpKzZQZxU6WCK1 yX2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=m67FwaeJk/Ye3KqiHPzwkiuVxbFDXaK+wQCs40zqR4Q=; b=ol6LverbkU6rcRJRGEv7XjqCbk7JTmyz9d4A7z/swfayOJwyeZGMltqBE334KwK8xe 0GFrrikoichYsCIZ5+NQqLWrA0JwBe4c40lialeLdW5x0nxwq0qbSvYTeWF+SIsEGz92 I7eAbODYLI9Oo23cJfEAn4EsRT2XebaBXuwtQDyvL8QtmVux1b675rfcJCViIq7GZ3au Ni8uvkB21lAUMQ6RNNz4Dppdbxt/uXyVMP78JchYcXo2UBTlwash0S0ITphpOuZq7kYR ZJuh7KCrTjUbxn2o/BBsgD1/iW33ox47zreQkZ+zlTSkidHTXLlZi0jgTbZpxcg3vyDs 83Aw== X-Gm-Message-State: AOAM533rJOocmqpSThMGprU73Q7WAxdZRJ2NjJKIAJbP7elNU/6Q4cN/ Ag1QW3Ic3pB0u5V8E+CxrGf5BcWVQEo= X-Google-Smtp-Source: ABdhPJyn6Qk9j79NqHD8ZMqlMiGKMqUqkM6GnwBba8Iu0FC5mcibD60A7eV0/+A9PpLch9U8mbfCmg== X-Received: by 2002:a1c:2c4:: with SMTP id 187mr17251957wmc.187.1608561912960; Mon, 21 Dec 2020 06:45:12 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:12 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 27/55] meson: switch minimum meson version to 0.56.0 Date: Mon, 21 Dec 2020 15:44:19 +0100 Message-Id: <20201221144447.26161-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Meson 0.56.0 does not need b_staticpic=$pie anymore, and has stabilized the keyval module. Remove the workaround and use a few replacements for features deprecated in that release cycle. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 5 ---- docs/meson.build | 12 ++++---- meson.build | 54 ++++++++++++++++------------------- plugins/meson.build | 4 +-- tests/meson.build | 2 +- tests/qapi-schema/meson.build | 4 +-- tests/qtest/meson.build | 2 +- trace/meson.build | 4 +-- 8 files changed, 39 insertions(+), 48 deletions(-) diff --git a/configure b/configure index 0a6de3b8ef..ce4f365231 100755 --- a/configure +++ b/configure @@ -6963,10 +6963,6 @@ fi mv $cross config-meson.cross rm -rf meson-private meson-info meson-logs -unset staticpic -if ! version_ge "$($meson --version)" 0.56.0; then - staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi) -fi NINJA=$ninja $meson setup \ --prefix "$prefix" \ --libdir "$libdir" \ @@ -6986,7 +6982,6 @@ NINJA=$ninja $meson setup \ -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \ -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \ -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \ - ${staticpic:+-Db_staticpic=$staticpic} \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \ -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \ diff --git a/docs/meson.build b/docs/meson.build index bb8fe4c9e4..4e88ed7516 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -38,12 +38,12 @@ endif if build_docs SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']] - sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py', - meson.source_root() / 'docs/sphinx/hxtool.py', - meson.source_root() / 'docs/sphinx/kerneldoc.py', - meson.source_root() / 'docs/sphinx/kernellog.py', - meson.source_root() / 'docs/sphinx/qapidoc.py', - meson.source_root() / 'docs/sphinx/qmp_lexer.py', + sphinx_extn_depends = [ meson.current_source_dir() / 'sphinx/depfile.py', + meson.current_source_dir() / 'sphinx/hxtool.py', + meson.current_source_dir() / 'sphinx/kerneldoc.py', + meson.current_source_dir() / 'sphinx/kernellog.py', + meson.current_source_dir() / 'sphinx/qapidoc.py', + meson.current_source_dir() / 'sphinx/qmp_lexer.py', qapi_gen_depends ] configure_file(output: 'index.html', diff --git a/meson.build b/meson.build index ada35d56e1..34ecb93b03 100644 --- a/meson.build +++ b/meson.build @@ -1,14 +1,10 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', - default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] + - (meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []), - version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) +project('qemu', ['c'], meson_version: '>=0.56.0', + default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto', + 'b_staticpic=false'], + version: run_command('head', meson.project_source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') ss = import('sourceset') fs = import('fs') @@ -1372,21 +1368,21 @@ genh += configure_file(output: 'config-host.h', configuration: config_host_data) hxtool = find_program('scripts/hxtool') shaderinclude = find_program('scripts/shaderinclude.pl') qapi_gen = find_program('scripts/qapi-gen.py') -qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', - meson.source_root() / 'scripts/qapi/commands.py', - meson.source_root() / 'scripts/qapi/common.py', - meson.source_root() / 'scripts/qapi/error.py', - meson.source_root() / 'scripts/qapi/events.py', - meson.source_root() / 'scripts/qapi/expr.py', - meson.source_root() / 'scripts/qapi/gen.py', - meson.source_root() / 'scripts/qapi/introspect.py', - meson.source_root() / 'scripts/qapi/parser.py', - meson.source_root() / 'scripts/qapi/schema.py', - meson.source_root() / 'scripts/qapi/source.py', - meson.source_root() / 'scripts/qapi/types.py', - meson.source_root() / 'scripts/qapi/visit.py', - meson.source_root() / 'scripts/qapi/common.py', - meson.source_root() / 'scripts/qapi-gen.py' +qapi_gen_depends = [ meson.current_source_dir() / 'scripts/qapi/__init__.py', + meson.current_source_dir() / 'scripts/qapi/commands.py', + meson.current_source_dir() / 'scripts/qapi/common.py', + meson.current_source_dir() / 'scripts/qapi/error.py', + meson.current_source_dir() / 'scripts/qapi/events.py', + meson.current_source_dir() / 'scripts/qapi/expr.py', + meson.current_source_dir() / 'scripts/qapi/gen.py', + meson.current_source_dir() / 'scripts/qapi/introspect.py', + meson.current_source_dir() / 'scripts/qapi/parser.py', + meson.current_source_dir() / 'scripts/qapi/schema.py', + meson.current_source_dir() / 'scripts/qapi/source.py', + meson.current_source_dir() / 'scripts/qapi/types.py', + meson.current_source_dir() / 'scripts/qapi/visit.py', + meson.current_source_dir() / 'scripts/qapi/common.py', + meson.current_source_dir() / 'scripts/qapi-gen.py' ] tracetool = [ @@ -1895,14 +1891,14 @@ foreach target : target_dirs if target.endswith('-softmmu') execs = [{ 'name': 'qemu-system-' + target_name, - 'gui': false, + 'win_subsystem': 'console', 'sources': files('softmmu/main.c'), 'dependencies': [] }] if targetos == 'windows' and (sdl.found() or gtk.found()) execs += [{ 'name': 'qemu-system-' + target_name + 'w', - 'gui': true, + 'win_subsystem': 'windows', 'sources': files('softmmu/main.c'), 'dependencies': [] }] @@ -1911,7 +1907,7 @@ foreach target : target_dirs specific_fuzz = specific_fuzz_ss.apply(config_target, strict: false) execs += [{ 'name': 'qemu-fuzz-' + target_name, - 'gui': false, + 'win_subsystem': 'console', 'sources': specific_fuzz.sources(), 'dependencies': specific_fuzz.dependencies(), }] @@ -1919,7 +1915,7 @@ foreach target : target_dirs else execs = [{ 'name': 'qemu-' + target_name, - 'gui': false, + 'win_subsystem': 'console', 'sources': [], 'dependencies': [] }] @@ -1934,7 +1930,7 @@ foreach target : target_dirs link_language: link_language, link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []), link_args: link_args, - gui_app: exe['gui']) + win_subsystem: exe['win_subsystem']) } if 'CONFIG_TRACE_SYSTEMTAP' in config_host diff --git a/plugins/meson.build b/plugins/meson.build index e77723010e..d58efc980e 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,7 +1,7 @@ if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host - plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')] + plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.project_build_root() / 'qemu-plugins-ld.symbols')] elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')] + plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.project_build_root() / 'qemu-plugins-ld64.symbols')] else plugin_ldflags = [] endif diff --git a/tests/meson.build b/tests/meson.build index 1fa068f27b..0b8c3c6f32 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -113,7 +113,7 @@ tests = { 'test-keyval': [testqapi], 'test-logging': [], 'test-uuid': [], - 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'], + 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], 'test-qapi-util': [], } diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build index 304ef939bd..26588396d2 100644 --- a/tests/qapi-schema/meson.build +++ b/tests/qapi-schema/meson.build @@ -1,5 +1,5 @@ test_env = environment() -test_env.set('PYTHONPATH', meson.source_root() / 'scripts') +test_env.set('PYTHONPATH', meson.project_source_root() / 'scripts') test_env.set('PYTHONIOENCODING', 'utf-8') schemas = [ @@ -240,7 +240,7 @@ if build_docs # clutter up the build dir with the cache. command: [SPHINX_ARGS, '-b', 'text', '-E', - '-c', meson.source_root() / 'docs', + '-c', meson.project_source_root() / 'docs', '-D', 'master_doc=doc-good', meson.current_source_dir(), meson.current_build_dir()]) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 6a67c538be..450af3e51c 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -237,7 +237,7 @@ foreach dir : target_dirs qtest_env.set('QTEST_QEMU_IMG', './qemu-img') test_deps += [qemu_img] endif - qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh') + qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests/dbus-vmstate-daemon.sh') qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base) foreach test : target_qtests diff --git a/trace/meson.build b/trace/meson.build index b19309b327..012d0dbceb 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,7 +2,7 @@ specific_ss.add(files('control-target.c')) trace_events_files = [] foreach dir : [ '.' ] + trace_events_subdirs - trace_events_file = meson.source_root() / dir / 'trace-events' + trace_events_file = meson.project_source_root() / dir / 'trace-events' trace_events_files += [ trace_events_file ] group_name = dir == '.' ? 'root' : dir.underscorify() group = '--group=' + group_name @@ -68,7 +68,7 @@ foreach d : [ ] gen = custom_target(d[0], output: d[0], - input: meson.source_root() / 'trace-events', + input: meson.project_source_root() / 'trace-events', command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ], capture: true) specific_ss.add(when: 'CONFIG_TCG', if_true: gen) From patchwork Mon Dec 21 14:44:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EobYR7HV; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03Ln3Smxz9sVH for ; Tue, 22 Dec 2020 02:30:09 +1100 (AEDT) Received: from localhost ([::1]:40484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN8R-0003lC-FB for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:30:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0004wp-Nx for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:33916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007l9-Jy for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: by mail-wr1-x42b.google.com with SMTP id q18so11333085wrn.1 for ; Mon, 21 Dec 2020 06:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cerUCuLfNAoPI4An40BkKkZ+H8a+IdBgs1zZ6lcMQsQ=; b=EobYR7HV31KkCRN6qa+MmUPKUpGgIhQaGvBr8ib9L+h8gKtsKLFA3ou+EeFscG18IO 0/3F3DHgE2e5uBXmgpMeS7KRoEcTvWGZ1C5YNYfYcrRBsdqfoBVEZjigNdBl17gyYjsM jsXTRbLGrgXosYq49NA2/YGZoi8A9qeM/DgT9Wfs2HmMW3oRNJyb0TisAHPdp1PeSWPY zr1kLl0WrVFP8gKRNFIPab21w7VAwIq73Ol8P4YHHzR0cI2qixoOwdIOO8zcyTO2uMZ4 jlzSzGbLJVewpRM9jJK4U8wgMRU4vhP2aHTARkO+MHKvxgd8a+biNc7f4f5JJs7nFjpb yG6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=cerUCuLfNAoPI4An40BkKkZ+H8a+IdBgs1zZ6lcMQsQ=; b=rdADcH4pmu4CGt3AlVOdKwCQJIFbmZxNBT7nuGG5+mce1BfnhVD2buE7ee1IOS7HQ3 2ZSxj6iA7sApYJumu6iA5gqeBxGzP5ymx6eTLxHk3jZJNBnWD8habK2RTI73SWyitn71 U2FUZdWlCIJalePL+tONVcOCy9n3bgfKkm+Jjz3o8L60zHRZh6rAgKVdnIXO+w5MX5LT QG2hYqbGkz/jDVFnPCpt4ymT6RjDRMEXWQYMJE0ktt6lvm9wV6IDXxwusS1pHAiKZeqh 7Jf5Y8MHqKaW1hb3VYXpA+0Md57IE/wz3Ij90Fjid8TUH/f0hZJlqnN6ksGlaunSsvBW WbZg== X-Gm-Message-State: AOAM533YgFWubdQUXso9CH390fJR11YOp4okz7TO4RzfM/ngJbMCeRQp 4p/RHtVVfh036w7NdoVmseFRxZZg0pY= X-Google-Smtp-Source: ABdhPJxv8egUFIZ1W91J+/RaHCDfatwbv2kg+iukn5Hc2h+kqP2wTz3IVPsoW5aTL25zw0nqLU/5rQ== X-Received: by 2002:a5d:6045:: with SMTP id j5mr18426081wrt.223.1608561913770; Mon, 21 Dec 2020 06:45:13 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:13 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/55] meson: fix detection of curses with pkgconfig Date: Mon, 21 Dec 2020 15:44:20 +0100 Message-Id: <20201221144447.26161-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 34ecb93b03..d5d08c8b6b 100644 --- a/meson.build +++ b/meson.build @@ -500,16 +500,16 @@ if have_system and not get_option('curses').disabled() endif endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' + curses_compile_args = ['-DNCURSES_WIDECHAR'] if curses.found() - if cc.links(curses_test, dependencies: [curses]) - curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses]) + if cc.links(curses_test, args: curses_compile_args, dependencies: [curses]) + curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses]) else msg = 'curses package not usable' curses = not_found endif endif if not curses.found() - curses_compile_args = ['-DNCURSES_WIDECHAR'] has_curses_h = cc.has_header('curses.h', args: curses_compile_args) if targetos != 'windows' and not has_curses_h message('Trying with /usr/include/ncursesw') From patchwork Mon Dec 21 14:44:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=T7C1esfu; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02ch488Lz9sVS for ; Tue, 22 Dec 2020 01:57:08 +1100 (AEDT) Received: from localhost ([::1]:45608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMcU-0002UC-GZ for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:57:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRD-0004rT-8o for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:51730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007lK-St for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: by mail-wm1-x330.google.com with SMTP id v14so10095089wml.1 for ; Mon, 21 Dec 2020 06:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4xkRnQKoaqp5QhpLOFtcF2nzdn950oGLnCfoEhfvu7E=; b=T7C1esfuc1FL3X9ac+gDGwoiJ+IvTo9aFHptceqiholVNkUfm1MTOVKVbMB6pe6pAD cpNPh7cy90W/TJpVzehkuDRVUTNOfn5Z3+O+b1IcYZzgQn8ubuMVVsrhResFhmld+wGV B2WQ6iBrWLSc5YGz620SiZHEK8aPaV5ZBxsMzZWSsgf53fn44eOC4pggCeYgLQFCSrHN ZLHSSdEAacAWILWYVHPWQ3CvMgmtfouk0acgLE58zPV9r/7UlrO5YeKBhOW6svd/dUnh l8HX0FMjmWyiIGR5iPp+kezlXf2YMCre5kNIjpeLfrBcU+Cz0+6e1k+dQdPWBBsP+GQX EJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4xkRnQKoaqp5QhpLOFtcF2nzdn950oGLnCfoEhfvu7E=; b=XwXW77U/VBo8DNHTwVAEmWr/JBrBmDTGL/r7XBhHYYAUYW7s3eB0WojrDJgEOdfh0Q JgsKzx34UWEqBD3ddvCzcZvJH/rE2oDpMTrqE1G0xgh1mW5nKuS5mLeKjgzbq6aa7kif Yl6Egb11uBtsNcZphnkE1/+WyDmfPpMi2R4VBo8zlnNLzdhEnocxx3Tu94ftd5KopV/i y0b9Nk8ZoY5JE5AotQjPyCnleYY88dq5Pcqjewx4BO1gqCbVxlwqhYXGiS777xlC/FmS yhSS+OQCI99V5oP1w1oRL+wuNI7qxVcXipHAI22RpQe5W67FZxvjsn4J7i1YW7yW2jki s0+A== X-Gm-Message-State: AOAM531PuxbHZO0rkhabcMRze9rtN1yebl5LqxEwoD9FvpqnMxZ5aU2E 2qdkoQqYohktm7mZctaMF9PjpX/z55E= X-Google-Smtp-Source: ABdhPJzWcS6Eve1OwliQBWHGkJz8Vn8a6NJExcH43Za202GrCHw7P8EAZoy7aX7kPEhunUhgYS0C6Q== X-Received: by 2002:a05:600c:2116:: with SMTP id u22mr16821870wml.174.1608561914644; Mon, 21 Dec 2020 06:45:14 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:14 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/55] meson: use pkg-config method for libudev Date: Mon, 21 Dec 2020 15:44:21 +0100 Message-Id: <20201221144447.26161-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index d5d08c8b6b..45155114d3 100644 --- a/meson.build +++ b/meson.build @@ -399,6 +399,7 @@ endif libudev = not_found if targetos == 'linux' and (have_system or have_tools) libudev = dependency('libudev', + method: 'pkg-config', required: get_option('libudev'), static: enable_static) endif From patchwork Mon Dec 21 14:44:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Ps3ttjcU; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02jb4xzKz9sVS for ; Tue, 22 Dec 2020 02:01:21 +1100 (AEDT) Received: from localhost ([::1]:56438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMgX-00077L-D1 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:01:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRK-0004yU-EY for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:34 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:34243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007mG-MK for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:34 -0500 Received: by mail-wm1-x333.google.com with SMTP id g25so10375601wmh.1 for ; Mon, 21 Dec 2020 06:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=We8zm4vTljefLB1H+FZSFrGQyaLw5AVUbS8dE3t5u5A=; b=Ps3ttjcUxCJH+NMGlHp7rEaKJ/Ms8D0moQ7wkTyZDjqBE2SrXyuQj/Dl9N3GupjHMJ aqvJeQ1TQHOir/NUrVgLRcvtf8oilstmJaPmmakW2is3MS7aosRgZ7ruuGp6m34sDWhz VcSC7uU0eBtGHxV1Cj9/djTJDk2OWeGGMmTOGmABJBLo0tmVnKLymiXCTJesc8RrS3WC ZYGnWE3N8H+PVqioyYSq0oFMcmbQip12AIDjdQTJXty6cmUnWruyAK4a7l8kKgNJBo1e wlWcE0zOSm9kS4T72FAojDdi5XgAlO2RkkpZUaw1SlvkYgxHo2jiQSXrdDi/N8LVTSE0 SUOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=We8zm4vTljefLB1H+FZSFrGQyaLw5AVUbS8dE3t5u5A=; b=q0ZyPIk+uBQIrP1Rwyh6nMMSdHRz8wkO5h5Iygi0GZXWNufNlnjUBQnCTOBd8wnAiZ QKxHfz34OTEMcrhn/7/szCpndCobp4+uOUPXZRprGlYQuGce9cZd8gCQPHAJtq53rd/z wR6PVIJIieWUHjmjZqYvIqe3swAulrCflbm82ODzdZY3gyC/Av2YM7xnV4PeHkaDwQXk IxgoWv7EdwxF1W9ZS/YDV3Mpu2WY/laQ+2a4UZYFLcc5WyJiZ20i1OCrCrmgmRpvQvCR 6xwbpjLBPO6rUcfGZo9Y4MSXuYnVcFYEIslpN23VdpiG12VZsBx/SwlBuxl50fR4kb1w zDJw== X-Gm-Message-State: AOAM531EFv/kENIeJwSfY7rca1XSxL1h/Wf4PQ61MwQEdRbbW7AFM3tM hMjWgSckUkYjWmQv69jt1fd6RMMrdHU= X-Google-Smtp-Source: ABdhPJwk5Ctp0pZsXO+ItssBSLwlIPbtTMr4SaJZBON6IcMt/SUh8U3PLRtHDp9LLs4ZWSwZ/oVlDQ== X-Received: by 2002:a1c:43c5:: with SMTP id q188mr17059302wma.163.1608561915560; Mon, 21 Dec 2020 06:45:15 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:15 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 30/55] meson: use dependency to gate block modules Date: Mon, 21 Dec 2020 15:44:22 +0100 Message-Id: <20201221144447.26161-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This allows converting the dependencies to meson options one by one. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- block/meson.build | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/block/meson.build b/block/meson.build index 5dcc1e5cce..b02cb14aad 100644 --- a/block/meson.build +++ b/block/meson.build @@ -70,14 +70,14 @@ block_modules = {} modsrc = [] foreach m : [ - ['CONFIG_CURL', 'curl', [curl, glib], 'curl.c'], - ['CONFIG_GLUSTERFS', 'gluster', glusterfs, 'gluster.c'], - ['CONFIG_LIBISCSI', 'iscsi', libiscsi, 'iscsi.c'], - ['CONFIG_LIBNFS', 'nfs', libnfs, 'nfs.c'], - ['CONFIG_LIBSSH', 'ssh', libssh, 'ssh.c'], - ['CONFIG_RBD', 'rbd', rbd, 'rbd.c'], + [curl, 'curl', [curl, glib], 'curl.c'], + [glusterfs, 'gluster', glusterfs, 'gluster.c'], + [libiscsi, 'iscsi', libiscsi, 'iscsi.c'], + [libnfs, 'nfs', libnfs, 'nfs.c'], + [libssh, 'ssh', libssh, 'ssh.c'], + [rbd, 'rbd', rbd, 'rbd.c'], ] - if config_host.has_key(m[0]) + if m[0].found() if enable_modules modsrc += files(m[3]) endif @@ -90,10 +90,10 @@ endforeach # those are not exactly regular block modules, so treat them apart if 'CONFIG_DMG' in config_host foreach m : [ - ['CONFIG_LZFSE', 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'], - ['CONFIG_BZIP2', 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c'] + [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'], + [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c'] ] - if config_host.has_key(m[0]) + if m[0].found() module_ss = ss.source_set() module_ss.add(when: m[2], if_true: files(m[3])) block_modules += {m[1] : module_ss} From patchwork Mon Dec 21 14:44:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Mrm6b4Tl; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02hb0Wznz9sVS for ; Tue, 22 Dec 2020 02:00:31 +1100 (AEDT) Received: from localhost ([::1]:53964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMfl-00062v-0a for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:00:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRH-0004rk-7A for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:35782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007mE-T4 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:27 -0500 Received: by mail-wm1-x32f.google.com with SMTP id e25so11195424wme.0 for ; Mon, 21 Dec 2020 06:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6dooPjFN1B8tfi4MCbVcoop9IWaOfHRSgoH9hXmEYAc=; b=Mrm6b4Tlw3FOQNyP41JtEUpH2bXLZC6fHeg74yd9HqpaUVVXq+9abJmeHssfO1xBRM bxKQgohvJpcRAJq9SOhEeJ6xDu0dAhncMqBUfrG5Dk7dXbSR5saTRhm8N0sDOfTxGqVD Qzq+DMwDGwX3F208ea//apTx2JDPERpkM2XZePbtF49/Kr9KHOXpSz8n3p+h3b3fSJQ0 nLXntkA8SRdLMUrhnsFrRFyh90mKVLBnw+Vbd6nEvsA7LJOFBKw/H2OBPkOfxSDucJ4m 5//v7C/nfrp8GYToPQcV3plDwFMmTs251lrkpqF4ukOZVGtGTRKGeqqns+ru/mVrFeXN /wwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6dooPjFN1B8tfi4MCbVcoop9IWaOfHRSgoH9hXmEYAc=; b=P4swmPoFG9K+cUBuYb/7IfkHt0tC+cKpDk9a6Mce9UXjFJcvacUysLj6ZxflO3U7Qc IStPR5J0DX/6XriZKyFxd86/nswgCr0GMNtBuuGeyRXD6ftocbAH5C94ZiG5Hb1YNpeP EsK6uiJa8BydOnRUvI+7U3kvkWYrwicsoiWxOmWKvT+NOOYspjVcswyoKChhcHzYDeh3 NAoV6uWB0yU0wRbHiRRLD7mru1ChyIkhNSWvPsBRwIH9Mm+MYs9g2gv+iqR/12nVLp9x U/xmtKylMGnX0aNmy90qKrDZEZdIClmysSW0SSrMKlSKhNpAeAKk+91B+xH0YCU3vHSz +B3A== X-Gm-Message-State: AOAM532GR7hnT17c7G43Ods7U9DLJda3yjUpQrmvJPpwQrNtZCBtYK1P 59ozc/VcMRgRgarl0IeD2p83coceuu8= X-Google-Smtp-Source: ABdhPJxLxn6kbI/IPk+Xx0gwDc6aoW6EjkMgyywa9LBZFgROMK9aBczPTz+E47aRHwq/97DUZrBK9Q== X-Received: by 2002:a7b:cf0d:: with SMTP id l13mr17305575wmg.168.1608561916381; Mon, 21 Dec 2020 06:45:16 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:15 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 31/55] meson: cleanup Kconfig.host handling Date: Mon, 21 Dec 2020 15:44:23 +0100 Message-Id: <20201221144447.26161-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Build the array of command line arguments coming from config_host once for all targets. Add all accelerators to accel/Kconfig so that the command line arguments for accelerators can be computed easily in the existing "foreach sym: accelerators" loop. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- accel/Kconfig | 9 +++++++++ docs/devel/kconfig.rst | 19 +++++++++---------- meson.build | 43 +++++++++++++++++------------------------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/accel/Kconfig b/accel/Kconfig index 2ad94a3839..461104c771 100644 --- a/accel/Kconfig +++ b/accel/Kconfig @@ -1,3 +1,12 @@ +config WHPX + bool + +config HAX + bool + +config HVF + bool + config TCG bool diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index 336ba0e8e5..cb2d7ffac0 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -288,21 +288,20 @@ they will include all these symbols and some help text on what they do. ---------------- In some special cases, a configurable element depends on host features -that are detected by QEMU's configure script; for example some devices -depend on the availability of KVM or on the presence of a library on -the host. +that are detected by QEMU's configure or ``meson.build`` scripts; for +example some devices depend on the availability of KVM or on the presence +of a library on the host. These symbols should be listed in ``Kconfig.host`` like this:: - config KVM + config TPM bool -and also listed as follows in the top-level Makefile's ``MINIKCONF_ARGS`` +and also listed as follows in the top-level meson.build's host_kconfig variable:: - MINIKCONF_ARGS = \ - $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \ - CONFIG_KVM=$(CONFIG_KVM) \ - CONFIG_SPICE=$(CONFIG_SPICE) \ - CONFIG_TPM=$(CONFIG_TPM) \ + host_kconfig = \ + ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=y'] : []) + \ + ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \ + ('CONFIG_IVSHMEM' in config_host ? ['CONFIG_IVSHMEM=y'] : []) + \ ... diff --git a/meson.build b/meson.build index 45155114d3..3e584499bc 100644 --- a/meson.build +++ b/meson.build @@ -954,21 +954,19 @@ if link_language == 'cpp' } endif -kconfig_external_symbols = [ - 'CONFIG_KVM', - 'CONFIG_XEN', - 'CONFIG_TPM', - 'CONFIG_SPICE', - 'CONFIG_IVSHMEM', - 'CONFIG_OPENGL', - 'CONFIG_X11', - 'CONFIG_VHOST_USER', - 'CONFIG_VHOST_VDPA', - 'CONFIG_VHOST_KERNEL', - 'CONFIG_VIRTFS', - 'CONFIG_LINUX', - 'CONFIG_PVRDMA', -] +host_kconfig = \ + ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=y'] : []) + \ + ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \ + ('CONFIG_IVSHMEM' in config_host ? ['CONFIG_IVSHMEM=y'] : []) + \ + ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=y'] : []) + \ + ('CONFIG_X11' in config_host ? ['CONFIG_X11=y'] : []) + \ + ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=y'] : []) + \ + ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=y'] : []) + \ + ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=y'] : []) + \ + ('CONFIG_VIRTFS' in config_host ? ['CONFIG_VIRTFS=y'] : []) + \ + ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \ + ('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=y'] : []) + ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ] default_targets = 'CONFIG_DEFAULT_TARGETS' in config_host @@ -1003,7 +1001,7 @@ foreach target : target_dirs } endif - have_accel = false + accel_kconfig = [] foreach sym: accelerators if sym == 'CONFIG_TCG' or target in accelerator_targets.get(sym, []) config_target += { sym: 'y' } @@ -1011,10 +1009,10 @@ foreach target : target_dirs if sym == 'CONFIG_XEN' and have_xen_pci_passthrough config_target += { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' } endif - have_accel = true + accel_kconfig += [ sym + '=y' ] endif endforeach - if not have_accel + if accel_kconfig.length() == 0 if default_targets continue endif @@ -1068,13 +1066,6 @@ foreach target : target_dirs configuration: config_target_data)} if target.endswith('-softmmu') - base_kconfig = [] - foreach sym : kconfig_external_symbols - if sym in config_target or sym in config_host - base_kconfig += '@0@=y'.format(sym) - endif - endforeach - config_devices_mak = target + '-config-devices.mak' config_devices_mak = configure_file( input: ['default-configs/devices' / target + '.mak', 'Kconfig'], @@ -1083,7 +1074,7 @@ foreach target : target_dirs capture: true, command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], config_devices_mak, '@DEPFILE@', '@INPUT@', - base_kconfig]) + host_kconfig, accel_kconfig]) config_devices_data = configuration_data() config_devices = keyval.load(config_devices_mak) From patchwork Mon Dec 21 14:44:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419098 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=M5vWrwMI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D031R0bRdz9sVH for ; Tue, 22 Dec 2020 02:15:07 +1100 (AEDT) Received: from localhost ([::1]:35236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMts-0006Fz-VX for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:15:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRG-0004ro-K6 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:37452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007mR-To for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:28 -0500 Received: by mail-wr1-x434.google.com with SMTP id i9so11319150wrc.4 for ; Mon, 21 Dec 2020 06:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QcALGteNqeaz9wkB1WyIxyZdXEQ5pVyXB1p6a5LUXjc=; b=M5vWrwMISVzFopxvoipMeZpDuxuWYqzlxYp0GJeWqWkBkyww8RJA8wYghyT6shSxWL tWan8THqOH0F+wW661nYla4EILGOn1EGwuSsW8qgAOOb5wDKiQmsh7GtxDmY3AIxrmI7 Hc+E4C1rFpYINIuxlaum9f5JgIeAm31F50PfnWH915uMImVRg11JpFRHbiuGcZ954dSP qPOsjaAstFwiSBSJxCMYGtmsP+JcD8TgRglQVwijAl1GOhWpQXaLWi2iF/ssm34I0ckI qEkFZlPT4akUem3Uf4Hhctlzfj3Yx/6nCvMIrLmM8t2EQ+YJg7IK9SThbm3gSfVHSel9 t7BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QcALGteNqeaz9wkB1WyIxyZdXEQ5pVyXB1p6a5LUXjc=; b=ouRoZgFKwwThYcYtwLr8TZhvhFiCx+lJkRziWUrYH/+i1IPo9H/Ch2s5123Khv269c uM4SAfw5EtX5bkgL3qKFv/lNYCxj6bUdkpnOXzGFlT5cC/kzlg290ynsZIgwvh/GRvWF +U6q3BNWIwmnK7xT/taXqgAIvgIcSW3Gc0woqHtaDML+twTEsa2LNxLF6q+Dnq0/aTot qtJjNBQXCZvrpLyA3iA+d5h7eJIrBMNOYYWFq6/m71HmHfGTVrf1GEOmHXq2KHHjMmRj va5RkB6sBpvMqfA+PEzMngRIiPJCvSQKxCQoUNZ4criKf8niecmHr1N8nEyiWs2m3rIx z2PQ== X-Gm-Message-State: AOAM532HIZxFFqC/V20N0wDw86CPZkhHlqvOA+/c6AhtM1GxLMkQfsfi ekneQRxjt5GLRdwxZe+rGJ9zMyTzU1g= X-Google-Smtp-Source: ABdhPJxd3EDFvGcxujYpxD0aYe26OHB943CdQWwTp3cdMGu7vXDLCYfUh1rCquHtxXfghb9ZNskwEg== X-Received: by 2002:a05:6000:108b:: with SMTP id y11mr18890514wrw.379.1608561917160; Mon, 21 Dec 2020 06:45:17 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:16 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 32/55] configure: remove useless code to check for Xen PCI passthrough Date: Mon, 21 Dec 2020 15:44:24 +0100 Message-Id: <20201221144447.26161-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" meson.build is already doing the same check, so remove it from configure. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/configure b/configure index ce4f365231..ca8496b607 100755 --- a/configure +++ b/configure @@ -2877,18 +2877,6 @@ EOF fi fi -if test "$xen_pci_passthrough" != "disabled"; then - if test "$xen" = "enabled" && test "$linux" = "yes"; then - xen_pci_passthrough=enabled - else - if test "$xen_pci_passthrough" = "enabled"; then - error_exit "User requested feature Xen PCI Passthrough" \ - " but this feature requires /sys from Linux" - fi - xen_pci_passthrough=disabled - fi -fi - ########################################## # X11 probe if $pkg_config --exists "x11"; then From patchwork Mon Dec 21 14:44:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pBr+RH6G; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02f06z3Dz9sVS for ; Tue, 22 Dec 2020 01:58:16 +1100 (AEDT) Received: from localhost ([::1]:48272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMda-0003Yu-Ud for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:58:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRI-0004u1-6B for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:51726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007mX-Hb for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: by mail-wm1-x32b.google.com with SMTP id v14so10095287wml.1 for ; Mon, 21 Dec 2020 06:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lh7IRMrgTGCLn22WAhKDgSov3MsoKDobeP7waDosJsw=; b=pBr+RH6Gy64+ZzEin5FcW8wQeK1/CPcFdHnkypEsHhGce5g9Le70GMTEJeeDmajuQS kf2Z4angZanmvc8fmbL5qTnNivWDc40vFb214ZhFDu0BeFTVMmo0+BS9DAFLJmFqWqA7 0dMFsxUfHLZquQ1zja9faLq+Zsz7y2v296KIKCM5lRje3UIyRekb8FpE1pbRrQ8wd32+ VlZEF9Z+6ajTXh1AzXBL8OGF4mmVknNNNu+/XgtrrnZKLSZ1CaNbhzgxetCwMXZN8ojh cc83CZn58VKabw/n65T0hvyR8jkBZcxemIwM3+Tju7cljeyDfgSMZZxO5q3B+Bd+Fy+V 0cBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lh7IRMrgTGCLn22WAhKDgSov3MsoKDobeP7waDosJsw=; b=mSmTivl4MzdnV1I3PSV2wkzG27ObwaXLS8zcE9I+EBPjxrRFh4DieO2tD0RnLSn/9Y 4m19Htp0lbhWubGFXGhd1dFUgmXVRaUK5eKPOv134MzCC33QHpOvGbYbZdyF+fDb3f8G F8drGlqrKAhFRyyvB3OWbqb9vz8B1IbOKTSPyimtaVbNfig8WKE+MaV2tcKQI2QYmwln FyJCD2t7Kfmrr9zjZJ3Qvoo9zCrGYyfMMgvXOadU21DBOEN9fUISwVIkbPns+DXqAuF8 7i9aLAokKaGy09yR/hPSANYLqyDwscM2IwuDzMJ2WtZJbjyFxnbLDLMZIHABMtoJGOB/ WJqA== X-Gm-Message-State: AOAM530W5kzEsOzCp346RmE0KrX12o2UIyrgq6lDmifaWGR9SYDomL1u RaaGZ8/2CiyhgcjlHPtKq1hARhlzNK0= X-Google-Smtp-Source: ABdhPJweytDT9jaDt7tb80kMStIw+0fZ+ukaZ9wGD+Q8rxcxIuewikBewTtd5Gj+omLdeR3RwQth+g== X-Received: by 2002:a1c:2c4:: with SMTP id 187mr17252334wmc.187.1608561918600; Mon, 21 Dec 2020 06:45:18 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 33/55] configure: remove variable bogus_os Date: Mon, 21 Dec 2020 15:44:25 +0100 Message-Id: <20201221144447.26161-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Thomas Huth Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The condition can be tested also from $targetos, clean up. Reviewed-by: Marc-André Lureau Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure b/configure index ca8496b607..d5d630c0ee 100755 --- a/configure +++ b/configure @@ -466,7 +466,6 @@ gettext="auto" fuse="auto" fuse_lseek="auto" -bogus_os="no" malloc_trim="auto" # parse CC options second @@ -619,7 +618,6 @@ else # might be going to just print the --help text, or it might # be the result of a missing compiler. targetos='bogus' - bogus_os='yes' fi # Some host OSes need non-standard checks for which CPU to use. @@ -2014,7 +2012,7 @@ if test -z "$werror" ; then fi fi -if test "$bogus_os" = "yes"; then +if test "$targetos" = "bogus"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used # to identify the OS are reliable), if we didn't recognize the From patchwork Mon Dec 21 14:44:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419104 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SCC1JXxW; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D038k4VrGz9sVw for ; Tue, 22 Dec 2020 02:21:26 +1100 (AEDT) Received: from localhost ([::1]:48758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN00-0003YN-Je for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRI-0004uF-CX for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:52839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007ml-HX for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: by mail-wm1-x32a.google.com with SMTP id a6so10098190wmc.2 for ; Mon, 21 Dec 2020 06:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=33P+IG3zourtkiugP+gHrNcHn4CktLcQ1NmI5YOJd5Y=; b=SCC1JXxWjNBDJ4PyciQM/NqoEcDJlXKcnr/neWZ+ccE3k93munyzTA4C0gn2NguW4k 26xhm8G+6PpU/ndwKko1cZT5/kMv0lO3tbB1qztjbzvgdYPCRxu8cpDLMa4JN3ZlMhga Ttk7mBBCwDVmNvuqL+MriLaV4Vyz4Rb2Spizpc5iL5w80O/+vjJRgJVcUA4RdW7okeVk FbqmIqjc5jGg0tR3dVmricPKumzt6CyO2+CWUSbbeQStRqMGo64T9Y8s+tcb9S6sNMSO herlIIcb9jml1GS1HpXMMFV4rBVxX71DTV25EHeLaQACRKT8st8RRKCo4+jabv1/U/aA 8Itw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=33P+IG3zourtkiugP+gHrNcHn4CktLcQ1NmI5YOJd5Y=; b=qTFGAj80EyJK3QiyFGbfyVRC/I6NRx2ucmIm4L3q5I4dL/iE/WhhHz5Xaye9BjQAIH jGkp8M+r7iMighbE34WWQ9WPzjrOdyK8cPOMy2e/RvX0a5n+hdhUlGc/N1rJJsJD4EE1 SCe+aX6MGY9npOVH/XfnTq8a+a7ZecF1dPsxpEMvLylG+u33xaC26RJGtZQ29PuIN9jt kVFVO+K9YJkB2wrhjWfPbSMhb9aO7/XnPGlRc7lg/zfyPmUkffrSU2CTd6+pggNO6D8/ nh2R8ei5COVMUfNz+579FwNuk/OZG8BjwI/OKbYAlN0TSQIe7fI1zt7joaKgGubrTzJf UtXA== X-Gm-Message-State: AOAM530lqVwT10flUD9NxMhEYy2HL1iEh66PkUBP1pVbGdTUgp44qKrv 7FNW9+VZlDp/qpySBVObRKHfpz/gSyc= X-Google-Smtp-Source: ABdhPJzjA/RBEKbJLVTob2Gn0O0CT/rIWdimLNwX28MwyzM5N4rXstmeJEWob47FzzY2poRRP7GfPQ== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr17292023wmg.152.1608561919508; Mon, 21 Dec 2020 06:45:19 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 34/55] configure: accept --enable-slirp Date: Mon, 21 Dec 2020 15:44:26 +0100 Message-Id: <20201221144447.26161-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Thomas Huth Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Meson understands -Dslirp=enabled, so there is no reason not to accept the configure option as well. Reviewed-by: Marc-André Lureau Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index d5d630c0ee..16b609a984 100755 --- a/configure +++ b/configure @@ -1082,6 +1082,8 @@ for opt do ;; --disable-slirp) slirp="disabled" ;; + --enable-slirp) slirp="enabled" + ;; --enable-slirp=git) slirp="internal" ;; --enable-slirp=system) slirp="system" From patchwork Mon Dec 21 14:44:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=J9Zm8QGv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02rW4LJZz9sVS for ; Tue, 22 Dec 2020 02:07:23 +1100 (AEDT) Received: from localhost ([::1]:42418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMmL-0005n7-VH for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:07:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRD-0004rR-52 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007nf-0P for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: by mail-wr1-x433.google.com with SMTP id a12so11304823wrv.8 for ; Mon, 21 Dec 2020 06:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6WMpKqBPeuGJHcvKl3raY8sepKGy3ANI9y/5By+JLWc=; b=J9Zm8QGvNo+7ybi9Q0XEpI+3o44UjLQ7/8QobIsU6g5/no/TrUQnGuSc2LDk7OV0HB kkmMGoCwJO/jJq4nZostIRg4BLN1JpB+Jv858GqAVY/iapam/7f86duu8UFuLQJQoZoA otiuMFcwG04ccM9/V+iAyEaNDRZHdHmUoO5IE6GLKlG0f5FwF1dYDR7gqnxxowyIX66x YFd4wVZHaguPM6k//w5hDivx/CyaSks+5Bb6PKbamU0ni0Yy+1oJUBDFP64T6mhVY/qq Q6/W+kBWe9nNjgAXkc4dZqHGWl98xHeMPX8OobZObecziAjUvI/9aGpjLzfDVVk1TCNq cqxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6WMpKqBPeuGJHcvKl3raY8sepKGy3ANI9y/5By+JLWc=; b=E8qpC8sE2bmXadFcFeS/bXIljwMc/2GAGT32au0OulhGzFo52s3XAZ2EpM0q8rVZuv qk0cHnLkoGr3axVGS9ZT5k1KjkuwX2zL6Qd0S0x2y32AhWezunEVBjd0f4edRRqfJFFz 83/tuy+ob3i1wiA/AgoB73SAphmBUq2RT+FuM0kn8uYAS3zkISmouGn2ycnN6yJE+5pl EOJTWEckGbYFqSGHOpgYClMl9+SpsdXGOHEsmgktL/Eseda6FSz12NLrWtLh/plmsyUh vWfJSYf2ts+dGRtW8OPGvz1wHmPBxTS2hVcmmDLhh06Qgpd9jpHo8/gNXE5h87121+mA taeQ== X-Gm-Message-State: AOAM532GNdlc2zjZ3bTsQTdCoTMneF6lR0v0AinksbQSs9D4CNFiPriE WhZejf+g/xpkh/yCLpQyJOLhJaa4RI8= X-Google-Smtp-Source: ABdhPJw59zoQwQzdWTxbYBveuCK3aeNKJucgQJv5jQqq9J6Gr4yWJLOAdruze7zyaYPXtTrjZ+P7Fg== X-Received: by 2002:adf:c64f:: with SMTP id u15mr17134922wrg.270.1608561920641; Mon, 21 Dec 2020 06:45:20 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 35/55] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION Date: Mon, 21 Dec 2020 15:44:27 +0100 Message-Id: <20201221144447.26161-36-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" version.rc can just use existing preprocessor symbols. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 9 --------- version.rc | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 16b609a984..61ae342a58 100755 --- a/configure +++ b/configure @@ -5927,15 +5927,6 @@ if test "$bigendian" = "yes" ; then fi if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=y" >> $config_host_mak - rc_version=$(cat $source_path/VERSION) - version_major=${rc_version%%.*} - rc_version=${rc_version#*.} - version_minor=${rc_version%%.*} - rc_version=${rc_version#*.} - version_subminor=${rc_version%%.*} - version_micro=0 - echo "CONFIG_FILEVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak - echo "CONFIG_PRODUCTVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak if test "$guest_agent_with_vss" = "yes" ; then echo "CONFIG_QGA_VSS=y" >> $config_host_mak echo "QGA_VSS_PROVIDER=$qga_vss_provider" >> $config_host_mak diff --git a/version.rc b/version.rc index d8e1569991..0daadbf981 100644 --- a/version.rc +++ b/version.rc @@ -2,8 +2,8 @@ #include "config-host.h" VS_VERSION_INFO VERSIONINFO -FILEVERSION CONFIG_FILEVERSION -PRODUCTVERSION CONFIG_PRODUCTVERSION +FILEVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 +PRODUCTVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP From patchwork Mon Dec 21 14:44:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YYR/8Vu2; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03721RXTz9sVH for ; Tue, 22 Dec 2020 02:19:58 +1100 (AEDT) Received: from localhost ([::1]:44734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMya-0001tC-5B for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:19:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRH-0004rp-00 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:52844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007nx-UF for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:30 -0500 Received: by mail-wm1-x32f.google.com with SMTP id a6so10098291wmc.2 for ; Mon, 21 Dec 2020 06:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RiKRgD2AaE0tCQWyXCImXmBK9bR0yALUWNeufpaoVnA=; b=YYR/8Vu2EThLDqvCwrTWwWASzV+uBwfLYFTacZetyEq8o2OOW2LxXOTmhnwet4Mcs2 8ns8KPQk1KlHrQjc0OKtFLsFQF9T8oTpcjjb3SYBQMDy2KE09mPL0Jj4d/ouZSn70iq8 ijo/wfL090ruOs8+VHrk2JDbUZWLjMdOs6O8VPHwv7mXAHzt7V7mVQesEHs6xDEYcGoA 9ULk7I5W81WF33h3kSAIFr4Pi9kBoZLLjt3JtTqsjH86C/GXw9IxKcP8KNWMLVDglJfy BpTU6eZtqWobcXxTnXWdPTntBpFqxbKHAZhoSNQbByCTMs1Nm3sC5aJoBTSjV6hrt5GW elaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RiKRgD2AaE0tCQWyXCImXmBK9bR0yALUWNeufpaoVnA=; b=WKwI0fJeYWhzWqoxFIpjS3yj917WIDW1MWFqccntvE6XZHwJ4eQMpC12AUqEGFbf/H qJgISmiZIajVhIwmOJtYhCg1UrqvSY6JZAwfjXCelxolecMZStL194hV969Qv6s+5Boq kAHuJNNPMMfZQ1L3E56AFzZJtgQQg2cRBrEBE4o8oA3agAJQISYxGTh1PUeUjSECl7l2 To1ppSXtvS21K6I2+/RS8ZHL9DOCkpYbV8eg17RT0ZLBPaos+KaqET7pEy5//GChLBt0 jljivME+yPSRIFvEBgoWEjY4GZ1uLgQehwISUKMs/YkOxPYEFoKmkiWjJKfPJoWIWBYI lj7w== X-Gm-Message-State: AOAM530Bz/RWVNKfKse7oL3dSF9aZ/3ME7h9fo/+gHNS3KPJNb0AFJdJ sTwp4hTMDDgLYD3P0zS0z8okT2PSMHU= X-Google-Smtp-Source: ABdhPJzatNcahS/9uCqfZ/fXXCleisP7IFH6BU5VODnOXFfc/pApblaZg97p63FtHqBpFgEYq+PQyA== X-Received: by 2002:a1c:43c5:: with SMTP id q188mr17059679wma.163.1608561921448; Mon, 21 Dec 2020 06:45:21 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 36/55] brlapi: convert to meson Date: Mon, 21 Dec 2020 15:44:28 +0100 Message-Id: <20201221144447.26161-37-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- chardev/meson.build | 2 +- configure | 32 ++++---------------------------- meson.build | 20 +++++++++++++++++--- meson_options.txt | 2 ++ 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/chardev/meson.build b/chardev/meson.build index 4e19722c5e..32377af383 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -29,7 +29,7 @@ softmmu_ss.add(files('msmouse.c', 'wctablet.c', 'testdev.c')) chardev_modules = {} -if config_host.has_key('CONFIG_BRLAPI') +if brlapi.found() module_ss = ss.source_set() module_ss.add(when: [brlapi], if_true: [files('baum.c'), pixman]) chardev_modules += { 'baum': module_ss } diff --git a/configure b/configure index 61ae342a58..8dd9c33685 100755 --- a/configure +++ b/configure @@ -305,7 +305,7 @@ for opt do esac done -brlapi="$default_feature" +brlapi="auto" curl="$default_feature" iconv="auto" curses="auto" @@ -1104,9 +1104,9 @@ for opt do ;; --enable-xen-pci-passthrough) xen_pci_passthrough="enabled" ;; - --disable-brlapi) brlapi="no" + --disable-brlapi) brlapi="disabled" ;; - --enable-brlapi) brlapi="yes" + --enable-brlapi) brlapi="enabled" ;; --disable-kvm) kvm="disabled" ;; @@ -3423,26 +3423,6 @@ for drv in $audio_drv_list; do esac done -########################################## -# BrlAPI probe - -if test "$brlapi" != "no" ; then - brlapi_libs="-lbrlapi" - cat > $TMPC << EOF -#include -#include -int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } -EOF - if compile_prog "" "$brlapi_libs" ; then - brlapi=yes - else - if test "$brlapi" = "yes" ; then - feature_not_found "brlapi" "Install brlapi devel" - fi - brlapi=no - fi -fi - ########################################## # curl probe if test "$curl" != "no" ; then @@ -6132,10 +6112,6 @@ if test "$curl" = "yes" ; then echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak echo "CURL_LIBS=$curl_libs" >> $config_host_mak fi -if test "$brlapi" = "yes" ; then - echo "CONFIG_BRLAPI=y" >> $config_host_mak - echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak -fi if test "$gtk" = "yes" ; then echo "CONFIG_GTK=y" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak @@ -6969,7 +6945,7 @@ NINJA=$ninja $meson setup \ -Dcocoa=$cocoa -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ - -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \ + -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index 3e584499bc..ecc95207e5 100644 --- a/meson.build +++ b/meson.build @@ -570,8 +570,21 @@ if have_system and not get_option('curses').disabled() endif brlapi = not_found -if 'CONFIG_BRLAPI' in config_host - brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) +if not get_option('brlapi').auto() or have_system + brlapi = cc.find_library('brlapi', has_headers: ['brlapi.h'], + required: get_option('brlapi'), + static: enable_static) + if brlapi.found() and not cc.links(''' + #include + #include + int main(void) { return brlapi__openConnection (NULL, NULL, NULL); }''', dependencies: brlapi) + brlapi = not_found + if get_option('brlapi').enabled() + error('could not link brlapi') + else + warning('could not link brlapi, disabling') + endif + endif endif sdl = not_found @@ -854,6 +867,7 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir')) +config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) @@ -2165,7 +2179,7 @@ summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')} if config_host.has_key('CONFIG_XEN_BACKEND') summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']} endif -summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')} +summary_info += {'brlapi support': brlapi.found()} summary_info += {'Documentation': build_docs} summary_info += {'PIE': get_option('b_pie')} summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} diff --git a/meson_options.txt b/meson_options.txt index 242e0769fb..62efe96a91 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,8 @@ option('cfi', type: 'boolean', value: 'false', option('cfi_debug', type: 'boolean', value: 'false', description: 'Verbose errors in case of CFI violation') +option('brlapi', type : 'feature', value : 'auto', + description: 'brlapi character device driver') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('mpath', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419099 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dGElYgnc; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D034C4gFmz9sVH for ; Tue, 22 Dec 2020 02:17:29 +1100 (AEDT) Received: from localhost ([::1]:37952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMwA-0007UN-87 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:17:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRD-0004rV-BA for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:36590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMR9-0007pB-S9 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:26 -0500 Received: by mail-wr1-x42c.google.com with SMTP id t16so11330080wra.3 for ; Mon, 21 Dec 2020 06:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IUehFNl6rhfyT37c92sSKWNXxAmQ4tNlj0djWzXh9wE=; b=dGElYgncueoqFrBjxYK0bsHIMxkhbYq9as0oEtVij5xgY5lf94S8ZtOfX/agLudfpE PfGlH73STiagcZ7nglG841pqU6bT0sdUpRBpEJczBkxjZSrnHd6qiKXIg60q3CTfUlDD TXJ809A3E/+gZ6shxm5gF8zmvc9TSScXDuY3YKjC1oY54zrDMS/ZZ6gE2VwdDTaEZ9Yh /AcVEQA5EaTOU4f3kwyc1WD9rF3nKUaKSzZD3h/cbCMG7gR9GD7TqhcfTBOYFtvSwkEh omTZjSv3DwNtxhJ3B+EDgf+pemGBnR7FOjI1TZYgyP1y/MWAm5erfvheEDjzj3nvdgRN tCPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IUehFNl6rhfyT37c92sSKWNXxAmQ4tNlj0djWzXh9wE=; b=GGR40JzgVOkYRpuYYuPcuoK5s8yPHVcBETkM+mu6YOM4uKh43xyLxOEiuZJtnH4qPa 23c7JPOq8k9nDe7xIJn98fQ+L1yRGQdykh7BgvbuunW1yycgb+MU9spryPRgGZtEjffd xOOAyAJRE5zkQo1rQ+OHXh+n+QHYYPhFIMwt9s+l7NC/pxnrTMY96EGmK4g0UMe4V0+P n1RtqCuAt5VPn81FvgtfGxbwfnL90iTUzM8IrQuNFI6SHm0KzCkOp9vywcdCEQd7Eo5u ON7minzNHgIfVqa0UTzS+PQEc3irgBRUJ7XboN28Fp4NVcmsJt1ytTSIXpAPGeJNnqPw E0EQ== X-Gm-Message-State: AOAM531NmxCqlNy+DwMZUSepI18m1p4WuKGMAdz3imYG2TeludlR6MsT Ow/AH5FmUTIQBXZkTxSh/+h6R7hCx8w= X-Google-Smtp-Source: ABdhPJzzosY0tnTMjjc/TPKo2AKmH2WE9h/E0kmGN+9t6pWAT2a216Ypcu/0y0EJ86MlfYQ2gNDc/w== X-Received: by 2002:adf:e552:: with SMTP id z18mr19580774wrm.29.1608561922222; Mon, 21 Dec 2020 06:45:22 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:21 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 37/55] curl: remove compatibility code, require 7.29.0 Date: Mon, 21 Dec 2020 15:44:29 +0100 Message-Id: <20201221144447.26161-38-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Daniel_Berrang=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" cURL 7.16.0 was released in October 2006. Just remove code that is in all likelihood not being used anywhere, and require the oldest version found in currently supported distros, which is 7.29.0 from CentOS 7. pkg-config is enough for QEMU, since it does not need extra information such as the path for certicate authorities. All supported platforms today will all have pkg-config for curl, so we can drop curl-config. Suggested-by: Daniel Berrangé Reviewed-by: Daniel Berrangé Signed-off-by: Paolo Bonzini --- block/curl.c | 28 ---------------------------- configure | 9 ++------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/block/curl.c b/block/curl.c index d24a4c5897..4ff895df8f 100644 --- a/block/curl.c +++ b/block/curl.c @@ -37,26 +37,6 @@ // #define DEBUG_VERBOSE -#if LIBCURL_VERSION_NUM >= 0x071000 -/* The multi interface timer callback was introduced in 7.16.0 */ -#define NEED_CURL_TIMER_CALLBACK -#define HAVE_SOCKET_ACTION -#endif - -#ifndef HAVE_SOCKET_ACTION -/* If curl_multi_socket_action isn't available, define it statically here in - * terms of curl_multi_socket. Note that ev_bitmask will be ignored, which is - * less efficient but still safe. */ -static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t sockfd, - int ev_bitmask, - int *running_handles) -{ - return curl_multi_socket(multi_handle, sockfd, running_handles); -} -#define curl_multi_socket_action __curl_multi_socket_action -#endif - #define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \ CURLPROTO_FTP | CURLPROTO_FTPS) @@ -140,7 +120,6 @@ typedef struct BDRVCURLState { static void curl_clean_state(CURLState *s); static void curl_multi_do(void *arg); -#ifdef NEED_CURL_TIMER_CALLBACK /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque) { @@ -156,7 +135,6 @@ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque) } return 0; } -#endif /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, @@ -433,7 +411,6 @@ static void curl_multi_do(void *arg) static void curl_multi_timeout_do(void *arg) { -#ifdef NEED_CURL_TIMER_CALLBACK BDRVCURLState *s = (BDRVCURLState *)arg; int running; @@ -446,9 +423,6 @@ static void curl_multi_timeout_do(void *arg) curl_multi_check_completion(s); qemu_mutex_unlock(&s->mutex); -#else - abort(); -#endif } /* Called with s->mutex held. */ @@ -598,10 +572,8 @@ static void curl_attach_aio_context(BlockDriverState *bs, s->multi = curl_multi_init(); s->aio_context = new_context; curl_multi_setopt(s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb); -#ifdef NEED_CURL_TIMER_CALLBACK curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, s); curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, curl_timer_cb); -#endif } static QemuOptsList runtime_opts = { diff --git a/configure b/configure index 8dd9c33685..c75196beb1 100755 --- a/configure +++ b/configure @@ -3426,17 +3426,12 @@ done ########################################## # curl probe if test "$curl" != "no" ; then - if $pkg_config libcurl --exists; then - curlconfig="$pkg_config libcurl" - else - curlconfig=curl-config - fi cat > $TMPC << EOF #include int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; } EOF - curl_cflags=$($curlconfig --cflags 2>/dev/null) - curl_libs=$($curlconfig --libs 2>/dev/null) + curl_cflags=$($pkg_config libcurl --cflags 2>/dev/null) + curl_libs=$($pkg_config libcurl --libs 2>/dev/null) if compile_prog "$curl_cflags" "$curl_libs" ; then curl=yes else From patchwork Mon Dec 21 14:44:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=o7bGX6bi; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02bT2H5hz9sVS for ; Tue, 22 Dec 2020 01:56:05 +1100 (AEDT) Received: from localhost ([::1]:39770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMbT-0008Ot-6z for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 09:56:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRH-0004rt-8f for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:31 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:37029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007q3-Ej for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:30 -0500 Received: by mail-wm1-x335.google.com with SMTP id q75so11189439wme.2 for ; Mon, 21 Dec 2020 06:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mlh+izxa5vEMNNyEE/2INCc8XWxagZR6Muhe29rcraY=; b=o7bGX6bi4mpe4JI8pXu7ctfj2cY9RLYy/9l+Vru43imYQ09pVvbvtoi4Aepi5mfBTZ LTzpcpnDL6Cok+fwnaizrQpcANsYmC2ameCa3HPMCly8unL8zWfgQ+xweWl5j9i8QNz3 kiltyjEGvmrBWHVwUoyjr/pacxPFDEVuZ8GFZ5ZCSZjFe3/CSG44u9HAGDicySnj9UBj sOdORVZRb7x06flphl6sN6r7f/QPzVXuyTHmuVlT7ijVRWMyJ7EjKd9xuIDUQl10qXDh qGCSU4Fd2W5w7Z8KEuNbRUUlz0XQnNGdkCw44xZGz54lutWglPrDxd+R/TkLFwcH22ak VLkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mlh+izxa5vEMNNyEE/2INCc8XWxagZR6Muhe29rcraY=; b=SBgqj/y8WRjpo6M0SK8J3QIYKJuHOfZhNyxoNUFDZG2wSK+tyAhRx7RB9n+WkORl/9 2WcH1CfLqJrHvR3O1uoGtVmrIeXuSOb6lyRzpq0Odj2LQMSY4OWIb0+mMAAG081MEUhh Gk86XpMXPKliEqv2vATypYjzZQx8AW+VSN39TJXFgjRuxntp3OD0sPCrAGxKg2W1T6Cp ZHjmHiDSU5QbNRXg/ky6zR6hmQRvYfUsukeB60ZjfbBSWCsgnTTzlaOCr/CKvpIsqL9u D8jsjT4FkVkz0jdg47YmL5xn41KPM226Uo+PPRtECwbpIeaydZu2MJ7WPcFSMn92DmrR 454Q== X-Gm-Message-State: AOAM5318U/5ppTaKJcXoQVi+RisBhRLUpOEW/WTktiWUq8EqJVja00PF y7ihuezFB7/vVZYQf5h+8hLiqgOUico= X-Google-Smtp-Source: ABdhPJzjn98/9F4db+OyQ7uIgHvpgf/HQdwF7Trq+bLKAbH6aDvyLQyf23T2IdNgzBf4Ue3RFiABrw== X-Received: by 2002:a1c:de41:: with SMTP id v62mr17074728wmg.135.1608561923087; Mon, 21 Dec 2020 06:45:23 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:22 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 38/55] curl: convert to meson Date: Mon, 21 Dec 2020 15:44:30 +0100 Message-Id: <20201221144447.26161-39-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Daniel_Berrang=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Daniel Berrangé Signed-off-by: Paolo Bonzini --- configure | 31 ++++--------------------------- contrib/elf2dmp/meson.build | 2 +- meson.build | 11 +++++++---- meson_options.txt | 2 ++ 4 files changed, 14 insertions(+), 32 deletions(-) diff --git a/configure b/configure index c75196beb1..bb6b8eefdb 100755 --- a/configure +++ b/configure @@ -306,7 +306,7 @@ for opt do done brlapi="auto" -curl="$default_feature" +curl="auto" iconv="auto" curses="auto" docs="auto" @@ -1215,9 +1215,9 @@ for opt do ;; --enable-iconv) iconv="enabled" ;; - --disable-curl) curl="no" + --disable-curl) curl="disabled" ;; - --enable-curl) curl="yes" + --enable-curl) curl="enabled" ;; --disable-fdt) fdt="disabled" ;; @@ -3423,25 +3423,6 @@ for drv in $audio_drv_list; do esac done -########################################## -# curl probe -if test "$curl" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; } -EOF - curl_cflags=$($pkg_config libcurl --cflags 2>/dev/null) - curl_libs=$($pkg_config libcurl --libs 2>/dev/null) - if compile_prog "$curl_cflags" "$curl_libs" ; then - curl=yes - else - if test "$curl" = "yes" ; then - feature_not_found "curl" "Install libcurl devel" - fi - curl=no - fi -fi # test "$curl" - ########################################## # glib support probe @@ -6102,11 +6083,6 @@ fi if test "$bswap_h" = "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak fi -if test "$curl" = "yes" ; then - echo "CONFIG_CURL=y" >> $config_host_mak - echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak - echo "CURL_LIBS=$curl_libs" >> $config_host_mak -fi if test "$gtk" = "yes" ; then echo "CONFIG_GTK=y" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak @@ -6941,6 +6917,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ + -Dcurl=$curl \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/contrib/elf2dmp/meson.build b/contrib/elf2dmp/meson.build index b3de173316..4d86cb390a 100644 --- a/contrib/elf2dmp/meson.build +++ b/contrib/elf2dmp/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_CURL' in config_host +if curl.found() executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'), dependencies: [glib, curl], install: true) diff --git a/meson.build b/meson.build index ecc95207e5..1d5b00aef1 100644 --- a/meson.build +++ b/meson.build @@ -392,9 +392,11 @@ if 'CONFIG_VIRGL' in config_host link_args: config_host['VIRGL_LIBS'].split()) endif curl = not_found -if 'CONFIG_CURL' in config_host - curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(), - link_args: config_host['CURL_LIBS'].split()) +if not get_option('curl').auto() or have_block + curl = dependency('libcurl', version: '>=7.29.0', + method: 'pkg-config', + required: get_option('curl'), + static: enable_static) endif libudev = not_found if targetos == 'linux' and (have_system or have_tools) @@ -872,6 +874,7 @@ config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) +config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) @@ -2161,7 +2164,7 @@ summary_info += {'iconv support': iconv.found()} summary_info += {'curses support': curses.found()} # TODO: add back version summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')} -summary_info += {'curl support': config_host.has_key('CONFIG_CURL')} +summary_info += {'curl support': curl.found()} summary_info += {'mingw32 support': targetos == 'windows'} summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} diff --git a/meson_options.txt b/meson_options.txt index 62efe96a91..2b845ac62b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') +option('curl', type : 'feature', value : 'auto', + description: 'CURL block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GjSAnPZG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03HS6gz5z9sVH for ; Tue, 22 Dec 2020 02:27:16 +1100 (AEDT) Received: from localhost ([::1]:34262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN5e-0001AF-Ig for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:27:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0004vH-0h for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:33 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:51729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007qL-Ha for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: by mail-wm1-x32e.google.com with SMTP id v14so10095560wml.1 for ; Mon, 21 Dec 2020 06:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YvGDjUX1uzLrPzoSyBtKDm1Id/IjIEI43leAgzqJqhU=; b=GjSAnPZGbVYqszF+K55bs8+51fglNPeZUvEr3sun4/OdNZN6NJIay2SMQ0WUjeF6H7 7OsmHmj6ymwCdP1xl0/JcKaIF8PU1Dh+QtwK+XSQH4qzfGDc4kdMxCNki9DWxIhUObAi 8Cd9Fp1Jisg2Sx5Cj5fWUajUP0fzFRyhhXdGkOsmTCBIMEuKIGGPxq2+BqkzbV6wSRM1 z8YG1c9crnBVqR+uBe7/pqbjpam2vjAUBNUOempk1a+oR5/vMxcKQhGXfQcBuCER/HRN QyCKEx8AkPzmm4ChPsykl9w/RuURGHGKtf5gxRb+YyA6tot1grfsW334I1bT0TheGXZp upJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YvGDjUX1uzLrPzoSyBtKDm1Id/IjIEI43leAgzqJqhU=; b=NoXwizXHdBRRRGCBF5yVzMXAahQiMvBxSS6IjrFmNwOp5aIK4+fnCJLkJBtm/GmVyD JiqGBMk/EeBtVJSl1d5HCRxQm5VwmhCFPLIu9IvD8eBNEeYSb0vewdhRilM9V2l9+W+j keplftgRJM2r4RayOuQj1mzwMzRO3xAgcLbrfxghUjrdd2VJzoJeQYt58ce4FWCXeH9X uKMWHG6TAK1KjaGN0VGSDRxrSpDRGmwGmIOhV9/mhVQjGhrnYF1w4Lb3qcC6nxoeixoZ JKpbjCydZWvGY9gMahsSDsWA6cm9Im4dRRXDjC4prhtnHnOnJOc82zMVAe4YdyOFEoqV yJYg== X-Gm-Message-State: AOAM531Fmk8OeMvMT0q4iGwXZLVfREpWaSeDEjih7n9HJBdk4om9wJCx hwVbQctDAIzHgWtL2yZWrSNvxY4gaX4= X-Google-Smtp-Source: ABdhPJyIFN0OslCzEpf6+jPU9LJvw/YkGFZGsg/R0qwbPBNzXyVzhRwqS8pKZU/87Z0BBLyUFf6ixg== X-Received: by 2002:a1c:df85:: with SMTP id w127mr17383726wmg.166.1608561924222; Mon, 21 Dec 2020 06:45:24 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 39/55] glusterfs: convert to meson Date: Mon, 21 Dec 2020 15:44:31 +0100 Message-Id: <20201221144447.26161-40-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 102 ++-------------------------------------------- meson.build | 48 ++++++++++++++++++++-- meson_options.txt | 2 + 3 files changed, 50 insertions(+), 102 deletions(-) diff --git a/configure b/configure index bb6b8eefdb..b7644cfbd9 100755 --- a/configure +++ b/configure @@ -414,13 +414,7 @@ crypto_afalg="no" cfi="false" cfi_debug="false" seccomp="$default_feature" -glusterfs="$default_feature" -glusterfs_xlator_opt="no" -glusterfs_discard="no" -glusterfs_fallocate="no" -glusterfs_zerofill="no" -glusterfs_ftruncate_has_stat="no" -glusterfs_iocb_has_stat="no" +glusterfs="auto" gtk="$default_feature" gtk_gl="no" tls_priority="NORMAL" @@ -1365,7 +1359,7 @@ for opt do ;; --disable-seccomp) seccomp="no" ;; - --disable-glusterfs) glusterfs="no" + --disable-glusterfs) glusterfs="disabled" ;; --disable-avx2) avx2_opt="no" ;; @@ -1376,7 +1370,7 @@ for opt do --enable-avx512f) avx512f_opt="yes" ;; - --enable-glusterfs) glusterfs="yes" + --enable-glusterfs) glusterfs="enabled" ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 @@ -3869,64 +3863,6 @@ if test "$libxml2" != "no" ; then fi fi -########################################## -# glusterfs probe -if test "$glusterfs" != "no" ; then - if $pkg_config --atleast-version=3 glusterfs-api; then - glusterfs="yes" - glusterfs_cflags=$($pkg_config --cflags glusterfs-api) - glusterfs_libs=$($pkg_config --libs glusterfs-api) - if $pkg_config --atleast-version=4 glusterfs-api; then - glusterfs_xlator_opt="yes" - fi - if $pkg_config --atleast-version=5 glusterfs-api; then - glusterfs_discard="yes" - fi - if $pkg_config --atleast-version=6 glusterfs-api; then - glusterfs_fallocate="yes" - glusterfs_zerofill="yes" - fi - cat > $TMPC << EOF -#include - -int -main(void) -{ - /* new glfs_ftruncate() passes two additional args */ - return glfs_ftruncate(NULL, 0, NULL, NULL); -} -EOF - if compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then - glusterfs_ftruncate_has_stat="yes" - fi - cat > $TMPC << EOF -#include - -/* new glfs_io_cbk() passes two additional glfs_stat structs */ -static void -glusterfs_iocb(glfs_fd_t *fd, ssize_t ret, struct glfs_stat *prestat, struct glfs_stat *poststat, void *data) -{} - -int -main(void) -{ - glfs_io_cbk iocb = &glusterfs_iocb; - iocb(NULL, 0 , NULL, NULL, NULL); - return 0; -} -EOF - if compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then - glusterfs_iocb_has_stat="yes" - fi - else - if test "$glusterfs" = "yes" ; then - feature_not_found "GlusterFS backend support" \ - "Install glusterfs-api devel >= 3" - fi - glusterfs="no" - fi -fi - # Check for inotify functions when we are building linux-user # emulator. This is done because older glibc versions don't # have syscall stubs for these implemented. In that case we @@ -6413,36 +6349,6 @@ if test "$getauxval" = "yes" ; then echo "CONFIG_GETAUXVAL=y" >> $config_host_mak fi -if test "$glusterfs" = "yes" ; then - echo "CONFIG_GLUSTERFS=y" >> $config_host_mak - echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak - echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak -fi - -if test "$glusterfs_xlator_opt" = "yes" ; then - echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak -fi - -if test "$glusterfs_discard" = "yes" ; then - echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak -fi - -if test "$glusterfs_fallocate" = "yes" ; then - echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak -fi - -if test "$glusterfs_zerofill" = "yes" ; then - echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak -fi - -if test "$glusterfs_ftruncate_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak -fi - -if test "$glusterfs_iocb_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak -fi - if test "$libssh" = "yes" ; then echo "CONFIG_LIBSSH=y" >> $config_host_mak echo "LIBSSH_CFLAGS=$libssh_cflags" >> $config_host_mak @@ -6917,7 +6823,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl \ + -Dcurl=$curl -Dglusterfs=$glusterfs \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index 1d5b00aef1..db52ac6bdf 100644 --- a/meson.build +++ b/meson.build @@ -613,9 +613,40 @@ if 'CONFIG_RBD' in config_host rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) endif glusterfs = not_found -if 'CONFIG_GLUSTERFS' in config_host - glusterfs = declare_dependency(compile_args: config_host['GLUSTERFS_CFLAGS'].split(), - link_args: config_host['GLUSTERFS_LIBS'].split()) +glusterfs_ftruncate_has_stat = false +glusterfs_iocb_has_stat = false +if not get_option('glusterfs').auto() or have_block + glusterfs = dependency('glusterfs-api', version: '>=3', + required: get_option('glusterfs'), + method: 'pkg-config', static: enable_static) + if glusterfs.found() + glusterfs_ftruncate_has_stat = cc.links(''' + #include + + int + main(void) + { + /* new glfs_ftruncate() passes two additional args */ + return glfs_ftruncate(NULL, 0, NULL, NULL); + } + ''', dependencies: glusterfs) + glusterfs_iocb_has_stat = cc.links(''' + #include + + /* new glfs_io_cbk() passes two additional glfs_stat structs */ + static void + glusterfs_iocb(glfs_fd_t *fd, ssize_t ret, struct glfs_stat *prestat, struct glfs_stat *poststat, void *data) + {} + + int + main(void) + { + glfs_io_cbk iocb = &glusterfs_iocb; + iocb(NULL, 0 , NULL, NULL, NULL); + return 0; + } + ''', dependencies: glusterfs) + endif endif libssh = not_found if 'CONFIG_LIBSSH' in config_host @@ -876,6 +907,15 @@ config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) config_host_data.set('CONFIG_CURSES', curses.found()) +config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found()) +if glusterfs.found() + config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().version_compare('>=4')) + config_host_data.set('CONFIG_GLUSTERFS_DISCARD', glusterfs.version().version_compare('>=5')) + config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_compare('>=6')) + config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6')) + config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) + config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) +endif config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2253,7 +2293,7 @@ summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1 summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')} summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')} summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} -summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')} +summary_info += {'GlusterFS support': glusterfs.found()} summary_info += {'gcov': get_option('b_coverage')} summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} diff --git a/meson_options.txt b/meson_options.txt index 2b845ac62b..b5d84bb88b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -46,6 +46,8 @@ option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') +option('glusterfs', type : 'feature', value : 'auto', + description: 'Glusterfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419107 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=J/ZoQpZs; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03F31YF3z9sVH for ; Tue, 22 Dec 2020 02:25:11 +1100 (AEDT) Received: from localhost ([::1]:55796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN3d-0006dQ-5t for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:25:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRI-0004uu-PQ for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:40582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRC-0007r7-HE for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:32 -0500 Received: by mail-wm1-x334.google.com with SMTP id r4so11156634wmh.5 for ; Mon, 21 Dec 2020 06:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MqJQF5mR+4cetOd5KHLJPsleSno/7cp2ZMdnZoPO5/4=; b=J/ZoQpZsZ/TifmfGKA+VR3HkyMTDr5q6wV24lFxOhF6U08Lwz8DMW7Ex/Ukr8ktKqq i4DZUX3mLaYv7sMUkNT5f3j0ZBLXOBKJIXE7xrBilcD9ye/+RTzoHgIOxOUOLbQ0I3ZZ I4fIjXVS24Fxf0svepN1V6aNJYc5vc/A5MW31EUpZWMMKtJRiRMNss3D9JEEobqXP0vb TLbPX5iT9co20/YUD3ZHOg1d+cGAXbRxkOtjpWc/tG/8R0pALrLfKcgFazaeFUsqYa+b WWFNsu/5h0AwWuLsD8aYbtPWPdQ1xz5QT/aCWB9clnlP6tZUGB3DNtcXXKfSrnoestWX eUfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MqJQF5mR+4cetOd5KHLJPsleSno/7cp2ZMdnZoPO5/4=; b=SHDrzQObSWD60BtOrxGZ5cZYor9RPuAXCB9VXBAd3cwxEV8Z5P/8JDUdrdkbpWIxxj BNah2YVganWvTqEXaxtB7cAJic/M8enpbZ1+00e8uiqw0ZdZFzoI0cElNa7M1YJgNcQW 5l/9keNOGP4rZdSjzrQVPlnIbJ+xptjTxLOpB5RrUOosxa7M7pR9Lh1pr/RURXyqBe+1 CgIQm7rdJGgdoKlsiVrB5tbY/5pS4mHyt7a2tyrV7dY1OI4A1ugVXdjBrOiAMnm2J6SG Y11FBgIAg26z8JgmuU9CM28rCSkGceFjuAoFsQmMYxFBnuUMBSjfwDOwhWGgsyhazKnl gtlw== X-Gm-Message-State: AOAM532xHXVE+9/8fnziE922Vxog+5pYatipcL5NGiDAppa683ix7Q1Y OyIWdeeHJSi+moPWPNdojuRWv031egk= X-Google-Smtp-Source: ABdhPJxkKK64+K4IhQOGDkbDN5OmejGvXZ34nv5ZG+lxDFqjrF4l7MX27AFeY8PlXujnQcmyYmPakg== X-Received: by 2002:a7b:cb54:: with SMTP id v20mr10806460wmj.148.1608561924954; Mon, 21 Dec 2020 06:45:24 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:24 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 40/55] bzip2: convert to meson Date: Mon, 21 Dec 2020 15:44:32 +0100 Message-Id: <20201221144447.26161-41-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 31 ++++--------------------------- meson.build | 18 +++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/configure b/configure index b7644cfbd9..3d65c1e196 100755 --- a/configure +++ b/configure @@ -395,7 +395,7 @@ avx2_opt="$default_feature" capstone="auto" lzo="$default_feature" snappy="$default_feature" -bzip2="$default_feature" +bzip2="auto" lzfse="$default_feature" zstd="$default_feature" guest_agent="$default_feature" @@ -1319,9 +1319,9 @@ for opt do ;; --enable-snappy) snappy="yes" ;; - --disable-bzip2) bzip2="no" + --disable-bzip2) bzip2="disabled" ;; - --enable-bzip2) bzip2="yes" + --enable-bzip2) bzip2="enabled" ;; --enable-lzfse) lzfse="yes" ;; @@ -2494,24 +2494,6 @@ EOF fi fi -########################################## -# bzip2 check - -if test "$bzip2" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { BZ2_bzlibVersion(); return 0; } -EOF - if compile_prog "" "-lbz2" ; then - bzip2="yes" - else - if test "$bzip2" = "yes"; then - feature_not_found "libbzip2" "Install libbzip2 devel" - fi - bzip2="no" - fi -fi - ########################################## # lzfse check @@ -6236,11 +6218,6 @@ if test "$snappy" = "yes" ; then echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak fi -if test "$bzip2" = "yes" ; then - echo "CONFIG_BZIP2=y" >> $config_host_mak - echo "BZIP2_LIBS=-lbz2" >> $config_host_mak -fi - if test "$lzfse" = "yes" ; then echo "CONFIG_LZFSE=y" >> $config_host_mak echo "LZFSE_LIBS=-llzfse" >> $config_host_mak @@ -6823,7 +6800,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl -Dglusterfs=$glusterfs \ + -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/meson.build b/meson.build index db52ac6bdf..66e35598ce 100644 --- a/meson.build +++ b/meson.build @@ -654,8 +654,20 @@ if 'CONFIG_LIBSSH' in config_host link_args: config_host['LIBSSH_LIBS'].split()) endif libbzip2 = not_found -if 'CONFIG_BZIP2' in config_host - libbzip2 = declare_dependency(link_args: config_host['BZIP2_LIBS'].split()) +if not get_option('bzip2').auto() or have_block + libbzip2 = cc.find_library('bz2', has_headers: ['bzlib.h'], + required: get_option('bzip2'), + static: enable_static) + if libbzip2.found() and not cc.links(''' + #include + int main(void) { BZ2_bzlibVersion(); return 0; }''', dependencies: libbzip2) + libbzip2 = not_found + if get_option('bzip2').enabled() + error('could not link libbzip2') + else + warning('could not link libbzip2, disabling') + endif + endif endif liblzfse = not_found if 'CONFIG_LZFSE' in config_host @@ -2301,7 +2313,7 @@ summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} -summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')} +summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} diff --git a/meson_options.txt b/meson_options.txt index b5d84bb88b..fd16f3b399 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -42,6 +42,8 @@ option('cfi_debug', type: 'boolean', value: 'false', option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') +option('bzip2', type : 'feature', value : 'auto', + description: 'bzip2 support for DMG images') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Ooo6NM9J; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02nC6f5Fz9sVS for ; Tue, 22 Dec 2020 02:04:31 +1100 (AEDT) Received: from localhost ([::1]:36438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMjd-00030i-RA for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:04:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRL-00050e-BA for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:35 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:55822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRD-0007rC-MB for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:34 -0500 Received: by mail-wm1-x334.google.com with SMTP id x22so10081179wmc.5 for ; Mon, 21 Dec 2020 06:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0IPpgfXJIG4wmc/dJzLIQz8n37gZPgs0r3/il0rSCBQ=; b=Ooo6NM9Jcil0b4ei/71psljq9lII19QKlYtYe98l+lLaMuh0biapanfkk3231MJWVZ pNp8WKRjkO4faKp45zNZ1vx1NusA4fwtGS+N99xpLg3iDfih39IWVm95Vb04/ZQp2vI6 sp6P/t4KB6cWWSg3blm1hDulNuF1YYQW3zOFhiipJyjJlJdpeyeGLxaTfV8cFwrlvSuT 9pcMFjHZ2CtWmZykSkR0yyV8/1D8Vtw480c+oCVdi/JSfbW9aWrIA/eKS1QsxDIN7cD7 2sUHKd1Dahnaxpi3QUUAgUiUmEWnxy63Th86+xk9JX+QBM8HvQTocJc/XVlmg4JPKfv4 rnkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0IPpgfXJIG4wmc/dJzLIQz8n37gZPgs0r3/il0rSCBQ=; b=AVe4nKHECadNjiO6RwOUy21WLRNIYsZfTTXXsYX3/AepKMOXawjWs7wftiLz+o0rR6 UwgssOwoR5mKnrlZkIxkCUB9XEexfweTiD6oyP1cEFKe4vYW9GCyAjTfKHMpmtvIfCZy 2cBEDFz/zbBSS2JrKqmueK48XbqHWTeleI2gwLKIq0nK9sS6OVUlGuddlqIJQSOa0KYS b274nJFbuHff0+X4Ji5rtlucMNjVIA4UQKMBNpnbS85zp/fq0WtnYtsMrz+Q6jpF6J+Q cyfQceBZoYRsUvv9mWuQ0aEpw+kn0AcFBZq0ROYwkvSz7dbP2RoZAq6HtaPTEwjDWYvc fS3g== X-Gm-Message-State: AOAM531ErBvo7rI12QZr3K4WAjR/8A7AFDeYqikfV6SvadUEMZ70lpzD WuvqlozYAne4l5MjHoq+z36L3PEHfX4= X-Google-Smtp-Source: ABdhPJyIZPxlGbx/e8/mgPPHTn/25KXjxdGKwIIvajT0SRnDtBGOsKyg6GNReMg7GWizdQwh8CzBKQ== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr17292435wmg.152.1608561925764; Mon, 21 Dec 2020 06:45:25 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 41/55] libiscsi: convert to meson Date: Mon, 21 Dec 2020 15:44:33 +0100 Message-Id: <20201221144447.26161-42-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- block/meson.build | 2 +- configure | 29 ++++------------------------- contrib/vhost-user-scsi/meson.build | 2 +- meson.build | 10 ++++++---- meson_options.txt | 2 ++ 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/block/meson.build b/block/meson.build index b02cb14aad..134034abb4 100644 --- a/block/meson.build +++ b/block/meson.build @@ -59,7 +59,7 @@ block_ss.add(when: 'CONFIG_QED', if_true: files( block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallels.c')) block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c')) block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit]) -block_ss.add(when: 'CONFIG_LIBISCSI', if_true: files('iscsi-opts.c')) +block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c')) diff --git a/configure b/configure index 3d65c1e196..30084af631 100755 --- a/configure +++ b/configure @@ -405,7 +405,7 @@ guest_agent_msi="$default_feature" vss_win32_sdk="$default_feature" win_sdk="no" want_tools="$default_feature" -libiscsi="$default_feature" +libiscsi="auto" libnfs="$default_feature" coroutine="" coroutine_pool="$default_feature" @@ -1138,9 +1138,9 @@ for opt do ;; --enable-spice) spice="yes" ;; - --disable-libiscsi) libiscsi="no" + --disable-libiscsi) libiscsi="disabled" ;; - --enable-libiscsi) libiscsi="yes" + --enable-libiscsi) libiscsi="enabled" ;; --disable-libnfs) libnfs="no" ;; @@ -4313,21 +4313,6 @@ if compile_prog "" "" ; then bswap_h=yes fi -########################################## -# Do we have libiscsi >= 1.9.0 -if test "$libiscsi" != "no" ; then - if $pkg_config --atleast-version=1.9.0 libiscsi; then - libiscsi="yes" - libiscsi_cflags=$($pkg_config --cflags libiscsi) - libiscsi_libs=$($pkg_config --libs libiscsi) - else - if test "$libiscsi" = "yes" ; then - feature_not_found "libiscsi" "Install libiscsi >= 1.9.0" - fi - libiscsi="no" - fi -fi - ########################################## # Do we need librt # uClibc provides 2 versions of clock_gettime(), one with realtime @@ -6229,12 +6214,6 @@ if test "$zstd" = "yes" ; then echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi -if test "$libiscsi" = "yes" ; then - echo "CONFIG_LIBISCSI=y" >> $config_host_mak - echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak - echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak -fi - if test "$libnfs" = "yes" ; then echo "CONFIG_LIBNFS=y" >> $config_host_mak echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak @@ -6800,7 +6779,7 @@ NINJA=$ninja $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ - -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 \ + -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ diff --git a/contrib/vhost-user-scsi/meson.build b/contrib/vhost-user-scsi/meson.build index 044c50bf43..cc893f6f20 100644 --- a/contrib/vhost-user-scsi/meson.build +++ b/contrib/vhost-user-scsi/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_LIBISCSI' in config_host +if libiscsi.found() executable('vhost-user-scsi', files('vhost-user-scsi.c'), dependencies: [qemuutil, libiscsi, vhost_user], build_by_default: targetos == 'linux', diff --git a/meson.build b/meson.build index 66e35598ce..d1cbea169c 100644 --- a/meson.build +++ b/meson.build @@ -372,9 +372,10 @@ if 'CONFIG_PLUGIN' in config_host libdl = cc.find_library('dl', required: true) endif libiscsi = not_found -if 'CONFIG_LIBISCSI' in config_host - libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), - link_args: config_host['LIBISCSI_LIBS'].split()) +if not get_option('libiscsi').auto() or have_block + libiscsi = dependency('libiscsi', version: '>=1.9.0', + required: get_option('libiscsi'), + method: 'pkg-config', static: enable_static) endif zstd = not_found if 'CONFIG_ZSTD' in config_host @@ -928,6 +929,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) endif +config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2286,7 +2288,7 @@ summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')} summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} -summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')} +summary_info += {'libiscsi support': libiscsi.found()} summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} if targetos == 'windows' diff --git a/meson_options.txt b/meson_options.txt index fd16f3b399..b562d4f1a6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,6 +50,8 @@ option('curl', type : 'feature', value : 'auto', description: 'CURL block device driver') option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') +option('libiscsi', type : 'feature', value : 'auto', + description: 'libiscsi userspace initiator') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419120 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=e0THxxve; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03Tc5vypz9sVs for ; Tue, 22 Dec 2020 02:36:04 +1100 (AEDT) Received: from localhost ([::1]:53564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNEA-00016B-R9 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:36:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRL-000513-Eh for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:35 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRE-0007sI-3w for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:34 -0500 Received: by mail-wm1-x331.google.com with SMTP id q75so11189640wme.2 for ; Mon, 21 Dec 2020 06:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S4JzR2yr+0oCeHu8Tpy2fW0hmDHgTGenqGpT5qkUnxc=; b=e0THxxveWRmhxNHqxBAnnA2gkwzSqN5qRriw6kiqQ7l/ZR1RNtzektVifbwNWoMuFm LIE242Y+OarvIj4n/9EXLtzBFfupBFAhdLHFV+W5m33rezkEJKXwN0tnhXkFF3WMhFxc KtyPtuKyWmdXafbD2Jojgt6T1jlmUAmvOq8bfHreITmPl74ImojtZIGY7UhWyt7nd3rB phl0VE5A+nT/DAXXA17IaadAZOH4Ww2RLst2NwwAWn7/c28qdWHYfVS57fELLLzL6pTi eJMoTnkt5ZlTL572Pz6K+FVeXZjmCJQYGBYiPE59JKt4xD3cL317mDQEGWn3xOWJvpzC J80g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=S4JzR2yr+0oCeHu8Tpy2fW0hmDHgTGenqGpT5qkUnxc=; b=RN8HhPb4Q7oxjSZw+8xWIgYRCGt3y5LLXmri9+JAbGZuaFo3urJeLBWwFPREF9jadJ pLKrIBGcKhr3q2x3LtpnM7y+b8bd5HcJTaYfiP2hCVqu3rwawmQcuIaLrK9jaDY8u4CB FJMGhhZpbeO4ZQSe4ROuhiA/u/yvIlSfcaNrkwHKI/kiB47cv9LrT7b3hhXMh1HU7la7 hj08UTA0Ae76uW01ewpNl9AzUsIAbD5+4aqLObZhoMUBKnnMiDuX7DHLvnRzTZodTbzp Wo9tNHw/S+qrURnMQWtqCLl54iFIbE48Y7oXm/ubAtuYD/6w480muUCFMaLqCwkoLaaB y6Iw== X-Gm-Message-State: AOAM5337TZNG2af+kfKJvbI5BU11XTRZN08sj4rBPn4+qnqhIWKte0zZ 5a6s9MBv/y/pgobbsGBMQT+7fvulcms= X-Google-Smtp-Source: ABdhPJx3Qb1H0vU8hwhVauqrxHcpcc8xuCMgcFta2jyzo+3B2wcNQhrgWoXH7k1fYEnHpWTdHtZFhg== X-Received: by 2002:a1c:55ca:: with SMTP id j193mr17035861wmb.87.1608561926566; Mon, 21 Dec 2020 06:45:26 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 42/55] libnfs: convert to meson Date: Mon, 21 Dec 2020 15:44:34 +0100 Message-Id: <20201221144447.26161-43-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 27 ++++----------------------- meson.build | 9 ++++++--- meson_options.txt | 2 ++ 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/configure b/configure index 30084af631..9b38368427 100755 --- a/configure +++ b/configure @@ -406,7 +406,7 @@ vss_win32_sdk="$default_feature" win_sdk="no" want_tools="$default_feature" libiscsi="auto" -libnfs="$default_feature" +libnfs="auto" coroutine="" coroutine_pool="$default_feature" debug_stack_usage="no" @@ -1142,9 +1142,9 @@ for opt do ;; --enable-libiscsi) libiscsi="enabled" ;; - --disable-libnfs) libnfs="no" + --disable-libnfs) libnfs="disabled" ;; - --enable-libnfs) libnfs="yes" + --enable-libnfs) libnfs="enabled" ;; --enable-profiler) profiler="yes" ;; @@ -5559,20 +5559,6 @@ if test "$have_ubsan" = "yes"; then QEMU_LDFLAGS="-fsanitize=undefined $QEMU_LDFLAGS" fi -########################################## -# Do we have libnfs -if test "$libnfs" != "no" ; then - if $pkg_config --atleast-version=1.9.3 libnfs; then - libnfs="yes" - libnfs_libs=$($pkg_config --libs libnfs) - else - if test "$libnfs" = "yes" ; then - feature_not_found "libnfs" "Install libnfs devel >= 1.9.3" - fi - libnfs="no" - fi -fi - ########################################## # Exclude --warn-common with TSan to suppress warnings from the TSan libraries. @@ -6214,11 +6200,6 @@ if test "$zstd" = "yes" ; then echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak fi -if test "$libnfs" = "yes" ; then - echo "CONFIG_LIBNFS=y" >> $config_host_mak - echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak -fi - if test "$seccomp" = "yes"; then echo "CONFIG_SECCOMP=y" >> $config_host_mak echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak @@ -6780,7 +6761,7 @@ NINJA=$ninja $meson setup \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ - -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ + -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index d1cbea169c..9ed3ee31f9 100644 --- a/meson.build +++ b/meson.build @@ -319,8 +319,10 @@ if 'CONFIG_LIBXML2' in config_host link_args: config_host['LIBXML2_LIBS'].split()) endif libnfs = not_found -if 'CONFIG_LIBNFS' in config_host - libnfs = declare_dependency(link_args: config_host['LIBNFS_LIBS'].split()) +if not get_option('libnfs').auto() or have_block + libnfs = dependency('libnfs', version: '>=1.9.3', + required: get_option('libnfs'), + method: 'pkg-config', static: enable_static) endif libattr = not_found if 'CONFIG_ATTR' in config_host @@ -930,6 +932,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) endif config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) +config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2289,7 +2292,7 @@ summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} summary_info += {'libiscsi support': libiscsi.found()} -summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} +summary_info += {'libnfs support': libnfs.found()} summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} if targetos == 'windows' if 'WIN_SDK' in config_host diff --git a/meson_options.txt b/meson_options.txt index b562d4f1a6..4535bc4dc2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,6 +52,8 @@ option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') option('libiscsi', type : 'feature', value : 'auto', description: 'libiscsi userspace initiator') +option('libnfs', type : 'feature', value : 'auto', + description: 'libnfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419105 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uIH0aitx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03Bd23jSz9sVH for ; Tue, 22 Dec 2020 02:23:05 +1100 (AEDT) Received: from localhost ([::1]:51762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN1b-0004rI-9H for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:23:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-00055O-5g for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRG-0007tf-OJ for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:36 -0500 Received: by mail-wm1-x32e.google.com with SMTP id r4so11156766wmh.5 for ; Mon, 21 Dec 2020 06:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OkoogDWMaZyV6Myf4uonQVC7+OrWlHs7G3dLx+saQ38=; b=uIH0aitxGxF+Gf9YuBW2ywWnng0C/As0n5Z3l5i4UNFDASG/qF+pJU0rPtKZryKUP6 u8Jbd3YTaQWQ6mvyI9BJxoYBt7pl3bER68xKQQ9LKOLPeTXAJuW6sab0VMkw9zFP1qON yFUayOX6e8m8FTQpiF/skxFRFeBCmueZ9x0cgIHZKjFuezB4UgT1an9DpAf1SkpEAKmp y9xqyH3epIyWnrIMmtesjcepaYRWpi3b6N86V+ssKifN0sVmjV4cn5vDi9TW3VDOKFXd LCF5O5LFastXCvaMha0xHGuCTcbGmd+A66EgjJ0fBLeyPSop4+gHcfAkRg872FYXJGGF /eQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OkoogDWMaZyV6Myf4uonQVC7+OrWlHs7G3dLx+saQ38=; b=uj/FJqEH4nqYNKdJkWFpPXdGpt0qPGaDb+U7PUAtphShh2CxtGALh69YT7oLbCcnyW bD9v1MOkqOKAEwn+HvtRWegM1aU7WvIdP7rQdDJBfL4x72iUroNS+IhGrgPksNYg/LTz K6NGql1wCaJCDlrSe1A6X+lA8DZkDqQNduJmjjzJ7kMM/RMH426URzRdZbBbC9uQNXLl zvvvFfN6uvKAbhYsz6f1/ccarnybOsJv/atxSytQB23bm/wzQqDCxl87O2MPnNrALrtR 0SKy2bCFcgT6vxjkG0QVdvEpU0icZAd7knDbiud91KH1E0gheCCeoz8jLE66ALvIdwlW dnlw== X-Gm-Message-State: AOAM533cGbGWzcCaOJwYBMfC8ESmrdAUb+zGwyl6UNWm8rM7k+lQFuCx Ux0ftdVZFk2Z9uyIr5cDCSvetAwumvw= X-Google-Smtp-Source: ABdhPJx3R5SU4onGz4s9/6rQgIpAtFeZw2FGInbKEdPiUwLWC6qXV0YvyYEZ9MEl++1X59oIKHbGQQ== X-Received: by 2002:a7b:c85a:: with SMTP id c26mr16515342wml.160.1608561927569; Mon, 21 Dec 2020 06:45:27 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 43/55] libssh: convert to meson Date: Mon, 21 Dec 2020 15:44:35 +0100 Message-Id: <20201221144447.26161-44-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 45 ++++----------------------------------------- meson.build | 22 ++++++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 24 insertions(+), 45 deletions(-) diff --git a/configure b/configure index 9b38368427..0350b59624 100755 --- a/configure +++ b/configure @@ -429,7 +429,7 @@ auth_pam="$default_feature" vte="$default_feature" virglrenderer="$default_feature" tpm="$default_feature" -libssh="$default_feature" +libssh="auto" live_block_migration=${default_feature:-yes} numa="$default_feature" tcmalloc="no" @@ -1423,9 +1423,9 @@ for opt do ;; --enable-tpm) tpm="yes" ;; - --disable-libssh) libssh="no" + --disable-libssh) libssh="disabled" ;; - --enable-libssh) libssh="yes" + --enable-libssh) libssh="enabled" ;; --disable-live-block-migration) live_block_migration="no" ;; @@ -3628,38 +3628,6 @@ EOF fi fi -########################################## -# libssh probe -if test "$libssh" != "no" ; then - if $pkg_config --exists libssh; then - libssh_cflags=$($pkg_config libssh --cflags) - libssh_libs=$($pkg_config libssh --libs) - libssh=yes - else - if test "$libssh" = "yes" ; then - error_exit "libssh required for --enable-libssh" - fi - libssh=no - fi -fi - -########################################## -# Check for libssh 0.8 -# This is done like this instead of using the LIBSSH_VERSION_* and -# SSH_VERSION_* macros because some distributions in the past shipped -# snapshots of the future 0.8 from Git, and those snapshots did not -# have updated version numbers (still referring to 0.7.0). - -if test "$libssh" = "yes"; then - cat > $TMPC < -int main(void) { return ssh_get_server_publickey(NULL, NULL); } -EOF - if compile_prog "$libssh_cflags" "$libssh_libs"; then - libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags" - fi -fi - ########################################## # linux-aio probe @@ -6286,12 +6254,6 @@ if test "$getauxval" = "yes" ; then echo "CONFIG_GETAUXVAL=y" >> $config_host_mak fi -if test "$libssh" = "yes" ; then - echo "CONFIG_LIBSSH=y" >> $config_host_mak - echo "LIBSSH_CFLAGS=$libssh_cflags" >> $config_host_mak - echo "LIBSSH_LIBS=$libssh_libs" >> $config_host_mak -fi - if test "$live_block_migration" = "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak fi @@ -6762,6 +6724,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ + -Dlibssh=$libssh \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 9ed3ee31f9..e448624212 100644 --- a/meson.build +++ b/meson.build @@ -652,9 +652,21 @@ if not get_option('glusterfs').auto() or have_block endif endif libssh = not_found -if 'CONFIG_LIBSSH' in config_host - libssh = declare_dependency(compile_args: config_host['LIBSSH_CFLAGS'].split(), - link_args: config_host['LIBSSH_LIBS'].split()) +have_libssh_0_8 = false +if not get_option('libssh').auto() or have_block + libssh = dependency('libssh', + required: get_option('libssh'), + method: 'pkg-config', static: enable_static) + # This is done like this instead of using the LIBSSH_VERSION_* and + # SSH_VERSION_* macros because some distributions in the past shipped + # snapshots of the future 0.8 from Git, and those snapshots did not + # have updated version numbers (still referring to 0.7.0). + if libssh.found() + have_libssh_0_8 = cc.links(''' + #include + int main(void) { return ssh_get_server_publickey(NULL, NULL); } + ''', dependencies: libssh) + endif endif libbzip2 = not_found if not get_option('bzip2').auto() or have_block @@ -933,6 +945,8 @@ if glusterfs.found() endif config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) +config_host_data.set('CONFIG_LIBSSH', libssh.found()) +config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2313,7 +2327,7 @@ summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} summary_info += {'GlusterFS support': glusterfs.found()} summary_info += {'gcov': get_option('b_coverage')} summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} -summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} +summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} diff --git a/meson_options.txt b/meson_options.txt index 4535bc4dc2..6466dc67f6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -54,6 +54,8 @@ option('libiscsi', type : 'feature', value : 'auto', description: 'libiscsi userspace initiator') option('libnfs', type : 'feature', value : 'auto', description: 'libnfs block device driver') +option('libssh', type : 'feature', value : 'auto', + description: 'libssh block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lHDSk4Ih; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02sY1dF0z9sVs for ; Tue, 22 Dec 2020 02:08:17 +1100 (AEDT) Received: from localhost ([::1]:45196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMnH-0006zV-62 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:08:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-000554-0k for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:35779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRG-0007uj-O9 for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:36 -0500 Received: by mail-wm1-x32a.google.com with SMTP id e25so11196015wme.0 for ; Mon, 21 Dec 2020 06:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NWGI23omPGUEZY71SQdPtP5PXqGrOMFaLCwsxeEHtMo=; b=lHDSk4Ih/3wmMH8IeSeBOc4WeRR4GgbBWpEXgGTjL8VewHn6mbcSVVCSI1LZrCLHaJ bjtwZ/MwZLxn4EbzV6CBgRk/JbLHWgZgC34MMG4I670hXr025qdhdUca1g22Kx4GoPl3 liYCHajfDVXEMGFMgj22gIo4WoegYvGg6GwBGAvM5S16NYQgjsnlJHkUJP7Pi2xRstOi Zku9TqMUqcW+NQ8Ah7dMYHOkKcLq53/rEIMepqi25YN2qOwqDaokftD1HM7Btp3ZyDYd jwa098sFG0sx6KPcvbXO8aQu4C4VfvrS9vZqv8PPoZRuetmsn1ewk4A8zFvBNqMAOouB xB9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NWGI23omPGUEZY71SQdPtP5PXqGrOMFaLCwsxeEHtMo=; b=fi8CcFVhAO3io38V6NV64Yg1D66kpQ9Lw29Q5Pw9JJZi3a+LUPuC94zMnV0DQNSgwO DfDa+Yamx1zHFtzbW3yb8G2vQe0L7sLxXSIqr/xybAAL/lADOd8fqFh5mStvkwYAsyqG Ev9sGCc8NPlLKNC435Pg1zkLRPWWBKThTnFhPvFIt3Wn1+5TuekN5VmeV4TGcu5SH+AC cGuNOKMG7AZOVzl3hN6HIGSey+aqrHdVtsJodFW/wFei4s+YK7u3acgOClummu1odqua ttgmtb2b7FYVgIzJsykr4cazpZ239a3T0lom+VHOP4g8jfwqCyaFwZWe8TC0vkr/BLbM 2q0w== X-Gm-Message-State: AOAM530aVJK5Qt1jw0H1Tb/AjjtXYmFJdM8qz6JS1Xx/R6Nb84aOiDyM lv/TfqzjlvrXhZeCO0Jh1+5dhcTxTrg= X-Google-Smtp-Source: ABdhPJwVUhPa86oteoYxqsvaAbycwr3/3NEOmTCBXZ29Ii8CU3a6+gFxrwcz1jmdw02lUxJ5w+0X6A== X-Received: by 2002:a1c:630b:: with SMTP id x11mr16835651wmb.138.1608561928389; Mon, 21 Dec 2020 06:45:28 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:27 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 44/55] rbd: convert to meson Date: Mon, 21 Dec 2020 15:44:36 +0100 Message-Id: <20201221144447.26161-45-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 35 ++++------------------------------- meson.build | 22 +++++++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 25 insertions(+), 34 deletions(-) diff --git a/configure b/configure index 0350b59624..a2e4796053 100755 --- a/configure +++ b/configure @@ -383,7 +383,7 @@ qom_cast_debug="yes" trace_backends="log" trace_file="trace" spice="$default_feature" -rbd="$default_feature" +rbd="auto" smartcard="$default_feature" u2f="auto" libusb="$default_feature" @@ -1285,9 +1285,9 @@ for opt do ;; --enable-opengl) opengl="yes" ;; - --disable-rbd) rbd="no" + --disable-rbd) rbd="disabled" ;; - --enable-rbd) rbd="yes" + --enable-rbd) rbd="enabled" ;; --disable-xfsctl) xfs="no" ;; @@ -3605,29 +3605,6 @@ if compile_prog "" "$pthread_lib" ; then pthread_setname_np_wo_tid=yes fi -########################################## -# rbd probe -if test "$rbd" != "no" ; then - cat > $TMPC < -#include -int main(void) { - rados_t cluster; - rados_create(&cluster, NULL); - return 0; -} -EOF - rbd_libs="-lrbd -lrados" - if compile_prog "" "$rbd_libs" ; then - rbd=yes - else - if test "$rbd" = "yes" ; then - feature_not_found "rados block device" "Install librbd/ceph devel" - fi - rbd=no - fi -fi - ########################################## # linux-aio probe @@ -6182,10 +6159,6 @@ fi if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi -if test "$rbd" = "yes" ; then - echo "CONFIG_RBD=y" >> $config_host_mak - echo "RBD_LIBS=$rbd_libs" >> $config_host_mak -fi echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak if test "$coroutine_pool" = "yes" ; then @@ -6724,7 +6697,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh \ + -Dlibssh=$libssh -Drbd=$rbd \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index e448624212..92fe7007ef 100644 --- a/meson.build +++ b/meson.build @@ -612,9 +612,24 @@ else endif rbd = not_found -if 'CONFIG_RBD' in config_host - rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) +if not get_option('rbd').auto() or have_block + librados = cc.find_library('rados', required: get_option('rbd'), + static: enable_static) + librbd = cc.find_library('rbd', has_headers: ['rbd/librbd.h'], + required: get_option('rbd'), + static: enable_static) + if librados.found() and librbd.found() and cc.links(''' + #include + #include + int main(void) { + rados_t cluster; + rados_create(&cluster, NULL); + return 0; + }''', dependencies: [librbd, librados]) + rbd = declare_dependency(dependencies: [librbd, librados]) + endif endif + glusterfs = not_found glusterfs_ftruncate_has_stat = false glusterfs_iocb_has_stat = false @@ -947,6 +962,7 @@ config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_LIBSSH', libssh.found()) config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) +config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2297,7 +2313,7 @@ if config_host['TRACE_BACKENDS'].split().contains('simple') endif # TODO: add back protocol and server version summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')} -summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')} +summary_info += {'rbd support': rbd.found()} summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')} summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')} summary_info += {'U2F support': u2f.found()} diff --git a/meson_options.txt b/meson_options.txt index 6466dc67f6..630c9dceb7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('rbd', type : 'feature', value : 'auto', + description: 'Ceph block device driver') option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=e4F89QkC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02sR3WFTz9sVS for ; Tue, 22 Dec 2020 02:08:11 +1100 (AEDT) Received: from localhost ([::1]:44644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMnB-0006ky-FD for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:08:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRL-00051a-JT for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:35 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:55818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRG-0007un-Eq for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:35 -0500 Received: by mail-wm1-x32f.google.com with SMTP id x22so10081356wmc.5 for ; Mon, 21 Dec 2020 06:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YskNFeL4B91Ml00lS/fJmS33X5P96iW79FRphupRrWk=; b=e4F89QkCH5JhwsUUpgBMJfGYyi93dPK6F+HtN0EZ2+jdgQtCHJba0b2FLa/Urg8hAL NX060dtRtph0s38aSktq8nz9EfxKGaKZrKo3Mz2kRs9ttTFzYckvZRYrufOe+qtXsEyV fsHzZmTqCwcVj/J/NExz2kGpbp1iAlfUPoKeFKUPYIUZzx+QcDXLpyxnk1gfXYW7ZKB1 94D8nXT/2W69LlEK9EkBxlkRoTNb7FsVsU2qRbOyE+UbDoKiyBRN66UQ03dPnOykrvgC MtBs0+RbhVTFARY9I7uZiny2lFOADn9R1uunHg+RkE6aJoJz81BrydRQxbsdb2OlKO7L DidA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YskNFeL4B91Ml00lS/fJmS33X5P96iW79FRphupRrWk=; b=pd9irSSc8R1Ahdc0KZ2kfzxol8FYfGaIV/N8YFY+rTwI9JTewbPJb3+jPgBdJP22Py tZedGrJ7zTDsRDfUSAajsE/3u6wWVSjax6ek0MeU8TpfOwOUOBLpl3uvfC0VQDyyvugz DKpRdNl2phyipjKJt4WSS5VqSFA7bPs53pNRxtPumrQoLqLobelXyoht8dUFjLAa/4gC inBlAk80uzguop6TNkEgBSWTA/isPfyvy6Bk3llwkDNVbWmw0kUm5w2gLBxK9Qtm4pAB K3gajjMHxeIHxgKy9fsmkK1NaOU61XwuA2DDphgswYRTRrmQiARld87cNHg7qTwHcjvM Ducg== X-Gm-Message-State: AOAM5307ivRAkOB0/TvLbP+sQwcnh4kK+XwuzH57TNS/ru2NvGXBqcGB FPCnl6LH1PrkFT7Ce5BvBDVqv1O0BkU= X-Google-Smtp-Source: ABdhPJz6MgGCl61CnBw4jOKNRiHCkxfrfuFMSwnrj3TTzFmbdPiiDZkCAsuoIdpHDViO7cv8Vyf5gA== X-Received: by 2002:a05:600c:2188:: with SMTP id e8mr17076993wme.99.1608561929161; Mon, 21 Dec 2020 06:45:29 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 45/55] lzo: convert to meson Date: Mon, 21 Dec 2020 15:44:37 +0100 Message-Id: <20201221144447.26161-46-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 32 ++++---------------------------- meson.build | 20 ++++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/configure b/configure index a2e4796053..1574ea8456 100755 --- a/configure +++ b/configure @@ -393,7 +393,7 @@ opengl_dmabuf="no" cpuid_h="no" avx2_opt="$default_feature" capstone="auto" -lzo="$default_feature" +lzo="auto" snappy="$default_feature" bzip2="auto" lzfse="$default_feature" @@ -1311,9 +1311,9 @@ for opt do ;; --disable-zlib-test) ;; - --disable-lzo) lzo="no" + --disable-lzo) lzo="disabled" ;; - --enable-lzo) lzo="yes" + --enable-lzo) lzo="enabled" ;; --disable-snappy) snappy="no" ;; @@ -2456,25 +2456,6 @@ EOF fi fi -########################################## -# lzo check - -if test "$lzo" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { lzo_version(); return 0; } -EOF - if compile_prog "" "-llzo2" ; then - lzo_libs="-llzo2" - lzo="yes" - else - if test "$lzo" = "yes"; then - feature_not_found "liblzo2" "Install liblzo2 devel" - fi - lzo="no" - fi -fi - ########################################## # snappy check @@ -6124,11 +6105,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$lzo" = "yes" ; then - echo "CONFIG_LZO=y" >> $config_host_mak - echo "LZO_LIBS=$lzo_libs" >> $config_host_mak -fi - if test "$snappy" = "yes" ; then echo "CONFIG_SNAPPY=y" >> $config_host_mak echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak @@ -6697,7 +6673,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 92fe7007ef..2a2f7d0039 100644 --- a/meson.build +++ b/meson.build @@ -757,10 +757,21 @@ snappy = not_found if 'CONFIG_SNAPPY' in config_host snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) endif -lzo = not_found -if 'CONFIG_LZO' in config_host - lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split()) + +lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], + required: get_option('lzo'), + static: enable_static) +if lzo.found() and not cc.links(''' + #include + int main(void) { lzo_version(); return 0; }''', dependencies: lzo) + lzo = not_found + if get_option('lzo').enabled() + error('could not link liblzo2') + else + warning('could not link liblzo2, disabling') + endif endif + rdma = not_found if 'CONFIG_RDMA' in config_host rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) @@ -945,6 +956,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_opti config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) +config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) config_host_data.set('CONFIG_CURL', curl.found()) @@ -2346,7 +2358,7 @@ summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} -summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} +summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} diff --git a/meson_options.txt b/meson_options.txt index 630c9dceb7..00a5ec55bd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('lzo', type : 'feature', value : 'auto', + description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', description: 'Ceph block device driver') option('sdl', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fvG7CHL3; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02xf0n83z9sVH for ; Tue, 22 Dec 2020 02:11:50 +1100 (AEDT) Received: from localhost ([::1]:52892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMqi-0001m5-1m for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:11:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-00055v-CS for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRH-0007us-DY for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: by mail-wr1-x42c.google.com with SMTP id 91so11313917wrj.7 for ; Mon, 21 Dec 2020 06:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uYM1BHiEYpg2iIhSeVE6JX5SY9trbxbH8tEoru3a6xQ=; b=fvG7CHL3DN+TN62X/EJYknuDPqCfv765eWZIYs9u8MJhTqEjHw59eZjnoLrzWtJn1l M3+8BoLVcCFfWzY19QX3MXWej9BpNMLA8XI20bcxgaSBG99gXDGhujZ7zroCIfjVO0Q1 7NnvNpJ7iNK1JTAgjOf8Nrx9xcYBHAWA8kfPyQWA3xATZk3LLvmR6RVtiSESLC3iZDgL Mb7p38gKuhBK3mkjk+XoISlTUFVAPGAYV69d9jC0GnlPyI4VdPRyR1MHvL2eY7S5JEJF TCoc4yt54PcQQb7yQ1O2h8CZM92OR2uauGaNxY0IcpQ/OmvV/6Ag1NY3xxtRHLV1qMto T+6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uYM1BHiEYpg2iIhSeVE6JX5SY9trbxbH8tEoru3a6xQ=; b=OT8wUEvczmDg53aANXCggvVJ+O7nIKpoInr1B6sB7uJuOQfYgXx9LwlX9WPw3QAICK 08K0KU58qvvkDbKMvZ9QbhoND3B5AHVYyC+O7pQNufLGxXOk8zr7toNAGWp+yjLRSYa4 XHCqrSXBrx2XRUk/TOLKv9+NYkMnyp+02sM8mCQXgcTDRX5U4WldzEP7xh33F26rlSM4 BnGT1WUDCNmc79n2dXOEspItGmkMFRkeYSLxRZHIFQLB9lL5dyQ1uyjE9n8Kc3n50cpJ CS8IqNojx72iV2d9vE706j0m/Egxkwm4orAHUA+SCWGNxZvXk3EZCA+cvuPx4hrUM/SQ cQVg== X-Gm-Message-State: AOAM533v4U32Y9Xqyaubb8UODlwy42rMNVt7XLy8d3iuyjMYxbCorYQ6 N+cML4cFWv7/wNT4c8cye5Wta8gjpsY= X-Google-Smtp-Source: ABdhPJw/bjCEhICr25bxBxgvBoUZz72o22/b/DkNCJRYL0QV2iL6ISTZFH5tcnJmEGGjXV+0Krfonw== X-Received: by 2002:a5d:4905:: with SMTP id x5mr18781461wrq.75.1608561929926; Mon, 21 Dec 2020 06:45:29 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 46/55] snappy: convert to meson Date: Mon, 21 Dec 2020 15:44:38 +0100 Message-Id: <20201221144447.26161-47-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 32 ++++---------------------------- meson.build | 19 +++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/configure b/configure index 1574ea8456..9166347739 100755 --- a/configure +++ b/configure @@ -394,7 +394,7 @@ cpuid_h="no" avx2_opt="$default_feature" capstone="auto" lzo="auto" -snappy="$default_feature" +snappy="auto" bzip2="auto" lzfse="$default_feature" zstd="$default_feature" @@ -1315,9 +1315,9 @@ for opt do ;; --enable-lzo) lzo="enabled" ;; - --disable-snappy) snappy="no" + --disable-snappy) snappy="disabled" ;; - --enable-snappy) snappy="yes" + --enable-snappy) snappy="enabled" ;; --disable-bzip2) bzip2="disabled" ;; @@ -2456,25 +2456,6 @@ EOF fi fi -########################################## -# snappy check - -if test "$snappy" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { snappy_max_compressed_length(4096); return 0; } -EOF - if compile_prog "" "-lsnappy" ; then - snappy_libs='-lsnappy' - snappy="yes" - else - if test "$snappy" = "yes"; then - feature_not_found "libsnappy" "Install libsnappy devel" - fi - snappy="no" - fi -fi - ########################################## # lzfse check @@ -6105,11 +6086,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$snappy" = "yes" ; then - echo "CONFIG_SNAPPY=y" >> $config_host_mak - echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak -fi - if test "$lzfse" = "yes" ; then echo "CONFIG_LZFSE=y" >> $config_host_mak echo "LZFSE_LIBS=-llzfse" >> $config_host_mak @@ -6673,7 +6649,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 2a2f7d0039..02a9f914be 100644 --- a/meson.build +++ b/meson.build @@ -753,9 +753,19 @@ if get_option('vnc').enabled() compile_args: '-DSTRUCT_IOVEC_DEFINED') endif endif -snappy = not_found -if 'CONFIG_SNAPPY' in config_host - snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) + +snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'], + required: get_option('snappy'), + static: enable_static) +if snappy.found() and not cc.links(''' + #include + int main(void) { snappy_max_compressed_length(4096); return 0; }''', dependencies: snappy) + snappy = not_found + if get_option('snappy').enabled() + error('could not link libsnappy') + else + warning('could not link libsnappy, disabling') + endif endif lzo = cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], @@ -977,6 +987,7 @@ config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) @@ -2359,7 +2370,7 @@ summary_info += {'libssh support': libssh.found()} summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'lzo support': lzo.found()} -summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} +summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} diff --git a/meson_options.txt b/meson_options.txt index 00a5ec55bd..e2b7e23887 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -72,6 +72,8 @@ option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', description: 'SDL Image support for icons') +option('snappy', type : 'feature', value : 'auto', + description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('vnc', type : 'feature', value : 'enabled', From patchwork Mon Dec 21 14:44:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pD8juEh4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03XZ6ZSnz9sVH for ; Tue, 22 Dec 2020 02:38:37 +1100 (AEDT) Received: from localhost ([::1]:58456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNGc-0003NB-Ax for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:38:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-00056H-IS for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRI-0007vW-5A for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: by mail-wr1-x430.google.com with SMTP id y17so11299396wrr.10 for ; Mon, 21 Dec 2020 06:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qhISAu6W0agb45aTi8DrVXmQ/KuOq7b6r+QgBkrN5o8=; b=pD8juEh4IOcgvGx136DUSh0VtDzpzr2hI0qSd3anCpq1mmNSGVcWAhOMJcwqBWeXm+ QMLU89Bp+vUkGeamGEKq1e+R3g5PS7GKhKi7r0zjanq61RgAq+rLh5Pry86jR5brldeI z9yVNGAt7UVo09fS3caYcUOH2haXfz/aRy2GQ8Ld4+WpEkw367HIRRz6OwAxwRG47byv 5gg5XmPAwprrXK8UVQ+5zVnCdRwHoEA5g9ZX/sxAFfyiQ1DmUz+TPbtyabq5oSuW0yjb ms0VtUXgkxick26DKnglgWczkaslyZlrdp9srGk/o1ZC9lTZw2xS6I5bO/Srum4VGHrv AInA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qhISAu6W0agb45aTi8DrVXmQ/KuOq7b6r+QgBkrN5o8=; b=DlHWY3jTZu9Xf9+p07IHXjSDUJGKpawAVmnfJABsfAie0DhRSuiIzJqZnfT1/l+K4C qAnxxqnQ1H9UOTUx6b6cqLzGCwJzOdWRvtH2/hRcJWTxbfHjpHEufj6hCF97aHhOskTC 9SthA500HIRFbW5LayH+B7cFlomRotqIGbMgHFMFHemogPaqoN9Ng+A5fqrxGjKYasfN FupJu17Q0BPlPXt4HKsRb5RuKiw95dR7BfRmFsoLK6kCt+fkNtVYfYa5bgRIIW7mB0Nj wwAwppdwrIJlf/scyQsWmJHyC/epgaodcaXDpbLzLHFu4AEJwqK8f7fmwpmU33a2bI0r sPyA== X-Gm-Message-State: AOAM533PH1v3ka/ghXjQ2sRF9Gu1NmAkhiR3fRzeZ7kMvA8/kQgsCaoL Sqlpsr54aPFwBqGMOh5h6IZDTPTSsiY= X-Google-Smtp-Source: ABdhPJwZf0qgCJ1LcR1i53ajrSd7MsHyLvlTW508D+VgB7SOg/qyhDmH3PECZ9VRdb7ZevyAb38wYQ== X-Received: by 2002:a5d:6a4f:: with SMTP id t15mr19643737wrw.62.1608561930729; Mon, 21 Dec 2020 06:45:30 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 47/55] lzfse: convert to meson Date: Mon, 21 Dec 2020 15:44:39 +0100 Message-Id: <20201221144447.26161-48-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 31 ++++--------------------------- meson.build | 19 +++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 9166347739..6224279e44 100755 --- a/configure +++ b/configure @@ -396,7 +396,7 @@ capstone="auto" lzo="auto" snappy="auto" bzip2="auto" -lzfse="$default_feature" +lzfse="auto" zstd="$default_feature" guest_agent="$default_feature" guest_agent_with_vss="no" @@ -1323,9 +1323,9 @@ for opt do ;; --enable-bzip2) bzip2="enabled" ;; - --enable-lzfse) lzfse="yes" + --enable-lzfse) lzfse="enabled" ;; - --disable-lzfse) lzfse="no" + --disable-lzfse) lzfse="disabled" ;; --disable-zstd) zstd="no" ;; @@ -2456,24 +2456,6 @@ EOF fi fi -########################################## -# lzfse check - -if test "$lzfse" != "no" ; then - cat > $TMPC << EOF -#include -int main(void) { lzfse_decode_scratch_size(); return 0; } -EOF - if compile_prog "" "-llzfse" ; then - lzfse="yes" - else - if test "$lzfse" = "yes"; then - feature_not_found "lzfse" "Install lzfse devel" - fi - lzfse="no" - fi -fi - ########################################## # zstd check @@ -6086,11 +6068,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$lzfse" = "yes" ; then - echo "CONFIG_LZFSE=y" >> $config_host_mak - echo "LZFSE_LIBS=-llzfse" >> $config_host_mak -fi - if test "$zstd" = "yes" ; then echo "CONFIG_ZSTD=y" >> $config_host_mak echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak @@ -6649,7 +6626,7 @@ NINJA=$ninja $meson setup \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy \ + -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 02a9f914be..550df12432 100644 --- a/meson.build +++ b/meson.build @@ -699,10 +699,21 @@ if not get_option('bzip2').auto() or have_block endif endif endif -liblzfse = not_found -if 'CONFIG_LZFSE' in config_host - liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split()) + +liblzfse = cc.find_library('lzfse', has_headers: ['lzfse.h'], + required: get_option('lzfse'), + static: enable_static) +if liblzfse.found() and not cc.links(''' + #include + int main(void) { lzfse_decode_scratch_size(); return 0; }''', dependencies: liblzfse) + liblzfse = not_found + if get_option('lzfse').enabled() + error('could not link liblzfse') + else + warning('could not link liblzfse, disabling') + endif endif + oss = not_found if 'CONFIG_AUDIO_OSS' in config_host oss = declare_dependency(link_args: config_host['OSS_LIBS'].split()) @@ -2372,7 +2383,7 @@ summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_ summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} -summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} +summary_info += {'lzfse support': liblzfse.found()} summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} diff --git a/meson_options.txt b/meson_options.txt index e2b7e23887..f74a3d78c4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('lzfse', type : 'feature', value : 'auto', + description: 'lzfse support for DMG images') option('lzo', type : 'feature', value : 'auto', description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tL4Rl5nA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03ZD55r4z9sVH for ; Tue, 22 Dec 2020 02:40:04 +1100 (AEDT) Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNI2-00055o-Na for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:40:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-00056k-QQ for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:50720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0007wa-1B for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: by mail-wm1-x332.google.com with SMTP id 190so10104429wmz.0 for ; Mon, 21 Dec 2020 06:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uUmqtYiVmUHg53FxTmD1eTlFpsIC4p/LT2B3iZjHHf4=; b=tL4Rl5nAuu4G2OQ7aGUamMjXrmT6Zz0oSAVav2Lgm84c2S4GFB4gpsN3FzHSSpLGbt aK1iduqwfnYsFwg/HR3pazxC1VjO3S785h5BS4uOUBr+b0/G/9DhqiWNzQ/Z0QNEIP1V TGgLFI1mnI9r+4WYLwKuxncUivXfk/66dI651eflYFkAUP3TxWolQofItFMEAtnc+laA 48OdsFOuHuXvRRpJEWqYRzzHplpAEk2MN+jXwSPjr5OxZyFLK9VzmjCKH8kpMvRk7uhN 182qiNKfIb73g7uktNxvUke5Fobk6LRgA0juCOD65izZ9DGghGFWzfUTP2sHArVZ5AuM HBog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uUmqtYiVmUHg53FxTmD1eTlFpsIC4p/LT2B3iZjHHf4=; b=VqQhcLQJFPCeJoSfgzuN84BABijfIEVKPC/RkyWNPLjclsUehqjfyNx7/ul8IBWyjZ Oc99OK8gajuZMtXMs4VV+kF0xNmDa5QbW8Z0lOs44a724iMiiO1+QYK4RwRY818p/xk4 NrMo8Do3zdMnp2b6OSFh1pTVCNFS5V4jV0ZgimUvimASeKjQSV3khVRqeFuk1M5RhfiF oloDezJ2OSbql3onyIDZnBXKGk3/N9WJ7Dvy/piBIXp/XzjDfxCM47Uf+MflCChLo4h9 KAwrHupumoGr6plhXmqX90YHmTModlE8Mvdo7pfUEcHlE7cY2KAfuoMunHJb3w2gAEWm /Bcg== X-Gm-Message-State: AOAM532+vGHJjQjJmdx/u5WTFfrm+Pm4OC+RLqpQs0aAETBJ375WURoA K7IwarUSkPnFh5srmQJaETHWw9vfQEE= X-Google-Smtp-Source: ABdhPJx9PZU+j5yMQCfXB+JemL5OBMEO/0Lfa0H04f0dI6/ZHLUERltuy3PpubMJ4HqUM+64WvwR2g== X-Received: by 2002:a7b:cb54:: with SMTP id v20mr10806927wmj.148.1608561931603; Mon, 21 Dec 2020 06:45:31 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:31 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 48/55] zstd: convert to meson Date: Mon, 21 Dec 2020 15:44:40 +0100 Message-Id: <20201221144447.26161-49-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 30 ++++-------------------------- meson.build | 10 ++++++---- meson_options.txt | 2 ++ migration/meson.build | 2 +- 4 files changed, 13 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 6224279e44..0c0eef7713 100755 --- a/configure +++ b/configure @@ -397,7 +397,7 @@ lzo="auto" snappy="auto" bzip2="auto" lzfse="auto" -zstd="$default_feature" +zstd="auto" guest_agent="$default_feature" guest_agent_with_vss="no" guest_agent_ntddscsi="no" @@ -1327,9 +1327,9 @@ for opt do ;; --disable-lzfse) lzfse="disabled" ;; - --disable-zstd) zstd="no" + --disable-zstd) zstd="disabled" ;; - --enable-zstd) zstd="yes" + --enable-zstd) zstd="enabled" ;; --enable-guest-agent) guest_agent="yes" ;; @@ -2456,23 +2456,6 @@ EOF fi fi -########################################## -# zstd check - -if test "$zstd" != "no" ; then - libzstd_minver="1.4.0" - if $pkg_config --atleast-version=$libzstd_minver libzstd ; then - zstd_cflags="$($pkg_config --cflags libzstd)" - zstd_libs="$($pkg_config --libs libzstd)" - zstd="yes" - else - if test "$zstd" = "yes" ; then - feature_not_found "libzstd" "Install libzstd devel" - fi - zstd="no" - fi -fi - ########################################## # libseccomp check @@ -6068,12 +6051,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$zstd" = "yes" ; then - echo "CONFIG_ZSTD=y" >> $config_host_mak - echo "ZSTD_CFLAGS=$zstd_cflags" >> $config_host_mak - echo "ZSTD_LIBS=$zstd_libs" >> $config_host_mak -fi - if test "$seccomp" = "yes"; then echo "CONFIG_SECCOMP=y" >> $config_host_mak echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak @@ -6627,6 +6604,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ + -Dzstd=$zstd \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 550df12432..b4313951a6 100644 --- a/meson.build +++ b/meson.build @@ -380,9 +380,10 @@ if not get_option('libiscsi').auto() or have_block method: 'pkg-config', static: enable_static) endif zstd = not_found -if 'CONFIG_ZSTD' in config_host - zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(), - link_args: config_host['ZSTD_LIBS'].split()) +if not get_option('zstd').auto() or have_block + zstd = dependency('libzstd', version: '>=1.4.0', + required: get_option('zstd'), + method: 'pkg-config', static: enable_static) endif gbm = not_found if 'CONFIG_GBM' in config_host @@ -1009,6 +1010,7 @@ config_host_data.set('CONFIG_KEYUTILS', keyutils.found()) config_host_data.set('CONFIG_GETTID', has_gettid) config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) config_host_data.set('CONFIG_STATX', has_statx) +config_host_data.set('CONFIG_ZSTD', zstd.found()) config_host_data.set('CONFIG_FUSE', fuse.found()) config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found()) config_host_data.set('CONFIG_CFI', get_option('cfi')) @@ -2384,7 +2386,7 @@ summary_info += {'lzo support': lzo.found()} summary_info += {'snappy support': snappy.found()} summary_info += {'bzip2 support': libbzip2.found()} summary_info += {'lzfse support': liblzfse.found()} -summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} +summary_info += {'zstd support': zstd.found()} summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} summary_info += {'memory allocator': get_option('malloc')} diff --git a/meson_options.txt b/meson_options.txt index f74a3d78c4..5a1de9b1fe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -92,6 +92,8 @@ option('virtiofsd', type: 'feature', value: 'auto', description: 'build virtiofs daemon (virtiofsd)') option('vhost_user_blk_server', type: 'feature', value: 'auto', description: 'build vhost-user-blk server') +option('zstd', type : 'feature', value : 'auto', + description: 'zstd compression support') option('fuse', type: 'feature', value: 'auto', description: 'FUSE block device export') option('fuse_lseek', type : 'feature', value : 'auto', diff --git a/migration/meson.build b/migration/meson.build index 980e37865c..c783f2f2ae 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -29,6 +29,6 @@ softmmu_ss.add(files( softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c')) softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c')) -softmmu_ss.add(when: 'CONFIG_ZSTD', if_true: [files('multifd-zstd.c'), zstd]) +softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c')) specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('dirtyrate.c', 'ram.c')) From patchwork Mon Dec 21 14:44:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=iqqHT01k; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03G204TMz9sVm for ; Tue, 22 Dec 2020 02:26:01 +1100 (AEDT) Received: from localhost ([::1]:58718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN4R-0007tA-Ts for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:25:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRO-0005AR-Uo for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:38 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:37450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRJ-0007xG-OT for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:38 -0500 Received: by mail-wr1-x42f.google.com with SMTP id i9so11319998wrc.4 for ; Mon, 21 Dec 2020 06:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S41BGPZRveGqkm5mvgfMqkVIT2lorAEsSBbiL0WKr8I=; b=iqqHT01kwFs6PSC8Vv7jk4rybJ+yb7gbjuIu2YrUffr9PVlrOSU9MEnTkA4to6d1NG K2of5vsXxro0VNyb46HgYcGkZJJiKUnd+8OX7oZZZZ4GpWamCHfqdC2XxItRbpUvI5jM Lf1TEeNydE0V2yf6c6HX47Zo10YIWJAcjF4OZD6BlWJyEToItqzvkH8ldgYbdZX2NVkm k+3KF1q0+G8jWd+ExczW25zYs57Gk3uDtzyLgb5Hdtp4aG3XsF0BCSNEYkw9CioZfeIM UtGB7892uhVnvDry5at9WSJ3mvWXOzpY1Kbz7IZ6o8zQjLybZWV6vikFGuY5uXWaIvox aq5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=S41BGPZRveGqkm5mvgfMqkVIT2lorAEsSBbiL0WKr8I=; b=F8Zu//9OA/FLDD7so72JtH5P/wUCUzHpvVa+s0GG1I8xSJd6YCKEWB9H9y22LaYCAz pyznUtCgUUV5adZgHGhIjIr6bSmT1O6f1Yd3tiBUCZCoUdlNNF5L+59b+t0ySvvfpAtl 4BUsCvT9xGabzlunROTbNM1OIb9Si63D562N1VqRdqZgWG3LzjSK6sSGaxib7WNGOfR/ m6E5CQIdcwB8zj8R6GQDLDzV8T9tKbX0pqsBPl6YDkUhvTTcukFM3fJV1SAZ91Iby1fm T9NDYH/pHBgI+8YJwzqwGF8rePXxtt7hJdNaIqayhV5hO3QNMzgWkaRL8zdmfp0nljiY ObBA== X-Gm-Message-State: AOAM5312AXWPxK1t0kCqIynvyPhXqcnkdOovcGh24X8k9+LHOlf45xx2 jt3PtmDCNKpO3C6S6l/uwskYJKVO1yk= X-Google-Smtp-Source: ABdhPJwN5MjV7X/wfszSb/tWNfWqUmIoYKqbWOBHRqynbYRerbUYQWOT0lCfG1KMs4wH5rDcyb40Nw== X-Received: by 2002:adf:e688:: with SMTP id r8mr18775408wrm.20.1608561932342; Mon, 21 Dec 2020 06:45:32 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:31 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 49/55] seccomp: convert to meson Date: Mon, 21 Dec 2020 15:44:41 +0100 Message-Id: <20201221144447.26161-50-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 32 ++++---------------------------- meson.build | 10 ++++++---- meson_options.txt | 2 ++ softmmu/meson.build | 2 +- softmmu/qemu-seccomp.c | 2 -- tools/meson.build | 4 ++-- 6 files changed, 15 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 0c0eef7713..ba8c6e74be 100755 --- a/configure +++ b/configure @@ -413,7 +413,7 @@ debug_stack_usage="no" crypto_afalg="no" cfi="false" cfi_debug="false" -seccomp="$default_feature" +seccomp="auto" glusterfs="auto" gtk="$default_feature" gtk_gl="no" @@ -1355,9 +1355,9 @@ for opt do ;; --disable-tools) want_tools="no" ;; - --enable-seccomp) seccomp="yes" + --enable-seccomp) seccomp="enabled" ;; - --disable-seccomp) seccomp="no" + --disable-seccomp) seccomp="disabled" ;; --disable-glusterfs) glusterfs="disabled" ;; @@ -2456,24 +2456,6 @@ EOF fi fi -########################################## -# libseccomp check - -if test "$seccomp" != "no" ; then - libseccomp_minver="2.3.0" - if $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then - seccomp_cflags="$($pkg_config --cflags libseccomp)" - seccomp_libs="$($pkg_config --libs libseccomp)" - seccomp="yes" - else - if test "$seccomp" = "yes" ; then - feature_not_found "libseccomp" \ - "Install libseccomp devel >= $libseccomp_minver" - fi - seccomp="no" - fi -fi - ########################################## # xen probe @@ -6051,12 +6033,6 @@ if test "$avx512f_opt" = "yes" ; then echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak fi -if test "$seccomp" = "yes"; then - echo "CONFIG_SECCOMP=y" >> $config_host_mak - echo "SECCOMP_CFLAGS=$seccomp_cflags" >> $config_host_mak - echo "SECCOMP_LIBS=$seccomp_libs" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak @@ -6604,7 +6580,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd \ + -Dzstd=$zstd -Dseccomp=$seccomp \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index b4313951a6..99c4d0dd1a 100644 --- a/meson.build +++ b/meson.build @@ -329,9 +329,10 @@ if 'CONFIG_ATTR' in config_host libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) endif seccomp = not_found -if 'CONFIG_SECCOMP' in config_host - seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(), - link_args: config_host['SECCOMP_LIBS'].split()) +if not get_option('libiscsi').auto() or have_system or have_tools + seccomp = dependency('libseccomp', version: '>=2.3.0', + required: get_option('seccomp'), + method: 'pkg-config', static: enable_static) endif libcap_ng = not_found if 'CONFIG_LIBCAP_NG' in config_host @@ -999,6 +1000,7 @@ config_host_data.set('HAVE_LIBSSH_0_8', have_libssh_0_8) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) config_host_data.set('CONFIG_VNC', vnc.found()) @@ -2368,7 +2370,7 @@ if targetos == 'windows' summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')} summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI')} endif -summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')} +summary_info += {'seccomp support': seccomp.found()} summary_info += {'CFI support': get_option('cfi')} summary_info += {'CFI debug support': get_option('cfi_debug')} summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']} diff --git a/meson_options.txt b/meson_options.txt index 5a1de9b1fe..1854a9639f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -74,6 +74,8 @@ option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', description: 'SDL Image support for icons') +option('seccomp', type : 'feature', value : 'auto', + description: 'seccomp support') option('snappy', type : 'feature', value : 'auto', description: 'snappy compression support') option('u2f', type : 'feature', value : 'auto', diff --git a/softmmu/meson.build b/softmmu/meson.build index 2dab6c7eb6..d8e03018ab 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -28,5 +28,5 @@ softmmu_ss.add(files( ), sdl, libpmem, libdaxctl) softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) -softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp]) +softmmu_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) softmmu_ss.add(when: fdt, if_true: files('device_tree.c')) diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c index 8325ecb766..377ef6937c 100644 --- a/softmmu/qemu-seccomp.c +++ b/softmmu/qemu-seccomp.c @@ -202,7 +202,6 @@ static int seccomp_start(uint32_t seccomp_opts, Error **errp) return rc < 0 ? -1 : 0; } -#ifdef CONFIG_SECCOMP int parse_sandbox(void *opaque, QemuOpts *opts, Error **errp) { if (qemu_opt_get_bool(opts, "enable", false)) { @@ -328,4 +327,3 @@ static void seccomp_register(void) } } opts_init(seccomp_register); -#endif diff --git a/tools/meson.build b/tools/meson.build index 76bf84df52..5c52d79fe4 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,6 +1,6 @@ have_virtiofsd = (targetos == 'linux' and have_tools and - 'CONFIG_SECCOMP' in config_host and + seccomp.found() and 'CONFIG_LIBCAP_NG' in config_host and 'CONFIG_VHOST_USER' in config_host) @@ -8,7 +8,7 @@ if get_option('virtiofsd').enabled() if not have_virtiofsd if targetos != 'linux' error('virtiofsd requires Linux') - elif 'CONFIG_SECCOMP' not in config_host or 'CONFIG_LIBCAP_NG' not in config_host + elif not seccomp.found() or 'CONFIG_LIBCAP_NG' not in config_host error('virtiofsd requires libcap-ng-devel and seccomp-devel') elif not have_tools or 'CONFIG_VHOST_USER' not in config_host error('virtiofsd needs tools and vhost-user support') From patchwork Mon Dec 21 14:44:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OH1Dn3eX; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D030G1pFSz9sVH for ; Tue, 22 Dec 2020 02:14:06 +1100 (AEDT) Received: from localhost ([::1]:33294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMsu-0005Ro-57 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:14:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRP-0005Aw-3X for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:39 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:37026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRK-0007xd-Hj for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:38 -0500 Received: by mail-wm1-x330.google.com with SMTP id q75so11189946wme.2 for ; Mon, 21 Dec 2020 06:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9TR752MNLWceHvtFCikM71zHYckwDkSayW1xOx+GF/E=; b=OH1Dn3eXzv2fyHQW6fas9aGA+o1IBVHTUTtxTZ4e/Xy/apuxeR8OVhdVzzM5zYjXuv P/tRfcKFr+PIlpZY5qUMtmqcI3K3pc+cit2LjbeiQm3MT7pHAuB9egnQo/K09sgqLHWM 85QQUGlEPWPmTa62dZAv9NSxawRPBfUoBVHb8QEixVpCL1fRHnvNh7bDRjj6tKUd2m72 /85MuuThoZ3BJ5SQjrIu83wgVvuAYAEEmYNnt8xbRxK1h9z/bl/O4LDVu33OL1eHFbX3 jlXdyGNJN/8rACEblxIi+qQtxax5SYAzi5sW32Zl7d3huBl7kfYdVoDDdOO5dmzjj3xB Dhbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9TR752MNLWceHvtFCikM71zHYckwDkSayW1xOx+GF/E=; b=mDl5OyDecJaE/UWVB6DNwp5ACByXfduEy0pdfWgEFmUqT7/wz9rigZfnw7MckqW9wx JZUH+qKTeUSAXMlP8EzamIUXKGJqjx6LOoXlfKxYZskYRUJa8ztLHv8U741TMe762eET AHUsudoYWB8LiebKYakJ4qxA+ipA9xwqWrmYdRJCCzGjsoY7ekJ1iNtu8m3z1tP1ao2w M8XiNvcST+QREWqfiwj8dBlIZGP2GAI/FsJanqm2BJXUL0X/18QmRfq1ofBNIrm+ocdY 572NbNU8rOmQ0MjA5YzNo+/f34rXb9mvuBwLxR0En2h341ws3tuBFoXFN5in5bQjv6ai saWA== X-Gm-Message-State: AOAM5318BxWlX6rnMyO80wtHDrU/SRqUSERxxsjem1Z6/BL4AKHL/HfW haOBRYrmR3htMZhdSf5pVJpxb16VFnA= X-Google-Smtp-Source: ABdhPJyvWoiSUAIoP6kSXKjoeyYPNUmWS0GqhIfGQoFKKtPX8WdqHkuQdXJ6DR0/azUqhyo4s4g/qA== X-Received: by 2002:a05:600c:2042:: with SMTP id p2mr17292922wmg.152.1608561933122; Mon, 21 Dec 2020 06:45:33 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 50/55] virtfs: convert to meson Date: Mon, 21 Dec 2020 15:44:42 +0100 Message-Id: <20201221144447.26161-51-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 29 ++++------------------------- meson.build | 24 ++++++++++++++++++++++-- meson_options.txt | 11 +++++++---- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/configure b/configure index ba8c6e74be..46ee3da40e 100755 --- a/configure +++ b/configure @@ -315,7 +315,7 @@ netmap="no" sdl="auto" sdl_image="auto" virtiofsd="auto" -virtfs="$default_feature" +virtfs="auto" libudev="auto" mpath="auto" vnc="enabled" @@ -1004,9 +1004,9 @@ for opt do ;; --enable-qom-cast-debug) qom_cast_debug="yes" ;; - --disable-virtfs) virtfs="no" + --disable-virtfs) virtfs="disabled" ;; - --enable-virtfs) virtfs="yes" + --enable-virtfs) virtfs="enabled" ;; --disable-libudev) libudev="disabled" ;; @@ -5443,24 +5443,6 @@ if [ "$eventfd" = "yes" ]; then ivshmem=yes fi -if test "$softmmu" = yes ; then - if test "$linux" = yes; then - if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then - virtfs=yes - else - if test "$virtfs" = yes; then - error_exit "VirtFS requires libcap-ng devel and libattr devel" - fi - virtfs=no - fi - else - if test "$virtfs" = yes; then - error_exit "VirtFS is supported only on Linux" - fi - virtfs=no - fi -fi - # Probe for guest agent support/options if [ "$guest_agent" != "no" ]; then @@ -5917,9 +5899,6 @@ fi if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak fi -if test "$virtfs" = "yes" ; then - echo "CONFIG_VIRTFS=y" >> $config_host_mak -fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi @@ -6580,7 +6559,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd -Dseccomp=$seccomp \ + -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 99c4d0dd1a..22413b4f16 100644 --- a/meson.build +++ b/meson.build @@ -963,6 +963,25 @@ endif # config-host.h # ################# +have_virtfs = (targetos == 'linux' and + have_system and + libattr.found() and + libcap_ng.found()) + +if get_option('virtfs').enabled() + if not have_virtfs + if targetos != 'linux' + error('virtio-9p (virtfs) requires Linux') + elif not libcap_ng.found() or not libattr.found() + error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel') + elif not have_system + error('virtio-9p (virtfs) needs system emulation support') + endif + endif +elif get_option('virtfs').disabled() + have_virtfs = false +endif + config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir) @@ -1007,6 +1026,7 @@ config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_PNG', png.found()) config_host_data.set('CONFIG_VNC_SASL', sasl.found()) +config_host_data.set('CONFIG_VIRTFS', have_virtfs) config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found()) config_host_data.set('CONFIG_KEYUTILS', keyutils.found()) config_host_data.set('CONFIG_GETTID', has_gettid) @@ -1105,7 +1125,7 @@ host_kconfig = \ ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=y'] : []) + \ ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=y'] : []) + \ ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=y'] : []) + \ - ('CONFIG_VIRTFS' in config_host ? ['CONFIG_VIRTFS=y'] : []) + \ + (have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \ ('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=y'] : []) @@ -2294,7 +2314,7 @@ summary_info += {'mingw32 support': targetos == 'windows'} summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} -summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} +summary_info += {'VirtFS support': have_virtfs} summary_info += {'build virtiofs daemon': have_virtiofsd} summary_info += {'Multipath support': mpathpersist.found()} summary_info += {'VNC support': vnc.found()} diff --git a/meson_options.txt b/meson_options.txt index 1854a9639f..59a8a50e5b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -90,10 +90,6 @@ option('vnc_sasl', type : 'feature', value : 'auto', description: 'SASL authentication for VNC server') option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') -option('virtiofsd', type: 'feature', value: 'auto', - description: 'build virtiofs daemon (virtiofsd)') -option('vhost_user_blk_server', type: 'feature', value: 'auto', - description: 'build vhost-user-blk server') option('zstd', type : 'feature', value : 'auto', description: 'zstd compression support') option('fuse', type: 'feature', value: 'auto', @@ -101,6 +97,13 @@ option('fuse', type: 'feature', value: 'auto', option('fuse_lseek', type : 'feature', value : 'auto', description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports') +option('vhost_user_blk_server', type: 'feature', value: 'auto', + description: 'build vhost-user-blk server') +option('virtfs', type: 'feature', value: 'auto', + description: 'virtio-9p support') +option('virtiofsd', type: 'feature', value: 'auto', + description: 'build virtiofs daemon (virtiofsd)') + option('capstone', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], description: 'Whether and how to find the capstone library') From patchwork Mon Dec 21 14:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eh32L3WC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D035D1lvKz9sVs for ; Tue, 22 Dec 2020 02:18:24 +1100 (AEDT) Received: from localhost ([::1]:39878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMx4-0008Im-83 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:18:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRP-0005Bv-Es for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:39 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:33929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRL-0007xv-FV for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:39 -0500 Received: by mail-wr1-x436.google.com with SMTP id q18so11334116wrn.1 for ; Mon, 21 Dec 2020 06:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RdW2HjhcohpbvrKSbpoMZNbyc1Eg4tJlxHdWFEO6tHw=; b=eh32L3WCLk/tlJLc+CvQoyoRMRnXuAtCdbWqfRRyWiSypBnF5Lwr6OzXFW6qw3LYSn iu/Fxe//pcRhzPyN3BsxvYtAMI5UmXi8sHgmS5+TK8PiT0ILcc+zSxhuEp9Ow+L1qx9P WIkYwBpDdqVaXESCAwiTfc8A9LupQkSEXNQEVOyVEgS+3CEhtnZMPGqXystr7nsIe0ux PqE34FZu5F7wMXqn66uSj3KgT9He1HSi7qkiJC6CaMyZbuqEUArNBWnlmvuUSJMagPH8 Y2mHySAadiAovA5ySI/ORwkuB3ovTuEJxrcIf2wpyNuCpYnbtxZiieJHT8B5a7Tc0/qP aJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RdW2HjhcohpbvrKSbpoMZNbyc1Eg4tJlxHdWFEO6tHw=; b=Rq0x+GrAZojAhYDD7I13yL13Qt5HAFbF9PvqbiQzhMBHlxbqyRTzBhYP0411mB+Iid RMMSEl01TucomK1cpBI+MV+5aidrA0aq3i74Tb96qOvERv2VPt8ElpGoz0eXOdS62Vqy Rf57kPN/iXJEJeyLJ3A1TCht/fEvaF9cq0VH241ZJ1biJfusnYpo1qwOGMVqszKSS5nu hs7L6fygs/1sXZae87YvVouR42nC1PUcDvHbWPpNJwMzui2IWP/aP8pyft10N0XcOVFb RT8zjChYkoSWUYrGvCHaxuDvDd36hUTnqiYGSSiPA4VCmvUJWQ5HEXxLP4YY+HwgPfxS mtVg== X-Gm-Message-State: AOAM531TIiWehZVHDOwelVT0rIXyWhyTUuNE0ktX3g8lSFv01+rG2HIG h7f3Z5Y5XPMNDbhte/SUBR9wV/M25qQ= X-Google-Smtp-Source: ABdhPJyInkrbSD+sMh+0q+F1BVZtJUvgyrwt9t7+0Iwyvy+rELx04Ti5pSnwbl5lmx7nCFE6/sLVLg== X-Received: by 2002:a5d:67c1:: with SMTP id n1mr18824035wrw.205.1608561934012; Mon, 21 Dec 2020 06:45:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 51/55] cap_ng: convert to meson Date: Mon, 21 Dec 2020 15:44:43 +0100 Message-Id: <20201221144447.26161-52-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 34 ++++------------------------------ meson.build | 24 ++++++++++++++++++++---- meson_options.txt | 2 ++ tools/meson.build | 4 ++-- 4 files changed, 28 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 46ee3da40e..569396248b 100755 --- a/configure +++ b/configure @@ -330,7 +330,7 @@ xen_ctrl_version="$default_feature" xen_pci_passthrough="auto" linux_aio="$default_feature" linux_io_uring="$default_feature" -cap_ng="$default_feature" +cap_ng="auto" attr="$default_feature" libattr="$default_feature" xfs="$default_feature" @@ -1122,9 +1122,9 @@ for opt do ;; --enable-tcg-interpreter) tcg_interpreter="yes" ;; - --disable-cap-ng) cap_ng="no" + --disable-cap-ng) cap_ng="disabled" ;; - --enable-cap-ng) cap_ng="yes" + --enable-cap-ng) cap_ng="enabled" ;; --disable-tcg) tcg="disabled" ;; @@ -3191,28 +3191,6 @@ EOF fi fi -########################################## -# libcap-ng library probe -if test "$cap_ng" != "no" ; then - cap_libs="-lcap-ng" - cat > $TMPC << EOF -#include -int main(void) -{ - capng_capability_to_name(CAPNG_EFFECTIVE); - return 0; -} -EOF - if compile_prog "" "$cap_libs" ; then - cap_ng=yes - else - if test "$cap_ng" = "yes" ; then - feature_not_found "cap_ng" "Install libcap-ng devel" - fi - cap_ng=no - fi -fi - ########################################## # Sound support libraries probe @@ -5669,10 +5647,6 @@ fi if test "$gprof" = "yes" ; then echo "CONFIG_GPROF=y" >> $config_host_mak fi -if test "$cap_ng" = "yes" ; then - echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak - echo "LIBCAP_NG_LIBS=$cap_libs" >> $config_host_mak -fi echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]') @@ -6559,7 +6533,7 @@ NINJA=$ninja $meson setup \ -Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2 -Dlibiscsi=$libiscsi \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ - -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs \ + -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index 22413b4f16..f580f2f67f 100644 --- a/meson.build +++ b/meson.build @@ -334,10 +334,25 @@ if not get_option('libiscsi').auto() or have_system or have_tools required: get_option('seccomp'), method: 'pkg-config', static: enable_static) endif -libcap_ng = not_found -if 'CONFIG_LIBCAP_NG' in config_host - libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) + +libcap_ng = cc.find_library('cap-ng', has_headers: ['cap-ng.h'], + required: get_option('cap_ng'), + static: enable_static) +if libcap_ng.found() and not cc.links(''' + #include + int main(void) + { + capng_capability_to_name(CAPNG_EFFECTIVE); + return 0; + }''', dependencies: libcap_ng) + libcap_ng = not_found + if get_option('cap_ng').enabled() + error('could not link libcap-ng') + else + warning('could not link libcap-ng, disabling') + endif endif + if get_option('xkbcommon').auto() and not have_system and not have_tools xkbcommon = not_found else @@ -1012,6 +1027,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) endif +config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_LIBSSH', libssh.found()) @@ -2355,7 +2371,7 @@ summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')} summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')} summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')} summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')} -summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')} +summary_info += {'libcap-ng support': libcap_ng.found()} summary_info += {'vhost-kernel support': config_host.has_key('CONFIG_VHOST_KERNEL')} summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')} summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')} diff --git a/meson_options.txt b/meson_options.txt index 59a8a50e5b..12a1872f20 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -44,6 +44,8 @@ option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('bzip2', type : 'feature', value : 'auto', description: 'bzip2 support for DMG images') +option('cap_ng', type : 'feature', value : 'auto', + description: 'cap_ng support') option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('curl', type : 'feature', value : 'auto', diff --git a/tools/meson.build b/tools/meson.build index 5c52d79fe4..fdce66857d 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,14 +1,14 @@ have_virtiofsd = (targetos == 'linux' and have_tools and seccomp.found() and - 'CONFIG_LIBCAP_NG' in config_host and + libcap_ng.found() and 'CONFIG_VHOST_USER' in config_host) if get_option('virtiofsd').enabled() if not have_virtiofsd if targetos != 'linux' error('virtiofsd requires Linux') - elif not seccomp.found() or 'CONFIG_LIBCAP_NG' not in config_host + elif not seccomp.found() or not libcap_ng.found() error('virtiofsd requires libcap-ng-devel and seccomp-devel') elif not have_tools or 'CONFIG_VHOST_USER' not in config_host error('virtiofsd needs tools and vhost-user support') From patchwork Mon Dec 21 14:44:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EpVJHdcr; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D038C0JB5z9sVt for ; Tue, 22 Dec 2020 02:20:59 +1100 (AEDT) Received: from localhost ([::1]:46846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMzZ-0002lz-0C for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:20:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRQ-0005FE-On for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRM-0007yC-5b for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: by mail-wr1-x432.google.com with SMTP id 91so11314171wrj.7 for ; Mon, 21 Dec 2020 06:45:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x+XV7POEVzZV9uOrwvIZLsGMYHJ/WzP2anWj6Wklw4o=; b=EpVJHdcrjVOeV+TcaUSqr98K+inA8CLtvlYV4nS1r/a6wbu1hYhRQdRGQIMm+dqr1N gNCvAdGIOrit0x8P5tdKdFhtRF387c536drwILymXUSHW7pR4Ak0t0hFpBevixCiptN1 FAB7BqrVDJmhIWgaH1bXmX0o4yBLDIaWNcv4Lw7bR8Y39zwJhuQlnni+hD3IludyZGI5 kNJ6CT5pE1z268xMpJ/yxk+QSt4F3w8YEEbYr13g/fBr27yO4fEME1QcQaPWf+NtbgrX eZuEd0xa0xIbKuQUeZ4R3mYl6BG6YZb3v9Gf2IaRT+GUg40JacK4lOfJq6BhomOayOg2 wTHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=x+XV7POEVzZV9uOrwvIZLsGMYHJ/WzP2anWj6Wklw4o=; b=iHJefzhMpy7O4MmR/rcpw4PfkurjfeKeT1BxIu5y67yhwPKc+Om86cZZ04nfU9LuYp ZDM4gwwRgbusGwmQTUnwaUGxvchcFytepmpHNYcjFF1706CyKGiUSpcTV/HjYBSbTkd8 R6QwCqTGAHnk8echHnOnJ26CN/6MWq1/W7MgD/Ezk/lLv7tkYVrrPyQNJ67exJ2L4MN8 R+6h1Zhe/MJ+3/cLgz73S3Eir/cBmqxel/2CK/r3liH1ndYA3blzT7xyn13budKYfpoU AcBuO1NLMk0kUVlzwp1wTB3cwM7lkRj8i6N6UN6kPgZV5k/pWumCmmlsd+6m42ydHi7k DexQ== X-Gm-Message-State: AOAM531gT+U+e6jVsU3NA7D9d8n5jGCbPP7hsYpO1rtYGU58ZU2RDjmh jpVV+wbhlaqAcYOVOLS1zID7c/7WTpw= X-Google-Smtp-Source: ABdhPJzgchAneWYicCTcY6OhG+m2iBC46VsiZk0xoe9x2AK3SYrKNSt4ddJ0OHvAfVEFfuVQXrVSLQ== X-Received: by 2002:adf:c387:: with SMTP id p7mr18943960wrf.95.1608561934748; Mon, 21 Dec 2020 06:45:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 52/55] libattr: convert to meson Date: Mon, 21 Dec 2020 15:44:44 +0100 Message-Id: <20201221144447.26161-53-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 45 ++++----------------------------------------- meson.build | 38 +++++++++++++++++++++++++++++++++++--- meson_options.txt | 2 ++ 3 files changed, 41 insertions(+), 44 deletions(-) diff --git a/configure b/configure index 569396248b..18af62a3e0 100755 --- a/configure +++ b/configure @@ -331,8 +331,7 @@ xen_pci_passthrough="auto" linux_aio="$default_feature" linux_io_uring="$default_feature" cap_ng="auto" -attr="$default_feature" -libattr="$default_feature" +attr="auto" xfs="$default_feature" tcg="enabled" membarrier="$default_feature" @@ -1229,9 +1228,9 @@ for opt do ;; --enable-linux-io-uring) linux_io_uring="yes" ;; - --disable-attr) attr="no" + --disable-attr) attr="disabled" ;; - --enable-attr) attr="yes" + --enable-attr) attr="enabled" ;; --disable-membarrier) membarrier="no" ;; @@ -3542,36 +3541,6 @@ elif test "$tpm" = "yes"; then fi fi -########################################## -# attr probe - -libattr_libs= -if test "$attr" != "no" ; then - cat > $TMPC < -#include -#ifdef CONFIG_LIBATTR -#include -#else -#include -#endif -int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 0); return 0; } -EOF - if compile_prog "" "" ; then - attr=yes - # Older distros have , and need -lattr: - elif compile_prog "-DCONFIG_LIBATTR" "-lattr" ; then - attr=yes - libattr_libs="-lattr" - libattr=yes - else - if test "$attr" = "yes" ; then - feature_not_found "ATTR" "Install libc6 or libattr devel" - fi - attr=no - fi -fi - ########################################## # iovec probe cat > $TMPC <> $config_host_mak echo "LINUX_IO_URING_LIBS=$linux_io_uring_libs" >> $config_host_mak fi -if test "$attr" = "yes" ; then - echo "CONFIG_ATTR=y" >> $config_host_mak - echo "LIBATTR_LIBS=$libattr_libs" >> $config_host_mak -fi -if test "$libattr" = "yes" ; then - echo "CONFIG_LIBATTR=y" >> $config_host_mak -fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi @@ -6534,6 +6496,7 @@ NINJA=$ninja $meson setup \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ + -Dattr=$attr \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index f580f2f67f..fef0c0f013 100644 --- a/meson.build +++ b/meson.build @@ -324,10 +324,40 @@ if not get_option('libnfs').auto() or have_block required: get_option('libnfs'), method: 'pkg-config', static: enable_static) endif + +libattr_test = ''' + #include + #include + #ifdef CONFIG_LIBATTR + #include + #else + #include + #endif + int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 0); return 0; }''' + libattr = not_found -if 'CONFIG_ATTR' in config_host - libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) +have_old_libattr = false +if not get_option('attr').disabled() + if cc.links(libattr_test) + libattr = declare_dependency() + else + libattr = cc.find_library('attr', has_headers: ['attr/xattr.h'], + required: get_option('attr'), + static: enable_static) + if libattr.found() and not \ + cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATTR') + libattr = not_found + if get_option('attr').enabled() + error('could not link libattr') + else + warning('could not link libattr, disabling') + endif + else + have_old_libattr = libattr.found() + endif + endif endif + seccomp = not_found if not get_option('libiscsi').auto() or have_system or have_tools seccomp = dependency('libseccomp', version: '>=2.3.0', @@ -1010,6 +1040,7 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir')) +config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) @@ -1027,6 +1058,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat) config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat) endif +config_host_data.set('CONFIG_LIBATTR', have_old_libattr) config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found()) config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) config_host_data.set('CONFIG_LIBNFS', libnfs.found()) @@ -2350,7 +2382,7 @@ summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')} summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')} -summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')} +summary_info += {'ATTR/XATTR support': libattr.found()} summary_info += {'Install blobs': get_option('install_blobs')} summary_info += {'KVM support': config_all.has_key('CONFIG_KVM')} summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')} diff --git a/meson_options.txt b/meson_options.txt index 12a1872f20..8fcec056cd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,6 +40,8 @@ option('cfi', type: 'boolean', value: 'false', option('cfi_debug', type: 'boolean', value: 'false', description: 'Verbose errors in case of CFI violation') +option('attr', type : 'feature', value : 'auto', + description: 'attr/xattr support') option('brlapi', type : 'feature', value : 'auto', description: 'brlapi character device driver') option('bzip2', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vcHvFyZG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03c71k3Gz9sVH for ; Tue, 22 Dec 2020 02:41:43 +1100 (AEDT) Received: from localhost ([::1]:36902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNJd-0006DW-8z for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:41:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRQ-0005Ev-Ik for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:53396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRM-000803-Va for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: by mail-wm1-x32d.google.com with SMTP id k10so10103272wmi.3 for ; Mon, 21 Dec 2020 06:45:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VHZYhA9oJgmEAppkwuoyrKj0wreNSbxgP7cRZdHvYKQ=; b=vcHvFyZGzSldT27NNip8dv//8k36fGRgBYtOydyqbVNyPV8U7NZPsVtMQh28SIpoBk YjRnJdZijIA417sXqc11CW1ndgg8IkxGh+rGoNq4Sbq0v8CWqu+MBPDMZRaB/N1lt1cg edpUP8nNoRZ7XoY9LTAmMxFbOxlIpsn92ZHM3nvKJdtgsadEW9OBLvfYFKUvMuh4mhmM bsR+ADEN6BAJNUiPieH0mJwzDoipQrot+ByZbRWOT6rf9b+caWIV93DY/XcqtDl+HwVj cfkyOPpwBMPGeV17h5KFQV+On1yKwPJ0vtvSf1sIt6qsU4PiH+EBOGGzdZTxwOV0uAHe 43WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VHZYhA9oJgmEAppkwuoyrKj0wreNSbxgP7cRZdHvYKQ=; b=ayHHLPyoUj/7bd9Lrh23C4vzKVw8/A+H9nbJPNcrFxqR4wNk4zrfOsoO2X1a5jXNA4 3t6w0JoCK63zR6PB0hIHShWhebDQXVkmAAv3scvtwtFC3NaHgW+qhMbMcLeStgYxjPUG XOvT4lEVBJKN66VnYFX/WLewrdSJVmgfMddw8MGYSveNDmY/B4ayyZNWM5KMrQvKVUqG Bv4SYQ9avFarZH++DXhNWqKxIIMX9cfy1iUY1dIou214whvIs+n7VXeT0iEaDbqgS5iK LjsLvZy4mA68MJBkRReWqBONcnkdXT8zgVauvgh7j3wkzB1jwe0xLfpVGFw/YBeqUkNU Xz7w== X-Gm-Message-State: AOAM531Ab6qUEnF2AFbWfdRrGXacNuu/6KFMLe5ZrTF5RdWJDrOAgxrQ l/f6DTJo1F31ykx91arspNr5Tdf+stE= X-Google-Smtp-Source: ABdhPJwg8SqQi1A9Bsv5DwzqIC13H6TZyQg2BDCESUXr2L3AB8biyZinH/CQ666iLHHEMC5Cuc/FyA== X-Received: by 2002:a05:600c:208:: with SMTP id 8mr17277423wmi.146.1608561935542; Mon, 21 Dec 2020 06:45:35 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 53/55] meson.build: convert --with-default-devices to meson Date: Mon, 21 Dec 2020 15:44:45 +0100 Message-Id: <20201221144447.26161-54-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Pass the boolean option directly instead of writing CONFIG_MINIKCONF_MODE to config-host.mak. Signed-off-by: Paolo Bonzini --- configure | 13 ++++--------- meson.build | 5 +++-- meson_options.txt | 2 ++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 18af62a3e0..63ac12d5b8 100755 --- a/configure +++ b/configure @@ -446,7 +446,7 @@ sheepdog="no" libxml2="$default_feature" debug_mutex="no" libpmem="$default_feature" -default_devices="yes" +default_devices="true" plugins="no" fuzzing="no" rng_none="no" @@ -943,9 +943,9 @@ for opt do ;; --with-trace-file=*) trace_file="$optarg" ;; - --with-default-devices) default_devices="yes" + --with-default-devices) default_devices="true" ;; - --without-default-devices) default_devices="no" + --without-default-devices) default_devices="false" ;; --without-default-features) # processed above ;; @@ -5539,11 +5539,6 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak -if test "$default_devices" = "yes" ; then - echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak -else - echo "CONFIG_MINIKCONF_MODE=--allnoconfig" >> $config_host_mak -fi if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi @@ -6496,7 +6491,7 @@ NINJA=$ninja $meson setup \ -Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Dlibssh=$libssh -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \ -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \ - -Dattr=$attr \ + -Dattr=$attr -Ddefault_devices=$default_devices \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ -Dvhost_user_blk_server=$vhost_user_blk_server \ -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek \ diff --git a/meson.build b/meson.build index fef0c0f013..98d302cb22 100644 --- a/meson.build +++ b/meson.build @@ -1282,7 +1282,8 @@ foreach target : target_dirs output: config_devices_mak, depfile: config_devices_mak + '.d', capture: true, - command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], + command: [minikconf, + get_option('default_devices') ? '--defconfig' : '--allnoconfig', config_devices_mak, '@DEPFILE@', '@INPUT@', host_kconfig, accel_kconfig]) @@ -2476,7 +2477,7 @@ summary_info += {'capstone': capstone_opt == 'disabled' ? false : capst summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')} summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')} summary_info += {'libudev': libudev.found()} -summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'} +summary_info += {'default devices': get_option('default_devices')} summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')} summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} if config_host.has_key('HAVE_GDB_BIN') diff --git a/meson_options.txt b/meson_options.txt index 8fcec056cd..1d4a71772e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,8 @@ option('qemu_firmwarepath', type : 'string', value : '', option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build [$sphinx_build] for building document (default to be empty)') +option('default_devices', type : 'boolean', value : true, + description: 'Include a default selection of devices in emulators') option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') option('gettext', type : 'feature', value : 'auto', From patchwork Mon Dec 21 14:44:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cMV9erJ+; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D02xX2SdRz9sVs for ; Tue, 22 Dec 2020 02:11:44 +1100 (AEDT) Received: from localhost ([::1]:53462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMqc-00021e-Az for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:11:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRQ-0005FS-SD for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:40584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRN-00080a-MH for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: by mail-wm1-x334.google.com with SMTP id r4so11157177wmh.5 for ; Mon, 21 Dec 2020 06:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0C3CDOl7kWOIXwW0cGa3NTxLoRJZBcCPdgZjuR7pLXA=; b=cMV9erJ+EFzQ7/UWs2mZ92w+VRNAaf+fHylXutcfDUNS3i0uIEJ9WXEN5MHixI+yzT 3W6nlsoxeZYA31EBln49R5DQLY/O7Fyrb4bfimNY4+x6+pjtJkAQbMN1BpGShGQUaCD/ AWpum5B6XsiInDR5WkBI5W8pZdYrY5D5RnZbNCT7l9JT8MPogdYTBRfDwfBsF22iM3wk RAdo26SDTLgVJfJYI4yDPzNCgX9vzb8XX+m6aVUK2h63bZlFbafnMobS+itOq0nXQs0y qBWC/PZHM/osxqswqJ9I/LzkXILOBVMjMb1YjGf7/HhwZ/7Lck2VIKKJl/lra8w16bsn M1Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0C3CDOl7kWOIXwW0cGa3NTxLoRJZBcCPdgZjuR7pLXA=; b=T0fsSw/Mu52OToMkhdeYqf0+JXViek1laSXWg2bZiCkt+O1uI/cBNyo5eFXN1XAVzO alDwKMZBuRnUHDtzun+h4f5gHA7Zw5Z6PAtUyLWDt+q+W+DKeJDn31Lju0XUY6Ancd8c oh7xuvA3VOMCrBj/DEvUvYcPOD34UNjR+d5PFJQTuy5IzHVK1LsPrr4vMnLBUFMaM8Pr kDxDtK2IPhEobTPphebYxXs62070utM7RMIlxjGGJMiderS1LKn4V9GbbqNEI5n2OMsP OlKLLXndGi5lqgrus5QwptQrtR0Ifays7GUo769TjKFRSq1yu/7JPyf9pbXBy4L6m2im rxng== X-Gm-Message-State: AOAM532jGM1rNIAlYiqrFwuJEjEsvIyHfMNdibgQMoNmB1XT+JHct1af RMzFHOhwWQXBIr5MdRF8/iPBKtFQ3kk= X-Google-Smtp-Source: ABdhPJzNgS9pim4g9i7xSncAuO+3Phc2NWKgB/s/UJ52fqW0Y3dS9xr4RuCVnKoZ1WLrNDRmMpohdQ== X-Received: by 2002:a7b:cb09:: with SMTP id u9mr17231014wmj.61.1608561936380; Mon, 21 Dec 2020 06:45:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 54/55] configure: move tests/qemu-iotests/common.env generation to meson Date: Mon, 21 Dec 2020 15:44:46 +0100 Message-Id: <20201221144447.26161-55-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Signed-off-by: Paolo Bonzini --- configure | 7 ------- tests/qemu-iotests/common.env.in | 3 +++ tests/qemu-iotests/meson.build | 3 +++ 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 tests/qemu-iotests/common.env.in diff --git a/configure b/configure index 63ac12d5b8..c8e30ba1c7 100755 --- a/configure +++ b/configure @@ -6394,13 +6394,6 @@ for rom in seabios; do echo "RANLIB=$ranlib" >> $config_mak done -# set up qemu-iotests in this build directory -iotests_common_env="tests/qemu-iotests/common.env" - -echo "# Automatically generated by configure - do not modify" > "$iotests_common_env" -echo >> "$iotests_common_env" -echo "export PYTHON='$python'" >> "$iotests_common_env" - if test "$skip_meson" = no; then cross="config-meson.cross.new" meson_quote() { diff --git a/tests/qemu-iotests/common.env.in b/tests/qemu-iotests/common.env.in new file mode 100644 index 0000000000..e565cdf40c --- /dev/null +++ b/tests/qemu-iotests/common.env.in @@ -0,0 +1,3 @@ +# Automatically generated by configure - do not modify + +export PYTHON='@PYTHON@' diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 67aed1e492..26658ce25c 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -3,3 +3,6 @@ if 'CONFIG_LINUX' in config_host else socket_scm_helper = [] endif +configure_file(output: 'common.env', + input: files('common.env.in'), + configuration: {'PYTHON': python.full_path()}) From patchwork Mon Dec 21 14:44:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1419106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bOGe03f6; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D03Dk2RCnz9sVH for ; Tue, 22 Dec 2020 02:24:54 +1100 (AEDT) Received: from localhost ([::1]:53822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krN3M-0005jY-1V for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2020 10:24:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRR-0005G4-3X for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:41 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRO-00080x-DE for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:40 -0500 Received: by mail-wr1-x430.google.com with SMTP id d26so11283517wrb.12 for ; Mon, 21 Dec 2020 06:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3dnpjFrRZ3Pps/Dhvh5pKZJV/WyB1MHI0RknEGiEb1k=; b=bOGe03f61jBDEzK2juPygpVhKgLtlH7P8Y49LYTOi94/nVZKJzXRH5Jm4J5eh2AxvM 20AM0/N8Ux64Bznas/WhEPkkivvTJJvd8GChEiVEeOoyBYb5oqdniVtQm/tqH1bD7zeu RpNdeblFsQuUmusruRiXfXBJ4wR0Y/OMU2KXCQ3eEG71W6TgiY0KXvy78GCPAfTo3Bgr 91tR68lMg4fPvDF/pKoTebRWYsR+5hflvVLh+C1Tr9kM7QpA9MgHx+23nEzfmIvvRAeX S4f7pmYcjK3jyGyf92Hr1PdhIP/c5STEW5zP6aE0jBUU5yCAAncY6QvPWntq1YZZje+N sscQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3dnpjFrRZ3Pps/Dhvh5pKZJV/WyB1MHI0RknEGiEb1k=; b=M6vs+EmdYVZdzkTkgAHwKgCvU6QBHSWVrdUHU/1hTLKbpgA/k5TQKxFDzRTE8V5wWJ 65u1xF6hOrDODQMdNcdUKA68B626b0b6kCHFmAL6r9gGf7ECkx7dCr4xqPeQtCXL6pGx 596Dhy2cbmGHNJbBR+XTvAreLxSQDtlFnMYrx/YJ39pxbp49j9b/Vln5QBJ23eYr/wOW c8Szhp7/HKP8rawUmQkKw/lR38LzbfylAG7XS/qfBkEKYlOvlZYCd7HQfUKL+xl0iNN/ wFbddLIX93D8LPbqIktkAzsnU0XHQNTp2j7ugfu7AYT+/DXb2pad7pz60tRkxj8oPLDQ jt8A== X-Gm-Message-State: AOAM532UtwvIF8s0bf5qY5znfs0Tsw+KzqopoKXrPySl3bmt6vY1qzf9 hayB6ihx6iU9XBW9rXR4tp74xE03+X0= X-Google-Smtp-Source: ABdhPJwhrkTO07pcJmIsb8QOH6D8Jt+MMBFaSIemA5pzEi+g5V63NI/LUFsMmjsTwAKEszkM1Xixeg== X-Received: by 2002:adf:8290:: with SMTP id 16mr18484839wrc.27.1608561937204; Mon, 21 Dec 2020 06:45:37 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 55/55] win32: drop fd registration to the main-loop on setting non-block Date: Mon, 21 Dec 2020 15:44:47 +0100 Message-Id: <20201221144447.26161-56-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Low-level fd users from QEMU use aio_set_fd_handler(), which handles event registration with the main loop; qemu_fd_register() is only needed together with the main loop's poll notifiers, of which SLIRP is the only user. This removes a dependency from oslib-win32.c to main-loop.c. Suggested-by: Paolo Bonzini Signed-off-by: Marc-André Lureau Message-Id: <20201218135712.674094-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- util/oslib-win32.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 23a7c7320b..01787df74c 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -221,7 +221,6 @@ int qemu_try_set_nonblock(int fd) if (ioctlsocket(fd, FIONBIO, &opt) != NO_ERROR) { return -socket_error(); } - qemu_fd_register(fd); return 0; }