From nobody Mon Feb 9 17:39:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1622573123; cv=none; d=zohomail.com; s=zohoarc; b=R5vezN/S0ae06Cogl6QStc7gebIMIasx9aeqTnB5PLexSK2m3Wcm5kw1bqm0o53e30n4QjzF7UJHfIYI6rgkmvvmuuET1dr9aVoMYSu3TLOhK9kOd1pjFhm7rGN+cGw4W8Qmu4RiITLRE+qFLrXmUxMzW/TdJeFstyJ6VN0wkbw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622573123; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=ZOXhey3+ZizeDUdHGRZwVFih8a7HCIB6NPdPOw8R/GA=; b=ARDapuoMd6xam3CuF5XrBpIXQYfOChEyGoQvM+CGP7fEYGYKe7erSvPoSvZ2u2ruCQeCYiQ/4cFy4XRQjUY+bECtkI2Xx0FUHSdyKlPP9FYdaBplDNc/yovfObIoWSJPFGoYaQLNumlLswG+BGlGOLjEr/afbbmrENIadzltt/c= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162257312364966.27060289363374; Tue, 1 Jun 2021 11:45:23 -0700 (PDT) Received: from localhost ([::1]:58460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo9OD-0005iX-Qr for importer@patchew.org; Tue, 01 Jun 2021 14:45:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo9M7-0004n7-3K; Tue, 01 Jun 2021 14:43:11 -0400 Received: from [201.28.113.2] (port=40572 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo9M5-0001oR-3l; Tue, 01 Jun 2021 14:43:10 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 1 Jun 2021 15:43:04 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 161CF80148B; Tue, 1 Jun 2021 15:43:04 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [RFC PATCH] target/ppc: removed usage of ppc_store_sdr1 in kvm.c Date: Tue, 1 Jun 2021 15:42:42 -0300 Message-Id: <20210601184242.122895-1-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 X-OriginalArrivalTime: 01 Jun 2021 18:43:04.0226 (UTC) FILETIME=[F4B6A820:01D75715] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:Overall KVM CPUs" , farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, Greg Kurz , lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, Paolo Bonzini , matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The only use of this function in kvm.c is right after using the KVM ioctl to get the registers themselves, so there is no need to do the error checks done by ppc_store_sdr1. The probable reason this was here before is because of the hack where KVM PR stores the hash table size along with the SDR1 information, but since ppc_store_sdr1 would also store that information, there should be no need to do any extra processing here. Signed-off-by: Bruno Larsen (billionai) --- This change means we won't have to compile ppc_store_sdr1 when we get disable-tcg working, but I'm not working on that code motion just yet since Lucas is dealing with the same file. I'm sending this as an RFC because I'm pretty sure I'm missing something, but from what I can see, this is all we'd need target/ppc/kvm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 104a308abb..3f52a7189d 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1159,7 +1159,11 @@ static int kvmppc_get_books_sregs(PowerPCCPU *cpu) } =20 if (!cpu->vhyp) { - ppc_store_sdr1(env, sregs.u.s.sdr1); + /* + * We have just gotten the SDR1, there should be no + * reason to do error checking.... right? + */ + env->spr[SPR_SDR1] =3D sregs.u.s.sdr1; } =20 /* Sync SLB */ --=20 2.17.1