From patchwork Tue Aug 1 21:54:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708756 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575394wrw; Tue, 1 Aug 2023 14:56:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFAWGW5S6I+EMaVtqWEZaQnv1FxpcpOzshwi2KZ0fOlnIZm5ouTjK4iceLEzeFF5dEbLJtG X-Received: by 2002:ac8:7c4d:0:b0:405:3806:4444 with SMTP id o13-20020ac87c4d000000b0040538064444mr19370627qtv.40.1690926992633; Tue, 01 Aug 2023 14:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926992; cv=none; d=google.com; s=arc-20160816; b=za7fDtSouCqL/iG1CBXY0ZUeilTvSPRJKUYGEXOLupkusoSsz02sjrBiXalvU4Tuw9 qmMa2Di8ES9TuMwZW4QLliF4nhqSCcHEFi0SkNor3DEFErdlbiLtiPLFNrIYpdBSgyAk NTFRM49yW0hY2uIfCufeVSy7dh1teYsDAo3DCtkvwdQA+1AXjknGA81k5SdrtIohyXBS dwKOrw3EqZEVi9RWPpbxjoNWjoUt6gbf8mdRblINqFOShUV9orPRxdDbHkX/cYZV4Sao zTBRNvKvc7I4OhfpobgmG2KpaKJ7mcmyyLO8KuYm5VOFS/2uRqjJqTvFR55ItgIueA9F RvLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=M3NPngvFxJx9HpwzOZ730KZECLvyMyLnhk8cJRf/tlQ=; fh=DDMVslwBuY3s0nfe5aVPvdWqk8Uk9pXilLas2gi731U=; b=u5xH8A47uCN3YIEHh9MbHFujDTlws1Uxe1KuJDUVpIa5Wy7HP8hzMHvs6chBvAVkXI IXrYfYfn5N7HeM3sqA8HroE66n2xcSq5OeDAwacjS/L9Q7PeGdVp7+V9/u/dNKtfXRiJ Bef7iLTm81vP9fA4E8fHZu8K48UrU/HOk7wXDI5eTaxLKnL8o5CQ6NltvHJtksyqgcxa gVmQv47OgNvMs48lg73XaYRmaCcCbSt1/aUIUUPgY4EQpyHPlVaWoG0uAf54SzqIZHiu ASzCU3OZ9i5sEB86w6Simag2dPTjadld+Azk6cChuFiitb8EVVXD6wP4mrmVqFwl3otP S6GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=apryb7d7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x2-20020a05622a000200b00403b2b69cb5si7885372qtw.189.2023.08.01.14.56.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:32 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=apryb7d7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKG-0003q1-6b; Tue, 01 Aug 2023 17:54:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKE-0003o7-7z for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:42 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKB-0004lM-4M for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:41 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so6271986f8f.1 for ; Tue, 01 Aug 2023 14:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926871; x=1691531671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M3NPngvFxJx9HpwzOZ730KZECLvyMyLnhk8cJRf/tlQ=; b=apryb7d7TxDShJHIY+cCaXy6JQwZXoBmrkwFMRLeIVv5FGc/Z7vuDLQyoRZHJfYzwU mG1ZRXx7wKOr6W08Qau6PZfxMnyys0O5lQbTfRfJBlipPuo0Kq4af6HECNSbRTlH0A0F y1KfYOw+ne3DcnWcImcZkglzs3XFoQ6WNA5aq2GajzovthldW9QXCF5Fj3V5u/WCND0a 3Lxirv69YrJ58DjnY9SP3g2Opw/7KXbxvLjqY+rQ77Ob5+q8ZPOpIkxmyQGo+9hp1WHU ZIIH8fVbLcQQxgpJa7Wc8C4xRXuBPRYHXedfakq904pvRFLsMCZ1TDzkmV+Vj8BW+/Gd 9f1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926871; x=1691531671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M3NPngvFxJx9HpwzOZ730KZECLvyMyLnhk8cJRf/tlQ=; b=U4quWa171+w69vI+zoDY3WZ/N9NKhivhjVQy4soMu66U3792S3HAM+uilGpfLCVmhE Uqww47RNZD+wRnGNLbhXQTE/4Al/cw3Bp9QxbdDLjNWU/S3Q4wwC1Ypaxq7XhDra4Exn 2M/k3oh/8QlWzMoALSjya1hWIo+PtAXtZZ8h3+rq0gDGQ8kpaRKSAspv/3lUUr4ti/f0 rMUoOT1ajgOe1xAOWE+4vQimuQlDWLcaJSMjxs0DMfhw3h8pGr6Z3BHlLQ+lIWPOwISc /GUTiQI3m7EkqNU6fe5Bs9NibsJkwISg5QelsUAldhCqWjYQ/w4jtVQrvmY5QUV65XCd z2cQ== X-Gm-Message-State: ABy/qLZkO+0oyupeyQ/0rIDjm8iuDurzIrMvyjcgiH4+2F/nOnpR1YNv hKfRLzeQ5YxW3NgdiM/+uzunFJPz4FyaWolougw= X-Received: by 2002:adf:f204:0:b0:314:12c:4322 with SMTP id p4-20020adff204000000b00314012c4322mr3323325wro.4.1690926871535; Tue, 01 Aug 2023 14:54:31 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id m12-20020adff38c000000b00313f031876esm17181934wro.43.2023.08.01.14.54.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:54:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, David Woodhouse , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 01/10] hw/xen: fix off-by-one in xen_evtchn_set_gsi() Date: Tue, 1 Aug 2023 23:54:12 +0200 Message-Id: <20230801215421.60133-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: David Woodhouse Coverity points out (CID 1508128) a bounds checking error. We need to check for gsi >= IOAPIC_NUM_PINS, not just greater-than. Also fix up an assert() that has the same problem, that Coverity didn't see. Fixes: 4f81baa33ed6 ("hw/xen: Support GSI mapping to PIRQ") Signed-off-by: David Woodhouse Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230801175747.145906-2-dwmw2@infradead.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/xen_evtchn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index 3d810dbd59..0e9c108614 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -1587,7 +1587,7 @@ static int allocate_pirq(XenEvtchnState *s, int type, int gsi) found: pirq_inuse_word(s, pirq) |= pirq_inuse_bit(pirq); if (gsi >= 0) { - assert(gsi <= IOAPIC_NUM_PINS); + assert(gsi < IOAPIC_NUM_PINS); s->gsi_pirq[gsi] = pirq; } s->pirq[pirq].gsi = gsi; @@ -1601,7 +1601,7 @@ bool xen_evtchn_set_gsi(int gsi, int level) assert(qemu_mutex_iothread_locked()); - if (!s || gsi < 0 || gsi > IOAPIC_NUM_PINS) { + if (!s || gsi < 0 || gsi >= IOAPIC_NUM_PINS) { return false; } From patchwork Tue Aug 1 21:54:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708760 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575464wrw; Tue, 1 Aug 2023 14:56:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEoIxEqLbMekk8q/r3Q2qr7UzRn7JgaMg1Ls82bYxZkgMFQ82WnirQ1M66yanuyIGIiF2BN X-Received: by 2002:ac8:4e95:0:b0:40f:d27a:4367 with SMTP id 21-20020ac84e95000000b0040fd27a4367mr4802332qtp.58.1690927007421; Tue, 01 Aug 2023 14:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690927007; cv=none; d=google.com; s=arc-20160816; b=YIYfL7dpUSL3ShGsh4ED7O0QFTq4oGK8o/HtOqhoMAjQiG4YGVdY8xXAhR84mr1sFI yJzxuXupCPnwN9AsFBmkfmkfgY8Ha7RKMDeGFdHwXfMm1Bs/FQSPqLCYnS/yLUrIG28e eWmUtudoKbzXA9Az159IuAm40MFdlQEo6UdrnL3t6ChEBrHDC79f7Xur6Gd619QzCR8D UUJzxG5MPIJaBH4Hg2B8CUJn91sM3riUiQx3pveLbjjou+xmERO+ncCCedlesY3a5x85 KC+OkBwhs8p+rjB5OCY0L6dDBEHl1Mpbdnhs30r2VV6jgdIwjrDuCURFaZA0KAocrc+f is7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=tug+CECb4KNzufWe9Ppj5URciL2axuWNKJ5vUVPsbBc=; fh=PWUNcOiwsmJ8+T8xPP0M9o6ssEhpUFLiCHFrXcUp5hw=; b=fKD5/MdDL3qkDetBi/SKtrcKPqZCmMkCqO9xFgVKz1zjFbQLRPAs2frXoeH7X+Ety5 9i/ZEWNU9xCI2vQMXU1vjgSF1HMUJOZ80P8roEs38I1pbP6pAic+WTGxKXgIWFkHiLvM hGHH71cW/HBsPEpHjhtQRy8LmXJrrTkNDr+rPZ6fdTKh7w54eXUGzqH+RJl6w2WBLlt9 YuNqLsFKKco651WMIZpbrFOd9ZoemT01QxN+PMuqFGsrYxpA9mrdzDQ4UFn7lgACdNqC +v3Vf1BE5AvXOX9JxtUF0Lh4mveMa1ssR7mUjvh3dBe4WndLDSehXE1Dguo42662kaQA IfTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ylerMqvB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w8-20020ac857c8000000b00403a4483ec6si7937029qta.757.2023.08.01.14.56.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:47 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=ylerMqvB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKH-0003rL-RG; Tue, 01 Aug 2023 17:54:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKF-0003pO-Ou for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:43 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKC-0004lq-Hu for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:42 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe1b00fce2so8798628e87.3 for ; Tue, 01 Aug 2023 14:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926878; x=1691531678; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tug+CECb4KNzufWe9Ppj5URciL2axuWNKJ5vUVPsbBc=; b=ylerMqvBqypNgpbhaMDxfmwF4Oovx7GZVkkI5MSrWZpB8DT38C8V550zY/fPIUXzES An27tPi/XmjezkwXX9CSj3w/c/TXW1UEZYMfB8I9B+9p4p6jpCkapocfIECy836Pp8mK WGa5r3/+s3QflqRq1D5oltytBVhxIhcwxx9HgOMRI2DujTfkOkoTAQUb+jPt+jwXSXCG R2/OGTVFWk6CiUaZkNR10SRT2BZUka5sw2MyvWKhE21Vg2VOZcQujquF5PH6S2yS7W23 pX1tp69UOyv9wJMTEUJPUHNwtMhC8K5CgFK13zaY+WUn48EzPWQBrNHMAYQd6c76aKfS v7aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926878; x=1691531678; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tug+CECb4KNzufWe9Ppj5URciL2axuWNKJ5vUVPsbBc=; b=ftezxlr6cA/yLY2tq5jfXPObp40ougbJXwBXZObsVuFQ7urlaVt/KtSHucPG72PoVF so/H3b+QEgWCvxvgKOcv8hTEe5Rp7c0TB3SWDURO6qGCCnY51o6XJOqju11lk56J+0Es P93c03Uj7Zt3jbUhG1cUsNRVg1yemBsNQ9b8rhQeEkP0SuD8t/1t0cB309IPEDAOSVUu 8RJtNrarMDvJxGY8Ty79DP+CQKsL5ZhPoDiLxOn/CVxzzN10HVi/gC+pmiTM0imjLpOL As1PECHjfeL5QweEZCDmmm5n0wjkLYO3m59BA9Fwrnpzei2MU76sLY0tUPeqX3F0ULBE l9XA== X-Gm-Message-State: ABy/qLY+xFdnV6kkfqkqd8xYnu2PK3xJk7I5NUyWZ5zIuy87OglQAISX 0DXdW8jqvUx3z713Rcf3Ai06LN8uBO8PLH/rdQk= X-Received: by 2002:a05:6512:3d0c:b0:4fb:73ce:8e7d with SMTP id d12-20020a0565123d0c00b004fb73ce8e7dmr4581447lfv.15.1690926877903; Tue, 01 Aug 2023 14:54:37 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id x4-20020a1c7c04000000b003fc06169abdsm25112wmc.2.2023.08.01.14.54.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:54:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, David Woodhouse , Paul Durrant , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/10] i386/xen: consistent locking around Xen singleshot timers Date: Tue, 1 Aug 2023 23:54:13 +0200 Message-Id: <20230801215421.60133-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: David Woodhouse Coverity points out (CID 1507534, 1507968) that we sometimes access env->xen_singleshot_timer_ns under the protection of env->xen_timers_lock and sometimes not. This isn't always an issue. There are two modes for the timers; if the kernel supports the EVTCHN_SEND capability then it handles all the timer hypercalls and delivery internally, and all we use the field for is to get/set the timer as part of the vCPU state via an ioctl(). If the kernel doesn't have that support, then we do all the emulation within qemu, and *those* are the code paths where we actually care about the locking. But it doesn't hurt to be a little bit more consistent and avoid having to explain *why* it's OK. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Message-Id: <20230801175747.145906-3-dwmw2@infradead.org> Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/xen-emu.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index d7c7eb8d9c..a8146115f0 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -43,6 +43,7 @@ static void xen_vcpu_singleshot_timer_event(void *opaque); static void xen_vcpu_periodic_timer_event(void *opaque); +static int vcpuop_stop_singleshot_timer(CPUState *cs); #ifdef TARGET_X86_64 #define hypercall_compat32(longmode) (!(longmode)) @@ -466,6 +467,7 @@ void kvm_xen_inject_vcpu_callback_vector(uint32_t vcpu_id, int type) } } +/* Must always be called with xen_timers_lock held */ static int kvm_xen_set_vcpu_timer(CPUState *cs) { X86CPU *cpu = X86_CPU(cs); @@ -483,6 +485,7 @@ static int kvm_xen_set_vcpu_timer(CPUState *cs) static void do_set_vcpu_timer_virq(CPUState *cs, run_on_cpu_data data) { + QEMU_LOCK_GUARD(&X86_CPU(cs)->env.xen_timers_lock); kvm_xen_set_vcpu_timer(cs); } @@ -545,7 +548,6 @@ static void do_vcpu_soft_reset(CPUState *cs, run_on_cpu_data data) env->xen_vcpu_time_info_gpa = INVALID_GPA; env->xen_vcpu_runstate_gpa = INVALID_GPA; env->xen_vcpu_callback_vector = 0; - env->xen_singleshot_timer_ns = 0; memset(env->xen_virq, 0, sizeof(env->xen_virq)); set_vcpu_info(cs, INVALID_GPA); @@ -555,8 +557,13 @@ static void do_vcpu_soft_reset(CPUState *cs, run_on_cpu_data data) INVALID_GPA); if (kvm_xen_has_cap(EVTCHN_SEND)) { kvm_xen_set_vcpu_callback_vector(cs); + + QEMU_LOCK_GUARD(&X86_CPU(cs)->env.xen_timers_lock); + env->xen_singleshot_timer_ns = 0; kvm_xen_set_vcpu_timer(cs); - } + } else { + vcpuop_stop_singleshot_timer(cs); + }; } @@ -1059,6 +1066,10 @@ static int vcpuop_stop_periodic_timer(CPUState *target) return 0; } +/* + * Userspace handling of timer, for older kernels. + * Must always be called with xen_timers_lock held. + */ static int do_set_singleshot_timer(CPUState *cs, uint64_t timeout_abs, bool future, bool linux_wa) { @@ -1086,12 +1097,8 @@ static int do_set_singleshot_timer(CPUState *cs, uint64_t timeout_abs, timeout_abs = now + delta; } - qemu_mutex_lock(&env->xen_timers_lock); - timer_mod_ns(env->xen_singleshot_timer, qemu_now + delta); env->xen_singleshot_timer_ns = now + delta; - - qemu_mutex_unlock(&env->xen_timers_lock); return 0; } @@ -1115,6 +1122,7 @@ static int vcpuop_set_singleshot_timer(CPUState *cs, uint64_t arg) return -EFAULT; } + QEMU_LOCK_GUARD(&X86_CPU(cs)->env.xen_timers_lock); return do_set_singleshot_timer(cs, sst.timeout_abs_ns, !!(sst.flags & VCPU_SSHOTTMR_future), false); @@ -1141,6 +1149,7 @@ static bool kvm_xen_hcall_set_timer_op(struct kvm_xen_exit *exit, X86CPU *cpu, if (unlikely(timeout == 0)) { err = vcpuop_stop_singleshot_timer(CPU(cpu)); } else { + QEMU_LOCK_GUARD(&X86_CPU(cpu)->env.xen_timers_lock); err = do_set_singleshot_timer(CPU(cpu), timeout, false, true); } exit->u.hcall.result = err; @@ -1826,6 +1835,7 @@ int kvm_put_xen_state(CPUState *cs) * If the kernel has EVTCHN_SEND support then it handles timers too, * so the timer will be restored by kvm_xen_set_vcpu_timer() below. */ + QEMU_LOCK_GUARD(&env->xen_timers_lock); if (env->xen_singleshot_timer_ns) { ret = do_set_singleshot_timer(cs, env->xen_singleshot_timer_ns, false, false); @@ -1844,10 +1854,8 @@ int kvm_put_xen_state(CPUState *cs) } if (env->xen_virq[VIRQ_TIMER]) { - ret = kvm_xen_set_vcpu_timer(cs); - if (ret < 0) { - return ret; - } + do_set_vcpu_timer_virq(cs, + RUN_ON_CPU_HOST_INT(env->xen_virq[VIRQ_TIMER])); } return 0; } @@ -1896,6 +1904,15 @@ int kvm_get_xen_state(CPUState *cs) if (ret < 0) { return ret; } + + /* + * This locking is fairly pointless, and is here to appease Coverity. + * There is an unavoidable race condition if a different vCPU sets a + * timer for this vCPU after the value has been read out. But that's + * OK in practice because *all* the vCPUs need to be stopped before + * we set about migrating their state. + */ + QEMU_LOCK_GUARD(&X86_CPU(cs)->env.xen_timers_lock); env->xen_singleshot_timer_ns = va.u.timer.expires_ns; } From patchwork Tue Aug 1 21:54:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708759 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575437wrw; Tue, 1 Aug 2023 14:56:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFf7RciZ3rfeAuky/k15kr6CRA9keY296XZwL0MJPDDDVgIb6J2J63YkaEbWvzi2e/gvaJf X-Received: by 2002:a05:622a:3:b0:405:42e9:8a8e with SMTP id x3-20020a05622a000300b0040542e98a8emr19110113qtw.57.1690927002107; Tue, 01 Aug 2023 14:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690927002; cv=none; d=google.com; s=arc-20160816; b=NjgRklnEdw26dzb0iMso9AJGb5ZDSjLdbaBQp0v51PQFW3NxhqjkdNlzfi0M6WJfFC i5t9x0WQ7GGUetbfZwDRF3pf0N87p3lpx/WewkhzHKypPTILXb5QZGc5nnZjZsyyLk7i YJzW/3H0RKXXZd8CNIepzzVXLEmL/s6TZ3gUpgLIAbm+T2RgveMeQ/WAgZZBJM5Qivr5 WvGLlBXtFBoamSLE7uF7YF7hflPkODgVEcYcg9NjTiUT2qLXTLd6UoOOzLOjejumOp1J EqIC9dqOO0eYFc7yGHU9TvrpWB6bioxtWLkeGJ+38K4/1aqj+dIxqXicucyBq+WwpyZ/ ybLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=t+Ia2IW7W0o2NfDvv7wb0werH1oj3pCGRYKiA4thOho=; fh=PWUNcOiwsmJ8+T8xPP0M9o6ssEhpUFLiCHFrXcUp5hw=; b=L+q6KGtHyWXeWjE0Aq3ohXJu/GRWVOKfAroVhmtSg5w7JAmP4f4jxwumTz9OByS6OD di/FnfWY2K+2MZTcs/NWJeQbFvGZNbZD5Rm6udlTnr04gMa5RR/SiiHBPs/TmRnFkTMz wz5pMchxLCketGOiudvxlZU3vYZ1YeXUg7Zwc3uZctpeGYKnNwQW2M1ykDrUHA77YI55 070s7UxW+ViYpHU1szaQWtwMQK9BhTWbQxFEtoOdiTCooVnYy9P6GtFCAss50qE238Cg 7ei82Yxx4J9Y+sdf6mfAHcafng21Bpl90W2VCS01AZeKzeqoVFiQ1K8x/x/biQ6GUY4z CayA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mjl49F/d"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c16-20020a05622a025000b0040fd02240basi2103516qtx.639.2023.08.01.14.56.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:42 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b="mjl49F/d"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKK-0003s6-Iy; Tue, 01 Aug 2023 17:54:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKJ-0003rj-GU for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:47 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKH-0004nM-E1 for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:46 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-316feb137a7so6290440f8f.1 for ; Tue, 01 Aug 2023 14:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926884; x=1691531684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t+Ia2IW7W0o2NfDvv7wb0werH1oj3pCGRYKiA4thOho=; b=mjl49F/dE4gTtMfYJljruuqsJE3gVhRP6+acpgpCEERYeJyuBI5zOHIjdYseaLdmft WJuXvtjyNjaJJukwF+TL2Q79rSHb/QGEAo9RweH3AmGpVocyLzqq2Oyy5/tVJp/Rf84s vOGm8HMb2XKFHr56z5K7WZ5dzgIvz48bZFyCaVmmOOGhsy4Q+4uWqzSJ4hGvU7yWHrBM jbq8bE5k2D1BvGwPqDz2/u17nTBpZOIgYB4F1ElS6QQbLnurV7xD1J8ZqYBH06v5hW9q ywMUHxhGc3DoztPwk5oUYIFx0aSpU7XeHiTqIhzFPbDmVA0nOvlM/O1XydU6b4dkRSTC focg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926884; x=1691531684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t+Ia2IW7W0o2NfDvv7wb0werH1oj3pCGRYKiA4thOho=; b=UcrElQt21Stk17E/hqH0AN78MXncvVL9YUDhEht8MOtYWgsI1Hyw5VidtypKBEcg6U 3S8RXqkJlxg99EBZIy12K6thibDxUMbfPtDo3GWdmca2YaDsMNdYjopMDG3zUAE4gmGn KpVVOV1K/d26SxSLHPwjhyT4Z9SJOF7tz3xg+/46hZ62QBelj3jMENlMf5kM7y0Gz8ET 8vlDaoldKc944frh/rRv3Kic9zOYINdu+fqWRnpzGDtIrguNpqJSNoxg9T4nVLTRdxcP ladvHN5VHTD2yQ5A++ns5GXZDH6Wu8l7yjHY/zM2CRitncpgsdNPySFaPuh+N/iZ8a1Z HOAg== X-Gm-Message-State: ABy/qLZhGO1PYedurjPWT+koF5Jps/9EhvjGh7/Q3oMv/FLvX2keDMIl nz9zVbSKTdbVJT91ZhM6SuDFn86MZY/16YsWgnU= X-Received: by 2002:adf:d4cc:0:b0:317:6513:da7c with SMTP id w12-20020adfd4cc000000b003176513da7cmr3119817wrk.18.1690926883691; Tue, 01 Aug 2023 14:54:43 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id bf10-20020a0560001cca00b0031432f1528csm17143007wrb.45.2023.08.01.14.54.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:54:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, David Woodhouse , Paul Durrant , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 03/10] hw/xen: prevent guest from binding loopback event channel to itself Date: Tue, 1 Aug 2023 23:54:14 +0200 Message-Id: <20230801215421.60133-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: David Woodhouse Fuzzing showed that a guest could bind an interdomain port to itself, by guessing the next port to be allocated and putting that as the 'remote' port number. By chance, that works because the newly-allocated port has type EVTCHNSTAT_unbound. It shouldn't. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Message-Id: <20230801175747.145906-4-dwmw2@infradead.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/xen_evtchn.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index 0e9c108614..a731738411 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -1408,8 +1408,15 @@ int xen_evtchn_bind_interdomain_op(struct evtchn_bind_interdomain *interdomain) XenEvtchnPort *rp = &s->port_table[interdomain->remote_port]; XenEvtchnPort *lp = &s->port_table[interdomain->local_port]; - if (rp->type == EVTCHNSTAT_unbound && rp->type_val == 0) { - /* It's a match! */ + /* + * The 'remote' port for loopback must be an unbound port allocated for + * communication with the local domain (as indicated by rp->type_val + * being zero, not PORT_INFO_TYPEVAL_REMOTE_QEMU), and must *not* be + * the port that was just allocated for the local end. + */ + if (interdomain->local_port != interdomain->remote_port && + rp->type == EVTCHNSTAT_unbound && rp->type_val == 0) { + rp->type = EVTCHNSTAT_interdomain; rp->type_val = interdomain->local_port; From patchwork Tue Aug 1 21:54:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708754 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575321wrw; Tue, 1 Aug 2023 14:56:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGtBtvhjkLl8a/no/A3Muo6g35pWh/sy8/TFKJVKV5Bg5x+2licBVcWAqgC9RTh4F3VtrkP X-Received: by 2002:a05:6102:19b:b0:443:8a7b:f76d with SMTP id r27-20020a056102019b00b004438a7bf76dmr2590592vsq.28.1690926975268; Tue, 01 Aug 2023 14:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926975; cv=none; d=google.com; s=arc-20160816; b=F7tRMPVAF8kaNGkLL9yfcacXnTyiGt7qCj8j5RghTH3hwvJ2/BxJKYOsABC71CYwhv RUj3gaDESUNT7Ob1fDUqbpfjMChTBLDR6Gd7wKbiMUHNdu4bJQnrgNXdlbrPViroU7Ex TklE/MgyFvrvxJyNr2BrDwLUdes3UAMVhOX9z3GPtXPOKwshnyqeuqylTgy2xS86Ushv hVUTedsOBvXLiBpTPM5ZRTZ70jqNpxhRhRWOcr6THXBdmGAcvETTdsKNwH62OCMpx1CW 8R7Oa/dEJjzPSMfa2V8L9U2u8qkgU5KmGLGu2oIF6QmA5qfWeFdgqGyCVOxDWLsZUg5O 5ZRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=2T0C73iE5ucC0JEX55ofVhBEJhpXpDWRqJBs1hHB9OM=; fh=VxPkJlU8udkBFzznysoCFPEG+n+fEdmmjk6E07niLy4=; b=vh5lBjJnR9fO/+D33PSJddq4ozfn+JMhDQSx2kBn/fZKoZblfDVIMfOc2i9xram3Is aYsvlCOFtChYIsx/cmR8Ko4H+cA+7a43aHpwic7G40/Y+KEk8Pp0/6wegRs29II8XuEp 4vVPF7fYK1WRyT2OcXCdwGPRd44y0l2/Dq+H1teptQYe0ng5rRsk/Xbrss0XgOvNswLC QAFzAKHaf6xL/FNCyi9celkZyRYuLz75nP2t+TlheV2tWWOPb4uN/Vls6Z0tKCY02ZVw zRyNUc7OrIlQVaabt7/DnUxE4ooo6+5izFh9jgiZQ1FXggGv06uAt22pC2ENg6h5mq95 hkcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jr7ar/mI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n6-20020a0ce486000000b0063cfa978898si7919867qvl.592.2023.08.01.14.56.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:15 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b="Jr7ar/mI"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKU-0003vr-8K; Tue, 01 Aug 2023 17:54:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKP-0003us-Lh for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:53 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKM-0004oA-St for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:52 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fb4146e8deso67415925e9.0 for ; Tue, 01 Aug 2023 14:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926889; x=1691531689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2T0C73iE5ucC0JEX55ofVhBEJhpXpDWRqJBs1hHB9OM=; b=Jr7ar/mI1dtCR/bozchalPpeVUjRXpIfX2wlc16mP395CJW4BHHkLTVys5+fcKMwIj 98Ltl+VUMQ/efUpjA/cDvMkSJ6EBvsh3OBiCLx1fntVza/na/vlsU4mnw422tTRKAzME VN9ZNEGHVlLEDlB9VaDUC313bt6jYZ0ybxRgDxvpjByxm28+lK578g+RwAj1BLoH4/P9 tvX9YqNOinpzcGF68bOUxSxxjx+kRIwVccoRbfXFh8u0uZIwPCSbKolSt0asXYm2jKxN Ua2ahlJJaM/lMwsa/QJQFFBLTalkzO+NpuW8BXObXVTMSeePU4cqEtCAI/TzmtCOu18R KlgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926889; x=1691531689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2T0C73iE5ucC0JEX55ofVhBEJhpXpDWRqJBs1hHB9OM=; b=Di2RgdN3I/siKkhfymbewoZACDndehaco0W3a12DRAGmaQCC5icC/Rq4pFaq6OAzBT NPbVhXOZfRjkQc2b4X094zFKHO+BQj7JASbVYPOwgOU3Ntno8rk60ksKXY2k/b2UkJ6E a2k7JjnGkwpIUYR7f/NJuuP1WecT4CHEcYWcvyBgE5Cg8OAobo9+ZonMdzYtTQYP1Ai/ Hx9Lg6I+aCLY61wgXReapUD1w3oGxGnPhDlw7+GFi2fAj6cuwFvq37hbufBhvDHIKu6V tZw08vVnrvl78Pl8tAaNopHH2g5JlMnsa5iNRlFDdruPBJfHXgsi/DFuOdN/Apm2HYaY mwgg== X-Gm-Message-State: ABy/qLbQzIkeJXJXmpp4qkS7BdVJp6rATU75e6WNFZok1kqHL1NuUbAG ydhQ23ExmJi0WwI2phe5Yvtili/zXc5vfewpYOo= X-Received: by 2002:a05:600c:22d1:b0:3f5:fff8:d4f3 with SMTP id 17-20020a05600c22d100b003f5fff8d4f3mr3742936wmg.7.1690926889328; Tue, 01 Aug 2023 14:54:49 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id t8-20020adff048000000b00317878d83c6sm14990064wro.72.2023.08.01.14.54.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:54:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Marc-Andre Lureau , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PULL 04/10] ui/dbus: fix win32 compilation when !opengl Date: Tue, 1 Aug 2023 23:54:15 +0200 Message-Id: <20230801215421.60133-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Marc-Andre Lureau Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1782 Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230725112540.53284-1-marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/dbus-listener.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 68ff343799..02fc6ae239 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -338,6 +338,7 @@ static bool dbus_scanout_map(DBusDisplayListener *ddl) return true; } +#ifdef CONFIG_OPENGL static bool dbus_scanout_share_d3d_texture( DBusDisplayListener *ddl, @@ -399,7 +400,8 @@ dbus_scanout_share_d3d_texture( return true; } -#endif +#endif /* CONFIG_OPENGL */ +#endif /* WIN32 */ #ifdef CONFIG_OPENGL static void dbus_scanout_texture(DisplayChangeListener *dcl, From patchwork Tue Aug 1 21:54:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708752 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575147wrw; Tue, 1 Aug 2023 14:55:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbuiYKw3+4Hp0kFwIXm4diI/3YaCG2p03WUCbI8yV92d+oaiWC7t7wxc74p2Ae3qDeGqzv X-Received: by 2002:a05:620a:29d5:b0:768:f98:e8e2 with SMTP id s21-20020a05620a29d500b007680f98e8e2mr19930534qkp.56.1690926940372; Tue, 01 Aug 2023 14:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926940; cv=none; d=google.com; s=arc-20160816; b=z1o+c09ZqCHtLkOP5qL0GdGulMkTKvJRpuzvxrtimcbUaG6BVfYcOf8GC6YZi8F0Gk GivsXyI8ekBj+4aUVDIxwvFf3NTi1L8kAzjVBRKwBcvnowMU996ef1mlL3TwZK8kwrtQ hzxQcx5nNwSuvo3snU+yflSZkcYluY8jVuKBsak8niGyC4QIIUyuK8TN7UqIw+Nv5VN3 PeUIL/qKcq+ShSNMF0On5zKdQor3btvefL2uxDbsgJ374cXv1kZaq59kJWtEP53sCqWz hT0f8a2SPJqA6WvPx4Z9BfoOce/Tl5kOyhh7DMjr9hd0bCQ+lJyC3+c1KUJvNKg/lEEb viKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=TL4wONxRCFHb4IRhcbJ760o3oW6V2ATu43JtMkEQRP4=; fh=3YoEeWJDkI3jC2uxkqIBLlq2XvTqCZj41MB3XnfF1E0=; b=zrO4ozzzW5dz7N7qHZjISvPSiC7HEkJeZbf/2oykPA/Qb9HwiSO/mAJ6E4hen77ajt /a9larafx6qHYR4hn6STDkEih0xkWHjggQl92TShvJMK8KI/1kteUdxJtWoo3bAmw5a7 ntMegQDwB8eu5kRaL1GAFQACgqjgHjGVLhvxq+VhLpkmI84/vncrxA6l/9NjyxQHiABX n8q+4ZV0fDetgoRn+dciMpI6zCYjiR0ShJ+4P3wWsFpHiEuU1f0RwgKaF0mzgXgiLhPp SyYuhidXcnyj8fBrXnqF9zvTuHtFm5UFqVsAEqSXaU/+RV2t+ggqDjQo2hl+eHmxYEuK cfmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lxoqXbW+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l12-20020a05620a28cc00b0076cc12a2303si1710129qkp.207.2023.08.01.14.55.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:55:40 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=lxoqXbW+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKh-0003yv-Ve; Tue, 01 Aug 2023 17:55:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKW-0003x3-Em for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:00 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKT-0004pD-PS for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:54:59 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3174aac120aso5658815f8f.2 for ; Tue, 01 Aug 2023 14:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926895; x=1691531695; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TL4wONxRCFHb4IRhcbJ760o3oW6V2ATu43JtMkEQRP4=; b=lxoqXbW+NbJPwfc8NfnvGZ3d72+SWSU4BhE7uJo44BCFMbryNVzfCSgSUh30WL6JOh aZqDHfxhn8Vh7+76H582c5oRZH8aQ8bZbl6prDl1Ess5+opWknKtQqpcF+9Z0c6kfWdh V32HRJYUXHnxu6r/gINvGvZVb8OC5GCK45jBegnFgi/QmkC6LGwfRODmeTHikdPHDOuH U++Jqs6enVSSX14u7uJq7B19kDrwBiUO0BECUvSU7S/AaI1d/FgsOartT7HR7zXzLWhE zIjsRq7Kx0RHvlohOtdYBKz9goInv6mUiY32aUirvK9JWM8VpQ6CY2us4yEohE9q6jbe 19GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926895; x=1691531695; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TL4wONxRCFHb4IRhcbJ760o3oW6V2ATu43JtMkEQRP4=; b=abnQk3T24aXigOcc51Okbi2ZbHjw30UpII/N7bdGT+ftlXkU0HIMvQzuy/37TXlIGu QM7CBx5L5IhBfMrmJqL7lgw87wVwYw37X4alamm0yPdTWo0xYYUM4s628PfvIyRh0RTY LsOvJdK3Yq9mVjeDJj9nqgE7iGUqGRvUz+RiNQ34Ea6+J61lTsfU87pX75bKAELLHNNa dfDTI3gJxqbxrVrGA+TBY/HIJAxSV1Wu1D3/XBkz134Are7CUQ039O/xGSlI31fHBN+n rigZe1gcVkspxVx3O/fqUAddQl8lpm8gvHJL/iDunZhpCihYeS6dedvCeojVy9On07tZ L68w== X-Gm-Message-State: ABy/qLbinylo9NPKpLwVV69A8bXrB2YNoO9l0aBTVG0f+nAHi8qiBqi4 r6FysEY0AElyGElbVFGB7v9b/FIc/KjDb+SdE5w= X-Received: by 2002:adf:efd1:0:b0:313:ebf3:f817 with SMTP id i17-20020adfefd1000000b00313ebf3f817mr3121670wrp.22.1690926895154; Tue, 01 Aug 2023 14:54:55 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id k14-20020adfe3ce000000b00317643a93f4sm17063951wrm.96.2023.08.01.14.54.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:54:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_?= =?utf-8?q?Lureau?= , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Thomas Huth Subject: [PULL 05/10] ui/dbus: fix clang compilation issue Date: Tue, 1 Aug 2023 23:54:16 +0200 Message-Id: <20230801215421.60133-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Marc-André Lureau ../ui/dbus-listener.c:236:9: error: expected expression Error *err = NULL; See: https://gitlab.com/qemu-project/qemu/-/issues/1782#note_1488517427 Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230726151221.515761-1-marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/dbus-listener.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 02fc6ae239..30917271ab 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -232,7 +232,7 @@ static void dbus_call_update_gl(DisplayChangeListener *dcl, egl_fb_read_rect(ddl->ds, &ddl->fb, x, y, w, h); dbus_gfx_update(dcl, x, y, w, h); break; - case SHARE_KIND_D3DTEX: + case SHARE_KIND_D3DTEX: { Error *err = NULL; assert(ddl->d3d_texture); @@ -249,6 +249,7 @@ static void dbus_call_update_gl(DisplayChangeListener *dcl, dbus_update_gl_cb, g_object_ref(ddl)); break; + } default: g_warn_if_reached(); } From patchwork Tue Aug 1 21:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708755 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575357wrw; Tue, 1 Aug 2023 14:56:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlEVepMWivpHqmsNbPnidQRm1pVk3ey90aJmUBoM3IBQoZQn/wuktKJmEuk1N46mJOoixH5q X-Received: by 2002:a05:620a:343:b0:76c:c147:22a3 with SMTP id t3-20020a05620a034300b0076cc14722a3mr3431058qkm.74.1690926985269; Tue, 01 Aug 2023 14:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926985; cv=none; d=google.com; s=arc-20160816; b=lQjbvjvWEtPbwGW033QkCm4CAAqcVVOIMlkODHYxb9yXuM8/ZXKw6376H55tviC//o cAbEPZhUOL71Th/QWMFV9ikq329l4SAWKuU6yx88bHkvGxt5tBoDY1i8Yd04SeS94r3Q MaAYMmcGrPC+3PUqy4D4+bYgKmcFUNC5tvCBET981Cvk1iaSdfCudhapz8l9hPLwqsqP 3upJsE2fi8Z4AQC1x51M1QQI2WoKh4st7WfldhOx/KAjO3W9tKR3YmxkQtcJcWwJuj/9 6Jw6WAgvfPtTJaUFlBwYcpOULM4alPns1W3+o1TjBa8i93a4y1ReClt9SVXvOiGJUQn/ hwaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=ALlzvSCMcoLc+e3yixiSCFGQuR+9t3b/espKpIxx4ew=; fh=nBV0DlgJ0T6P3Xu+aPEk7EZD4sz6vDW1rAfnK/5AACc=; b=di/ldEUH1b9SSqH6XJtwSynY5kAc8mVBaluGd7oYpOdHHVoELkavzSNcPAOnRBDB04 AXQJ0eaY9oB/Jsi14aiXB+ay4JS8nPKE09Ap0MkyKWxCNA5FMjwIEQyjCK4bJcnZryga il3X4KW+N9w9nhe6+k+7ivVX33LDstaB6+ULJUeA+J3T4bRUCyiwXMv30JdLi5X8I2KZ zqGpp+X9uDF8LdgtG2kUHvmPZf5TDhkAye8vuim4dKKjVQ6VRvjMuTdEcefXGR63LZbo qgAoNpd8k0Ed3W8YGCKxN1i5M9EGagwl8JwL9WxAevTTHVftALkNszAqORDgYXQYP51m 4arw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uYbf0s9W; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t12-20020a05620a450c00b00767cae047dcsi8384713qkp.267.2023.08.01.14.56.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:25 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=uYbf0s9W; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKt-00044D-Cy; Tue, 01 Aug 2023 17:55:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKf-00040T-9S for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:13 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKa-0004rA-0t for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:07 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-31759e6a4a1so5487383f8f.3 for ; Tue, 01 Aug 2023 14:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926902; x=1691531702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ALlzvSCMcoLc+e3yixiSCFGQuR+9t3b/espKpIxx4ew=; b=uYbf0s9WN0ipyLKflCDoHxPmIntche6P/fpIS7B/wGnmbOo++Z7kyh4BnVvQB78V7Q ZhmTDGjcr0HDAWvaInHE/odx7BMzR+Drye0HAahwY9aUVDtflezTj0YOkT3rKi+NFJaK Yzd4zFLzSaYCZ5Eo1d+f51DfQXUFD112Lql6tQgL9/MyvZGmIrSnOe6lylsWRd1kfFEx ItwDHoIiMDeYsSDRdkcpVl8kXqyCr4gXoCkkXaad2e/DosYW/raJyonVfw9fQivywD0j GrbZDkOohWfrQBDPK59VM2wg26Xng41gJ1hEozaBfnnfHw157vAgTLAV7Ga8LDl1xELd Tx/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926902; x=1691531702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ALlzvSCMcoLc+e3yixiSCFGQuR+9t3b/espKpIxx4ew=; b=Q22q3ps4jpMoqqpCZ7ypp/NlvtT8ArGrg757nW0k/ulC5nfPusLgkvgL7pohsC3J60 R/vNbNQawHcHuaTHTpUDt6kdStLLf2dieQwUrodMsoj64XBxY84BI69zWUOjKkYEvY8l 3RXnVbfgCOqOflX0WI+I3qkAFB+i2mDfSFFJKv8Zl/bspaDLUN4Gg5yVn7zVRWcRTjbz u5p6T8xEXzn8XBELX5QYzNsyFdqYlQHcyxpcmR3/n6ztBBeydM5qhQVzNHu4hl4jg1Tw Ekd8udQjcc98LoHVExhvJgyUTQ6JrX+6NeXYXiSRw2UPcNKiO70tHKOetTeAhhtQb73f t7uA== X-Gm-Message-State: ABy/qLYw6wv84GZc0JDFgMP/k5Hjb6fvjrWEs6IolFf0kwybSk5xH60E tjElVI8b2+5VbBxTmT66OdjfqJYFUQ7Us7CpPWY= X-Received: by 2002:adf:ef42:0:b0:317:5b5f:2328 with SMTP id c2-20020adfef42000000b003175b5f2328mr3157781wrp.24.1690926901746; Tue, 01 Aug 2023 14:55:01 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id z15-20020a05600c114f00b003fbb5506e54sm14800593wmz.29.2023.08.01.14.55.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:55:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Stefan Weil , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/10] misc: Fix some typos in documentation and comments Date: Tue, 1 Aug 2023 23:54:17 +0200 Message-Id: <20230801215421.60133-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Stefan Weil Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230730180329.851576-1-sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 2 +- docs/devel/qom.rst | 2 +- docs/system/devices/nvme.rst | 2 +- include/exec/memory.h | 2 +- hw/core/loader.c | 4 ++-- ui/vnc-enc-tight.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 1c35f55666..92a2bafd2b 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -369,7 +369,7 @@ mapping permissions et al by using its 'mapped' security model option. Nowadays it would make sense to reimplement the ``proxy`` backend by using QEMU's ``vhost`` feature, which would eliminate the high latency costs under which the 9p ``proxy`` backend currently suffers. However as of to date nobody -has indicated plans for such kind of reimplemention unfortunately. +has indicated plans for such kind of reimplementation unfortunately. Block device options diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 0b506426d7..9918fac7f2 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -30,7 +30,7 @@ user configuration. Creating a QOM class ==================== -A simple minimal device implementation may look something like bellow: +A simple minimal device implementation may look something like below: .. code-block:: c :caption: Creating a minimal type diff --git a/docs/system/devices/nvme.rst b/docs/system/devices/nvme.rst index a8bb8d729c..2a3af268f7 100644 --- a/docs/system/devices/nvme.rst +++ b/docs/system/devices/nvme.rst @@ -232,7 +232,7 @@ parameters: Set the number of Reclaim Groups. ``fdp.nruh`` (default: ``0``) - Set the number of Reclaim Unit Handles. This is a mandatory paramater and + Set the number of Reclaim Unit Handles. This is a mandatory parameter and must be non-zero. ``fdp.runs`` (default: ``96M``) diff --git a/include/exec/memory.h b/include/exec/memory.h index 7f5c11a0cc..68284428f8 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -942,7 +942,7 @@ struct MemoryListener { * * @listener: The #MemoryListener. * @last_stage: The last stage to synchronize the log during migration. - * The caller should gurantee that the synchronization with true for + * The caller should guarantee that the synchronization with true for * @last_stage is triggered for once after all VCPUs have been stopped. */ void (*log_sync_global)(MemoryListener *listener, bool last_stage); diff --git a/hw/core/loader.c b/hw/core/loader.c index 8b7fd9e9e5..4dd5a71fb7 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -863,7 +863,7 @@ ssize_t load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz) /* * The Linux header magic number for a EFI PE/COFF - * image targetting an unspecified architecture. + * image targeting an unspecified architecture. */ #define EFI_PE_LINUX_MAGIC "\xcd\x23\x82\x81" @@ -1492,7 +1492,7 @@ RomGap rom_find_largest_gap_between(hwaddr base, size_t size) if (rom->mr || rom->fw_file) { continue; } - /* ignore anything finishing bellow base */ + /* ignore anything finishing below base */ if (rom->addr + rom->romsize <= base) { continue; } diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 09200d71b8..ee853dcfcb 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -77,7 +77,7 @@ static int tight_send_framebuffer_update(VncState *vs, int x, int y, #ifdef CONFIG_VNC_JPEG static const struct { - double jpeg_freq_min; /* Don't send JPEG if the freq is bellow */ + double jpeg_freq_min; /* Don't send JPEG if the freq is below */ double jpeg_freq_threshold; /* Always send JPEG if the freq is above */ int jpeg_idx; /* Allow indexed JPEG */ int jpeg_full; /* Allow full color JPEG */ From patchwork Tue Aug 1 21:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708761 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575493wrw; Tue, 1 Aug 2023 14:56:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlFS3awGqK+awiJmVGMMpYpI83WNo1QfL0X2vXdz2rYwchVY2qk0cinRx12j3pLdxMAzwbyM X-Received: by 2002:a05:620a:400a:b0:76c:b4a0:e548 with SMTP id h10-20020a05620a400a00b0076cb4a0e548mr7780957qko.53.1690927012427; Tue, 01 Aug 2023 14:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690927012; cv=none; d=google.com; s=arc-20160816; b=ktjps0qvFp3PqR/13E1zxLSI5EnZfGmnnMiWuIGXO4K43OO3DUKYZnmdhYZf7IXOEe W2jLG45XAp8TbOseIPgH1WxvYcpZd6X8ftRAwRX2fupRk5FwhwsDHw+gduG7Yn651MDC 906S7CRdPyZ5rxwhtk5IJbztQuRom2POffL8CrOSJsVmI2fwJNS7GqVncXzS2ha3f3ZT b4OOH+exPWQt02XthsxH2MjmiiqAhD4lem7Sv+RWwSt/JQbWL5NUATgdWIIDsjSSQKQo wOL9Yt/j7XSm5lK8264JzxkU09zB1R4H4WVEBMOzD4ffd26iCMxodK2+ltnNBv78Fqnz 9aIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=QVfBl55livYW0yWtqiDTvD5GbwIpzCrNuWoNY+Gm1TE=; fh=BZTwgktrFoOsB/WAJQo6W1UJKeRSY+VMHISzzhBqLxk=; b=b3ijsQAPUFz2aWMRwZVD0wYSFinz0u6MMMmdv1qv31fLN7cnSGqqAUxd/LnTVoJIiE 5iyawr9BZGylvUwwVnQ7q2/NiH1idcy3+v3j4T3/w/llcYQkoLH78U+G/VgQzYMwhvHO junycMjPq3GtzCpHY8Rs535BYvrNRECqhsbtHMK0jMCjNHwSOfz+Njmg2M7JQXNjW+vM Z9b5DFE8+FVWWR69nrh8L2aXjS7usb1PkqG20UUaRPN3i/cFjnd3zavc6OXwbpQWGRo8 DzLOrxFZSAaHLdJwpfUHJp7y2D5ta7LtwYKmdFFIyOxkseO0KQM06lO6wJOCMgQdq1n4 GFDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H7NPrUp+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g21-20020a05620a40d500b0076cad668927si3880616qko.295.2023.08.01.14.56.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:52 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=H7NPrUp+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKu-00048M-Sp; Tue, 01 Aug 2023 17:55:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKp-00043A-EO for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:21 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKh-00051Y-Us for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:18 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fe24b794e5so19789575e9.1 for ; Tue, 01 Aug 2023 14:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926907; x=1691531707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QVfBl55livYW0yWtqiDTvD5GbwIpzCrNuWoNY+Gm1TE=; b=H7NPrUp+ldHLolZzwK7aXYphSZ6Mxy8yEXqm4h3NzocqcMiNrsbhfnhdzfVBpeXcOj LCcHTsaO3E8lA1QNiea5j3d4DNSI24YwyqCMmMnIxftyTI9HJNYlROW7ewxSB43pleVK EJl3CukD2jem/Qsn+cVhkro1zJWSTvFXwKHrkmo4RGDwx/9QlhJNHb5Ft9MOpX8Q4zy/ qwE/OrJiM0VSoMNRipqZkvC6xuAtUODAx8EA+IgUNbhOajoPgBbCqGv+X2TS2rFZJMs+ GNz0jbEi/TcnpkP4bGGvak4JaTPZWCjLMDuiVxm+JiIxdrCLKsPV/EJD6Lv6lR41evgb y6AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926907; x=1691531707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QVfBl55livYW0yWtqiDTvD5GbwIpzCrNuWoNY+Gm1TE=; b=NmTsEePpoGc9FLcwCIJbUTOeoS+j9gxIAdkgjSS6pVPbCkclZ7TzPEZ97Yjslj0ViJ +HjJpSNG91m731M1Lo+7tBbGfo1YZJTDnB8rweJCaWbsRcl3BnQZXxeLEKZIGpXl7XhN jYUFd78qLJawdIcPAbX4utBLs9NU4r3kR00zrk+4cFRaIMfog/USCc3MztjWPGRIqBzd g6dKwVytuiqDGJIs4etKHN7XjpmbtPBNxqBvCh8X23icKQjALPYVvprnmcE5JN9k59I7 9loU5jvro3IrJMKoXJUMemxZuMnEKekQetHcfy/8ebr2UwZbNMH+u2omXsjL6TWBcV59 qFCA== X-Gm-Message-State: ABy/qLbaGEnyZdjpiqKw/+i3VHn8za5VTH9Klpcq//sfMxAaMLEq2mxM TbJJyANkap1+VdknatNs8uJHYphN8hihuEo2RwQ= X-Received: by 2002:a05:6000:1084:b0:317:39e3:7c68 with SMTP id y4-20020a056000108400b0031739e37c68mr2874160wrw.18.1690926907801; Tue, 01 Aug 2023 14:55:07 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id y1-20020adfd081000000b003179d5aee63sm9039908wrh.91.2023.08.01.14.55.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:55:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Akihiko Odaki , Juan Quintela , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 07/10] tests/migration: Add -fno-stack-protector Date: Tue, 1 Aug 2023 23:54:18 +0200 Message-Id: <20230801215421.60133-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki A build of GCC 13.2 will have stack protector enabled by default if it was configured with --enable-default-ssp option. For such a compiler, it is necessary to explicitly disable stack protector when linking without standard libraries. Signed-off-by: Akihiko Odaki Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Message-Id: <20230731091042.139159-2-akihiko.odaki@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/migration/s390x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/migration/s390x/Makefile b/tests/migration/s390x/Makefile index 6393c3e5b9..6671de2efc 100644 --- a/tests/migration/s390x/Makefile +++ b/tests/migration/s390x/Makefile @@ -6,8 +6,8 @@ all: a-b-bios.h fwdir=../../../pc-bios/s390-ccw CFLAGS+=-ffreestanding -fno-delete-null-pointer-checks -fPIE -Os \ - -msoft-float -march=z900 -fno-asynchronous-unwind-tables -Wl,-pie \ - -Wl,--build-id=none -nostdlib + -msoft-float -march=z900 -fno-asynchronous-unwind-tables \ + -fno-stack-protector -Wl,-pie -Wl,--build-id=none -nostdlib a-b-bios.h: s390x.elf echo "$$__note" > header.tmp From patchwork Tue Aug 1 21:54:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708757 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575410wrw; Tue, 1 Aug 2023 14:56:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlHa9coad4H0xfSsyB4ck4cKx3TpcgbOCC0YJRvyAACPATNW5kIkpmLqoLbTyoyMuqEVtaOp X-Received: by 2002:a05:6358:9894:b0:139:688e:c73e with SMTP id q20-20020a056358989400b00139688ec73emr3237211rwa.32.1690926996764; Tue, 01 Aug 2023 14:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926996; cv=none; d=google.com; s=arc-20160816; b=IDj28sT9RrkH1GR3AOBb1Jv53OhoIV8LoUcwC8xdK3zfGgnghK93W78hQMj26Ei9St jtjbFH02DrYL+A6ORN87+PdTFUsczEsW3SA/ibK+UkGk/Ok/JETXGjejEgjhnJCikhkA xGjRlG+34TF1wJf7/6prti4Bqr5bAn8JbtYDpW+/r3oiobGp8a/uJpBxIh3S2WB+jPuW Q6U9uHKc4UNddADA8UkQqZLuIIVaFqdKCos0e1survkhYHgAhR7NnlaZZfqoN5i6cuiM 09Fbevq8GOuGfevgt6MX2KTE1ZBTsCnsGSOrdfepM3wi47MZ9AT6qTUY/dqjo92L4hWZ sZlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=pxy5Yn/JsCpPFvBWg/TvifCvOz534Lkl3K0+WTl0qy8=; fh=x/adA1fzboTgVnm+T156poQuzEogbwqnQBKNpDDsF8E=; b=eQjPcGsQ36NWoL5JWFqtpgQDuX7hyNi9nMqLJUUXA6W2aMhPRffzentFN2RaNo9CdV WHn8NnDfDGXqOvC3JPEIcbom4Nb4KcnmoIZDVSejrsZ7kRmd3r1DvJH8VEA7Wya5pQqG QOB9jyJFPnjFRe9KUg6irpUvl1OpGpnI54jkwBZlyj/FzE/UQdYBLwwmK5r8XTKnzeKA jUQ+BzgpSKlW5S3k4l2R6jm/bfdSgoV+3mYszc/aCj4+CleeDGzvz35vqKrswD9T6CiG I6YsNoQL0WCpE387mGo6TSk02nkwl+wMl1FzQBUt//UOjECs6O12is/zs26VY0NqKBjb 9enw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j2ZO/9RS"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c7-20020a0cca07000000b0063d16b31fd2si7620131qvk.371.2023.08.01.14.56.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:36 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b="j2ZO/9RS"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKv-00049g-Q6; Tue, 01 Aug 2023 17:55:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKt-000451-H9 for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:23 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKp-000525-79 for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:21 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3178dd771ceso4635814f8f.2 for ; Tue, 01 Aug 2023 14:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926913; x=1691531713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pxy5Yn/JsCpPFvBWg/TvifCvOz534Lkl3K0+WTl0qy8=; b=j2ZO/9RSPZ4OW5Fnn0l+NMxpcJ6rqKi3/cfLXUT85R9nUgrkxzmEGedDM6YLIXl2Mf 4j3zT0dOOJQjcuDYSMekPo+m6URA4im+/czDpES+KZQTpQ0gCUZuAF7zvEN6SwJ+oBWU 7NVaX6k3D1IGYsN0c/vS9scTQPJtplO8JYNrbNBetWsZ09YGuUyYzc4Br5uDOqSuwIbe v+33poJHrqN/JkQljwSa/g17Bw8I6qlA/7DMTFDx6ZpO9GmBtJW1a/Y3PdnfbgRA6vWg qA5KCqMQcpg58SgOkQv6VCyjBwk5i6XXgGBGh9/eLdjmxKkBg7qSo3pVIipJbsC38HJj AaTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926913; x=1691531713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pxy5Yn/JsCpPFvBWg/TvifCvOz534Lkl3K0+WTl0qy8=; b=Toewt5tcrlX0VGXwd9kA7VdihyGcxigm5iEhlm1cbjRHhX9BcTo6dAUT8/5DEqqbVP H7GTEHVC7Ez/hpv3xw2SGTsMR4f07wHa5dkClXWpJwmEgklRvIXkvNLYrAxBA557W1KK lYG3GEtXvh4pJJa2YdGTCcpgQoz0PDZlELq8AUZ3tbluF9x0SLwC607tVN0yExUN/1TE lfjchv4UW6+tZ4+jlcI46N5OfLDf4WrdnzbUHXKbNS4OwQxef5/LP7UUO2GBR4jEh+B0 GIWzuWSw/CYIJqlT/apvcFtQp7f+wayCYNgqQ10OvOuXb6gUZ8Fx5riZ1SVlgbteisU2 xfjg== X-Gm-Message-State: ABy/qLbA2nea1Om06DzifO88sxT0oZYiDoXVYrNp9MMQcQk6RuIrKPHf lmYWVsDxCMzdOKuRrAat+5HS+Yh0n/HmXo5Ag30= X-Received: by 2002:a5d:608a:0:b0:313:e8b6:1699 with SMTP id w10-20020a5d608a000000b00313e8b61699mr3328575wrt.55.1690926913384; Tue, 01 Aug 2023 14:55:13 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id r8-20020adfe688000000b0031434c08bb7sm17004764wrm.105.2023.08.01.14.55.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:55:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Keith Packard , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 08/10] target/nios2: Pass semihosting arg to exit Date: Tue, 1 Aug 2023 23:54:19 +0200 Message-Id: <20230801215421.60133-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Keith Packard Instead of using R_ARG0 (the semihost function number), use R_ARG1 (the provided exit status). Signed-off-by: Keith Packard Reviewed-by: Peter Maydell Message-Id: <20230801152245.332749-1-keithp@keithp.com> Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/nios2-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index 3738774976..f3b7aee4f1 100644 --- a/target/nios2/nios2-semi.c +++ b/target/nios2/nios2-semi.c @@ -133,8 +133,8 @@ void do_nios2_semihosting(CPUNios2State *env) args = env->regs[R_ARG1]; switch (nr) { case HOSTED_EXIT: - gdb_exit(env->regs[R_ARG0]); - exit(env->regs[R_ARG0]); + gdb_exit(env->regs[R_ARG1]); + exit(env->regs[R_ARG1]); case HOSTED_OPEN: GET_ARG(0); From patchwork Tue Aug 1 21:54:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708753 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575246wrw; Tue, 1 Aug 2023 14:56:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHc6c7FW0MpyuXW2DcL2M48ANmb6T+5MtT0bOrDKvAVHLF+Dx/dd0wbQwKXt5JPEPGOFWRI X-Received: by 2002:ac8:7dd3:0:b0:403:b6ab:48d1 with SMTP id c19-20020ac87dd3000000b00403b6ab48d1mr21092420qte.11.1690926960530; Tue, 01 Aug 2023 14:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690926960; cv=none; d=google.com; s=arc-20160816; b=stAhYud+DcSXEDPM+a7IrgTwzGnFZnfXw3bav7TcvSPYdP4PDAr8Q2yubcdINlwJUG t6gpad8EtpzIXbjiAAA3yYWS7kwnnJbhUC0+hvvDGx4TjO09UbjiocLl2bhHYIVu7dPk P8r4HDOy4U7lAEFwp9R0y4OYR77aJtQ7YxxP6jzWvMj73nRxMI1mw17+Nntem+MD4gFL ChqZvA8r7l7e+fTZvP7xeb5NjQHfHSLxWTT1V4t2stXOLVWCiRB//TrmIWuEc+FwqinC CXrPA0lf8vYqiRI0qe3nyEcDdM5RTTWzpjgdMh6WHV5aoEv2Ug5egzacdQgnCuMKZJL+ YFgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=bh9naHn4NiF5F3e/lau9gZRCmWW1W7JeWXsrB/buMi8=; fh=vGXPPaQiC2AtSq+qYAHJTxqUj7dh9xeXehSyTOwzaGA=; b=QlfrzH7JpnFyfSBbiyEKpoi3wr97BHv/Mp3kKulaz71e4+/zE/Nb9el0A5507wvNRn 0jCBF/YNp3fnLhBe+mQF5ON3RS+Qdl1SHFAl8uLhbUfXgf4BNT/9r6GC/2PA6GdnoUhL 6P72isipGKn60bMclX66LGXWOLoWe9R6kPWYK9I3btqneGg2PAk5tHoHBCD2UU5D+Bpm 1/Lad3X6D4krxtmLBvVNhkwg3tPqaGNpM4GJaWz8MKHas8JkWYm3j0IhUSfi4oRvuxsp ubolnT861p6iwoGKbFm0keOh1NtKJlVTeT31ZzH3m8BI92UqlXIqFSY7W1Vv/ObKP3yP /24g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UogiiheJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z18-20020a05622a061200b00403ed87043fsi7834083qta.697.2023.08.01.14.56.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:00 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=UogiiheJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxKw-0004AZ-7J; Tue, 01 Aug 2023 17:55:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxKt-000450-HB for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:23 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKr-00053H-5Y for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:22 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so6272329f8f.1 for ; Tue, 01 Aug 2023 14:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926919; x=1691531719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bh9naHn4NiF5F3e/lau9gZRCmWW1W7JeWXsrB/buMi8=; b=UogiiheJHAADm4UMrPE/AyrskvVO4HQVa5uOSEEmpS/FMuNlQ53n6euV3Fo1ISe2kO dG0f8cOQpJre7fbWRaQsJYSB4huiZDadgUnHbiAefaZMvgGFdKNxSiFNTb5wddJQ/DYw /CuqmGov2rV4bCiUZe79+YtybcrnpmIZJrryyLIlEDOxNuW157izUua0O51vKRYqHWfV P4tUCgtSev9aTBCtyU29/qNn4OHdwDDbh3yszQNdb31ifZriF5lpEI21jdUZIdqYdSaA x/4exdMXDCkQLJ3De3Egz7g3wFwij0hK6+DADUU2Rf4NarwcRyFXosMJX5Q2Dk8bqJl7 IjkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926919; x=1691531719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bh9naHn4NiF5F3e/lau9gZRCmWW1W7JeWXsrB/buMi8=; b=LtbUFHOZf56zTy+jSlJd2qBx/yx0QeyHKhDTG3pG+wl6Ae6bM2SyZio105kLmFacqM NI4avhzl9EXzg3TFHDT4FvLSP1Rkz5nWRKw4St6mRvrnzmqomiGyhZkGJl84O1iwzfAj zeWu/M28cCqCXWpVYlsE1kPug1/WcV/+ydYcZrEsRz7Bx3Eg5qYJI2jPW/G/90j7wK8D K4LBEHz5IIVsLE2+5LbtZ777zzbx/anHT7YeD8fzb3LxRIPzpCAQathNnIy2fvrGZmgV 7ZNpnxnMPOiFbtHXMMhtMCpyCAUTz2P8FKaWShuJhR9kYPsQt6uV/Sm14P4Udi+8gcQn oyOQ== X-Gm-Message-State: ABy/qLYqN7N6SbWK0MwyGnk5vsG1odne0NbIk1OkFY5cLHAeRckSAjGp NIyHrUgduQpCgzCMHPSzzQ4D/i+qs4DVrg9b3VE= X-Received: by 2002:adf:fd8b:0:b0:314:3ca0:c8c2 with SMTP id d11-20020adffd8b000000b003143ca0c8c2mr3466166wrr.11.1690926919468; Tue, 01 Aug 2023 14:55:19 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id y18-20020adff152000000b0031784ac0babsm15896468wro.28.2023.08.01.14.55.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:55:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Keith Packard , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 09/10] target/nios2: Fix semihost lseek offset computation Date: Tue, 1 Aug 2023 23:54:20 +0200 Message-Id: <20230801215421.60133-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Keith Packard The arguments for deposit64 are (value, start, length, fieldval); this appears to have thought they were (value, fieldval, start, length). Reorder the parameters to match the actual function. Signed-off-by: Keith Packard Reviewed-by: Philippe Mathieu-Daudé Fixes: d1e23cbaa403b2d ("target/nios2: Use semihosting/syscalls.h") Reviewed-by: Peter Maydell Message-Id: <20230731235245.295513-1-keithp@keithp.com> Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/nios2-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index f3b7aee4f1..9d0241c758 100644 --- a/target/nios2/nios2-semi.c +++ b/target/nios2/nios2-semi.c @@ -169,7 +169,7 @@ void do_nios2_semihosting(CPUNios2State *env) GET_ARG64(2); GET_ARG64(3); semihost_sys_lseek(cs, nios2_semi_u64_cb, arg0, - deposit64(arg2, arg1, 32, 32), arg3); + deposit64(arg2, 32, 32, arg1), arg3); break; case HOSTED_RENAME: From patchwork Tue Aug 1 21:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 708758 Delivered-To: patch@linaro.org Received: by 2002:a5d:55c5:0:b0:317:2194:b2bc with SMTP id i5csp575433wrw; Tue, 1 Aug 2023 14:56:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHGREvU4AyZEt5H8SnnX3rzoo6yDXTEPnRg5jqcWYTmoYOoXQbJX48U2Pfcy24SDQgCc/UO X-Received: by 2002:a05:620a:e14:b0:76c:ad46:2683 with SMTP id y20-20020a05620a0e1400b0076cad462683mr6630949qkm.16.1690927000995; Tue, 01 Aug 2023 14:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690927000; cv=none; d=google.com; s=arc-20160816; b=AAqS1iFOut6PRAknOQWAondYozqJZjiICZ9xc6fBY4YOgan5n1EwZHlCiZi/438T/5 s3NJmQyVPlfOY+pJz7h2VAIbZW/6Htda8E3kHTW93DElMDC6Tu3KN/m+/LAUGLvX1/j1 IFA1X5Ubj+znPTcEIg5bnLd/ib7MbZUqFZ7R9ONhGO3JJvqE8FVJr4w+zhs9zyH69J+0 P28BDHRdrUwnlZmDm5ftXT2hYQViLZdDRxndhSGbRHBNn6J1SB5dh/TDXxGY1dZ8J6+G Zr8NjNL4XfNuNylHfN/Sj4baercDDS4EZutmP3nZqJgL5V5IS2nc3Zbx2Yzl0Xe0cIXn lAPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=+MlPVeFzrXbSa0qfelXJkLgucjf8rAzsUaPyUQvx+Ws=; fh=/FxUIKi6d+jntFDQ/WpC1s7Eq8zYRQmAYK0yRDHdIEM=; b=q5eL6q0XcVjHSdP77F7VCegcXnI+fS6uPwcb6aNGML3T/O60+KFXZe3sk+dvm+ygKA 3vPsFjwM6ss5+hMEfka/eE5sFJ45IrBP+jxGzSrpkHc4OkeRKFh2eY+ba7yTMREW5A6k SDXEdPc0QzIRlZNolK1QwKMYe97uSWMC0we6RbXGnbPR4TzN4dFMJivpHbe7BmLd1xDq fQ1szOWHe2ZA/bh/awH25SLD3UdqseiJ1k1pz7qkc48ej1DMiITsce0Wsm+L/3YgPsIH ig+2KTMdtorvD70bgYosU5HZawmPdyYOlro/lTEM2yKlKpj29k1rfU/AzFnucIGuI0ne Pegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KlfSg670; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u19-20020a05620a0c5300b00767d0cb5098si7975758qki.438.2023.08.01.14.56.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2023 14:56:40 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=KlfSg670; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQxL7-0004Xr-0k; Tue, 01 Aug 2023 17:55:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQxL0-0004Ed-6Y for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:30 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQxKx-00056T-I0 for qemu-devel@nongnu.org; Tue, 01 Aug 2023 17:55:29 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fbea14700bso57927105e9.3 for ; Tue, 01 Aug 2023 14:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690926926; x=1691531726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+MlPVeFzrXbSa0qfelXJkLgucjf8rAzsUaPyUQvx+Ws=; b=KlfSg670yEjxG8mRW+WVGKKKUXv5xDpMVNh93zWanLzzqpMqOj+KvhiCP2YLRzWZY5 SelbwR0bZ7llcPu4owyWQT7PvrC5k0WlrF6uvwkIRSkXLBXhYK2Cuao6Dj3VVZ75MPjU a+hIu5k3ISsx35pzuTDWwpRT3GWMXQnOqwO3Yss2c94t8AMZNhxD9R39ayxMRyJ9HMHO 6xGqqAqk7eQSaHfh7fTuCYu2iN0G8+XrlCZr8jWwGQ/E27iWhOjPHG/r48k4jaiT5mL8 zaz0l8LLnZjEzCRwLUoaHyzfSQpKNDMdhmXM6CzwgAQuHO58/uvCoHl6m+QTZmHwsIXX wm9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690926926; x=1691531726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+MlPVeFzrXbSa0qfelXJkLgucjf8rAzsUaPyUQvx+Ws=; b=Sm+zAGB/kWW5mfCoOGNSDncEglTacUWBe55UvPZKDDp2YqiCDqTf44+fac6aamPGfK z1FWXRzwG4t/niqHwt6Qf38wxuZ9UC1u5Y3bEjsV+sLNjRzNTtUH5PYXGHLblBtGjzIE wpbQ4hUBHOEG53NjZFJuqIenr5X4X07wAG4J6ipaMvkWGzygUNsjemAD1Jyy96ebnCRe zgEKMpimK00D+rUZ6hnuAXfOgEy2gP38JF3Ge8Ln0IHYA9Y0FC3IC643MIF/aYaV3KgO 7BATmC0EpXUzH9MtrZLShSuzCqKKwNKV6gV8FF7wW3qLG1wguY873EebdO13JmoG6XyW ++lA== X-Gm-Message-State: ABy/qLZNeJPb74xxK3X+j2y9MCS2k+vMHwjl1iLhtCzS3UPl4V4V4tsO j/MVqhR8B+W5BvlAzS/xRoE6BcdM1EYLCc4vjUo= X-Received: by 2002:a05:600c:ac6:b0:3fb:d1db:5454 with SMTP id c6-20020a05600c0ac600b003fbd1db5454mr3360777wmr.35.1690926925992; Tue, 01 Aug 2023 14:55:25 -0700 (PDT) Received: from localhost.localdomain ([176.176.174.59]) by smtp.gmail.com with ESMTPSA id 7-20020a05600c22c700b003fe1a96845bsm33446wmg.2.2023.08.01.14.55.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Aug 2023 14:55:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-s390x@nongnu.org, Peter Maydell , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 10/10] target/m68k: Fix semihost lseek offset computation Date: Tue, 1 Aug 2023 23:54:21 +0200 Message-Id: <20230801215421.60133-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230801215421.60133-1-philmd@linaro.org> References: <20230801215421.60133-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell The arguments for deposit64 are (value, start, length, fieldval); this appears to have thought they were (value, fieldval, start, length). Reorder the parameters to match the actual function. Cc: qemu-stable@nongnu.org Fixes: 950272506d ("target/m68k: Use semihosting/syscalls.h") Reported-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230801154519.3505531-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/m68k-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 88ad9ba814..239f6e44e9 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -166,7 +166,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) GET_ARG64(2); GET_ARG64(3); semihost_sys_lseek(cs, m68k_semi_u64_cb, arg0, - deposit64(arg2, arg1, 32, 32), arg3); + deposit64(arg2, 32, 32, arg1), arg3); break; case HOSTED_RENAME: