From nobody Sat Nov 29 10:48:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1764250694; cv=none; d=zohomail.com; s=zohoarc; b=Ec8C803lTTtgf6DPQIh8NshQetomljKQePtne1DDW0E42Z4oXH8nohDc6kpUmX1mLi2jFnzymj9EZTWR26xrhwNp7CQdHOKMf40IdP8pfWsXQD/ey1CyCn/bOQ4hYrRFu/Mw+pLyCSRgecklh+XqR43bDkExu1ghJrlQzygeghY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764250694; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oHu41Oa/q8GhaKEt1sOE2Bq7H77riGl0nC0M3nPlAeI=; b=BPJ4zmGsu+Y2rPk+mX0cPcQw2Wgv7qGM75nWYPfcCi5CofEAT53EwNRhPNbCFILGFdpn338dF2osdKYp/fi+FJ1LrdsC08gzWWPeltxHMTfUxjaMEso+JvCMYkwELcPxzWMgDu5OEbb0fqPHwbi/+paCKJmU5S+tCu9GHr1XDwI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764250694052298.0505597767187; Thu, 27 Nov 2025 05:38:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vObwC-0006gd-Ds; Thu, 27 Nov 2025 08:21:32 -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 1vObvc-0005Wq-TA for qemu-devel@nongnu.org; Thu, 27 Nov 2025 08:21:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vObva-00026R-Fw for qemu-devel@nongnu.org; Thu, 27 Nov 2025 08:20:56 -0500 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-oiZ9WDSJPb-7QrT8s3mMLA-1; Thu, 27 Nov 2025 08:20:52 -0500 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-64537824851so1025193a12.1 for ; Thu, 27 Nov 2025 05:20:52 -0800 (PST) Received: from [192.168.10.48] ([176.206.119.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64751062261sm1735825a12.33.2025.11.27.05.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 05:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764249653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oHu41Oa/q8GhaKEt1sOE2Bq7H77riGl0nC0M3nPlAeI=; b=K0us2ePHE9ndXhoNPrqw3e8oLdsOv6UmWY3IF67wXcBACbrXTPTLLzeAz6a59R8R83K40Q yVlYeoHOcToLkq5qzH1qQTt2p2QsNXQRtqtbsNAWG1tTzFYha5M91NBL/f52Oi5Vgpc9EF bJHcmwinrLqoFmkVMbgjf2ujQuU0Kgw= X-MC-Unique: oiZ9WDSJPb-7QrT8s3mMLA-1 X-Mimecast-MFC-AGG-ID: oiZ9WDSJPb-7QrT8s3mMLA_1764249651 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764249650; x=1764854450; 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=oHu41Oa/q8GhaKEt1sOE2Bq7H77riGl0nC0M3nPlAeI=; b=ZKkkhBzNIVADgYOSb6OyzeRPI9C8ODXcSBiR/J1effW9l4hvXbOc0nKOnk7AH5uB9I NVKY7XnqIW5UeACrq+TrcRtbm4p320Iew3zcS7xH9XefX09zaABBm+YIZ5OiFBMJg2MN /LQq/0KoZ2zVMutJ7KqWS531/2vcszOlyDtnfy/9FkcKkthj+6YYhtYXFA3V9xYd7SCF 7NyAskE7TGtVgvl875WH4YXDSMuAkOenjQPY3xKJFiElZFaI+g+8NVIWYZjW5vODBmgG 1QKvYK5PsmOY8roH1J406twY8FSuGHVFK+TAX4lmBqlUIS2A0ho6xQGKcFBaLAlwMeXV uYwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764249650; x=1764854450; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oHu41Oa/q8GhaKEt1sOE2Bq7H77riGl0nC0M3nPlAeI=; b=BVJK35SqEXnykmy+ZxzTEsSuNsE5K8oCystmDGAq2KZCwXIinPQnBnslIdQCzobegM gRoMpepLZfE9jE3xghNz+neo1X97F6lip1L+bfIMQzE/JhHMV2sThnJRIXS0NUvFITec KYSjlmF3SX6GnSSyd8O5DmWM/k9B9kyi9yZvJIksiVO8M1OKMaSLCV06CgpwqKZIEMJZ tKNkJG65BmQXa9QpbFvbcKSxjnn9j6M9jLkkUJHtcU2gPuuV2AKD6ytJgRYVsqJLEi4h u548l79HIQSQzxz3DMjgoj8tNKqOzZzsHDlT+STTnfQV8FcfwINWekMXrbH+JiNV24BH 1zdw== X-Gm-Message-State: AOJu0YyGwSMV26ysmZa03Ad5bV8uLJspoYGECWtNHcf9PrZiTZUpPdE2 zk1BBbcI7fVJF2GSsunBEQYlZkqXAG6KCh/W3dHjis5B84JhLz5nYc1tWjxVIJ98tcA/8EmRBlv 0blPvvxP+DPspIe8nxhunn/XazOIuDRae7NCaJkOR9CxXU1b3Y5UnaHohtqtXnh3KelXoZCpVxu +DE4qvoOZifrlzonPgYR+UMmyJ4NDoOFg8jNdZczB/ X-Gm-Gg: ASbGncu72/3zr62FHIxNO/vMSg/9zpm2M/nyG9BktsJZrCQQZr53gtKIoXNo8hti+Wt HgtI2n8U/Am3XAvPozM2RpiyxKKeGB5KKstzjjodfUX0Q9PTwjISUBXDPVAZVqPMjwt90ou6/Py yirnQxxJUWli3PfCJZ8DyJF583mMX0uVcVAguT6oqc9YCYhmnCFLeQHXMGyluYO1D84LndFuRX2 nVRUfb9KHOmZLuQObYNqW8vcCXvfYQfeC7ObURvEMtDQVDT5VzzcMNzj/72r9CqIDQ/5kVf/Bnp DCozW78ISxx2pWjcqV9+gv60YECvc38g0xv/a7sOKNmJbBoogjD8IgzeBeWAVju5BURpfwnrIUN L+pYYGI3EPvuQk/mDWCxVmqTU/TzAtP1SxGu8sLJsrji566onE1l00EsQPB3mAUGJYb1EkXlq3a NWGsrrkqA4dPjPEMg= X-Received: by 2002:a05:6402:2816:b0:640:93b2:fd1e with SMTP id 4fb4d7f45d1cf-64555cd8cc4mr21660357a12.17.1764249650403; Thu, 27 Nov 2025 05:20:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4X2jw7lKUrC0VSwQWqFLab02VMT9E/qXYgLu35Aos+c181UH6b58dTLOfMnS++mkvY5wIPQ== X-Received: by 2002:a05:6402:2816:b0:640:93b2:fd1e with SMTP id 4fb4d7f45d1cf-64555cd8cc4mr21660325a12.17.1764249649989; Thu, 27 Nov 2025 05:20:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-rust@nongnu.org Subject: [PATCH 5/9] rust: do not copy the SysBusDevice Date: Thu, 27 Nov 2025 14:20:32 +0100 Message-ID: <20251127132036.84384-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251127132036.84384-1-pbonzini@redhat.com> References: <20251127132036.84384-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.224, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1764250695010019200 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- rust/hw/core/src/sysbus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/hw/core/src/sysbus.rs b/rust/hw/core/src/sysbus.rs index 68165e89295..ec620639be5 100644 --- a/rust/hw/core/src/sysbus.rs +++ b/rust/hw/core/src/sysbus.rs @@ -78,7 +78,7 @@ fn mmio_addr(&self, id: u32) -> Option { assert!(bql::is_locked()); // SAFETY: the BQL ensures that no one else writes to sbd.mmio[], = and // the SysBusDevice must be initialized to get an IsA. - let sbd =3D unsafe { *self.upcast().as_ptr() }; + let sbd =3D unsafe { &*self.upcast().as_ptr() }; let id: usize =3D id.try_into().unwrap(); if sbd.mmio[id].memory.is_null() { None --=20 2.51.1