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: 346415 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4514252jai; Mon, 21 Dec 2020 06:45:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC7Jo0eA2tXoyv+9zSVp4em853Uyw9i13HMAiZJsZ0bXugnPkBhXtQGP2mNWGU7LF7amiM X-Received: by 2002:a25:bd4:: with SMTP id 203mr16172871ybl.311.1608561943318; Mon, 21 Dec 2020 06:45:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608561943; cv=none; d=google.com; s=arc-20160816; b=uHJ0opKhRuiFlyu6jWDtN4Lq2mtKIvM0eNmB5ouH5HxXOe5GEp2Lm92Y4Y210lUPEt kc3J1ndAv8YDYEdXWQHPsjrQolXjmJSBO/3u7VmSKJ8IHyyi46OsZvScv3AzsldsjmYk uuN905mNoFF30p8ESSkrUfwJhH6c6KdwpHdSXiyJCrLF+CUhQYFQgRlUK8A49ItQpTrW Wj7xEgKSI6wSVZjGH87FmmGTbc3vAAjNP1maGSkM150EX2W9EAyFZIfXdmdCouD6/QLe c1gysA/3ACKCHHzMgpS9UZuNhf/i/TpGgMYhtOZbwCOQSuP2V6YfLg/inxmtSZkYybpO 33fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Dlm6bXWaBbuv+Ol2HceMiiYjxW7VEJXnt7yRt9Kk1sI=; b=zQN09drhM7Hs7d6og5HpNUy/GZN2NM2zO/c0gjmXzSNRDdxZaHX3V3RbL8kblMlnEt 6dNP1trEJcFXuclfp+LhQBjqV14oWkzhWpbqSy8tWQExDPDdkaeyn2OBCq7h0c0Ij82r 4F606aCtuo4+XZ4L5/BJvY24VSLnsPyWKxiMxn/o41R1Pn08ZTMoXPIASB8xLF2kapHX ReNU/P5fPER9u7FPSkx7ymOUlAXN3XjI5Q2vfgK0yQFzG+DPoMCcPwl+KIein5GwkD+Q wsWsMTieUOSDlmhnagzsVKhO98IAZHIRFL1158c2Brn74Vot5KGmSXSiv+tz2IJre2zP Ku2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tMAz42rp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g18si18717501ybe.157.2020.12.21.06.45.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:45:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tMAz42rp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMRS-0004hD-PZ for patch@linaro.org; Mon, 21 Dec 2020 09:45:42 -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-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+patch=linaro.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(-) -- 2.29.2 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: 346416 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4514272jai; Mon, 21 Dec 2020 06:45:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJysPYAjJROSzYI02M/9L02xlMw8JiSKqT4jIm/7/s2JPSJ9O67tJ3AgjqpgoDm00JN5H1P5 X-Received: by 2002:a25:bc07:: with SMTP id i7mr22132742ybh.39.1608561945683; Mon, 21 Dec 2020 06:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608561945; cv=none; d=google.com; s=arc-20160816; b=0h6X/uSNEuEyt9n/0DeURjG3ONrKvRTVAdYV4SIJ6q/rIpA/5f3yX1z2ixbOQEMCYJ xM8uNjMzxJ+hRk9Tr4Lp0fC4pg498q4FR8T+PEaJxPbvqhdeMTqCoZyVC6maRm+FRoEn snx55t/CMyZHLq1myhxhS+Tl51JTeAXxjiq0BUhK81ax0ukcYHGlPE8hiLWVEyUoKBhZ ot9GujQzS6dKVhsyXFlSGY7+Gk+mEVCP6dptEV7FaqK6cUMMNB0xJrIf4UdcQpouibxw GDzeiTS9E4b0F7BVXvbpymXn/WqOgtuTQAaypkSNnLFn8RVBAfPW7OSPovyE6HjLo+N2 PmVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TUIOh4Q+WvEg2+2buyUeFeWSyxEP3rr0TYbdSrhdRw4=; b=Ix+uMbto8JG4TKRkhs74XPXSNNjcdt18ubn98kjWcYBwW/iY9l8cegfWHomjDhMrrt TE/pkMFAIsteBhB0YSbd6qWf1FL+BcSqA8wTvMAxFkwBPB8at+NgeJ4MncnLtw5dbInp tPZs/Eb69tPylWcFIWOXaLTDHWmNA8Tnc1Yeg0g+kMcue78PpwEYjmPx3L46mpXgm8xm Nav2/vWj+/j1K3Ajz5T1pn1r2zpWWhX38sR2wwyrq6fo0v0iysMguuUIzA4LFaE1xG+0 YQE7qInM+7Tmxs0Z0+vHrZQXpmAPGtVmd7FIbEvAd0OoB1D9Dc+OrAjJIbl1G01Q8Ogh byWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BECO+yOG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h4si16238163ybk.286.2020.12.21.06.45.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:45:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BECO+yOG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMRU-0004j9-Ps for patch@linaro.org; Mon, 21 Dec 2020 09:45:44 -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-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+patch=linaro.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(-) -- 2.29.2 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: 346419 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4518379jai; Mon, 21 Dec 2020 06:51:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfoPSM7XHJIY/o4tS1zlcF4ZzDfX9sm+TFIHcR8Ggie5lH9yvSuQMwznt1Hz3iKapXnWmg X-Received: by 2002:a25:ef0c:: with SMTP id g12mr22902960ybd.26.1608562304545; Mon, 21 Dec 2020 06:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608562304; cv=none; d=google.com; s=arc-20160816; b=tSH61FYvtLGvLzXVt7T0loMmmxq+N0fjuLSwIwXY167mKCx+LLbcL+D4HCgNLikMqU E5NOSH/aAEFoaUfCPHpARzkqZWqhglBdOtdd62bevGIyFyGYfL+8mZ2kGN4kj3FtvaHo bZVBLt0gEaE6VA45O/9xOHdim5gr8RSYbf56npd60vbQwSjT7AFbK4ArJnqLKfX73AVU f4ekJGlAN03a+RpMvdzq0BUNyDJHgek6f9Zl96V0gKivWzU20RNPQWzmZk+xLHI2I+4f ZMrnAGyHt+kWS7bdS9kybxbIUb2DLVDbtao2e0BecJgSXrR/rNdPZPg9j9Aihjso1eQ2 gWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=vIdRuqNwJxUCNTtBWW3hlZRf3HEfcDV9b7k9felS6Q0=; b=PHFI6IvFCiszSwft4S0Y3ZDF6SP010YFE2FqKAuV2qaagtPQCbc+vcELIBPY2ZNA/x Paok4PeSULn2D3INdLVhJBwsaFAsexLVVyyBOZ1odawctQTLhNPvh+WlUcnnefDdU6ei FV+f0kUtBu0ycmZc5YuH9KlvkU5SeYYScYcQTW2dl+nJXSJ0Sff+O2MJ6Q/bMI6Pm1IO 6NuEPhomJmX5O19pOHeydcasQWkJPhqCSSub68bTJEeY4GdQRnzlRjCjQFiBG7l6qiWJ yu/DtF8P0CqxD1Gvk60kjNeDmyrwswZz/0MSxuOCtB4ux9Sz4ne5Cd4s2LTkOs5Y1o1D Vzfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sn20pyxP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t4si14902431ybp.189.2020.12.21.06.51.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:51:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sn20pyxP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:56824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMXH-0003k0-Tt for patch@linaro.org; Mon, 21 Dec 2020 09:51:43 -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-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+patch=linaro.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(-) -- 2.29.2 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: 346417 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4514772jai; Mon, 21 Dec 2020 06:46:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJz70l+pX+Ak/Bwy7xqcclYVW8d0/ySdyFqZ0bFAwTJBXztg0/blurjY3U4LS3OjLnAo4GvT X-Received: by 2002:a25:2643:: with SMTP id m64mr23661398ybm.221.1608561989612; Mon, 21 Dec 2020 06:46:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608561989; cv=none; d=google.com; s=arc-20160816; b=y/Ezp2//pYJUYYXxPoK7JZJ327bCeqhDq+IQcpSCsqWG56vRzXg6gzP9ecUBhAGTps JXcrCAaqp0si25z90/kdFSz3IFGcqsRMeqjZL+PKv/w9sVB4iyxhqtjy3/ejuHucU7k9 3+/v0SiMxH8hp4o6tkgpugVuwu2GLb9w4ARbAfzraeM+RxebG1FSnsRZJLZAH3I5Jn+8 ugh2yA9CZ1dTHxHd28m9/6Ghvz0mDgnTBTze6behg9hR8AVVZ5ub6oiRutppr+NdMCkq T53TqAk+xUAfIPWNyQ8rSmhs1ZzOH0UwSS8GyFCAJPyF+p+FTxi3jTfhprFDk6sZH+HY FqHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=r5CLA88dOWs1evquoz1Iig9Crq4gylWOWQgpaUYxU3E=; b=vuS8hv15XVjEAJSFKCLNSJsQ6MeDMguSrYRbAEHSxBd1kAM4LX1k+MepjPpJMdFjPG PxCO99MzL/nFx3vUznnB4NX00MbICUTusnNsBMXS8lKClPmTVM3K16Kd21W+XRPe5cyz UG4eQlWEsvupc7yiUonAVdfs/G+vUZKLc1lGkOoa+sJ80uDgvgNkVjkfnfLwlbZm28cf 0gIlY/EsO3SiFDjtl/MrjOKfLWy2Rx3huVLSaFBdKjcUMWzhCLWkrWULlHGU5GA0hPx5 zjB4ZTt7+zIyV+hWQKUZ/qT8dDUNRVpYiG/KqNzWx/xJUte1fjaLhO5rXvLp2HnJ0FmZ grpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WgobuO1m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 128si14674618ybd.172.2020.12.21.06.46.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:46:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WgobuO1m; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:39960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMSD-0004jB-2R for patch@linaro.org; Mon, 21 Dec 2020 09:46:29 -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-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+patch=linaro.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(+) -- 2.29.2 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: 346418 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4516852jai; Mon, 21 Dec 2020 06:49:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlPRwWxsGxXKMDDHDF7up0i/ZKwVekx43Utsi9kHgY2SEshWIzhLZYCjfe+IKHc+sgnTBa X-Received: by 2002:a25:1e42:: with SMTP id e63mr11460358ybe.270.1608562168303; Mon, 21 Dec 2020 06:49:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608562168; cv=none; d=google.com; s=arc-20160816; b=CxxNeef7KW13mCUY1KpLn8ZSRtTjcx8wkzToDOCDysD6RQ+zbk4ew4xSQG5rXO0Yvj aA1ksL2MWR6KMoPdz6kyWU2spjF/Sljxvk2tzr6GLZavwbSlo/gf9yAryWcScsljYwdk +NwdvwSdL3MJYZ8Yl1G5I0n7xwSzVPqP8yHf1A6NeyEh91SH9KFZQcRqOXlBGgbslX8n QkyFzCPGIUlM6TXMJjcdtEqBwl9EnbjfbKdhNbcDfErVccF9tvUV0F15H9IQKwslZkzt I4cInBKcD6aFal1H5PIloa0v/OSequRfSNkSfK3teVQt+g42XFLErfVWKezZ3Q5jvErQ H5Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=YGnuMthuXcsH6OY9HMnN1qAZ8S8XpiRe9F4Rv2hYwmo=; b=cYzAtVaUV5LbAffjIa81brQoClcoZHv6qwa7dELDPItWUgpWyNWKrM9SGxequf/mA4 pEFsZxN7s4yCZtNFIME5rQhv9VvMxIXCEKoQhGU6bAxSYFhyHSZred0QnbQz2Uub5if7 j9xiNoYbw+Q5TaDSozxN/Al+yjr5yTGC1H7MRip+6PcZfWi1uhKgexLoZPOG2LJtYG8i nF8fnjxCiAwtknHZb8hv+f7dSpdjU/c7SJ5HZ61jm+bvgNirWnusLIBUfciHyMg2OsJs tvGyLo87xhcOb3PWEjDdbZ46CG0RtAY6Jl6QkZuL7RH0m65kA7A/uWQsJPzosRYyuc6O MGUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=iKYJoprO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n192si16591429ybg.169.2020.12.21.06.49.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:49:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=iKYJoprO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:49874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMV5-0000lt-Px for patch@linaro.org; Mon, 21 Dec 2020 09:49:27 -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-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+patch=linaro.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(-) -- 2.29.2 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: 346420 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4519019jai; Mon, 21 Dec 2020 06:52:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDnSSJ1Rad8UrTLcQScu9Sc53ODKL2ZISU/Gq5JIKO6mIJInJPjTI7rtOgpP5itP0+tY4E X-Received: by 2002:a25:f20a:: with SMTP id i10mr22762902ybe.37.1608562364910; Mon, 21 Dec 2020 06:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608562364; cv=none; d=google.com; s=arc-20160816; b=Zv15RRvfQVTuo7GvQbQCqwADDH3uiBhtVtuBbM6s+cABjTPhl6e3C/lTLM4YQA778n 09myA35bpBeYCG14PWgrvTTJzeEnuOI5hW2G40wTg/KLngnyfCpUpEnm7BCvx3LIpgRs Gt/YKSw1ucif1dKwZAaw2ovT1X/v3E45QDvg5ZZ0ZOshh9b1UwQLrgnB3D2sNNUSKZ9H BHJS8+0l+AaRz/8vnDAfMi0g85QN0J0wFIRUxQGahP7GhlVC3MVk+2zXPTQLz5eu8QOt EU8jut7noXk2XvX1mjY6YIo5e5bJmjg0LGNT/GmIqfIKWx26EbYs/bax3cF1tHMHy7D2 kODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TXSA6eUd0by8kp0ro6t2CSTlJGcK5halbz63a1xMae0=; b=SHgLwHQ4jXQlHpcZuoVTrDsj5/ZB7QwaoTUCvppPkArrnt+tXRsohgahHXMaVcdUAt ZpHCiEsnlVPiL45KQlHbgPN3OO0iXbHcpddBus3Mu7VxX16Fh+3MaY1JkhsD15BNZy9b fQm2AiTvrALhE3JbkEqNAhAMw75KUVOuiWbZLA2arG8ywhBi4Q0mZpJaBuBNK4g1Q3se vDgy4zfKlW0SEsNQGJZC7JfaQMd1EXcjoLjLIy38XWMWeY0wJwLESvDLAhrbjYp2adU7 ajF3+A1ewQtBWYBw/VtGMwy99U84zu4H0pIyAQ96wTawr49U600Lo3kpafmyszoMCwiO sV/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IBEifJWa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c10si4327149ybr.110.2020.12.21.06.52.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:52:44 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IBEifJWa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:58366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMYG-0004NO-Bl for patch@linaro.org; Mon, 21 Dec 2020 09:52:44 -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-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+patch=linaro.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(+) -- 2.29.2 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: 346421 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4521051jai; Mon, 21 Dec 2020 06:55:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPf81o28uYUXDpFWrQoHtEW4A/04oIHk9pFOvFzPRu0/uAZC5i+m++o9AKlpbr8GXCuz3D X-Received: by 2002:a25:ce47:: with SMTP id x68mr22315220ybe.139.1608562537699; Mon, 21 Dec 2020 06:55:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608562537; cv=none; d=google.com; s=arc-20160816; b=CJDQRiRq1HiBC9ttvI2mFlXcM+chqYoB3xQbdLqjUZw9fSRt+/kZ5m4w1vsMZsF+vk A94goWQ2B2fgfj0tGWi9xn3xP30oHXxe6CuATicR9tbkI13Oy7peAJZInfQVmcj3adeD mTiTy68P1MmoWZx1fyMwOUfzeb33o2YzfKiwJ7Gbljy0YBIsCmmnXvva2d4pZST4DC5C Eg/nid+OODJI0V0qdssgRQRVUe73/dhtTtOsfrhARGJgDLuO7IbVS3xdOCD3SAR5WGOO +kiaZVFFsZUPb4ZPQJPbfq0tkjikX1ndXptBg3fJQ4GQdNjzSWSA8cFlfCNxzE2mb3Aw KVrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=joAl+PLtHiQUiU+Ypj043BdhAqkjCAPS2HAV23WoUs4=; b=EMncE/L437Q+eBogbC7vN/dlUnoV/8dTc8+N0QKdS9TSGYxU1zswPdwHu1UqvU8LlI zpveoqdclu4iZgfk+BkY99VgXi5DYphoDBOoUkiSZDwN32edbZwbakbLv/Umb4iyImf1 9dy6kjz3SCVs5hQGQach4aUZ2xffcsUDkI3s/Ar7IZENPYvNENXn94RRZNLAGq7g9IN8 kNWOMBpLIUwoPo146T0t0Fn+k1gv4GHCyEaZgdwwrIM0prMUdpXrkuLK4Po+svJyEGoJ QBzcyF4INC6kTY1FVUeQGuELRTa8G1Pk2NJgOF3M39pXW1P+SXjXV8ttXrx+0J25t1iE ZHrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Z16ZXaTw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u24si19542352ybd.456.2020.12.21.06.55.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 06:55:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Z16ZXaTw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:37134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMb3-0007JN-5g for patch@linaro.org; Mon, 21 Dec 2020 09:55:37 -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-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_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.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(-) -- 2.29.2 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: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: 346422 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4529615jai; Mon, 21 Dec 2020 07:05:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaFQECDakhiwVFajUae4j1P4dGt+BK3buytzsGCNGJFkL9N4oQSM/oXprJ/qCfDN078gQH X-Received: by 2002:a25:e03:: with SMTP id 3mr22730037ybo.414.1608563150660; Mon, 21 Dec 2020 07:05:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608563150; cv=none; d=google.com; s=arc-20160816; b=zWmSbYdz7qVlnE9lgBwWWuU7jUmOeMSEtyTtIDXHR1i6n033sG96tTeHdd+CFTKBuh MGxkoDBo1AkFtR2XKPT7lGsV7zSVVxQqb6owPKHLUwuACZDdmXzncGL7kRZmwb5foM6G 5Qdfc/EfinJFA8vmQp2S8m8K+c743GtWGRGUVQ0+wyJY/qyJKz6KMDVJGJTtMlt9s1Oo g4i1+TRRrsc8IhYnQDAzNUlqxiULAT4MXaqz6Tk/5PwhvbZdrc1eogu5VS5jZ43sCS8x 1+0epMx9GnKdsRvAfaKUWJAECGNsb7KiCYiOSNmePSnWl3Uhwe+eVhXO82ALI2xype7J g5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jM3hkD4CvKdZOABArp0NAjoE5fJXpKMpDEFZ8ZRfbww=; b=Z2y+pW0N53yCUqe/a8/XNK/Sg5lbdz9EJ9+YM6RO44VXb+axBgh/VF2PIjdJjBfBxq wE10trfhalZjJ2Fn/gaUe2O2hZWu1KCGGBNhPMn6iVJJzamwIEQKoT9t80Kn80RcRlPU S1BE/DbVJ64AIzXPvkMoV2fVdK3Dap2/rRMc8MQV/PFjMZoE8jADNuTk0Eivv3ThXfUT NkRy3wEQSuAPMrGg97FjycUeuHqyD4gl7y0pKHGh5/J4kIhzIijHR7NBIk/I3VgwcHlv Zh0U4hv83ajdhPRurX1tMGl1fnOXzjvUUemrxQBEvoEZPh9M1f1GVaDNiwMonGc8yqRa lHwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=p8aFyLKR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r4si16687161ybb.438.2020.12.21.07.05.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 07:05:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=p8aFyLKR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:38728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMkw-00049B-2O for patch@linaro.org; Mon, 21 Dec 2020 10:05:50 -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-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+patch=linaro.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(-) -- 2.29.2 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: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: 346423 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4531961jai; Mon, 21 Dec 2020 07:08:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJymILe/WdjchSiPwubtv63gjm3PvT0L5ZsX9PbGM6JLMdyrSTyRFLFEWRlEZ00EfGYa/uxK X-Received: by 2002:a25:d7c3:: with SMTP id o186mr21823777ybg.488.1608563303123; Mon, 21 Dec 2020 07:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608563303; cv=none; d=google.com; s=arc-20160816; b=WYpK5FSfPtp8b+yiOMWzJcjhXYMUnXlKf8wvMTq28jopFXH4e14Gs8siC1W8WxP/P0 spLTbvkNZGJ5uY6zdt9TAuMymeJCIsMu5D/JtRZrtTSjQHIb8USVVKvsHQu0Ngk7p+/6 8mHAo9yNm9oDkprmkNX0VTGIlEJlvYaZzgU7WyQiw721luAl8+2AY7k1SHpHF3yW5ary kltHwwgJXgphuUvFsoh4YBWnBVb3ck58jFWzH89s8tz/1Vkh7xtfxKJDXVdIJODNPUaB tswqr5LEmHl7HOCHbrE9vUUUb7jy2T25R6ID0HaraxkESuHcAvfNorTnhJHOq5iv9Ov0 CCiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8AQclSjbXSyXo4pzew2rKKN0nwXaQEd9pNOTA41enWQ=; b=U/nTflIotisHD9MgAEKypaSCmjOOJSyTZEdy5e28KiV64CZIGB4+SHJeSAxNF7Nn6V aFnYcJgiXnHHh/c6bvUhlXYv321RpesYnwZ+slEmdXoff7WbnAESM43nDIcvISeH47OQ /YykdxHjrcbNA+WQ0v8A2sxzrxYhHrQ3ywgd7TVhKsQHzLinIobjDYQXTCvmMxRhx1xm zq872v3rdtF6MvnGy4h8/TpZL8Zmq61aDoP02yGLeEx/VAxTi4NWujSN4JPbK86AvR62 9fPhG+M2674BlO6qnpXYKvMpEseo80+UUKx2ySf9lCTYVQzQr2rOhQNadAcrd6K3aTS1 XbMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=rkrDrbFD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v42si16213983ybi.6.2020.12.21.07.08.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 07:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=rkrDrbFD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:47024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krMnO-0007lg-Go for patch@linaro.org; Mon, 21 Dec 2020 10:08:22 -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-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+patch=linaro.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 -- 2.29.2 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'))