From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511241; cv=none; d=zoho.com; s=zohoarc; b=eOaTI3AakAznEgq3Q6FBE6jwosfoiK4FcepCRQSfH2+PdMfd5ZhbwMdYzD1nq8t08DZbwwJixdOOY2mdTdi7RnSysRpJHklEzI+wqZpNw83+XVBA861DiaLYxpUKMXkUU/J+j1wZKmcuEsuVKqDKNMHCPK7VjzI+y7lRqL1AFi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511241; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TgAg0v/tAeIq711JgceoovDuwjXgmItAtZGF3WEjIQc=; b=I4t5GAzEtGIYQJYqX43A7USvEfptczUM6Rn1AyIimF5CJ5DWYvRDO3W/HeaWvAbRakbZBWTETsEXA9xCgrC66xIjBR+5sv/utRO8pjkr6GSJLDZNim1YgW7iaKMq3KSEOsdYMKtWOxHdw1SsA/PCOK7mqB4hycSzlecphXObcVE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511241609642.1472746073077; Fri, 14 Jun 2019 04:20:41 -0700 (PDT) Received: from localhost ([::1]:50238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkG8-00059U-JS for importer@patchew.org; Fri, 14 Jun 2019 07:20:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35846) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCY-0002RF-8w for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk4z-0002rq-BO for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:11 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk4r-0002h8-BD for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:04 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB6wCX058877 for ; Fri, 14 Jun 2019 07:08:56 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t4a3011fu-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:08:56 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:08:53 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:08:51 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB8o2h29557122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:08:50 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E71CA4062; Fri, 14 Jun 2019 11:08:50 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20CF5A4060; Fri, 14 Jun 2019 11:08:50 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:08:50 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:08:49 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0012-0000-0000-000003291A2F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0013-0000-0000-000021622A04 Message-Id: <156051052977.224162.17306829691809502082.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=892 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 1/7] spapr_pci: Drop useless CONFIG_KVM ifdefery 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" kvm_enabled() expands to (0) when CONFIG_KVM is not defined. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index fbeb1c90ee6c..00d9f2cfe464 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1944,11 +1944,9 @@ static void spapr_phb_realize(DeviceState *dev, Erro= r **errp) * For KVM we want to ensure that this memory is a full page so that * our memory slot is of page size granularity. */ -#ifdef CONFIG_KVM if (kvm_enabled()) { msi_window_size =3D getpagesize(); } -#endif =20 memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, = spapr, "msi", msi_window_size); From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511663; cv=none; d=zoho.com; s=zohoarc; b=ZoVao66V1RXyd9JZjg9RYvnaWkfHXauz385w4Mivcs5cqI+t+KU1T1NNvJ3QxAmDYVXriDf2nQfh6waZdEWXCf4B38nkbn9pM9oNybpRSJ4PVRAJfdfuRKlCA4UD6PsfQiCx/aYnt68a/LtSNU8wiRzEBXibXtZeGk5T5VPMZ8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511663; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=6Qf/su9ho//HR0l8fo3ppGHqMI2EN3SNzZT8ZtcAI/Q=; b=Rm3HYafQ7LErARPGK5tKwyWOLzSd0vB5Bp5nwdyvCo39bUlNEvBQjxyKB2fhp1wk/1OSptDS5nOzwYjFF1JdblbO0Om38N881KYYW1/1WyvS0/patytHuxqzjo8owmLdODOn0ziNipACEyPFm++4/C4LtXSlgmf8k7QZ3uKaQTM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511663638753.7676097197873; Fri, 14 Jun 2019 04:27:43 -0700 (PDT) Received: from localhost ([::1]:50306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkMw-00036T-M9 for importer@patchew.org; Fri, 14 Jun 2019 07:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35833) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCW-0002RE-Sp for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk55-0002zl-W0 for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:16 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50134) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk55-0002lr-JZ for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:15 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB70Rq081155 for ; Fri, 14 Jun 2019 07:09:02 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t4a9trf3j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:01 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:08:59 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:08:56 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB8tCx34734438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:08:56 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B386452067; Fri, 14 Jun 2019 11:08:55 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 964355204F; Fri, 14 Jun 2019 11:08:55 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:08:55 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0008-0000-0000-000002F3BA6B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0009-0000-0000-00002260C43A Message-Id: <156051053529.224162.3489943067148134636.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=994 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 2/7] hw/ppc/mac_oldworld: Drop useless CONFIG_KVM ifdefery 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" kvm_enabled() expands to (0) when CONFIG_KVM is not defined. It is likely that the compiler will optimize the code out. And even if it doesn't, we have a stub for kvmppc_get_hypercall(). Signed-off-by: Greg Kurz --- hw/ppc/mac_oldworld.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index eddd005a7ce4..da751addc495 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -345,14 +345,12 @@ static void ppc_heathrow_init(MachineState *machine) =20 fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_IS_KVM, kvm_enabled()); if (kvm_enabled()) { -#ifdef CONFIG_KVM uint8_t *hypercall; =20 hypercall =3D g_malloc(16); kvmppc_get_hypercall(env, hypercall, 16); fw_cfg_add_bytes(fw_cfg, FW_CFG_PPC_KVM_HC, hypercall, 16); fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_KVM_PID, getpid()); -#endif } fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, tbfreq); /* Mac OS X requires a "known good" clock-frequency value; pass it one= . */ From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511751; cv=none; d=zoho.com; s=zohoarc; b=awVTo6BGQMENMV1pne/DNvm+CyGObovYJPF8D4qulcced7pnuLYIGyP/Des3dDurif47FDUeQA33c4WGI9KooY1mrnecX60t6H4ve9LSWEdlHDFpvPx6qEBAv5v9PhbBvPxq0rIeSSiXBOUeo4T8ZZXAuKw5Q5wl2iPl2apXlRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511751; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=WhB9AHYQkpRXtcZjwdUwFaCJhTzIcjQzpOKYui6z++U=; b=oOsZWuV7GQxEJwR+ekMw3Q5tUflffLTtzohBl+PtelsvfYMVlITmAnUzxM+kPdWmfkXudu0665wXczlCql7hcplhB6ra428i4w8czB1b1z9xxG1bQqRyOclc5WRQQXkQ8408wz2eeZRWkrH/o0j9M+xdblmo+I9DVoEBmmSJ8Pg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511751772660.765802929551; Fri, 14 Jun 2019 04:29:11 -0700 (PDT) Received: from localhost ([::1]:50310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkOM-0004a2-Qk for importer@patchew.org; Fri, 14 Jun 2019 07:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35890) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCW-0002RV-2p for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk55-0002ze-V8 for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:17 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk55-0002qN-GR for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:15 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB75x0136582 for ; Fri, 14 Jun 2019 07:09:07 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t48cudcha-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:07 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:09:05 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:09:02 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB91ds55443668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:09:01 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 496944C059; Fri, 14 Jun 2019 11:09:01 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21F1E4C044; Fri, 14 Jun 2019 11:09:01 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:09:01 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:09:00 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0028-0000-0000-0000037A454D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0029-0000-0000-0000243A41CB Message-Id: <156051054077.224162.9332715375637801197.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 3/7] hw/ppc/mac_newworld: Drop useless CONFIG_KVM ifdefery 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" kvm_enabled() expands to (0) when CONFIG_KVM is not defined. The first CONFIG_KVM guard is thus useless and it is likely that the compiler will optimize the code out in the case of the second guard. And even if it doesn't, we have a stub for kvmppc_get_hypercall(). Signed-off-by: Greg Kurz --- hw/ppc/mac_newworld.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 4d835f32b536..c8d324552470 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -437,13 +437,11 @@ static void ppc_core99_init(MachineState *machine) } =20 /* The NewWorld NVRAM is not located in the MacIO device */ -#ifdef CONFIG_KVM if (kvm_enabled() && getpagesize() > 4096) { /* We can't combine read-write and read-only in a single page, so move the NVRAM out of ROM again for KVM */ nvram_addr =3D 0xFFE00000; } -#endif dev =3D qdev_create(NULL, TYPE_MACIO_NVRAM); qdev_prop_set_uint32(dev, "size", 0x2000); qdev_prop_set_uint32(dev, "it_shift", 1); @@ -488,14 +486,12 @@ static void ppc_core99_init(MachineState *machine) =20 fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_IS_KVM, kvm_enabled()); if (kvm_enabled()) { -#ifdef CONFIG_KVM uint8_t *hypercall; =20 hypercall =3D g_malloc(16); kvmppc_get_hypercall(env, hypercall, 16); fw_cfg_add_bytes(fw_cfg, FW_CFG_PPC_KVM_HC, hypercall, 16); fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_KVM_PID, getpid()); -#endif } fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, tbfreq); /* Mac OS X requires a "known good" clock-frequency value; pass it one= . */ From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511426; cv=none; d=zoho.com; s=zohoarc; b=kYRGpfGtMkF7UDjU1uoWq+cP9/5CT0Z6piKmkY6KJ28vRHPZAVi0XOF7+ZHRDx03wzGFagSoWkbEDIHx2Km/jto8JK877Fq0F79C+i7DusCxS14Le37n7Qy3ghUkLuGBrNOEV3QVNpPPGEuUZlHq8fumxeHBOtCNJmWPhK0+E1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511426; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=T3idrQZWH8qyiKdM/LpAq12TqjUfIjdZFIr4bVjuBFw=; b=joZMhWq0Hp4XQyDdD0chpD+RlZExy6cmtkfc92rhHsfjAVwxWjYbcs6sU9gIUXzP5EoCTI+tmhIbSxyvGgM7Mwo6QofHb80zWVPoTIhLS7L3pEhUxqWZLo6Dn1WxSTMeo7ZRLv97cbzEFFeQyiV/HekjAszSwZ4dD0pskXCoOiU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511426671236.8455663495431; Fri, 14 Jun 2019 04:23:46 -0700 (PDT) Received: from localhost ([::1]:50270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkJ7-0008QY-Ot for importer@patchew.org; Fri, 14 Jun 2019 07:23:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35940) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCW-0002Vi-QT for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk55-0002zW-Tp for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:17 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52196) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk55-0002uj-IS for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:15 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB73CJ116604 for ; Fri, 14 Jun 2019 07:09:11 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t48mampa3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:11 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:09:09 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:09:07 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB96GZ35061832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:09:07 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C944CA4053; Fri, 14 Jun 2019 11:09:06 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2445A4051; Fri, 14 Jun 2019 11:09:06 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:09:06 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:09:06 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0020-0000-0000-0000034A137F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0021-0000-0000-0000219D4F4C Message-Id: <156051054630.224162.6140707722034383410.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=910 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 4/7] hw/ppc/prep: Drop useless CONFIG_KVM ifdefery 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" kvm_enabled() expands to (0) when CONFIG_KVM is not defined. It is likely that the compiler will optimize the code out. And even if it doesn't, we have a stub for kvmppc_get_hypercall(). Signed-off-by: Greg Kurz --- hw/ppc/prep.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 2a8009e20b46..a248ce480d57 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -780,7 +780,6 @@ static void ibm_40p_init(MachineState *machine) =20 fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_IS_KVM, kvm_enabled()); if (kvm_enabled()) { -#ifdef CONFIG_KVM uint8_t *hypercall; =20 fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, kvmppc_get_tbfreq()); @@ -788,7 +787,6 @@ static void ibm_40p_init(MachineState *machine) kvmppc_get_hypercall(env, hypercall, 16); fw_cfg_add_bytes(fw_cfg, FW_CFG_PPC_KVM_HC, hypercall, 16); fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_KVM_PID, getpid()); -#endif } else { fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_TBFREQ, NANOSECONDS_PER_SECOND); } From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511263; cv=none; d=zoho.com; s=zohoarc; b=kR9E16QJHG/Gl8Jgp7vzkZGh2v8QlcwgQAbh5hoKgqAcYm8TCKBC1PLISFDAIl6NKzu5P6zISCAAFL2MgPtgMCqbom2PoTnTaf8FApMPcPKLnRdgFc/h4VrJ2QDVNH3k4K7Zv37YIOfYuFjHF61OF57foXg5vnkB07eUFXeklGU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511263; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=YmVh6IEk/0k51zDjbTAhxBiNxN3RKQgYOWoQmfQXqRw=; b=Of831IcxrHRAFhbWodHiS55NKoCwXKm71Etyvlah4KlPelrQ60ahxYzetX+fPfYGr/j8xp3G10jtsOpNKQMAHk0xDlyoyQHK5VXFyOZf4DnQGmMJGGQVqJ9MY09gSHrFx2bMGygVdTFvm/nDsGg4zrNSU5MmOg6YerksYI8SsKI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511262835783.7957591860065; Fri, 14 Jun 2019 04:21:02 -0700 (PDT) Received: from localhost ([::1]:50240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkGT-0005Q1-Nj for importer@patchew.org; Fri, 14 Jun 2019 07:21:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35890) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCU-0002RV-Vj for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk59-000341-TN for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:20 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk59-000339-Id for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:19 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB6ucS073077 for ; Fri, 14 Jun 2019 07:09:18 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t4ac309sn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:18 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:09:15 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:09:13 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB9CiS41091114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:09:12 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 579C24203F; Fri, 14 Jun 2019 11:09:12 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DB2142045; Fri, 14 Jun 2019 11:09:12 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:09:12 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:09:11 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0012-0000-0000-000003291A38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0013-0000-0000-000021622A0E Message-Id: <156051055182.224162.15842560287892241124.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=669 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 5/7] hw/ppc: Drop useless CONFIG_KVM ifdefery 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" kvmppc_set_interrupt() has a stub that does nothing when CONFIG_KVM is not defined. Signed-off-by: Greg Kurz --- hw/ppc/ppc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 9d91e8481b32..288196dfa67a 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -80,9 +80,7 @@ void ppc_set_irq(PowerPCCPU *cpu, int n_IRQ, int level) } =20 if (old_pending !=3D env->pending_interrupts) { -#ifdef CONFIG_KVM kvmppc_set_interrupt(cpu, n_IRQ, level); -#endif } =20 =20 From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511501; cv=none; d=zoho.com; s=zohoarc; b=djElz5WsmXHDTu+CHEXNoi3zkZdNpFKl/31sHkYAfwXRJ8njvA0vz+F2gZiJ1j/FJHuK5XogBgkSc43ycirnU8JAGNkaso86nJeIzzICB/5kCT8JVRzWQYBgt8JJBDv54l3V8KrLlt35SJdzw2FdQ5Dac0Brs820ip1LAayBR/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511501; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=beqxLIi47HLrW/mkRorBbbaVExik13+UCPKMQTCxF6A=; b=NjsscPPGarG8rx/0bO/p5jlz+PP3jZlkRkTs45n8Q2Aw3GqpHSfgaXprtjf2hxUrMHTRAv7+GTxJQMwQnREgbAOh+SCjsaDRnBVRYi7Gt/O61CJqKirZzXcQ5TaMRTuoBq3n+rOMSaTV2g8PxaZiPLtEcSpYjo6NDJl2zgPgzSE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560511501990599.6609111277813; Fri, 14 Jun 2019 04:25:01 -0700 (PDT) Received: from localhost ([::1]:50272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkKA-0000j0-T5 for importer@patchew.org; Fri, 14 Jun 2019 07:24:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35890) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCS-0002RV-Fz for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk5R-0003N1-AS for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk5Q-0003Lo-Us for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:37 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB73WC136449 for ; Fri, 14 Jun 2019 07:09:35 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t48cudctq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:34 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:09:20 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:09:18 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB9Hwo61538540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:09:18 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA0AC11C054; Fri, 14 Jun 2019 11:09:17 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0DC011C050; Fri, 14 Jun 2019 11:09:17 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:09:17 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:09:17 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0012-0000-0000-000003291A3B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0013-0000-0000-000021622A10 Message-Id: <156051055736.224162.11641594431517798715.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 6/7] ppc: Introduce kvmppc_set_reg_tb_offset() helper 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Introduce a KVM helper and its stub instead of guarding the code with CONFIG_KVM. Signed-off-by: Greg Kurz --- hw/ppc/ppc.c | 5 +---- target/ppc/kvm.c | 9 +++++++++ target/ppc/kvm_ppc.h | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 288196dfa67a..a9e508c496de 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -1034,10 +1034,7 @@ static void timebase_load(PPCTimebase *tb) CPU_FOREACH(cpu) { PowerPCCPU *pcpu =3D POWERPC_CPU(cpu); pcpu->env.tb_env->tb_offset =3D tb_off_adj; -#if defined(CONFIG_KVM) - kvm_set_one_reg(cpu, KVM_REG_PPC_TB_OFFSET, - &pcpu->env.tb_env->tb_offset); -#endif + kvmppc_set_reg_tb_offset(pcpu, pcpu->env.tb_env->tb_offset); } } =20 diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index d4107dd70d21..cde39904510a 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2939,3 +2939,12 @@ void kvmppc_set_reg_ppc_online(PowerPCCPU *cpu, unsi= gned int online) kvm_set_one_reg(cs, KVM_REG_PPC_ONLINE, &online); } } + +void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_offset) +{ + CPUState *cs =3D CPU(cpu); + + if (kvm_enabled()) { + kvm_set_one_reg(cs, KVM_REG_PPC_TB_OFFSET, &tb_offset); + } +} diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 45776cad79d9..e642aaaf9226 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -80,6 +80,7 @@ bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu); bool kvmppc_hpt_needs_host_contiguous_pages(void); void kvm_check_mmu(PowerPCCPU *cpu, Error **errp); void kvmppc_set_reg_ppc_online(PowerPCCPU *cpu, unsigned int online); +void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_offset); =20 #else =20 @@ -206,6 +207,10 @@ static inline void kvmppc_set_reg_ppc_online(PowerPCCP= U *cpu, return; } =20 +static inline void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64_t tb_of= fset) +{ +} + #ifndef CONFIG_USER_ONLY static inline bool kvmppc_spapr_use_multitce(void) { From nobody Mon Apr 29 21:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=1560511190; cv=none; d=zoho.com; s=zohoarc; b=UFeMPstP8v661AX3z5tBBvGuP5AE+IIXuM4LGoVsbCWcmxm4MXLZeBO4fre1ICKO1NFcs9E62AXK7IUZDtBWfMM7WR59SyeyFZiB09UUYdH89RIXrdF+38cHduSrDerruif0pTmrdQPyXXOsZnmI1tC5w9JoK9IKW4qVnnY/SWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511190; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jRCFEvvAYfVV3jZfb2QFVtpsRmkMg2vmvNr1rb5VRpw=; b=QDhG7rDWF6kRV1c85HjP9I77AELrvUnGERA9g8WyrEPzu680v6bCVngjjkpIrH4k3wDNUIEnZ9DAeQdtJmPmmYbmT60/LhYae2tZIio2rlBQToMcSRyFxgfXUOuGJ7AnxE17KnjlDU/2r5AOfcWxm7aOIGuex5ySNVCPl3aJQ1k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1560511190282513.855095651852; Fri, 14 Jun 2019 04:19:50 -0700 (PDT) Received: from localhost ([::1]:50236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkFJ-0004Z1-7O for importer@patchew.org; Fri, 14 Jun 2019 07:19:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35940) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbkCT-0002Vi-OD for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:16:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbk5J-0003Eh-GK for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:30 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53834 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbk5J-0003EB-Az for qemu-devel@nongnu.org; Fri, 14 Jun 2019 07:09:29 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5EB74LO140064 for ; Fri, 14 Jun 2019 07:09:28 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2t48cyw9bg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Jun 2019 07:09:28 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Jun 2019 12:09:27 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Jun 2019 12:09:24 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5EB9NB452428816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jun 2019 11:09:23 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65048AE056; Fri, 14 Jun 2019 11:09:23 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D7EFAE045; Fri, 14 Jun 2019 11:09:23 +0000 (GMT) Received: from bahia.lan (unknown [9.145.152.28]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jun 2019 11:09:23 +0000 (GMT) From: Greg Kurz To: David Gibson Date: Fri, 14 Jun 2019 13:09:22 +0200 In-Reply-To: <156051052402.224162.13664250996245267046.stgit@bahia.lan> References: <156051052402.224162.13664250996245267046.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19061411-0028-0000-0000-0000037A4555 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061411-0029-0000-0000-0000243A41D4 Message-Id: <156051056289.224162.15553539098911498678.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-14_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906140093 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 7/7] target/ppc/machine: Add kvmppc_pvr_workaround_required() stub 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This allows to drop the CONFIG_KVM guard from the code. Signed-off-by: Greg Kurz --- target/ppc/kvm_ppc.h | 5 +++++ target/ppc/machine.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index e642aaaf9226..98bd7d5da6d6 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -399,6 +399,11 @@ static inline int kvmppc_resize_hpt_commit(PowerPCCPU = *cpu, return -ENOSYS; } =20 +static inline bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu) +{ + return false; +} + #endif =20 #ifndef CONFIG_KVM diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 5ad7b40f4533..e82f5de9db7c 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -378,11 +378,9 @@ static int cpu_post_load(void *opaque, int version_id) * receive the PVR it expects as a workaround. * */ -#if defined(CONFIG_KVM) if (kvmppc_pvr_workaround_required(cpu)) { env->spr[SPR_PVR] =3D env->spr_cb[SPR_PVR].default_value; } -#endif =20 env->lr =3D env->spr[SPR_LR]; env->ctr =3D env->spr[SPR_CTR];