From patchwork Tue Dec 3 11:31:28 2024 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: 846949 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424340wrr; Tue, 3 Dec 2024 03:32:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWd3bi0fuKmHtTe6XJ7AQbsQT76nBBKf4WQEuoVNdBP9jnf0AFjx4HWNFfiH2UC4L2wLy3MzA==@linaro.org X-Google-Smtp-Source: AGHT+IFFAtMibQE9GQ0ExNTTPUe0KoSVY0EPLJ2vO0ShjNUp7Mzn7gCgld5cnQ4xreYnRmkwyBNQ X-Received: by 2002:a05:6214:5008:b0:6d8:b2f2:bcb8 with SMTP id 6a1803df08f44-6d8b7331a5dmr31966126d6.8.1733225549208; Tue, 03 Dec 2024 03:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225549; cv=none; d=google.com; s=arc-20240605; b=GRCutxUX7rADaWHwN4KZqUUqX5xQxUevMaBgUNosSTTUQrFM736S+ed2oMtcg/3g86 ZCbT+/9AoSgZ895oyT9oooQmgRDUlrBOHdP6OPngfZQ4B9/pqRUJ73I+/XeDSGvQOnoe fl/D9mdPE9v8EvHeJIfwgkerGhL5bHwO8f2mwIrm38TT54ro0o50VWX6+Zn6BSPVVGo9 SsRjNkXJGD0iRG+z95xUZOtcQyMcwAWgi/nxcbqFJgXs4lBiiMTx7eCr0+4BxlxevepG ARUwG2jqHlFwA/OQEm0elGUHUuRXR2k7GL0hhBbSgNWzw0f2jwNky1zrBsWQvx2peNwh 1xkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=GEQJbcE86qikHlXktFZRneXT4XN3T75O47zRCAyenRc=; fh=LMmsA0sRESGvcky34VyXoHRdTK2MIA+JFzGx2Okli8k=; b=etDW9nJTQ8CZqiWb5f8/+YXWt8EPHptOMlyY9FRd3FeX26paSm/r58Yd26WzPRcNrX OICif0R0Q+aZQwDF1Na35BdLVIN08UrsRTImZcOb2QU6NdgAd9z9QkRyb6zXtVbVWdWJ BiHIf2mfkvANbyiBSx/WymtNUosmV6gWEqrhumTz/rlkrDEs6Zi3CMCPb3qkkunSLrWB d3P5ypO6BeNjfJJWcyzjIeIFjb8Vu2FVDDMlsIWiafd5pLWzwEnWhsqG6yeqEDAO2lhN 9xP/ZPkJ49niXO0bbLq8ttTyblbO6Iec75xkui1hPLL0Jx+Rxc/OAv9W9kIdfwpdxaqH wazw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QxGJW/xc"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d89c994326si78285556d6.82.2024.12.03.03.32.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:32: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=pass header.i=@linaro.org header.s=google header.b="QxGJW/xc"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8D-00005i-NV; Tue, 03 Dec 2024 06:31:53 -0500 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 1tIR8B-00005N-NK for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:31:51 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8A-0000Yc-4U for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:31:51 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-385e96a285eso1511468f8f.3 for ; Tue, 03 Dec 2024 03:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225508; x=1733830308; darn=nongnu.org; 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=GEQJbcE86qikHlXktFZRneXT4XN3T75O47zRCAyenRc=; b=QxGJW/xc0/2s4tmVFtFyDJN7GzksIcO8UH4libWr3hGOsv/5EbisYtL5TsTZwZotdY X30mtPshnXfH6BOHKR4gIcNboyj51w4O8ylmvcZjhrvOqL2WpDeDBoul5lbnw7A/riDf fXCINM70TGFeUyHFbwBCBykOUeezWDO1ZvFTWLN9k+YwgTACvitAJufRPFDCJAJayDSZ u16+K09wKPLZLDkA81Zr7LopSJ8g1kqK34iVK0nbE7i3o5N6Mkn9s8bgjAuTJNdmK9yk s8mWS3LHWG32vgT9mc9Ep4S1wbveVO+6mVr2If98oMUz5DYR9fVGxJ21BFsVGlRkjeNq LAnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225508; x=1733830308; 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=GEQJbcE86qikHlXktFZRneXT4XN3T75O47zRCAyenRc=; b=J2K7W8JS64olVB3gHDnSZr2i2Zcayf9E3b+iqt6yoATboeYLYl1VHSsXDuKYXtJSTZ zVHdw+JGOqmp1/nUuRCr1gdJ6bJygSlWpeaVtQLK3L8wycbFZaSpM3syzq9Uf3a2ueq1 V6D3Qkuy1kbdt8xufhP9cEv4vDOylL3e9YpibGUG516yxPNOFphNp6oKZB57ubdoMesb NYEZLmhF5F7IHTLGLguLyu5t4fPPTURhoBFZsUvYVg1ww5OpKJCtPczMAvFLiPKjXhWQ fHPo7Nakw7XJmNdJz7cIbS/YxEJbhifDGrJlFEXX9oGVe4NQ0vbYL84+yCy4m37yZk17 UeWA== X-Gm-Message-State: AOJu0Yw+8dICTxugskcgaQkc/00cUFCOziyNH7SJbd+ZbwOlU5hwNo8A OZYUTxiaTK5LRjNa98xfKge9NEYTi99zEU096adWz+aGtCrYQO3E20dEW64CKc/mHfGET7fwCch 7R0I= X-Gm-Gg: ASbGnctakigovJpIt9PwnOSixiZwCJ+SfxXt0cQ0MIZ7kj1CO66lhH4isOeuhN1ip1n m6OyMpI3E1sDoAdYMrv9dh3q5RokgeH6N/8pC7WUi6S8FbKhJriqq9QmYYv5t7HwNDlLX51b++o hd7eIRllp7reZiiEe88pJyCiRUIyRFhv1VMAKe/ZRI0MvwRzHKN4UJF00elCP9Ep5vRRUhooHvH 8upYLNnkj6LEjae6J69ye7x0YheAZE4dk2C1v0rdBw+i8MsRL0x8gs8aAVLx5KTV712dE0w X-Received: by 2002:a05:6000:1f8a:b0:385:f0d2:c34 with SMTP id ffacd0b85a97d-385fd423f8dmr1694907f8f.49.1733225508290; Tue, 03 Dec 2024 03:31:48 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e1bba97esm10618562f8f.91.2024.12.03.03.31.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:31:47 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Joel Holdsworth , Stafford Horne , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 01/13] hw/openrisc: Fixed undercounting of TTCR in continuous mode Date: Tue, 3 Dec 2024 12:31:28 +0100 Message-ID: <20241203113140.63513-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Joel Holdsworth In the existing design, TTCR is prone to undercounting when running in continuous mode. This manifests as a timer interrupt appearing to trigger a few cycles prior to the deadline set in SPR_TTMR_TP. When the timer triggers, the virtual time delta in nanoseconds between the time when the timer was set, and when it triggers is calculated. This nanoseconds value is then divided by TIMER_PERIOD (50) to compute an increment of cycles to apply to TTCR. However, this calculation rounds down the number of cycles causing the undercounting. A simplistic solution would be to instead round up the number of cycles, however this will result in the accumulation of timing error over time. This patch corrects the issue by calculating the time delta in nanoseconds between when the timer was last reset and the timer event. This approach allows the TTCR value to be rounded up, but without accumulating error over time. Signed-off-by: Joel Holdsworth [stafford: Incremented version in vmstate_or1k_timer, checkpatch fixes] Signed-off-by: Stafford Horne Message-ID: <20241203110536.402131-3-shorne@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/openrisc/cputimer.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index 835986c4dbe..87aa3533237 100644 --- a/hw/openrisc/cputimer.c +++ b/hw/openrisc/cputimer.c @@ -29,7 +29,8 @@ /* Tick Timer global state to allow all cores to be in sync */ typedef struct OR1KTimerState { uint32_t ttcr; - uint64_t last_clk; + uint32_t ttcr_offset; + uint64_t clk_offset; } OR1KTimerState; static OR1KTimerState *or1k_timer; @@ -37,6 +38,8 @@ static OR1KTimerState *or1k_timer; void cpu_openrisc_count_set(OpenRISCCPU *cpu, uint32_t val) { or1k_timer->ttcr = val; + or1k_timer->ttcr_offset = val; + or1k_timer->clk_offset = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); } uint32_t cpu_openrisc_count_get(OpenRISCCPU *cpu) @@ -53,9 +56,8 @@ void cpu_openrisc_count_update(OpenRISCCPU *cpu) return; } now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - or1k_timer->ttcr += (uint32_t)((now - or1k_timer->last_clk) - / TIMER_PERIOD); - or1k_timer->last_clk = now; + or1k_timer->ttcr = or1k_timer->ttcr_offset + + DIV_ROUND_UP(now - or1k_timer->clk_offset, TIMER_PERIOD); } /* Update the next timeout time as difference between ttmr and ttcr */ @@ -69,7 +71,7 @@ void cpu_openrisc_timer_update(OpenRISCCPU *cpu) } cpu_openrisc_count_update(cpu); - now = or1k_timer->last_clk; + now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); if ((cpu->env.ttmr & TTMR_TP) <= (or1k_timer->ttcr & TTMR_TP)) { wait = TTMR_TP - (or1k_timer->ttcr & TTMR_TP) + 1; @@ -110,7 +112,8 @@ static void openrisc_timer_cb(void *opaque) case TIMER_NONE: break; case TIMER_INTR: - or1k_timer->ttcr = 0; + /* Zero the count by applying a negative offset to the counter */ + or1k_timer->ttcr_offset -= (cpu->env.ttmr & TTMR_TP); break; case TIMER_SHOT: cpu_openrisc_count_stop(cpu); @@ -137,17 +140,18 @@ static void openrisc_count_reset(void *opaque) /* Reset the global timer state. */ static void openrisc_timer_reset(void *opaque) { - or1k_timer->ttcr = 0x00000000; - or1k_timer->last_clk = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + OpenRISCCPU *cpu = opaque; + cpu_openrisc_count_set(cpu, 0); } static const VMStateDescription vmstate_or1k_timer = { .name = "or1k_timer", - .version_id = 1, - .minimum_version_id = 1, + .version_id = 2, + .minimum_version_id = 2, .fields = (const VMStateField[]) { VMSTATE_UINT32(ttcr, OR1KTimerState), - VMSTATE_UINT64(last_clk, OR1KTimerState), + VMSTATE_UINT32(ttcr_offset, OR1KTimerState), + VMSTATE_UINT64(clk_offset, OR1KTimerState), VMSTATE_END_OF_LIST() } }; From patchwork Tue Dec 3 11:31:29 2024 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: 846947 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424264wrr; Tue, 3 Dec 2024 03:32:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWw2yzW/VLT/M5tYnjdfGXwKI3Da0zh+Zn9Hqnq1hqjPw0Hbldv4WWlj196M5r4g6t5pKBTkA==@linaro.org X-Google-Smtp-Source: AGHT+IH2lAwUJ4QpEB3wd9wcdDwLwie4hfB16HbD5pdvV+KeU59mdTRPoB/uFIPdj53MYMRa3TE/ X-Received: by 2002:a05:6214:2507:b0:6d8:a7f7:c39d with SMTP id 6a1803df08f44-6d8b741d70amr32287236d6.40.1733225540407; Tue, 03 Dec 2024 03:32:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225540; cv=none; d=google.com; s=arc-20240605; b=gnGRssgDSYY+5mdh4nBP8itaZo6NLcsRBHBM0JZ5wQ+B4aPNHZ06kVhPFSuIbbib0f is0+t/QnU3ft6neS1+zXdmrCS17CNyzHha7G9EK3Trv/GPw+Y3Dt/PCUluRSM6PhmzLu aLkmIQetK6UhPJ8Nx70hFM/RUSSwOoguv7nj76Dw1Vc48dN8NGTaYqb+pjYMMrIUNMJN vp4uxdRbKP2n6To5wYe7rWf8PJuUKwc9RlgRLi1MoFcVERazn5rcWdCUAFsi8EUrcJSs FuG5RaWzLRmVDAZeskz2tHTz2p5byPb7yCLgRJpqm6kMPiySLpBFv4Rr87nY+NvIZzul lJhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=V+svFV1xcdJrlV8NyDIn4cv3Yc08EHLS4Zn1tNR/Xs0=; fh=t7/loFbA1ok8FX8lF41CYUPB1Jid8E7vBolKt1WoAw8=; b=OLolS0irb1m+ZB5awDWA3l3pkzPFeRDdaS6F4LG134Tpog4pyYbeOSX7vZ05rpLpuK wVcElsVMbMpBPNPpJ9RRIns1smGYt7AEuF8DgAdKlNez+IK46DAQ4YUiEU17GpvkZzp6 f+3HE+7xldx2M26Eyp1pyWu7Yw7mj2SOuTymiFzDKSn1jcLI5AlnrTD08YgvbnyA2dRG xQZhA70ePyxL8F5q5sw0TwfIJQZpjpLVXVRMzn9Rv75I6whcPyYyv5DOqJHFAusYrArC 6tUuMDNWUUUnwJCaTFz29NvgvWgMsUth0cUEVUujoVsJ1iqk8dK85TdcU+x34F+l9+Qg dFGg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mrzAWRLF; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d896adb296si93083196d6.57.2024.12.03.03.32.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:32:20 -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=pass header.i=@linaro.org header.s=google header.b=mrzAWRLF; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8N-00007p-MN; Tue, 03 Dec 2024 06:32:04 -0500 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 1tIR8H-00006Y-K6 for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:31:58 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8F-0000Z5-KS for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:31:57 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4349f160d62so46125695e9.2 for ; Tue, 03 Dec 2024 03:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225513; x=1733830313; darn=nongnu.org; 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=V+svFV1xcdJrlV8NyDIn4cv3Yc08EHLS4Zn1tNR/Xs0=; b=mrzAWRLF6D/PaefW0z78aATHb/wCSsckXrzwMxZ52XD1RKvAGvYUo3hBiU5sOtxfnd TTUU6NCJzX6GdotkOHYSRI0mIeMKYZDt2XpDzYE9N3iWRNxSVOLysGpohVri33EUU58+ OX4q5bG8qk1VGHM/8vkoPVGswv7YUWfJwF7YJnO9x/2Ylkru/i8VA6QpsqWOGMAkXLan DLIVu+5jh+Jqijzez+kDr9NncTTnzwewk2CC+5OY5vs7nUKVXI74fgSANYeNN7sV1b/9 7iv/b73Heh2lwbMSEVCDPrZ5Z45E/az+s8rtfbj6HEW5Om22nzUlTIJ1BXPX/W63jRWC ghTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225513; x=1733830313; 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=V+svFV1xcdJrlV8NyDIn4cv3Yc08EHLS4Zn1tNR/Xs0=; b=unV8ie2B8OyXIGWBlfWUM+p6XwQ/xsSCNp24tXHuvbCXCRlqjmVtm14pmCMElT4+EA 5UJlMhiKB9leVuJ+Ia1BS6/bwcN4lyQXrN0h/C97YNOxWnK+ToaNR7dDYYtF7Tbuiqt4 ZeviWjwqoGDZBKXrDoYgHBWdf0ZXq5qY5/AqeQQpw4lZLk+Dg7Ln8B+PNncxD44LU4gz /q0Ypcpsrr6CuABnNhdoh/0fgaasKj17oVVDIifFygTx07OjKkzrMCY/HiLCo4LetqoC mqCT8bd+sPCDX9gRcZZeVSFt5z0yjJo+xRnE+ivl8cohvi/GLmZ6pbhLX3Y3GMVWV8Hx zTCQ== X-Gm-Message-State: AOJu0Yx0SDTPhGXKWU8QN5a2p6dolKWihAMWsoKEaKRcX6CNbrTlSbV5 zNPZN1v0fgwVGwiPgPMIa8k44vZAvY5rZxIcumI0Wa+Rx1mz4/nY7iEaX3SopyIVxLDO+6YOXfG hA1k= X-Gm-Gg: ASbGnctfWg9dU4UrDZJs0pcerBmUkOaTNkRAXfsiPigBYyj0omw/D9UOgUhl2hmes41 bPDsgkX3YlJgeQgxAvkFVf3izxhe8aBdbKsG6IWz8m2/W1d1NDuNHQSD7AHSMGEtDdT76P8SLPK 5CeqSuW0cM/+peZb0eGJmMb3uTpIwyi+uT1oadcrZzERiVOfML6oNqmBedRCU3Pzjj7hcgDSzsZ eoCoglSoVr+XbeE0xRV7Ie1jMBDh4Es4QLhRNQP5x/KnY5kXuUq+NaLL9zxpUlY0/WsScGY X-Received: by 2002:a05:600c:4f12:b0:434:a29d:6c71 with SMTP id 5b1f17b1804b1-434d0a1d4admr16898285e9.27.1733225513545; Tue, 03 Dec 2024 03:31:53 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d04e7380sm18163625e9.0.2024.12.03.03.31.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:31:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Ahmad Fatoum , qemu-stable@nongnu.org, Stafford Horne , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/13] hw/openrisc/openrisc_sim: keep serial@90000000 as default Date: Tue, 3 Dec 2024 12:31:29 +0100 Message-ID: <20241203113140.63513-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 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: Ahmad Fatoum We used to only have a single UART on the platform and it was located at address 0x90000000. When the number of UARTs was increased to 4, the first UART remained at it's location, but instead of being the first one to be registered, it became the last. This caused QEMU to pick 0x90000300 as the default UART, which broke software that hardcoded the address of 0x90000000 and expected it's output to be visible when the user configured only a single console. This caused regressions[1] in the barebox test suite when updating to a newer QEMU. As there seems to be no good reason to register the UARTs in inverse order, let's register them by ascending address, so existing software can remain oblivious to the additional UART ports. Changing the order of uart registration alone breaks Linux which was choosing the UART at 0x90000300 as the default for ttyS0. To fix Linux we fix three things in the device tree: 1. Define stdout-path only one time for the first registered UART instead of incorrectly defining for each UART. 2. Change the UART alias name from 'uart0' to 'serial0' as almost all Linux tty drivers look for an alias starting with "serial". 3. Add the UART nodes so they appear in the final DTB in the order starting with the lowest address and working upwards. In summary these changes mean that the QEMU default UART (serial_hd(0)) is now setup where: * serial_hd(0) is the lowest-address UART * serial_hd(0) is listed first in the DTB * serial_hd(0) is the /chosen/stdout-path one * the /aliases/serial0 alias points at serial_hd(0) [1]: https://lore.barebox.org/barebox/707e7c50-aad1-4459-8796-0cc54bab32e2@pengutronix.de/T/#m5da26e8a799033301489a938b5d5667b81cef6ad [stafford: Change to serial0 alias and update change message, reverse uart registration order] Fixes: 777784bda468 ("hw/openrisc: support 4 serial ports in or1ksim") Cc: qemu-stable@nongnu.org Signed-off-by: Ahmad Fatoum Signed-off-by: Stafford Horne Reviewed-by: Peter Maydell Message-ID: <20241203110536.402131-2-shorne@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/openrisc/openrisc_sim.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 9fb63515ef1..42f002985bf 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -250,7 +250,7 @@ static void openrisc_sim_serial_init(Or1ksimState *state, hwaddr base, void *fdt = state->fdt; char *nodename; qemu_irq serial_irq; - char alias[sizeof("uart0")]; + char alias[sizeof("serial0")]; int i; if (num_cpus > 1) { @@ -265,7 +265,7 @@ static void openrisc_sim_serial_init(Or1ksimState *state, hwaddr base, serial_irq = get_cpu_irq(cpus, 0, irq_pin); } serial_mm_init(get_system_memory(), base, 0, serial_irq, 115200, - serial_hd(OR1KSIM_UART_COUNT - uart_idx - 1), + serial_hd(uart_idx), DEVICE_NATIVE_ENDIAN); /* Add device tree node for serial. */ @@ -277,10 +277,13 @@ static void openrisc_sim_serial_init(Or1ksimState *state, hwaddr base, qemu_fdt_setprop_cell(fdt, nodename, "clock-frequency", OR1KSIM_CLK_MHZ); qemu_fdt_setprop(fdt, nodename, "big-endian", NULL, 0); - /* The /chosen node is created during fdt creation. */ - qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename); - snprintf(alias, sizeof(alias), "uart%d", uart_idx); + if (uart_idx == 0) { + /* The /chosen node is created during fdt creation. */ + qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename); + } + snprintf(alias, sizeof(alias), "serial%d", uart_idx); qemu_fdt_setprop_string(fdt, "/aliases", alias, nodename); + g_free(nodename); } @@ -326,11 +329,22 @@ static void openrisc_sim_init(MachineState *machine) smp_cpus, cpus, OR1KSIM_OMPIC_IRQ); } - for (n = 0; n < OR1KSIM_UART_COUNT; ++n) + /* + * We create the UART nodes starting with the highest address and + * working downwards, because in QEMU the DTB nodes end up in the + * DTB in reverse order of creation. Correctly-written guest software + * will not care about the node order (it will look at stdout-path + * or the alias nodes), but for the benefit of guest software which + * just looks for the first UART node in the DTB, make sure the + * lowest-address UART (which is QEMU's first serial port) appears + * first in the DTB. + */ + for (n = OR1KSIM_UART_COUNT - 1; n >= 0; n--) { openrisc_sim_serial_init(state, or1ksim_memmap[OR1KSIM_UART].base + or1ksim_memmap[OR1KSIM_UART].size * n, or1ksim_memmap[OR1KSIM_UART].size, smp_cpus, cpus, OR1KSIM_UART_IRQ, n); + } load_addr = openrisc_load_kernel(ram_size, kernel_filename, &boot_info.bootstrap_pc); From patchwork Tue Dec 3 11:31:30 2024 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: 846950 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424437wrr; Tue, 3 Dec 2024 03:32:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVtbVszPojy0/Qimx9KVRCvOTdeHsy6D/TqVvFibRpQcvx2NflQGy9/hxF7hJKxOeSWO1vVDQ==@linaro.org X-Google-Smtp-Source: AGHT+IEoARTOrahG/MNjTRXN4s/cuKq7w5QQX9dZbAQuDOypRB8C9kpUdi+uNV/z537JrZv7VcYj X-Received: by 2002:a05:622a:1984:b0:466:a51b:6277 with SMTP id d75a77b69052e-4670c09f54cmr29156531cf.16.1733225563113; Tue, 03 Dec 2024 03:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225563; cv=none; d=google.com; s=arc-20240605; b=IyHtf1vQytnj/yMniDtDemhJeKj5SLj9Xm7ME22OEASuZZ7c4+SfTUHE8zZyRLsrX7 HU1NuyAnwNzrU/3jCZj4seSqpvUAYmIuR9649WRZSToKY4aqStnHw/2EsprL4Tp2g4Rd 39xDgtH7Eaa65vv+s/qRbMDA5ew0Fwch3afQDni6C3ghqvBBHySWGXRBhsQMa/33fI7v qtolfMVhgw459Tc9rxyBEGVRkAM2vNlOW+P1cp50p08Fu/ICnwtSTwss2oaLzVSc0sPo vLzqv/haRMUfvl1nCSmFw61RkxYTiXYlXMtAAwti/VtrrOb55YBrIz5F9uZ68YxtWon2 T4jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=oU20d9+ticWenlMt5qSEyuabqKxdhpNZ4aYUuZ3tAj0=; fh=FTSHQskHtl9j7ectFglVMAYF1cUVWrjS0CcXydHqOx0=; b=Gx5HY8+rirgC7vRlVXcba+VCeww7TF1M9Xf0aWH7MCKbcuEG7MPgjMNkmW2zn6n0c5 4gsBStHlV67IZJ6gtDSpHZfI6+LsFo9E597RRsTQBb0L+NwtERKt5W6NRHS7Xs/VO7Oy 8zLo8+NxxQzzMYkCKn88teMphYOrm8V7LG56/GF4JRhWNjwosaQiEa4FhWXRBIRh/6xc 02CbCtt4aVN3MmdVrDy93Sp3s+OYw9BoltAzL+24hmOyAb958JjlhcRMo1NRbcBWN9bh CjPdUT6ICamkaHIMmjUWu3xZMQgFb4IR14Svcv/ewavmjyChnxzcmqh+e69lW9of7Qff uttg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jf3BFouz; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c44606fdsi160733131cf.699.2024.12.03.03.32.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:32: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=pass header.i=@linaro.org header.s=google header.b=jf3BFouz; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8W-0000BS-Po; Tue, 03 Dec 2024 06:32:14 -0500 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 1tIR8M-00007u-Jq for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:03 -0500 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 1tIR8K-0000ZZ-Eu for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:02 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-385d7f19f20so2402508f8f.1 for ; Tue, 03 Dec 2024 03:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225519; x=1733830319; darn=nongnu.org; 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=oU20d9+ticWenlMt5qSEyuabqKxdhpNZ4aYUuZ3tAj0=; b=jf3BFouz66Dhxe+w9UaceZCGMCoUREu3kg+rbWzuzUFEu+nzhaqTf2Xu0uCqn7P603 iJ1G/2SCmurQWoMSES03TOAn2IIbX5hIgQ+znkbig+Pdze2kXOAB/a35ddw4R67BRFth TMZUaVHVLEzovbwAMBQgz9nbK2ZwmVXlKBtJeY1+wKlmypGlwN3moKYy9IcAn5Npuh1/ bDtQWwaaOf8rZj/289eulxU558jwKLJ5J6a80obDLFe6NXVTu67lN7GBnFC98W1v+nUl S4FgLra0P6OQmZkb1Ct+HKIenDBWuJ07n/p8qUo9t6oyqNrITvsMWmQV4oec1Uuh3R4Z Fzgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225519; x=1733830319; 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=oU20d9+ticWenlMt5qSEyuabqKxdhpNZ4aYUuZ3tAj0=; b=p5v1VNqRLPbpqWRRJ8EovsCGh+m7ox7Vbs+mGzzyjdZtFMBCGibgdgPF5oFpwzQPV7 v6FQWxcEtYFSLsOEYB5Lbu4dnQjYnVcfVpO37vFVMDy4UTWfMS1tjfS/CnmQZ6KemQmX hg0x6iFHruOuqESyWfcRwkQTOa4L7j9f8anB/iKhy96pwie+cw2c31Mt6gEK1uTbw+yb Ac9mDBEp7//p/X/KGE936hHQ3MoKqG5lQ8kGL8+xczgTpQlfCLyxHwgduOgjjn98OU/H TxA90bh+0MWGnX+9Ut237ODmrgY4xGy2nE7txbe6/kGBw3AqHvZbndJdRyzXBcJbF3ar z5aQ== X-Gm-Message-State: AOJu0Yy+Y08r25r5gfsDDe7P5CUuhOlR4MZsafnviYw8MI5yNAVFKkJv UNHxCmtrbZfAaRrj0+6m+cMafisX/xB/pT5+Wpmmj1tY9wd/jCmEf73wY/ScnPwj61P5sNuKsjL lSz0= X-Gm-Gg: ASbGncvWKZB/yF01ISHu+V2abaQmEqEbYjfrv3ZOSS82hpN6zd0qZ457ehvYrZ+aJfN Rn1nGePWVSAZ7tHal4y2e00icq4uTXLhI4iCe6PvJumeot/01zyOmKxv5NXpzWOJAj+0VlaozHU DzPMgDxXI+qkMUiXIk/6wQkvMj3Ltezhy6lKW4/lAxrLTuzajORweuYvVx+x6NcsWcLoRFKWM2U +b0Kqw/LI5XQLwn5aX/q96OP0HZAzBTUsuiKjKhBXn2LGCjIP7Mk7VQxuwGTwhxuy2KXCS5 X-Received: by 2002:a05:6000:1866:b0:385:e429:e59e with SMTP id ffacd0b85a97d-385fd424daamr1880609f8f.52.1733225518677; Tue, 03 Dec 2024 03:31:58 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e86f5dd2sm9167687f8f.18.2024.12.03.03.31.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:31:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan Subject: [PULL 03/13] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings Date: Tue, 3 Dec 2024 12:31:30 +0100 Message-ID: <20241203113140.63513-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These warnings are breaking some build configurations since 2 months now (https://gitlab.com/qemu-project/qemu/-/issues/2575): ui/cocoa.m:662:14: error: 'CVDisplayLinkCreateWithCGDisplay' is deprecated: first deprecated in macOS 15.0 - use NSView.displayLink(target:selector:), NSWindow.displayLink(target:selector:), or NSScreen.displayLink(target:selector:) [-Werror,-Wdeprecated-declarations] 662 | if (!CVDisplayLinkCreateWithCGDisplay(display, &displayLink)) { | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:89:20: note: 'CVDisplayLinkCreateWithCGDisplay' has been explicitly marked deprecated here 89 | CV_EXPORT CVReturn CVDisplayLinkCreateWithCGDisplay( | ^ ui/cocoa.m:663:29: error: 'CVDisplayLinkGetNominalOutputVideoRefreshPeriod' is deprecated: first deprecated in macOS 15.0 - use NSView.displayLink(target:selector:), NSWindow.displayLink(target:selector:), or NSScreen.displayLink(target:selector:) [-Werror,-Wdeprecated-declarations] 663 | CVTime period = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(displayLink); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:182:18: note: 'CVDisplayLinkGetNominalOutputVideoRefreshPeriod' has been explicitly marked deprecated here 182 | CV_EXPORT CVTime CVDisplayLinkGetNominalOutputVideoRefreshPeriod( CVDisplayLinkRef CV_NONNULL displayLink ); | ^ ui/cocoa.m:664:13: error: 'CVDisplayLinkRelease' is deprecated: first deprecated in macOS 15.0 - use NSView.displayLink(target:selector:), NSWindow.displayLink(target:selector:), or NSScreen.displayLink(target:selector:) [-Werror,-Wdeprecated-declarations] 664 | CVDisplayLinkRelease(displayLink); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:249:16: note: 'CVDisplayLinkRelease' has been explicitly marked deprecated here 249 | CV_EXPORT void CVDisplayLinkRelease( CV_RELEASES_ARGUMENT CVDisplayLinkRef CV_NULLABLE displayLink ); | ^ 3 errors generated. For the next release, ignore the warnings using #pragma directives. At least until we figure the correct new API usage. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Phil Dennis-Jordan Tested-by: Phil Dennis-Jordan Message-Id: <20241121131954.98949-1-philmd@linaro.org> --- ui/cocoa.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 4c2dd335323..dd88115dc6f 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -639,6 +639,9 @@ - (void) updateBounds [self setBoundsSize:NSMakeSize(screen.width, screen.height)]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + - (void) updateUIInfoLocked { /* Must be called with the BQL, i.e. via updateUIInfo */ @@ -685,6 +688,8 @@ - (void) updateUIInfoLocked dpy_set_ui_info(dcl.con, &info, TRUE); } +#pragma clang diagnostic pop + - (void) updateUIInfo { if (!allow_events) { From patchwork Tue Dec 3 11:31:31 2024 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: 846958 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424987wrr; Tue, 3 Dec 2024 03:34:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXf0HOYO3kL76h42HW/c0SSNL1qU5kbpOhYdHzP1mTlGCGGcJluosys7BFf/ws5j8L6FKa9LA==@linaro.org X-Google-Smtp-Source: AGHT+IHxcFpSOH5YhjzaUDb44/7cnzV2tiZeBYaywQpP4uC5Dg+EICNA8CN9wdf7PDXS368qk8Wf X-Received: by 2002:a05:6122:2a41:b0:50d:83e1:94fb with SMTP id 71dfb90a1353d-515bf5900aamr2398207e0c.12.1733225641602; Tue, 03 Dec 2024 03:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225641; cv=none; d=google.com; s=arc-20240605; b=PHqLk/K4Umpu1Gj505/pnTmtO9qLzrU7qa0idRkdOS+8XetlVPxwsJGf0CiU0/gA5J KtWSQvBV950MVDdIsoY6RyMvkv+2SKUh4WWlyhAVnCXjmtLQED88nJzEKMBtXGyx1NE2 tSJB4oN06k5EuUq3BcWsDL83j7NE2qPY7CMBYarr8HTvNgMHd/3GwgkYKHGsQMOIzXBB 0Yw9TDuRdaT5vfmJ6DdHN6OsNbu8zUWqoDZ5APmM+Q4qjNqxYgq53zyZvvyLAU6bthRI thcGuJTa/paJxdhxjk2abEFPTAb6yvRAkPE3/Yn2naUGS9eWqL6QrJuKKtY3ZW9N7WSL 8xXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=j6jtl4bH2aw1ntBc/Q9c6zL2bli8TxIIjMRIPbMQt+E=; fh=aDCAagW5mxSPqHysMllZYr05yrz1yhx7v9Wal9sL76A=; b=Uck6vLg6UtlH/AXOgzTNcWAB9pODv64dbMSTsUMPjiOpA0V5T1BDOqxZzt3i43gaZ8 v/8R6wXqlSav6k2r5PM7vG6uPF9NoXpOw0ua4bvTKLv2Pg6PYJazqX2unmXXP9B2QJfC VlWlk6mSKV7DfAa+Ivwq+4j0loeN9Y+DG6jYrRSFGPPZNobQPr8cJZ5Ar5/9dff3CNXG i9/xxCHbaMOKbvhU7eom/m2CvIxuKi0xvjk9tGw7mLbaQblUdGjfRiJxgctdkLzp1PIs p678sw+PYRbxMd4RjN+TAvhHkGuA+jWUpeyDC/nXkl6+BGo7MHMr5ml6yfxeRkWTVIlj VdFQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BW565gGQ; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c4257db8si125654501cf.560.2024.12.03.03.34.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:34:01 -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=pass header.i=@linaro.org header.s=google header.b=BW565gGQ; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8d-0000PE-4N; Tue, 03 Dec 2024 06:32:20 -0500 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 1tIR8R-0000BZ-Fx for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:11 -0500 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 1tIR8P-0000Zu-Kh for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:07 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4349fd77b33so44086345e9.2 for ; Tue, 03 Dec 2024 03:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225524; x=1733830324; darn=nongnu.org; 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=j6jtl4bH2aw1ntBc/Q9c6zL2bli8TxIIjMRIPbMQt+E=; b=BW565gGQLSELBoMheP/JMpfHRO6JYKUxfRwoC2G6RZ2TqZcFI4OXd5kautigg4UZZK 5nyqlkUn6NdEdgpOt8m7i2VLA4o8mK1WKU2y8xXcE0gYZR6yl+huiqWZ2uwDc1Ieok9C VhZoI9HnP9/wcbG1ulFlx17n/3sgaxZWZnmPdDfwy82ZLi+Lrn1kUVqx+y6a1A2FqoZJ mOvqX5Rc6WWnxrj5VN4IVf7XmndK8MgeidKFGw0mh+61CCaDU+iQMZNXnZspuAk3KY0i ST2KZNfFSM2LQSYFv4qMHdW7+V4qCMi8IzkxxPzy8xDvUNu0u/yx4Ni0fImpHS+rZlDU tdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225524; x=1733830324; 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=j6jtl4bH2aw1ntBc/Q9c6zL2bli8TxIIjMRIPbMQt+E=; b=MHD3G6iCNTNVqPqbFJjV5VkspTlgIkreokBqMCsg6lhckXHwQ4Wv2RCWKc8z11MBRZ nnzsS6uUHe8rZ7m8K9ubX7p45wei/tXPk2XPX4qkKWQv74WiWf2NqEMHtC1Io8qMJIIi jB7LuOWdeIcrPUovR8NQp76Kl84oIQ67dQn4nMaZlxpWh1zUFG+mN6yOVVzIpNIT3qXT wrVBGhZ1mHcmtlN9Judfh9aGY7xSWXBpjcBWXBujbjVFQyjJvTDk2iLOxw9vP4TWZGBH YjaSC7/QymAMqeD6gWyl4OiBrcj+UM4VSCOpPykWTQlSZNVVE/gDOr9mzf57wmLyhIwz XpjA== X-Gm-Message-State: AOJu0YyuZXxKewd8qXE9dkBZf8v7OyLtcpVKZfpgWrhKJiZCOuNq0yro EAd2C7kC+Vz11FWFIiBGZNhrGEd0leSva1XBJFwvYVkjn4mfIbu1p8nKOSMZScT9KgZHVAYpnvy h2rI= X-Gm-Gg: ASbGncuwfs4tEtOoktoizQt52+S1To8LrLmNMexR3ricNbC2ls/hWVvDpElvcUc9d8t eiOmI/oM5DQlCgRC78OvYJ2jtq1st9MXgXAwXa5wQljiI6V8jZXKlLsf/5+RIWgW9pmEkaiZiBJ SB5XBegTBYt3rz0VqIh58Prf4KU6lDTARBlVg7SjW6aagsrPBo2Hhl6nB9gbISqNE5VZ01LnyiD gB4OUsFa+AMEtSaQ8S3+tAoKIZnAKAeSPv40pAQKSNQXshUGcRwW/+4M1no5RhZne5maFD/ X-Received: by 2002:a05:600c:1553:b0:431:93dd:8e77 with SMTP id 5b1f17b1804b1-434d0a16c18mr19991785e9.31.1733225523724; Tue, 03 Dec 2024 03:32:03 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0f70ea8sm191267755e9.40.2024.12.03.03.32.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:03 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bibo Mao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 04/13] MAINTAINERS: add myself as the maintainer for LoongArch VirtMachine Date: Tue, 3 Dec 2024 12:31:31 +0100 Message-ID: <20241203113140.63513-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Bibo Mao Song Gao is will be sick leave for a long time, I apply for maintainer for LoongArch Virt Machine during this period, LoongArch TCG keeps unchanged since I am not familiar with it. The maintainer duty will transfer to him after he comes back to work. Signed-off-by: Bibo Mao Acked-by: Philippe Mathieu-Daudé Message-ID: <20241112073714.1953481-1-maobibo@loongson.cn> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2b1c4abed65..3d6194684f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1199,6 +1199,7 @@ LoongArch Machines ------------------ Virt M: Song Gao +M: Bibo Mao R: Jiaxun Yang S: Maintained F: docs/system/loongarch/virt.rst From patchwork Tue Dec 3 11:31:32 2024 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: 846957 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424944wrr; Tue, 3 Dec 2024 03:33:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU+/zElF9qqVQxTskOw+RLL5zK7GUYf9ZaSuK//Ginikkh7qMNj3iu6s5HfTbLc5vyiNpNBZg==@linaro.org X-Google-Smtp-Source: AGHT+IEUbIMS1fJ5cghDt5raBXpoEtBWsBGHe+ycaypyAEpWCDUXcu0EV3oQTAeZSJWs1NaWxKOp X-Received: by 2002:a05:622a:30c:b0:461:148b:1888 with SMTP id d75a77b69052e-4670c041ff9mr26086541cf.4.1733225633941; Tue, 03 Dec 2024 03:33:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225633; cv=none; d=google.com; s=arc-20240605; b=d+LS/MZXPy/dWVN0ZEB4WujYrzrsPe8RZHG1MHZiMDWWU3J//qNg/vCt2qmqWPDgyx thlTUOGU0edkCqSZP+cCMQXJMKEQOv2D9R6rgSDof+exAQtyzHUJNUeGz3GKMeT24/yu z16dFxmBVm4xCVj39/2iobftmXBJKX/UPdztEhOfqK6bWwON5EGmX28GGDeO3PaLMKnZ ZEzO4CmQTiRB+nrcALq1fPUyUdoEYeiexWb7O60ZLSmuUGS9+GGSbKDTfdtBqZQu8Gj1 0XNQqp00d9NQujUly/QljjyXmyNyF+gxE51aDR4D4JuoPXun+mQ0+dbD28vrgVQYOM7Y chFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=+3la+FnavYG5s8brFqSIjvleKq1jzXECMBlEIPY8W0E=; fh=fRG0pe6viGIUjHG6wxFnS2yB5kleyOm2AgOl80C8evU=; b=hGXs4ZCq2KoDKhEVKce4hsiYdE+/fufOJYUi58uJtCf506Z6tV8DFsbEeoMIcpTqyo v+2aqDZFPzgWT8gWC3IngsBMUw6PGkLWH+KvHzNJhkzug8l0EJ73jZZ+cINS7J8gsZT3 kOqSIdNzojljSTZ9tYCLX7zwvaBaD5Q9YM2kIja6IOt91Opjn/EuNziqdbrSZ3uZXbnm ei33kMHppvXOOvnjNHyc8T78rlvNX/Oc7Qo+LGPlafGuJsxUdA5vXi+ZQFEu/JDCN5j4 KvXm+dsKG6KZQowfkkIfMjB6HoqBbZwRdz8H1SJpe5iymLGvAbo8NCEMLBtqi4Li9j7/ 6t1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t3bRfOr9; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c410226asi139102221cf.334.2024.12.03.03.33.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:53 -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=pass header.i=@linaro.org header.s=google header.b=t3bRfOr9; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8e-0000QR-FP; Tue, 03 Dec 2024 06:32:20 -0500 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 1tIR8W-0000FU-2O for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:13 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8U-0000aC-HD for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:11 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-434a9f2da82so47142295e9.2 for ; Tue, 03 Dec 2024 03:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225529; x=1733830329; darn=nongnu.org; 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=+3la+FnavYG5s8brFqSIjvleKq1jzXECMBlEIPY8W0E=; b=t3bRfOr9xAEeaBVUNd3THVoVh1bQqEvg05GjKls4FgfbuBiUtqLiaRmYydx10XPGQS LcIxC34SMdFiWzJWuPPd4hgM7/ja9LUhHFZL86C9gXgEn0M313HasccGmyjyOBbpLTah 41UO+VwkAnfy3Phughl6KMDgX1frSCHYh/4vIvgKeSHTwjnxo2I93TRBK7puAWeypgZk /Icmm8mZzIfGcaIEXChDR87gQkWZGDW10aqbE7N+Ku9GJswLiGC5gqRrECn3qXlJM2GK 4cYLOFMNba2Xp2qnd9f8SEV0mQJONhkrAH3kNT9HrVggKmga2iRAUY//CapyG8Y0gsHH 3r9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225529; x=1733830329; 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=+3la+FnavYG5s8brFqSIjvleKq1jzXECMBlEIPY8W0E=; b=CrEo/PRVgM+U0hcjvMcgqgv5yZTqTgEzdX8G0vToJBDqtQKnvNgcs3Db4Zsj54UU8k ZbqHA/6Y3dUh6IA0rtj5L1neVem4HLzmb1SaxQeYWvG9pYAmj7Yhb5JBt0R/cDdgrjBE M0TRkRLy8fjK1YeGZK8w2Gm4jDZ5JcJ08DXDGRPEgJEAB3Lo2LCOXP34/3ntoq6NWjbh /J4oQr3y8c4brdJIFgANFdklfgmY0+0OQhtQPR5+r/OKz/thXwGOwDOABYOitkgCU1kA TtyZ7YHSprxXu3RkEdr1+q57VAICg+3zgHHkoOsV88Km1ctbasMOgGZG1VBIA8d6srIp wzCg== X-Gm-Message-State: AOJu0YyvJndIP40NBvC30SofDPMKB4QYKUvgpwNOCYBEXC8ur/dd5MDW byNvZtufaeW4JBOEqeXY0OluPLcIFGppFytCWo8POPuYoR/1nKNQD4BHF4qz0ycms5W/vEi+YKT +H4o= X-Gm-Gg: ASbGnctcZb3x7WBEEj9m8R3eMQvY56P3+QO1rrzp3n/guM0MbymqKFjzSLrARVOoN0U 4j5HTk8ETbYA53D9bDfaZHzAPoU1ORzzqUv5C/Ae1ZZc6LU0NUMORrAXYjf5FT0NbW+cQ76j5YX VWcbOn/Lk1qnl265TRWNGeE3P+QYFuukx/kigE/MxxcHA0QgLtbcRViSBwz0QOHkXuaD8EQnzRd b07kfnwYr7gvOAq5To9kXJfmf4dm1mfftIzIWz+e+cOGsHvhx+0L+yE2+I6z/AVxTdZr58B X-Received: by 2002:a05:600c:3ba5:b0:431:4f29:9542 with SMTP id 5b1f17b1804b1-434d09b1441mr17712145e9.6.1733225528764; Tue, 03 Dec 2024 03:32:08 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0f32793sm189031305e9.31.2024.12.03.03.32.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PULL 05/13] meson: Add missing SDL dependency to system/main.c Date: Tue, 3 Dec 2024 12:31:32 +0100 Message-ID: <20241203113140.63513-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When building QEMU configure with --disable-gtk --disable-cocoa on macOS we get: User interface Cocoa support : NO SDL support : YES 2.30.5 SDL image support : NO GTK support : NO pixman : YES 0.42.2 VTE support : NO PNG support : YES 1.6.43 VNC support : YES VNC SASL support : YES VNC JPEG support : YES 3.0.3 spice protocol support : YES 0.14.4 spice server support : NO curses support : YES brlapi support : NO User defined options cocoa : disabled docs : disabled gtk : disabled ../system/main.c:30:10: fatal error: 'SDL.h' file not found 30 | #include | ^~~~~~~ 1 error generated. Fix by adding the SDL dependency to main.c it's CFLAGS contains the SDL include directory. Fixes: 64ed6f92ff ("meson: link emulators without Makefile.target") Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Message-Id: <20241120114943.85080-1-philmd@linaro.org> --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index a290dbfa331..147097c652e 100644 --- a/meson.build +++ b/meson.build @@ -4235,14 +4235,14 @@ foreach target : target_dirs 'name': 'qemu-system-' + target_name, 'win_subsystem': 'console', 'sources': files('system/main.c'), - 'dependencies': [] + 'dependencies': [sdl] }] if host_os == 'windows' and (sdl.found() or gtk.found()) execs += [{ 'name': 'qemu-system-' + target_name + 'w', 'win_subsystem': 'windows', 'sources': files('system/main.c'), - 'dependencies': [] + 'dependencies': [sdl] }] endif if get_option('fuzzing') From patchwork Tue Dec 3 11:31:33 2024 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: 846955 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424900wrr; Tue, 3 Dec 2024 03:33:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUhoEe7blmgeEo7XURsCzG/+YWAAQX37hKxkmi4i+iKUq23Zq7s9pK6ZK8VoXB4jqzH2JbN6A==@linaro.org X-Google-Smtp-Source: AGHT+IHpfAtveMpkAAg797IlZJJSWhEgH5lcBYyYPK/trY1QWTcYDwwbJdWwzS94d7KaCLSm+lrb X-Received: by 2002:a05:620a:1aa2:b0:7b1:4a48:56bb with SMTP id af79cd13be357-7b6a61e7d18mr245921385a.56.1733225629217; Tue, 03 Dec 2024 03:33:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225629; cv=none; d=google.com; s=arc-20240605; b=PEKaOO+kDMqMk5ynjAx4BXe+Z9YKaTZoP5VQUx7rAo3LEe4SrFEW4cucycSBixJQAC NgPBrtFJbSkYwhyWeN2FIORxC90KfZk8qMK++ifzJDigZeodm2FnZ1I+wUQmUCs8emqg kBx4b1vac+AszRzWWPKhT4kEr+gxWfCVEJyD2kuDJy0qAYEweweAwEZIMbDInPmbIx6I +t6blK1MZxJ1RvULEY4PzUKbXOlN6ZhpX52qfxr/RzDE7BaUJaGCO9ZMpG3CNDMFzrdu Wk0KAtTNSuAq5ybd+t9WAsIItL+zkU2Ty4JYECBo4jTCM6z415PaOEYJRd9MIDXhwGsD vDlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=0oJ3H34REbMvqjovorF+2XA/kIyPhomBUF8Hcx8gznY=; fh=yCu+QUDg2jbcIExZqaSKT/Zek+yHiNi1eQ7Px/0AfDo=; b=k+yxvftWqIJBohkjKCPpc9zjbFA6IzQ/nUeWxWkfP/MAGWlyGo5K1mPXqJHKnBsP9J rgRXZ3XwNVPN5LQpd8ijNQbNIPjgpx7meKATJ7Pm2TUFSQMFEnZOewBkRKtecS6M7zqF aGZS3RUYKn4vzwNCB+ovnKeuT3OwTDVzgL4HCkfCcUHxkUoZEDRAp7x0PiiJgY37sg+b zj1v7ll8B1ZkL/0jmgGlQ+YRB2FfBjv7Si2WZ3HoIDgldT7hfFlGTV4m1U0P91FommY1 WbGVX/856DqLgJKzShvYhmVk5CW8JXMsVPQVucinEsLkpIiKp1eS9GhVaPICTXGWY9bg RVtA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f90BlEz+; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b6849b27a6si1438445485a.245.2024.12.03.03.33.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:49 -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=pass header.i=@linaro.org header.s=google header.b=f90BlEz+; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8f-0000VY-PM; Tue, 03 Dec 2024 06:32:21 -0500 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 1tIR8b-0000LI-SH for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:18 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8a-0000aP-7W for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:17 -0500 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-53de880c77eso6361633e87.1 for ; Tue, 03 Dec 2024 03:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225534; x=1733830334; darn=nongnu.org; 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=0oJ3H34REbMvqjovorF+2XA/kIyPhomBUF8Hcx8gznY=; b=f90BlEz+XsVQMef1E/SGHvUiiG3QK/7TPbfJ3QMuzcptygXsUEuCUWqtb8jNTdnzhL QurNL+xNRH0NJj3jJxnAYu3mUiTdXzqtogZnAG+h1+iWL7dwNWXW9hW0lst/0Y2hUwSC Gze8x7jikSBtZaSQiNfhhFC0sQS+cqxTSjA9nA0b68zawWWj6z9vz7MdrlGWbTbZqPk6 fFBrUD35lkRHa1L9EIX5ca/nFogvJqEy3zPE4mtOzUafP9FEuo6uw4bZ4qlp02wqsOhr ouNEZQ7fkztnEATFxRGJf/eF6tNKe4f5UBfODfZb/Yg8DzF5ZKVwRcB+iFKXSkndj0/V p/hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225534; x=1733830334; 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=0oJ3H34REbMvqjovorF+2XA/kIyPhomBUF8Hcx8gznY=; b=tyAIClt1o3AApg4G92azLQtYKjaECSKo+8kBi31889befJDtkckcTYQzzYrGDFUGox BfByVQQEJaRHZwSUJRdsRamM3HhOifQFZNEdWMEwrYkNAdKP+InGroogARdElACGGRFS M1GRwk8xRaSgl8fvpn1ub0AC1rteqqUfq41CYAdeR8vv8klDFRTxOENcS5WXU5cN3/qp 9yxnuRuUbuDlgLQSAxHqV2aQggYV5TFBXtZMxf4kZeRopwr9iT1CXd1A+dvWfEwOQCkN 9msXEM++genLW5lazNtZqnusUaxg4i/guYMy/x7A1oPT89odjICndUVDYAvitEjmdsUw G3Dw== X-Gm-Message-State: AOJu0Yzl+SFuMZrXk4jRBKmj8c1z73iIRN63S9Tfk0p7v+yY/bP/eRX3 qxLcXfRa1+uaadJSb2y8V0TJm5FM5qGH+f+HJLGIDQqqjILsQSLjTfk4xdPjYAwBiGQyimPjavz J9JU= X-Gm-Gg: ASbGncvqa4eWsOQ0J4v7fOHAgrTeRuzZvxv7ISx3CjJAgvEbBe85fmmarIQaUeLbKXK x8MgE2Yi/qXptH10Bs7fr7sPKhJK1pQh+QAVowQhfxnXlk4E2TeEKxWFGI9sNaBjWrgeLXPwUa2 9v2gG7ytX7Hn5w58wnfdE7MzFO5h938JCVGLZgBSLWUdvOt/11Wn+bq8joKGgs9BJO66AJsoKKB Wk/+jPsQpHBj4K9hXHfVFDyF10VSV54xA9rtZ/e6O3SnzXET9tA6DCqJ9B0ZKOnKekarkd0 X-Received: by 2002:a05:6512:224e:b0:533:43e2:6ac4 with SMTP id 2adb3069b0e04-53e12a28294mr1264949e87.49.1733225533807; Tue, 03 Dec 2024 03:32:13 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434aa74efbesm217218755e9.7.2024.12.03.03.32.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:13 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Brian Cain , Brian Cain , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/13] MAINTAINERS: update email addr for Brian Cain Date: Tue, 3 Dec 2024 12:31:33 +0100 Message-ID: <20241203113140.63513-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=philmd@linaro.org; helo=mail-lf1-x12b.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Brian Cain Also: add mapping for "quic_bcain@quicinc.com" which was ~briefly used for some replies to mailing list traffic. Signed-off-by: Brian Cain Signed-off-by: Brian Cain Tested-by: Philippe Mathieu-Daudé Message-ID: <20241123164641.364748-2-bcain@quicinc.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- .mailmap | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3d6194684f1..f92be047756 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -226,7 +226,7 @@ F: target/avr/ F: tests/functional/test_avr_mega2560.py Hexagon TCG CPUs -M: Brian Cain +M: Brian Cain S: Supported F: target/hexagon/ X: target/hexagon/idef-parser/ diff --git a/.mailmap b/.mailmap index ef1b8a53f44..727ce204b2d 100644 --- a/.mailmap +++ b/.mailmap @@ -75,6 +75,8 @@ Aleksandar Rikalo Alexander Graf Ani Sinha Anthony Liguori Anthony Liguori +Brian Cain +Brian Cain Christian Borntraeger Damien Hedde Filip Bozuta From patchwork Tue Dec 3 11:31:34 2024 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: 846951 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424591wrr; Tue, 3 Dec 2024 03:33:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWUO9VukIIYK3/mCA/Ka+rRCSnIfsew1DyqkLQCWAIISy7HsXQqns8Ld/dr36I+IpIv3pGP0A==@linaro.org X-Google-Smtp-Source: AGHT+IEwMLWmDzkX7MpFjHa9BN6fGAIL84hn74HygC3ZxuPFLVVsnMKr46Dx6D7msMIVHO7lgvVA X-Received: by 2002:ad4:5768:0:b0:6d4:215d:91b5 with SMTP id 6a1803df08f44-6d8b73083b5mr30761136d6.11.1733225585981; Tue, 03 Dec 2024 03:33:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225585; cv=none; d=google.com; s=arc-20240605; b=HF/VnK4wlCz74AtlRuFJIKsVv4dR5eu2gfzUlrYeBhWqxghNb46nzBtVeY5QmQUKWK ZHGS4gaoEMw68XYdr/AxjAHL4IWvtP1fQ6GCX2YNt/5AvYoeHBDvo4zVjHMqkY6AidyS oImESxWJamzqqmxBz1X/a47obXPkFu6luFqB6pz0yw5viPjbEEh5NnkmUKQVwQuOfHIU LSXa/pQzZxo/BF7DOxuu44HqaayPe1+JA4TOjOfm9Ol3X4Dqwa/Ut+X+Sj55etGsQMQ9 Y6CWEeLPhiO3+UZdIiKgOQIIurqkw9JZQOVTGl+JOqn0CBolTkYZskvTv3XXTmcpm7yV D63Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=GJvSsd8dR9/3SHrqkOdjWUtSWpDGfzavxvd+Z0C+v1Q=; fh=YN/nZ5OGvfh0ZEPp6b/lO5lvfU2jXDgLoNmPtocUoJM=; b=BA7LQbE6S9T6g4iYqju7/PzVKeQAYokWmIoTcz7jSYUniNwHyqgO9ScqCChjpVMUGe DrRCfxB+vf6pufSQgU3zeZmC0291rBw3zNVHlryyTKYVp0EhUNTAdw1HrlnLqlhWyCmk F5rDoJIV2Uy/M8kjqCVDBsKcQy+xdxlrRI6pDPoVkyuyLKXtj1JpSAmvTnWC8l1qJN/z 41nrGiCeVJn1Rdjw5XMC6IVZtDJFCvDeKi8tCziDg7SFhUXvC4ZV+kOfP27GpBHH3sy1 TG3aV6MhKVEVMYuxMqHe8zrSJOGaJ13hd9YUUg/Uih5613k9fgw7lFRr8DV7N+Rzttdt SPVw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RbbrPkYL; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d89c51918fsi72222106d6.364.2024.12.03.03.33.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:05 -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=pass header.i=@linaro.org header.s=google header.b=RbbrPkYL; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8i-0000cM-3q; Tue, 03 Dec 2024 06:32:24 -0500 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 1tIR8g-0000YV-UD for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:22 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8f-0000ai-B1 for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:22 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-385e1f12c82so3576524f8f.2 for ; Tue, 03 Dec 2024 03:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225539; x=1733830339; darn=nongnu.org; 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=GJvSsd8dR9/3SHrqkOdjWUtSWpDGfzavxvd+Z0C+v1Q=; b=RbbrPkYLUgh0OkvoPxNUo44GBV5SVr2sZ7XqwWzVUdG8ZRFnQSHkI8WGlPa9RNyNRk A7N7RLjFoE9YAiICO6CKAQ0OF5xp1JoWSeE8rjFDDnWXikJFCPB84EAtmWbqGMErmzdX NBFK1+JPOlslIbYwbpo+1lqAlj1tAQzQVPYAWGgZ4wRVrL/fOTp0iYjJMkDxa/oWq8SN FjUdnDb3nmrJ/XkmD9LERvh8mKQ80KstZdxa/uJYlM+I2+Ahv29E/ZRwdnI0a7bpq0Yx qXEALUN5WUEXp94L6999fL4gelWPHKpSAlxoujaW/h0d91cz2URF4gDp0Nm8Ir9t3ZxW /YWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225539; x=1733830339; 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=GJvSsd8dR9/3SHrqkOdjWUtSWpDGfzavxvd+Z0C+v1Q=; b=aW6lqZFkLhRNZk0z4aL3r4nJpWtSJ3Xi1n96R8vQQAQ5gWSQ4+AdkcnGdzKqNBbflL totH9sA+hYyhIrYI8MFhc0/sxUj7DjjXvDzwHhQm8Jby7ksgclvTWimzjp4J8x0Ozdxq aOy+kaRlBkCzPykxuP7sHvx14F2HeFf4kzrWW/WAcMt1uwBIgFnekXCkJ+dxK3uw7Yx1 zXwxYa7lWehOaq9iAF54UbaQfo6ETFoOcOaSf/XnSfnSSE+uZgx5xbwOj2hdgaddDgrB hZSH5Vedw/SQwqaWTwpceI/9LZ6+nK7au4KJaQAV9jw6Yu6KY72o8yOD25j5WGpi1c3U DRog== X-Gm-Message-State: AOJu0YwjYMsylXjt6X/Zs1a6l2yiA+m6eGuyBtjnsUrRLU/a3UhFH21M 1lbCQ8fwKzD4rBEXg88GdUZOt7H/1TpDhFUhll4BHMIhAym9N+5MfgRR//dmAaTVqOY2l/ETonX N8n4= X-Gm-Gg: ASbGncsYoLDtlblISmTAI+al1aJGS58nnSrGVU3rIQXV2yDTXuUScW/Yeol7nbBolqj k2L1HB3XjlRfnodtgebALtcrOSuWAgWwhzBNAwY72Tt75RAyAz9hLDupKo04GYfWncGoHCVGe1o GnRQ1G/uIMBRfvl0xoqPCW9S25H8gCgIYQ9rh91GDn4dlEtHWoGhPXvGE3zYQ5k1SL4AhhmoBUx rmsnYfKoISBs0Yk+hTV7Po1fZLO3V5cnjRcz+AeOPpT2sYSyBELmf0PUslSAOvNnlqA3H4o X-Received: by 2002:a05:6000:156c:b0:385:e88a:7037 with SMTP id ffacd0b85a97d-385fd3cd72emr1942211f8f.6.1733225538921; Tue, 03 Dec 2024 03:32:18 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385f8448d32sm3687037f8f.96.2024.12.03.03.32.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Ani Sinha , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 07/13] hw/core/machine: diagnose wrapping of maxmem Date: Tue, 3 Dec 2024 12:31:34 +0100 Message-ID: <20241203113140.63513-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé The 'maxmem' parameter parsed on the command line is held in uint64_t and then assigned to the MachineState field that is 'ram_addr_t'. This assignment will wrap on 32-bit hosts, silently changing the user's config request if it were over-sized. Improve the existing diagnositics for validating 'size', and add the same diagnostics for 'maxmem' Signed-off-by: Daniel P. Berrangé Tested-by: Ani Sinha Reviewed-by: Ani Sinha Message-ID: <20241127114057.255995-1-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/machine.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index a35c4a8faec..f29fe959647 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -598,11 +598,19 @@ static void machine_set_mem(Object *obj, Visitor *v, const char *name, mem->size = mc->fixup_ram_size(mem->size); } if ((ram_addr_t)mem->size != mem->size) { - error_setg(errp, "ram size too large"); + error_setg(errp, "ram size %llu exceeds permitted maximum %llu", + (unsigned long long)mem->size, + (unsigned long long)RAM_ADDR_MAX); goto out_free; } if (mem->has_max_size) { + if ((ram_addr_t)mem->max_size != mem->max_size) { + error_setg(errp, "ram size %llu exceeds permitted maximum %llu", + (unsigned long long)mem->max_size, + (unsigned long long)RAM_ADDR_MAX); + goto out_free; + } if (mem->max_size < mem->size) { error_setg(errp, "invalid value of maxmem: " "maximum memory size (0x%" PRIx64 ") must be at least " From patchwork Tue Dec 3 11:31:35 2024 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: 846960 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp425165wrr; Tue, 3 Dec 2024 03:34:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVgKULQA4NEEAWynfqOJLjdDuB8CXt9qDNcLmChi808x/LqFs4nPyuckipEFeeBN+PN172THg==@linaro.org X-Google-Smtp-Source: AGHT+IEBlsjPiHQjvC8DLuM3eWcQosplH8g2hrKVvEIuj0T/nsLDdsQW2SqoFQvzcjJn3Hw6lhRI X-Received: by 2002:a05:6122:886:b0:50d:bfb2:4f2f with SMTP id 71dfb90a1353d-515bf3b9936mr3217795e0c.2.1733225666832; Tue, 03 Dec 2024 03:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225666; cv=none; d=google.com; s=arc-20240605; b=AMDSAY3Db81H81qvoaiW1fmE4bWEd2WyDwZZkpjq7C5YzTbIG6CPQ+EPvqZmjDu+Hk JxXNzXEiw/xsjGy9nz/PKikDSXv8htsQAFs0Quh4fZPp7wfW5Sdia5+KAk/s0Cy/I7qF IHjvuty1KLQ4OBXgiq7Xz0JfkMz6BlQOIiSRV7VL3dPsKqWpjYRsQ+b/AOPczusFjJm/ NborgZmg+sqXcWh41BQYg9iVSfdz0AZ9nFBpBpxd62cZrU0t7d/9L3MSnkDqVKEBCeap dl/NiBQzAOuaypGF2gb4H075cUAmTGPq60TCH4W1qY416m28B90S88JVekdlf5mF26RA tR6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=KV+7GY90q7nCs2B4ZjKF0flW7Qs4QTHZjk/KQDAdUzg=; fh=JfTxFKF5fnPA8c1/9UvbL1264zWtl0PpzA71QzhRUY0=; b=Z7Oy5mWyyXhV0lHlLmYB878XTGhaMSP220XYzHS8RHs3QxreS7QAuBaVzpwxlQaKlt GL+5J+68B6wZRvmGVlOSKSg44sh9zES44wC5ynybd3WX5cy0iSz3T+En/TLo6c7w1KrD Wr/PKZ3BDSEpwiZeg8Egc5xG/a89HayaaQdTZL0J2q9oGy0UDozIKj623Re2J68tsUjo JAc0at1QWOqglAARUDoyfwEPBD1gvFbbGk5hx+3mGXfD4DAJ+zIDE3+eUjAjJmPFzUtJ 5io39v6nR7ncPzDdo6wqdPWi3MORov7EaKl8FSlXnS05cV7UVnX1kn6L/BJ9oE+tFSWe nAkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DKWTq6Je; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d8a285c9a4si66614866d6.540.2024.12.03.03.34.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:34:26 -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=pass header.i=@linaro.org header.s=google header.b=DKWTq6Je; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8n-0000gF-Kg; Tue, 03 Dec 2024 06:32:29 -0500 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 1tIR8l-0000eB-MG for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:27 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8k-0000as-23 for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:27 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-385f06d0c8eso1462623f8f.0 for ; Tue, 03 Dec 2024 03:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225544; x=1733830344; darn=nongnu.org; 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=KV+7GY90q7nCs2B4ZjKF0flW7Qs4QTHZjk/KQDAdUzg=; b=DKWTq6Je5KjJX+h801XNTMLG845h780GM/1HQHatx/sA5w/4POvIUBzFTqwqKKMduL jr0gWATevUTqYkK4DsLx8mpZh6VKjxqj0YeQaVs4LzpyFBGCJWiWTvyAyGNKi/4MGAW9 eQ+bKpUqo2q/w9W3jevfcaiBCO7FZ7SfCYZHirsCpokzDYKasD7NDuCnE6OLHCWOcxhO JSXTfH+ccc+C1FztBuqKRFjz286PxPDuDVHZQM8/7FuK+JUr7S1ccf4kqyR6IPdPcyqs IhjCjiH6I51UJiYIqIfF5auC/f5gcVjjFf0sjqg3Tfs034H+sKw/WrHEEO0qsXcBbVui KdrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225544; x=1733830344; 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=KV+7GY90q7nCs2B4ZjKF0flW7Qs4QTHZjk/KQDAdUzg=; b=KRCRnVoS+YrNmwiu+kGqwNt9Tda8vH8hfJsnz2DDznnxcSoKtEPQMWwwEnaQSIMHfw mgzc21MaFW76jSTHnm8mI54Fa/DGy9zuUktd6BI3gtRTSihaOsgfM8pCZGBx3rnO5xVE 91rYBruFkoK9pWutDPPSfSf9zKGjqhSV4SMc3CnUjiGivXXjhFDgrq/aunj4f/EPJqNx FANM77S1huQrOv6hOdos9uNpVMAh26/yX77Nk0T1HI2ame9LWmxBWfkeTj8RIVZfm5W2 qMB91io3nh9i74pkQ607uD1Zd7IlvS3Mq6i0ccJLIATvbx6sxICvLa97c/Ggbq81WwMM ugAQ== X-Gm-Message-State: AOJu0YzHBourDcEwjUn0HYYroy8i93ARVxy0H/8dMbvPiRTFmd9qqtFb vnYzpdOR38YAjRUqawdbeo1lcviXHTB1uriXE6yFn+lcZNVhIggQW4p5c2ZMhZU6z3L3YrmRnje OBu8= X-Gm-Gg: ASbGncuC6UEmTv80msHzRjWsiCcHsSX1IIvgNmoy7jRGh0vh47T6ZG1CgcXJKNv7llL 8xalZmEaWDX8Vxsjp37tp/Z3nXu0mN6YmuLmdki8PCKf8n0mqMSUdDdK9jRiIIqq6AD7NJxbybx 0lCXIHtQYAPuXbvGQ85Xj/Kry1fCZlDflswJAG+1U1jGRM8Np53qkH9EQQj1gegSjWYew2UIdHk v1EWDlT7gUIW4QG90ghiwQUym2jdZtAampDO+5Kh/2xcXyyAbrKl5bYg844XY3URHtU0yoM X-Received: by 2002:a05:6000:156c:b0:382:4eef:270 with SMTP id ffacd0b85a97d-385fd3e9678mr1913180f8f.16.1733225544264; Tue, 03 Dec 2024 03:32:24 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385ee60549dsm6885508f8f.34.2024.12.03.03.32.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Daniel Henrique Barboza , Richard Henderson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= Subject: [PULL 08/13] target/riscv: Avoid bad shift in riscv_cpu_do_interrupt() Date: Tue, 3 Dec 2024 12:31:35 +0100 Message-ID: <20241203113140.63513-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell In riscv_cpu_do_interrupt() we use the 'cause' value we got out of cs->exception as a shift value. However this value can be larger than 31, which means that "1 << cause" is undefined behaviour, because we do the shift on an 'int' type. This causes the undefined behaviour sanitizer to complain on one of the check-tcg tests: $ UBSAN_OPTIONS=print_stacktrace=1:abort_on_error=1:halt_on_error=1 ./build/clang/qemu-system-riscv64 -M virt -semihosting -display none -device loader,file=build/clang/tests/tcg/riscv64-softmmu/issue1060 ../../target/riscv/cpu_helper.c:1805:38: runtime error: shift exponent 63 is too large for 32-bit type 'int' #0 0x55f2dc026703 in riscv_cpu_do_interrupt /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/../../target/riscv/cpu_helper.c:1805:38 #1 0x55f2dc3d170e in cpu_handle_exception /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/clang/../../accel/tcg/cpu-exec.c:752:9 In this case cause is RISCV_EXCP_SEMIHOST, which is 0x3f. Use 1ULL instead to ensure that the shift is in range. Signed-off-by: Peter Maydell Fixes: 1697837ed9 ("target/riscv: Add M-mode virtual interrupt and IRQ filtering support.") Fixes: 40336d5b1d ("target/riscv: Add HS-mode virtual interrupt and IRQ filtering support.") Reviewed-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-ID: <20241128103831.3452572-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu_helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 0a3ead69eab..45806f5ab0f 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -1802,10 +1802,10 @@ void riscv_cpu_do_interrupt(CPUState *cs) bool async = !!(cs->exception_index & RISCV_EXCP_INT_FLAG); target_ulong cause = cs->exception_index & RISCV_EXCP_INT_MASK; uint64_t deleg = async ? env->mideleg : env->medeleg; - bool s_injected = env->mvip & (1 << cause) & env->mvien && - !(env->mip & (1 << cause)); - bool vs_injected = env->hvip & (1 << cause) & env->hvien && - !(env->mip & (1 << cause)); + bool s_injected = env->mvip & (1ULL << cause) & env->mvien && + !(env->mip & (1ULL << cause)); + bool vs_injected = env->hvip & (1ULL << cause) & env->hvien && + !(env->mip & (1ULL << cause)); target_ulong tval = 0; target_ulong tinst = 0; target_ulong htval = 0; From patchwork Tue Dec 3 11:31:36 2024 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: 846953 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424636wrr; Tue, 3 Dec 2024 03:33:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXgesNl4glKbT20Ocp6v6ymrZEpfZ65z9LAB85sQIZB7a6v7iBqAYxUdozh3TEiKbpXq2yWtg==@linaro.org X-Google-Smtp-Source: AGHT+IHv7jMJCxrurq7rIXGBb0LdObQvz2O8kipUxL62+UCeKKzCJ6kTuknlOU3XeX2UZS6VoaoP X-Received: by 2002:ad4:5c6c:0:b0:6d4:12c:c6cc with SMTP id 6a1803df08f44-6d8b7385f0fmr40866596d6.25.1733225589566; Tue, 03 Dec 2024 03:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225589; cv=none; d=google.com; s=arc-20240605; b=ARndweQcmbQnSxRtI/s2tNyNbRfa4i1HDPqoYMI7K4NZpTxAYOvz89+0R0DhvUIzay 8ILWFbb4zz5XNAhGUWEh3dvk7uRWN7AOE+5TmBWhuFyNANhVHkpd/7auSNlbXZyLS6/e TntWDsAmCNcfEn/zW+2GZXbtAd8f5lTE05TfVWsziDgsyAStEcI8171m1GaRCGyd+M5t UPSs/LWs5xDBKeL+qSC1Ka0UFEp0XsnSm6I+ciYx7qyXezljq8S5B1R3njJLHZzmCXLg ItxN3aNnkhL7B6kWW6ztAXb/CsHj2fw/GXh6wK6cGBiq/QRqXFqCqBACl6YNaj1X313u 6tQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=8t8QZY/FN9UNn+m+6+g6e/VW+X5qrUlO0/BnLyYU4FA=; fh=0XtXTUbn8xZU8pj5Y33pO81yY/nX6jps34El+2xFlSM=; b=anaLrRelfoYASoGvlPmoqncIhnYxxE7ySLBkB/Npz0o1fx1i+DxnV6R3YTWOXe9Swc /8FlOgQ2hXQTcyn5cRlpdxZp3xx22LqNYiENqEZnATe5lvwqbeq4m3pY9ZOpzhoCjc4l YWbHTnvUsNJweh/sOTCCLO3WUtgNQ6/ZBhNO4vSqTC5desJNDV99J3llS/dJC0yoUaSd +KKtXCEbUJq5Ary2iAx0api2oT1FHV0jOMHa3zz2BLW57lUPP+rbYW7u2qvpcLOZ4m09 DrmXLj/jylgLGLP6CdeMb24Bq6eDWmvIW+l9JVYZEwLFjiPH0qtlV/E1dONelQxIy1x0 iGcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TUh0Qxu+; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d89cff671fsi80833206d6.491.2024.12.03.03.33.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:09 -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=pass header.i=@linaro.org header.s=google header.b=TUh0Qxu+; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8s-0000n8-B3; Tue, 03 Dec 2024 06:32:34 -0500 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 1tIR8q-0000k3-ND for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:32 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8p-0000bC-8a for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:32 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4349e4e252dso50350465e9.0 for ; Tue, 03 Dec 2024 03:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225549; x=1733830349; darn=nongnu.org; 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=8t8QZY/FN9UNn+m+6+g6e/VW+X5qrUlO0/BnLyYU4FA=; b=TUh0Qxu+rCrm1E9zC/MBR5dQxsKbjavqPE1wneuyH1/q3rqK2CMtZAQH+C0YfC0KTI Z7/KvltAxNegvhDoqZ1CCpRC0JtjdTawrjWQSFWDnEb5Jfa6WM1opB/It24yHQMQEJt3 YJ2XAEFElSLwwl1V0kjdmNOpmd8fpzgwAw9UsV2TF1l0UyxNE5m2xPcn0onyROylBzTE lW792qqMedKZwce6b7ErFNKGQB2mnob7mbT0eIW8GDHLbD2JqHeehkRD6uiLj6w749zY 85kNZ3xjz0YdtKTQAEEwlhf5anKpw9Y7XmPQbMpJq0S5yBX4NR0uax1q+IF91lkws9OU H0kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225549; x=1733830349; 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=8t8QZY/FN9UNn+m+6+g6e/VW+X5qrUlO0/BnLyYU4FA=; b=DLpNeUh+GxdxjNCS7HED2QYliuhz8Wp3Eq3nqDZ81gCRvj9nB2CMuYVMeRX3PespDn calIjYCHWHOd20HBpxDXSuyv9PE/MQVO45UMuY5IR9xTZXcvlIEr7rXnRBQAwsMqIcsK UVI7Ibn+PG1nT4WCm5+42SwUM6hhEiP8sMv8qOH7yKrR+U1SGc/YoWW860ZcR4rCpSYB sARdbak6cHCaxZLNuEGi5qpkz/prw6+GvRTwMBTjg+UCXlevdvgZVMhY1jbgX3fOpPuv KnTxbx5dYKQMaIqFvS1HLm4JMu1321L8FdRkPt16RVYEcrwzJzIcWlYUvU8K/PHnpKdQ M+ZA== X-Gm-Message-State: AOJu0YwPiTTTV2HcTqMR2KG3L8F59xso4n9ZVr754uBT0FKTUlbrqW8f GzlHXNgepODJ8LOtpqOp4+jkRciSEdaBRODoJbmU9dg/4EDZGROMF6DJVhm18Uwd5b3MVTSToN+ attA= X-Gm-Gg: ASbGncshBcd6KD/kN03KIhLSyeNqbTh7DWidkXENFK+1IwEfZ2SQaBSsYucuNR4qyQ5 9Z09JqSBURWPhv627qfs3uPBQA6wwBGoOJ4SDH5N7eOukpjJV7RwTqzypuW04xBoZYFLNJNvjM2 Egmn/fw9t8pUXWqLX5eMWquGdygK8mhq7mcqoJW+XcgwKytySDL3meVWgRUkiiewI8d/5eUliqK qJQwpJvGdn4j+aohJDyXJmm4hUHmEhRLhP2o6DlK16j3c1H4MwTI+a9LBThD3xwSGL0sYiO X-Received: by 2002:a05:600c:220b:b0:434:a815:2b5d with SMTP id 5b1f17b1804b1-434d1116ebbmr17064875e9.24.1733225549547; Tue, 03 Dec 2024 03:32:29 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e13e8eadsm11039936f8f.28.2024.12.03.03.32.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Benjamin Herrenschmidt Subject: [PULL 09/13] hw/display/vga: Do not reset 'big_endian_fb' in vga_common_reset() Date: Tue, 3 Dec 2024 12:31:36 +0100 Message-ID: <20241203113140.63513-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The 'pci-vga' device allow setting a 'big-endian-framebuffer' property since commit 3c2784fc864 ("vga: Expose framebuffer byteorder as a QOM property"). Similarly, the 'virtio-vga' device since commit 8be61ce2ce3 ("virtio-vga: implement big-endian-framebuffer property"). Both call vga_common_reset() in their reset handler, respectively pci_secondary_vga_reset() and virtio_vga_base_reset_hold(), which reset 'big_endian_fb', overwritting the property. This is not correct: the hardware is expected to keep its configured endianness during resets. Move 'big_endian_fb' assignment from vga_common_reset() to vga_common_init() which is called once when the common VGA state is initialized. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Benjamin Herrenschmidt Message-Id: <20241129101721.17836-2-philmd@linaro.org> --- hw/display/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 892fedc8dce..b074b58c90d 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1873,7 +1873,6 @@ void vga_common_reset(VGACommonState *s) s->cursor_start = 0; s->cursor_end = 0; s->cursor_offset = 0; - s->big_endian_fb = s->default_endian_fb; memset(s->invalidated_y_table, '\0', sizeof(s->invalidated_y_table)); memset(s->last_palette, '\0', sizeof(s->last_palette)); memset(s->last_ch_attr, '\0', sizeof(s->last_ch_attr)); @@ -2266,6 +2265,7 @@ bool vga_common_init(VGACommonState *s, Object *obj, Error **errp) * all target endian dependencies from this file. */ s->default_endian_fb = target_words_bigendian(); + s->big_endian_fb = s->default_endian_fb; vga_dirty_log_start(s); From patchwork Tue Dec 3 11:31:37 2024 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: 846959 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp425136wrr; Tue, 3 Dec 2024 03:34:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUukvNS1tBHaDwIsKxvHBUnLTWtNpiPK87nraGawfMK22b9J/Ayxq/7sa3DWhQWobWTN1vcNg==@linaro.org X-Google-Smtp-Source: AGHT+IFn1kD7GZ8ewjtsfic/3STK0U0A8CZ3N6fkvoeiIqiEfZHjbNkGX5BmNI8lRumJ199OQViu X-Received: by 2002:a05:622a:3c7:b0:460:a9ec:b506 with SMTP id d75a77b69052e-4670c3dbd68mr25631581cf.49.1733225663538; Tue, 03 Dec 2024 03:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225663; cv=none; d=google.com; s=arc-20240605; b=U/8Mdvz41SzljbCpGekksgzLk/zyNyAsjFAG+wbKBZZGTCWvcsez5Ds1KNH17QEgPg xQZgPohFi2UB7LBuE70sI8LdTYWli0Kc5NqcGhJnZUHcTHmX9jrUjAh0ysAFVRuG3goy KuDb5bJggDD5DBh2n8ZUdVV2054/U+LUnZyN0aUQQzoeNPVCAm9hBa0OwoflIm40fY7B oTkFQNTPcPLWil22D27fEAPiKG5aLlVe8vzok+Te7oTCg4DXMK7oY8Ws9Ewz1Cvi19dg Mdu+9IGE3F56hesacfkP7JgQjrKI62ItI8m2sIrkyzs6iyXwlKRkrQwMv0oDvoGU8JKG Hw2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=mkPA+7sTb+zksQscjRLpnKKKt+PKAd6deC8dAij30IE=; fh=2yqO0AtrOSTb2qvd62gN6VrrrBxi4bXCXp9UDFRICf4=; b=lc+ShoCWT9MvYaPLErm6t1/hJmiQtrOA0qiIFpFX4Pn3I39mKkVxc611HMQQGlGjze u5yh/Ji/WXpWXANWEGkrjYKlrCU5+U65mMXhh0EsJgWg2i4mS6WccHCApNfQT0qTbDZk XmPBKsfMZQt/r4RsJkZntXmm57om01d0As1drybBRjEUkECwd5KkB8tRXB+pcVivnEm+ yk+RpLk1dJ2tjulMbeSRiGHm4g6FFs7d9R9RiL2wIrhe0asypBd5K8OJqyVeuEIbiNfW mFkXdAHfDOgrgmt0WCy2cXpnsmespWP407TB8Ah3J0z+vUEBXhqIob/EqbwRZJZWOVFT Vbbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=he16EbLc; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c4259039si133896341cf.565.2024.12.03.03.34.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:34: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=pass header.i=@linaro.org header.s=google header.b=he16EbLc; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR8y-0000uA-1A; Tue, 03 Dec 2024 06:32:40 -0500 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 1tIR8w-0000th-Mn for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:38 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR8u-0000bT-Ty for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:38 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-385d6e36de7so4640220f8f.0 for ; Tue, 03 Dec 2024 03:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225555; x=1733830355; darn=nongnu.org; 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=mkPA+7sTb+zksQscjRLpnKKKt+PKAd6deC8dAij30IE=; b=he16EbLc2a+EOpPulgqlAJROAgVrftDkh2xSSUDHVkk/c2BWnpz8i7u7X8fNeAm8rH hkjlzVk7hCyFcZS5D9G7KwnnB6YRWBwSvtCHEb0tRlNbKeTtrai/m8lmXXkSb0vJ3vf+ 9Osje6UHtHBbCNLIOdsOBy2szTfvrt5w0PhbxQMM5rGd1Wfx0sR5gn/tZOUiwcCoclIm qchnjGonl8mn6lCC4vjF4VJYOlzj83nPy5eoPLoZFxQOCNIPv1cTLqF8PVFiqp0zeUGs iUMzK0QCCOpu55EUFUu0wyE5nt00pc22zkFtGEe3Tx5Xp+yzTeXpOaC2bFOpdj4XstqV CBiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225555; x=1733830355; 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=mkPA+7sTb+zksQscjRLpnKKKt+PKAd6deC8dAij30IE=; b=j5DcnChWKRTMNvLrcA5PE7MXoMVcJIucPZuYdqhDjK0JYKiUKEC3y7p+gFkAAVcZcL kk0iy0/FpSqDZNdiaRwWIoy9+Eacww0cQKHRE2wO/TR5v4b3eQAVb587GMydOmC9FoI7 1mtbpBFkhEqE4P4HhNzGki9Ng4ZTejMFmUqre0nuTJdzitYjjCKnSVrgYnhnN1kIGzCe SrJLciNKvlGx9fvz+IzYIYEHfODoFynycVo7oLZf5rPVIsnD87fRjVYanU9vGCqWVapN dhXgQyMpUOlo2Z/FlW6YMVOOXYnLw/onE9BTd+UJmEcwNm8TvzLjeJutM2fISlvn0Jlh W7Jg== X-Gm-Message-State: AOJu0Yz+RhpUHnNW9hwlG5da3qh5Lgf17UjlWDtFavlWds/vjEmjokOW db8VI7xRyHTo+GUqvZMQ1WRXU7D5/eIxrTWq0Zh0/4TzemKqS/irVAv9lxoFwDET4nblSE98xAL LGoY= X-Gm-Gg: ASbGncvYY14cVMK4lVi3nCQ/wptoiRgsh/xOjgz8JoncZoE8nE7ByXfVm2ENoD9Tw2m h5S/+h3E7A1mdAMq/SpZNmjRNM3lRUCunmTQ9qNpWdN6L6JTYJk7H381T/PvlibwTW5b0SalG71 Q3EqNjAkE/xZrEQmKa4DWCGRvz09ZimspXsJh7iqOt0v5odDa1NtdivJwnmIRv7uNWQ5ac3V/EI 9KmpRqAj/3VKk/Av1lZuCov8igqtVoFEpnj0EGwLTHB4dxfmQrbDtYLzvJaUPamPrda/Kmh X-Received: by 2002:a5d:5f84:0:b0:385:f1ac:3ac9 with SMTP id ffacd0b85a97d-385fd3ea448mr2064523f8f.17.1733225554837; Tue, 03 Dec 2024 03:32:34 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385df50fa9bsm12523649f8f.72.2024.12.03.03.32.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Martin Pitt , "Richard W . M . Jones" , David Hildenbrand , Michael Tokarev , "Michael S . Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 10/13] hw/virtio: fix crash in processing balloon stats Date: Tue, 3 Dec 2024 12:31:37 +0100 Message-ID: <20241203113140.63513-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé balloon_stats_get_all will iterate over guest stats upto the max VIRTIO_BALLOON_S_NR value, calling visit_type_uint64 to populate the QObject dict. The dict keys are obtained from the static array balloon_stat_names which is VIRTIO_BALLOON_S_NR in size. Unfortunately the way that array is declared results in any unassigned stats getting a NULL name, which will then cause visit_type_uint64 to trigger an assert in qobject_output_add_obj. The balloon_stat_names array was fortunately fully populated with names until recently: commit 0d2eeef77a33315187df8519491a900bde4a3d83 Author: Bibo Mao Date: Mon Oct 28 10:38:09 2024 +0800 linux-headers: Update to Linux v6.12-rc5 pulled a change to include/standard-headers/linux/virtio_balloon.h which increased VIRTIO_BALLOON_S_NR by 6, and failed to add the new names to balloon_stat_names. This commit fills in the missing names, and uses a static assert to guarantee that any future changes to VIRTIO_BALLOON_S_NR will cause a build failure until balloon_stat_names is updated. This problem was detected by the Cockpit Project's automated integration tests on QEMU 9.2.0-rc1. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2329448 Fixes: 0d2eeef77a3 ("linux-headers: Update to Linux v6.12-rc5") Reported-by: Martin Pitt Reviewed-by: Richard W.M. Jones Signed-off-by: Daniel P. Berrangé Reviewed-by: David Hildenbrand Reviewed-by: Michael Tokarev Acked-by: Michael S. Tsirkin Message-ID: <20241129135507.699030-2-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio-balloon.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 609e39a821f..afd2ad6dd62 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -167,19 +167,33 @@ static void balloon_deflate_page(VirtIOBalloon *balloon, } } +/* + * All stats upto VIRTIO_BALLOON_S_NR /must/ have a + * non-NULL name declared here, since these are used + * as keys for populating the QDict with stats + */ static const char *balloon_stat_names[] = { [VIRTIO_BALLOON_S_SWAP_IN] = "stat-swap-in", [VIRTIO_BALLOON_S_SWAP_OUT] = "stat-swap-out", [VIRTIO_BALLOON_S_MAJFLT] = "stat-major-faults", [VIRTIO_BALLOON_S_MINFLT] = "stat-minor-faults", [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory", + [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory", [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory", [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches", [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc", [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail", - [VIRTIO_BALLOON_S_NR] = NULL + + [VIRTIO_BALLOON_S_OOM_KILL] = "stat-oom-kills", + [VIRTIO_BALLOON_S_ALLOC_STALL] = "stat-alloc-stalls", + [VIRTIO_BALLOON_S_ASYNC_SCAN] = "stat-async-scans", + [VIRTIO_BALLOON_S_DIRECT_SCAN] = "stat-direct-scans", + [VIRTIO_BALLOON_S_ASYNC_RECLAIM] = "stat-async-reclaims", + + [VIRTIO_BALLOON_S_DIRECT_RECLAIM] = "stat-direct-reclaims", }; +G_STATIC_ASSERT(G_N_ELEMENTS(balloon_stat_names) == VIRTIO_BALLOON_S_NR); /* * reset_stats - Mark all items in the stats array as unset From patchwork Tue Dec 3 11:31:38 2024 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: 846956 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424934wrr; Tue, 3 Dec 2024 03:33:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUWQ4SO+kNeKntIKdER5NV17MAPeSSmYxRi5fRGN1laE67QE3mVuqtj5byx2LJRm7uuS0TGqw==@linaro.org X-Google-Smtp-Source: AGHT+IG0Wq8tHGMgKQy62GEL/XpJLrX0zkx2sDfxxdymBo3WwNml6zwFlzBE82J35eXMpwRuW+q6 X-Received: by 2002:ac8:57c3:0:b0:460:8f80:909a with SMTP id d75a77b69052e-4670c3cc078mr23758031cf.32.1733225633121; Tue, 03 Dec 2024 03:33:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225633; cv=none; d=google.com; s=arc-20240605; b=dsvfcyNec3LKm6D1MLkj7tgocliNUY2qJtQ+g5+kIHe4tok49cz9/1FYps5knoRCUZ /42/38Vqm4AJA4Ov9BpJQ9RC1XdZAK71jizETnZtoVR6GpBmEdiz1318/qcrQ51mXstf Sq4JEmRkK7Y9yS5FgpuQKxUiGcbYhVEnSWw92a905lR+w/o3KghnUCPZoR0cFqTGYzlT 1JL/5hENHJNPvp3LQzcQG8A7p2qawcX2UZWUv7UL0CdN4w60c1T/eXeVdB2nGabnvtWj 03X1KzQyNuturQlLt6LJRxnTvO5mxA70d1GRtl9t04+YZUeNm3z/pXyXFaE9KoazcO/U mV1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=Psz6QYjNWfaE66z0yRJOGzXu5KyUodxfagJJPxkvaQY=; fh=Qfc9ntnPGhXFLMiIxQFQ+l/Y5vwCImRTrz6LyKmt9OE=; b=IN1f8sKN5xrfrSGD9b5flkPCf9uWiGmVK0M5ttw7KDP9HEdcoweqrDicQq6naRpncu zyWIr2d4LowmXj2MbYywRvTbua5tokULixRSPet0t/J2/ZCmtu4XJOOI+OKyQGVYxMR9 sKi2qbxRcyMhKcdE9HCwBAQ4dGWWZHnYQPXMkzR353zG9enyiPhtGeey2Me9aYma6BDb tJhdg6DxLaIMBBe3h1mTmwQKOTaPhOzoVzkbt/I725pQPwbp5lNc1GY6c1omGrmarVaT vkorKFgp/XNs2iwIp2D0FfskAm0XvRLh1mxQIvALEy+Q/2LhgNRGP9h2/i4W1rPhM2Tl Gvog==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gj7kK/tD"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c4223fe8si166068551cf.383.2024.12.03.03.33.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:53 -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=pass header.i=@linaro.org header.s=google header.b="gj7kK/tD"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR93-00014r-Cz; Tue, 03 Dec 2024 06:32:45 -0500 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 1tIR91-00010L-Nl for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:43 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR90-0000bu-3J for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:43 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-432d86a3085so45258685e9.2 for ; Tue, 03 Dec 2024 03:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225560; x=1733830360; darn=nongnu.org; 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=Psz6QYjNWfaE66z0yRJOGzXu5KyUodxfagJJPxkvaQY=; b=gj7kK/tDusnQTxv5C5adruWXrIEkqyN4SeY414yHKLVjdu/7v278pLvynYzWKET5pb xI7MY2b8RRoYQr/hhaEfTUODq3/XD5kDjrmtW9xMrDNWULxIsV4KJFCln26AkOk5zqoH 0bjVaTltwqETVBUvQaBq7MPNEKT6mUJ9zLrJAHum7Fd+PHw3j8IiS15SK1lVuglycAzY uFMhUKEPLt1P5nQH2JSahi3HZTZeGTkdv0lnden5w7GAZL5+YcecLBYJTxfR9mOXmJ7K QfvN6C1POTuKyg66f59bFWpD4eXduCYuUW6BDrP15gnrZJMiWxY5+c/2MtaOGzhd0IPq RZXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225560; x=1733830360; 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=Psz6QYjNWfaE66z0yRJOGzXu5KyUodxfagJJPxkvaQY=; b=iQMRxhAAaJCRtwOjB87r2vP1hiru7GubwIDTRnrVi3CzAwRvF6El4kJ/9nVsnYvN4p SZSsHJjzmDUvmJ/MR8Rhx0APeyb0RytDt27QYKg8zOBO/t6hozz2i0XgFb/yKxeuB2tr 5K7ZuRjTCOwfw3w2Muv4Oe9MRA7MVfcvZVF+JuwAI36kFBDDMgHYFUeTcwGlbW8hDKNL jocvo9b46VxRaRPqtssFNyW1ctT38gJU4OcDjWktrC/Ctxqk0A2xrxQS3jmy7ZoqgILa vN5kr6XZI5hY8Na0RmZ4jMCzrl4v/OEuJ+QzwA/wrE8AWpO8No1mX+6ziB5URv0ObXx4 STYw== X-Gm-Message-State: AOJu0Ywha0nToedStExZr3609wf7lq4VLlFlt7IDCQZiZt9xhfcKfaIm r7nM3VnTgxBHNwDIttcGQIRuCMDsRYOZ4yR1VAe7d2f9MLpuplulBDoCrxLEmKwtSVgdZ9mwlyn nMTE= X-Gm-Gg: ASbGncvUAZjb+cyOCkBp3i4D8KoX0GryBpEWx1gptU7nrrjD4NFJCkIQBE7ZlVIkqxN DzXW7lHBJb42ELY9uLk9Oy95uAkGe/Nr+S8bFKHpih9Vfa6ocZpmsLiQU3vpBRnnM1EYFPQ0GNn nwVi3QWp/1fo4WLg++cDhJzrwnSEOVvPuVr5F9yaC6avYd6u9NHNDYQMFezP0Y1xhnALIpbIOo8 dLvgIbn3qhx1So8WRSWnVZ8ZfVse5RYHaPbhzWgQcdJafRFb/okVTbvDn9SWsU0f9bNs6+y X-Received: by 2002:a5d:47a2:0:b0:385:f47a:e9d1 with SMTP id ffacd0b85a97d-385fd3e8f33mr1665357f8f.17.1733225560021; Tue, 03 Dec 2024 03:32:40 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385e19104a0sm10690514f8f.32.2024.12.03.03.32.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?P?= =?utf-8?q?hilippe_Mathieu-Daud=C3=A9?= , Fabiano Rosas , "Michael S . Tsirkin" Subject: [PULL 11/13] tests/qtest: drop 'fuzz-' prefix from virtio-balloon test Date: Tue, 3 Dec 2024 12:31:38 +0100 Message-ID: <20241203113140.63513-12-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This test file is expected to be extended for arbitrary virtio-balloon related tests, not merely those discovered by fuzzing. Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas Message-ID: <20241129135507.699030-3-berrange@redhat.com> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- MAINTAINERS | 1 + .../{fuzz-virtio-balloon-test.c => virtio-balloon-test.c} | 4 ++-- tests/qtest/meson.build | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename tests/qtest/{fuzz-virtio-balloon-test.c => virtio-balloon-test.c} (84%) diff --git a/MAINTAINERS b/MAINTAINERS index f92be047756..aaf0505a214 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2228,6 +2228,7 @@ F: hw/virtio/virtio-balloon*.c F: include/hw/virtio/virtio-balloon.h F: system/balloon.c F: include/sysemu/balloon.h +F: tests/qtest/virtio-balloon-test.c virtio-9p M: Greg Kurz diff --git a/tests/qtest/fuzz-virtio-balloon-test.c b/tests/qtest/virtio-balloon-test.c similarity index 84% rename from tests/qtest/fuzz-virtio-balloon-test.c rename to tests/qtest/virtio-balloon-test.c index ecb597fbee3..6bea33b5901 100644 --- a/tests/qtest/fuzz-virtio-balloon-test.c +++ b/tests/qtest/virtio-balloon-test.c @@ -1,5 +1,5 @@ /* - * QTest fuzzer-generated testcase for virtio balloon device + * QTest test cases for virtio balloon device * * Copyright (c) 2024 Gao Shiyuan * @@ -30,7 +30,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - qtest_add_func("fuzz/virtio/oss_fuzz_71649", oss_fuzz_71649); + qtest_add_func("virtio-balloon/oss_fuzz_71649", oss_fuzz_71649); return g_test_run(); } diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index f2f35367ae7..bd41c9da5fd 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -88,7 +88,7 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-test'] : []) + \ (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \ (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \ - (config_all_devices.has_key('CONFIG_VIRTIO_BALLOON') ? ['fuzz-virtio-balloon-test'] : []) + \ + (config_all_devices.has_key('CONFIG_VIRTIO_BALLOON') ? ['virtio-balloon-test'] : []) + \ (config_all_devices.has_key('CONFIG_Q35') ? ['q35-test'] : []) + \ (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ From patchwork Tue Dec 3 11:31:39 2024 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: 846954 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424751wrr; Tue, 3 Dec 2024 03:33:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUEJFT/40QpyxfZebErZKeCzX8c6mVe7JIQRw4HDlMYN+pglNFSyow5nOnJ17t9JPTpRAFMEA==@linaro.org X-Google-Smtp-Source: AGHT+IEkB/dGQVGTtekayyoaA4ssloHAiEvPXH6f5a+2V8Oh0zs7ZVGRvMpcpiGx5H6Qq9XgNQZi X-Received: by 2002:a05:622a:1890:b0:463:5eb4:6f with SMTP id d75a77b69052e-4670c3d9dd2mr25479881cf.47.1733225607115; Tue, 03 Dec 2024 03:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225607; cv=none; d=google.com; s=arc-20240605; b=d71F8F1nelMM/2TB4rVm623+rvSWf4TVgf8OnV/idGSac601J+5HzDfeY/almkQtdS cV2NthNtVPV+ssznf0gd+5hkO3awmofMyl42sgdfo+mX3gW2uZRpEVk/rcO2I2tGoIYf FmqQ1O7Mu/gMJ5AcVyGBdMx9mk3AHmZEdu+ZcWaeYrvRCdbJ9TVDrX6MX/xmCOyUXkqE 4+pMgat1tQcUNES6HkPvbvw0QN3TdgbQeHshNT44vFDe1cceW32l+ZTg6np4yLkpO7WX ryxamT5qZQY8nrC15JwveWhj5jrJL6sogKVSgu4C+Rsps7amP8Ec1KlIOowbH6GEt11l KAQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=LP08ovgAlxy3zJSGfhanCL3pqQJtbHP67JCIcBXaArA=; fh=oOJVVqHukdr9n1m/h6vqHB1V4LpSZW/pZmKhYNcrvN4=; b=TIcrtAdJjnlLBN/1BaggSRzMrBM5lc3ShLUkAZz4/OPfnQt4b5Po3fnUAAzyPFmCZ/ eE2rQwA9OmcOQ2cvhlSuYEd5nzodvhWuZKUgqzk68hwWK5zjpMGJtVqsDANJD72/pUjc G2p9VKfwPGRg/KRlUap+yx0YGoRzNSzkDpSYrHJm6PFqhKbwiXeI+aLW4HFtHedQk0k1 44pARx8UTfE6cAcWvq+lXO2eskm9E1kt4Ahs5ynBrOIJWyiUtogaIe0ZNZutBQz0xt62 xA5a74RpnpbCV+Sgk+PN1YW/QY/t9zLqXL6EePmkLq7+DkxKGtWs83AvgEvGoN5cZyzv teyg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vEsN5IWO; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c4225ce9si142075701cf.462.2024.12.03.03.33.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:27 -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=pass header.i=@linaro.org header.s=google header.b=vEsN5IWO; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR98-0001J3-Re; Tue, 03 Dec 2024 06:32:50 -0500 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 1tIR96-0001I1-VY for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:49 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR95-0000cT-2j for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:48 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385e075255fso2556740f8f.0 for ; Tue, 03 Dec 2024 03:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225565; x=1733830365; darn=nongnu.org; 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=LP08ovgAlxy3zJSGfhanCL3pqQJtbHP67JCIcBXaArA=; b=vEsN5IWOSA7SlEP54JXgEnJJxYXtekQxA01y9zailEZ4FV0Z5PKKU9kJLmoxDhsLRM zwQhwQu4oO8Tu2C+O9pMlH/NZYVFa3I9dttqM/Izzd1y4I5LyDmDtytozpboWLNLBNqH AIwmUNMyyDc3gy5izXfdO7yz0o3iQGmAgZ8+qs2RFX0qjv67CTKiwuNt4fmyYqlJxgkC trvw5b1RIPhUhzWygCtdnBmV47syDl8xB2dHFmIeDhWCjVl3wQEjbug2F3I9S1FnLlBZ CI7JuIIz9allUN+hBVaQcwyOqhTcz2Jr0osafXZAg4xOhHq1zvbVQamnDda+Jjict2AF F+yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225565; x=1733830365; 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=LP08ovgAlxy3zJSGfhanCL3pqQJtbHP67JCIcBXaArA=; b=hYl4IeJx3vrLAIFxuWi3wPEnQJJXqYtkJyN6gzEhpaY8Xog3syDgC39+48I8o224E4 d8Dqq0klj7WFU9mm1b4mgG77386oNvft4I4Qms0ri/F+P4lBvuCGyWXbXl2/zExwaC7T uxiDZ/cizcuvk2eu2IPiBOELiQ9TBLCSOpifoRbC0+SIWzyAHSplVzBw/1VQ4Z8nzSmb 0CXb7tdvIVg5ySWh7SccXLJ5SkGHAE0LCVhcGJ/SdAE5syInnlRPjZJdLXMdCa6giprl qQSY9/a/BbAsBgjyjTgy9VpCqmCxeDKHbVO57h7hnFyI1YazzOeZ0UqbJb4RhnLZlhS+ lQCg== X-Gm-Message-State: AOJu0YxEwvYTGGACSmWPtbvdX9IRAiNNqkLe2z4Bzra2ujWmvsqk4PaV 8lcMg/ezIlduXBoBqagaXIxPhZ0ptcZREI+azu8W+DvHAj5ENxiW9qXku9EIVnjUaKZ93vFGeY6 PFMs= X-Gm-Gg: ASbGncvN50WEGJnnqBiMgRzZ4dPj5+HykSMQxHZsXA56ccmtB1qEPQ+H+U86V36s8G+ aJsP37CnLKHLUR1kvC8JGcdvcDBiyM5vIG449dSX3ZCEXC2bspKnyUQnefKGAdjeivK6zG2uBDF WGZYE/4nW2n40FyLz6epyost8UedkRTKXOyqO3wPLynfJkJb/fMvFaE+yfcpxhA8RLv+cJHhcvM uUTsjNbNZswHJ44MudG2cXpvieu08YcV+Y4pX2kbArlN53EWmbQB5sC8BlxbWDQKHo7XdKy X-Received: by 2002:a05:6000:789:b0:385:f44a:a3b with SMTP id ffacd0b85a97d-385fd42108amr1763074f8f.41.1733225565138; Tue, 03 Dec 2024 03:32:45 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0dbe4ccsm184300625e9.13.2024.12.03.03.32.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Fabiano Rosas , "Michael S . Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 12/13] tests/qtest: add test for querying balloon guest stats Date: Tue, 3 Dec 2024 12:31:39 +0100 Message-ID: <20241203113140.63513-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This test would have identified the crash caused by the addition of new balloon stats fields. Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas Acked-by: Michael S. Tsirkin Message-ID: <20241129135507.699030-4-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/virtio-balloon-test.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/qtest/virtio-balloon-test.c b/tests/qtest/virtio-balloon-test.c index 6bea33b5901..ecdd363b06c 100644 --- a/tests/qtest/virtio-balloon-test.c +++ b/tests/qtest/virtio-balloon-test.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "libqtest.h" +#include "standard-headers/linux/virtio_balloon.h" /* * https://gitlab.com/qemu-project/qemu/-/issues/2576 @@ -26,11 +27,30 @@ static void oss_fuzz_71649(void) qtest_quit(s); } +static void query_stats(void) +{ + QTestState *s = qtest_init("-device virtio-balloon,id=balloon" + " -nodefaults"); + QDict *ret = qtest_qmp_assert_success_ref( + s, + "{ 'execute': 'qom-get', 'arguments': " \ + "{ 'path': '/machine/peripheral/balloon', " \ + " 'property': 'guest-stats' } }"); + QDict *stats = qdict_get_qdict(ret, "stats"); + + /* We expect 1 entry in the dict for each known kernel stat */ + assert(qdict_size(stats) == VIRTIO_BALLOON_S_NR); + + qobject_unref(ret); + qtest_quit(s); +} + int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); qtest_add_func("virtio-balloon/oss_fuzz_71649", oss_fuzz_71649); + qtest_add_func("virtio-balloon/query-stats", query_stats); return g_test_run(); } From patchwork Tue Dec 3 11:31:40 2024 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: 846952 Delivered-To: patch@linaro.org Received: by 2002:a5d:44cd:0:b0:385:e875:8a9e with SMTP id z13csp424594wrr; Tue, 3 Dec 2024 03:33:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW2J6VlXJ6FnKIP0w0v3qXcQ4BHz+1wROD35UQBxjyHN7EFxuuJ4/v9HDFIbbiCQ/kd24Albw==@linaro.org X-Google-Smtp-Source: AGHT+IEefpTzzEnr5opLU8QJr5udTALvTe7+JJMQ4UcVFbQMa/aGA4UpE3Yhl/633efq70kPF1x2 X-Received: by 2002:a05:6214:518e:b0:6d4:fff:f9cf with SMTP id 6a1803df08f44-6d8b740e1c7mr28170376d6.35.1733225586112; Tue, 03 Dec 2024 03:33:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733225586; cv=none; d=google.com; s=arc-20240605; b=BcWdTIx6/c7LrkWEFa+Mt5+sEjELLoKr+AtWpnhIoUCgXlz3v4PLMtFs5lQBob7132 eIi7COTsqTe0lZZW9F1BAgMEXUl5ZQQ5ayhn+FrZoRZP4eDSmDDOlwr7aKL5ouIR6M6O LMeJgWGlPPE0xM7q13b9qdmAq25PNpWU7GZOyE0nwvbCR2oITfREfyNXf9sFRzCXAu/e 5D06yFqmBGKEcp639RDuPL5TgMA7QCBwBR/b4ZQNQeK51QHfBVzbHuOvWF+omA05ANpv xZislzrn7rWsejpxT3hpZ8nB2BHXOaI/X0tXr3mxJq4aaDCmGgUApDJPNYpVuM81UWLo E3QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=yG+iobrKsz6g8k3u5QukV9MFc+erYLWSKmXLzhEJYGo=; fh=3calPSna0a7+qCyLkhcxltRNQ9UOIoNYmq//bc4XfGA=; b=YLKoLviU+iz+p5GDBfdqypatN+VvCR7zIMRX8OmXpDyags5+52epl7zGaL9YsF9GGc GygM7vshy2ZEhaoaV6+oZlO1Ur9XlvxV8Tl1UPrEo0u1fE96OUKMv3IBvVvttlkKgD3k aT2c0IIhS/H2QGAT/ugozCahQxbiYeap59hGeIyJT9qooas/ODRTE14/r5mopvCb4CiI zhyb7u2PFoSMduZ9C6RQ69Uvknmb2gDHrcgAH4EySi1eq2wfgdvG2zk0+NuQKkBy4Mwd XARcDipmpX66iRHCxK1a3OwBjnsFklKY/x75mOoi2pRmNydXixLZe8XOkWVEqRyu4Eg4 P7iA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y+qIByOm; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d887ccf50bsi111691176d6.59.2024.12.03.03.33.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Dec 2024 03:33:06 -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=pass header.i=@linaro.org header.s=google header.b=Y+qIByOm; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIR9E-0001hS-IQ; Tue, 03 Dec 2024 06:32:56 -0500 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 1tIR9B-0001UV-Vw for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:54 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIR9A-0000cq-9T for qemu-devel@nongnu.org; Tue, 03 Dec 2024 06:32:53 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-434b3e32e9dso46170205e9.2 for ; Tue, 03 Dec 2024 03:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733225570; x=1733830370; darn=nongnu.org; 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=yG+iobrKsz6g8k3u5QukV9MFc+erYLWSKmXLzhEJYGo=; b=Y+qIByOmSFBeazu9rZpLVKHr4A7MDOWP/DC1OSIjk8JvWuepnKonsTrcNoJKe3ufdm +2w7O+KEa1m53tgSJX76RscWMmYn8i9l2+klCYq6h/jZ0eCaQrsIWRFs3kvTufaX0oIc k4DN7OYK8lYNOR08Nw4V3f9azulO/+8EYJLti6954hWdyxA3bsZpAJ6CS6l+ePYewVjl NG/cfh0lkawu3Ama/4zs6UHBD0+skZ1jB1X6orLJ22XQ0RkQxK9kwpbc27+qOFE6bcx2 c6ji2b7XxDrK7haMPUQbIqj17T9fO+iet8p6rEh1oADo4Oo/dmsOybRjIQuZO7kkNSMD kn8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733225570; x=1733830370; 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=yG+iobrKsz6g8k3u5QukV9MFc+erYLWSKmXLzhEJYGo=; b=WWhCo4wZ5p5zeqI1Oo4XvIDBoGO69vidMt5DfEZAoh5kk6zNVyDidQ556eIgEB6i+I QEJ+CRYFhqVzemJf3b+scsF04rtK6MKBERKJ9BqfDm4KGtthsJq557qCrrKkzUOUje8h 0Bw2gQG1Qv+41fcwlVIp3h8QuwWO6HxSOpb4JF0Lemdt519eMLcqVsKdYgPwbhW4bon6 mudXyRpvl4Q3eSDmKqJy+gB0tl0LIXhuYTObznm7gPVbH16axgeDqh4ocTdmdMY5KW09 sKuFFuebGbHusZ+vjBjQVf0wdFs+jt3u5QTrImaYkqqWt52Xf4KlLbRx0OZr1qJLIHGB AYZw== X-Gm-Message-State: AOJu0Yxuyfc6Fdy+bWemwbQENPXKnweWx4YUh1DpzhZ/qou1cB2IXtXj C0KqAVWnBlnC8yrxu10nGlTsv7vUkOK/pLSp+kev64rD8RkwJFb1X+j/yNL1KjWYsxAzW5ZrS7b p6C4= X-Gm-Gg: ASbGncutV1yzR6Z2yFPkTHJr8EQaBEvz/zhxK55JnGq9QtpLLuVSHqfsAcHDpObeNpf C0kAC58ybgCpxBEoUauMCtoYuTTwVxzZXArSyoDKSrf8bdRcMfeFsUPJypWCegm5qxfYZFb3nv8 Nzu5kyYW0xDaATBHZrqliE8qV8uPhTFWJ1Ui92pZhSNsk6LuNokw+zft7sR6bebMZbPraYQlGGG aQMo6VzbxooKxDqsexu/fehHjLzUbuh0y1esfu/X6+yrNocQcTgSuLxM2Qci69tv62QVMgq X-Received: by 2002:a05:600c:3c97:b0:431:5d4f:73a3 with SMTP id 5b1f17b1804b1-434d09c7f34mr19700765e9.18.1733225570258; Tue, 03 Dec 2024 03:32:50 -0800 (PST) Received: from localhost.localdomain ([176.187.209.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0dbe4e6sm184521365e9.14.2024.12.03.03.32.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Dec 2024 03:32:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= , Thomas Huth Subject: [PULL 13/13] system: Select HVF by default when no other accelerator is available Date: Tue, 3 Dec 2024 12:31:40 +0100 Message-ID: <20241203113140.63513-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203113140.63513-1-philmd@linaro.org> References: <20241203113140.63513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When testing with a HVF-only binary, we get: 3/12 qemu:func-quick+func-aarch64 / func-aarch64-version ERROR 0.29s exit status 1 stderr: Traceback (most recent call last): File "tests/functional/test_version.py", line 22, in test_qmp_human_info_version self.vm.launch() File "machine/machine.py", line 461, in launch raise VMLaunchFailure( qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish session: EOFError Exit code: 1 Command: build/qemu-system-aarch64 -display none -vga none -chardev socket,id=mon,fd=5 -mon chardev=mon,mode=control -machine none -nodefaults Output: qemu-system-aarch64: No accelerator selected and no default accelerator available Fix by checking for HVF in configure_accelerators() and using it by default when no other accelerator is available. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-Id: <20241203094232.62232-1-philmd@linaro.org> --- system/vl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/vl.c b/system/vl.c index 54998fdbc7e..2f855d83fbb 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2362,6 +2362,7 @@ static void configure_accelerators(const char *progname) /* Select the default accelerator */ bool have_tcg = accel_find("tcg"); bool have_kvm = accel_find("kvm"); + bool have_hvf = accel_find("hvf"); if (have_tcg && have_kvm) { if (g_str_has_suffix(progname, "kvm")) { @@ -2374,6 +2375,8 @@ static void configure_accelerators(const char *progname) accelerators = "kvm"; } else if (have_tcg) { accelerators = "tcg"; + } else if (have_hvf) { + accelerators = "hvf"; } else { error_report("No accelerator selected and" " no default accelerator available");