From patchwork Thu Jun 29 12:11:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 697688 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4853827wrm; Thu, 29 Jun 2023 05:12:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4RUw1F1Uawf0uNGlsymU60RI/J1lvfZoY8JotJWa5rnai9T1rUudlgz0eFdQ6Hgo5pPvNN X-Received: by 2002:a1f:bf41:0:b0:464:7445:cbcb with SMTP id p62-20020a1fbf41000000b004647445cbcbmr13360552vkf.2.1688040743122; Thu, 29 Jun 2023 05:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688040743; cv=none; d=google.com; s=arc-20160816; b=yRHRqdHJpQR4FR4w/XPDv4lNxh9n0/6Jek646lo1/xQT6AMWgB3fAOulwwfEx60yjx LmfLQnQX8zwNG8tqSKFN9Ir5quxAaxsn6yu/OVs1ncLpVfVwCZsmKw7wjcuhz67iwspc UZAzBtrZkmLAhIjMeovgTrBLULowSgW+OcpUdsL6GHIz/eJ86zsKCxC54hIMftpIKySZ Km8ROTuEvP1T2xuSWTb4YMxgT4xIlBPbndMBvrEJUVlvLlykqDkMOMER+c+tWBNQnXRC WbxRVxUWHzDoPXQVAX8n/5soY5LVjCXuGQ5+nEQMw98/7tJDO7hBKs/e6MiweobceLKR rzWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s6YYX1dWztzELlCI3XT5PMGW/yG6v7BZW/N8+vfbi8Y=; fh=TH+aYAsXC1OKzDbnLW/2Vw94ft/ruj6WlRG4bj6mCQg=; b=KiIVaHmoT4kbf3ltX19/D+MgJkiHbyEv83aYcMss5PsPwiMllPpgRenUNHky8pExYF gLIuUJnqD7cAlr5CqmztmDtvCy9M23qeKmD9bVLmLJJZxBV80p0ji/icwqzFzsXFJa7K SkT8MCtih0OjIVOtUXYpbIe4jBdXJbUi1aPJY+2rVFazluLXHrgQJXM7mxdcBKpXaG8f eme/3K2eUuvcXspeonMLYgb//X9IuMN5D9H9hYmi87rqpBxBgL+gkIaEUEneGTIYHk0b Yq0O1ev3U6p9g2MydLYE8mQNfzUN+LB+cMfyfp/OmJqqZC4qWaVB9sRPmXVCWRjZappx /G8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgqw1EbK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5-20020ac85945000000b003f6baac3610si5975423qtz.377.2023.06.29.05.12.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2023 05:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgqw1EbK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEqUY-0005pu-5l; Thu, 29 Jun 2023 08:11:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEqUX-0005pW-98 for qemu-devel@nongnu.org; Thu, 29 Jun 2023 08:11:17 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEqUU-0000Ai-OO for qemu-devel@nongnu.org; Thu, 29 Jun 2023 08:11:17 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-313f3cd6bb4so561173f8f.3 for ; Thu, 29 Jun 2023 05:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688040673; x=1690632673; 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=s6YYX1dWztzELlCI3XT5PMGW/yG6v7BZW/N8+vfbi8Y=; b=dgqw1EbKpIXDe+Ln7FcLJoUI4Bx6KvOQi9fMMl4LkwWNvPlz4uc5mH+LQTGRWVGmMV stNfmAH5KXMEOkMkQyhRYl6SVmvcJJPK/4x0W+gKru5SX+L4pwa5TpRdSokrMivH/2Og JfZldQ1dKoS1THLmBl5RNTHTD3bwoK1BREdLRKGi+fXDBmAkGbvhzEXp6qWT9YFyMXEh JkW4Cl5GrG1tHo69jKf2LO/RNIuTNVOm8j3iakF9IzEtcGJoizgCBxYphNqC02lP93Po 6BFp270OK95FCjbBIH0yJH4xUFQZIwg63HS1FmSWxWJqqS+kiv0RfYeniWJboX990EtU ooXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688040673; x=1690632673; 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=s6YYX1dWztzELlCI3XT5PMGW/yG6v7BZW/N8+vfbi8Y=; b=k4LbBYOIpnXRzhp/jIbPADLN0G0oOaYCM6Tv1cj3sgMh5HP/vf/DWjkkrxEN0pvV8c xPLV9GxIF7nWonAYTzEFGTBFVYyzy4NSknUjUuWX9PNqzJuXMU/NBuuHGLrTkolQW+ka p92yi0U7MTfIbxWJffVsWVdEkr+BHgnuo8h+Z/H2xmeM5Jg2hRbf/SMniBPizUvmxsx6 RtDWWqxFp/y+x1xLx6IQHi1meiPwJ6hWP3OzIRmqPlECzbPMHRbM6YTOIsitvfFJNnaH 71LJv7a+BRa27ZoZ0bERo6Ma3Y09/8mwXUhFKRVg7rURn5+yRp0TMB+THgsJJeaOHdBH LyHg== X-Gm-Message-State: ABy/qLZyTS6zo5JorF0z5zpKjls1i9Uwl+xHZWcGUL035AM/8u3MQ0HS 9lnTsUL3lu+p5SiTMxBsgizqHNvSdt1R2m4GReA= X-Received: by 2002:adf:fa4b:0:b0:314:1bb7:8a19 with SMTP id y11-20020adffa4b000000b003141bb78a19mr774490wrr.35.1688040673142; Thu, 29 Jun 2023 05:11:13 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.242]) by smtp.gmail.com with ESMTPSA id i6-20020adffc06000000b00313e421c620sm14872185wrr.54.2023.06.29.05.11.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 29 Jun 2023 05:11:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Daniel Henrique Barboza , Alistair Francis , Palmer Dabbelt , qemu-riscv@nongnu.org, Weiwei Li , Liu Zhiwei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] hw/riscv/virt: Fix 'controller' typo Date: Thu, 29 Jun 2023 14:11:02 +0200 Message-Id: <20230629121103.87733-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230629121103.87733-1-philmd@linaro.org> References: <20230629121103.87733-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index ed4c27487e..68ccd0bde1 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1692,7 +1692,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) virt_set_aia); object_class_property_set_description(oc, "aia", "Set type of AIA interrupt " - "conttoller. Valid values are " + "controller. Valid values are " "none, aplic, and aplic-imsic."); object_class_property_add_str(oc, "aia-guests", From patchwork Thu Jun 29 12:11:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 697687 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4853828wrm; Thu, 29 Jun 2023 05:12:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzt25A2bbtX0S1/VUNYXe+1PG98jRavrbd+mIz94g4PRIxpiUU1KoStT0aku3tqzd8C7vh X-Received: by 2002:a05:620a:2ac6:b0:767:3bd4:dda1 with SMTP id bn6-20020a05620a2ac600b007673bd4dda1mr587094qkb.46.1688040743218; Thu, 29 Jun 2023 05:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688040743; cv=none; d=google.com; s=arc-20160816; b=C/Sp7mQd0aB4Pkf0IUxE6AfmfcL2kvZumjeAQMPwrWk2+DRYeoP0IX78TUNghdSPPw W9juHujRFJn8ePDtp3I0S4mJYsAT34FLy4fojw9g07bU4Kk/8vdGQfxsObSD9xulm9ih 7xzcBmy3x3b/t8Tf0cZN7JuGWM+1UmnXNkk228Z4ufOcSD2BhtiQ+vm4gyxYbtzqrYVl xo/XXGHRaJ3AmItYEAOXUZD3L1k4eqAFx01YZxUxapM79UPvxgQFjybz94G5Ky50ULQf ShQ4QPNen1BJEGBJqgtCyV1C1sjVshDhkRiyTBIOj+SIpu/wS0C5PXrGxshuDRFm0FL/ Wcpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yB0NCZT8QF6RTN9p4AzdupdhKCd458WHvVaRRns1YuU=; fh=TH+aYAsXC1OKzDbnLW/2Vw94ft/ruj6WlRG4bj6mCQg=; b=LcdGw/kgQ1k/gmaBDJQMSbfv41t6ZL0pOZxAF75tXREHQYg7WzlO8F8lqGOBODCgcf vEq/XA9jQo4q/8Bb8tqN1Y22dMrAK2deL7aeKFWmOQb2jSbZlX+Scf35hWAmhy8reQrA yqfRKad6UpaxOw1RnHf6pjtt0UaCN+NdnoNCD6OM4lA0+ZG++QgAcKvBPw8f3cPjFYGb sDGxPrL8ibVZz5Li3/rMd7JkfxPjwMBX7d0EOwTKDXJ5xcgAQ52/2o6CGpBLz12Ceg91 Ux6sXJNLvLXrPHmg+kSM89dU8Bc9cvXMJMlAUBIyBrUTe9VwS2/Y30k/6r7Jqv0zd1l3 1UsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YNT/N+be"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g12-20020ac87f4c000000b003f4e7c7c7d6si6039796qtk.606.2023.06.29.05.12.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2023 05:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YNT/N+be"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEqUf-0005r8-8W; Thu, 29 Jun 2023 08:11:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEqUd-0005qT-9s for qemu-devel@nongnu.org; Thu, 29 Jun 2023 08:11:23 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEqUb-0000CY-34 for qemu-devel@nongnu.org; Thu, 29 Jun 2023 08:11:23 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3141140f51bso668848f8f.1 for ; Thu, 29 Jun 2023 05:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688040679; x=1690632679; 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=yB0NCZT8QF6RTN9p4AzdupdhKCd458WHvVaRRns1YuU=; b=YNT/N+beqVDkqxKFnOFvYKPKZqC0gomiXkMrDN/ybmsWD/4Wk+bM5W5hq6C3LYxm1D aEOtlHgE9CW+Hf1Pn/EdvkvslJ2F1/6MZxi8aWp1772TTxrYDRvlNV/ziK7l131j83fp F9UpapQPNdwUsk31DnjwzefnQtNVREQcu2QXgBymg7JGevXCgsqBJZigFwK8HQo/6KBv 2hXamMCBiO/Whp7AvHaAdrQOjWwZkYBYmf+7MCxvMAT3NIeZ6laaXUSdnXacXcXn+Be5 I2QDB5I9kvywZVS/uGUCq+RF6TBHts03K4Q2go7AY47//Vh/th6zcrfkGGCle9l+c655 hUOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688040679; x=1690632679; 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=yB0NCZT8QF6RTN9p4AzdupdhKCd458WHvVaRRns1YuU=; b=kA+DyI6skNE6/YBuN214KnESUgm9VId+Vc/PEL4e7kRFofitRJJIn2RI52rOIodJwy SPKjUUmjI+jx6YCL1gNrjZE1lmpr93W40vBeeYJyLpC+zIiWhQqbjIuuFL2pBvhGzrfb ZLWbIwg+Zo4/BKKrKh/ZZOJGvYjt2HG45HM+LzT8fmK5qSAJYCbqbWGzafW1AchsMPzT WcBwllfx9cXt2+Vjtm6oVNpY1l31p8XKp0MoOTrmBCdu9g2uhY3/eF9O0yaFO97Qosbn CMMe3HTdy2Xf/RLYn6DG66pLWUr5nE7KQkZZYzuRZamevt7eO+JwK3bPTFiH4IAmLES1 Pa0A== X-Gm-Message-State: AC+VfDz7Swsh6jQlHfkkeoqwkSDAE5TyBHGg6MoQElnLMQlrnfalTJvr mh6JWKQEiMFWAfekZSSMpreljuo7ao6XqnMoYc0= X-Received: by 2002:a5d:6a8c:0:b0:313:f8ca:989f with SMTP id s12-20020a5d6a8c000000b00313f8ca989fmr7409629wru.10.1688040679265; Thu, 29 Jun 2023 05:11:19 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.242]) by smtp.gmail.com with ESMTPSA id j4-20020adfea44000000b0030fa3567541sm15838493wrn.48.2023.06.29.05.11.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 29 Jun 2023 05:11:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Daniel Henrique Barboza , Alistair Francis , Palmer Dabbelt , qemu-riscv@nongnu.org, Weiwei Li , Liu Zhiwei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] hw/riscv/virt: Restrict ACLINT to TCG Date: Thu, 29 Jun 2023 14:11:03 +0200 Message-Id: <20230629121103.87733-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230629121103.87733-1-philmd@linaro.org> References: <20230629121103.87733-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=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 Advanced Core Local Interruptor (ACLINT) device can only be used with TCG. Check for TCG enabled instead of KVM being not. Only add the property when TCG is used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- docs/system/riscv/virt.rst | 1 + hw/riscv/virt.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/system/riscv/virt.rst b/docs/system/riscv/virt.rst index b33f45e5b3..f9a2eac544 100644 --- a/docs/system/riscv/virt.rst +++ b/docs/system/riscv/virt.rst @@ -93,6 +93,7 @@ The following machine-specific options are supported: When this option is "on", ACLINT devices will be emulated instead of SiFive CLINT. When not specified, this option is assumed to be "off". + This option is restricted to the TCG accelerator. - aia=[none|aplic|aplic-imsic] diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 68ccd0bde1..cdb88a1529 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -44,6 +44,7 @@ #include "chardev/char.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" +#include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "sysemu/tpm.h" #include "hw/pci/pci.h" @@ -776,7 +777,7 @@ static void create_fdt_sockets(RISCVVirtState *s, const MemMapEntry *memmap, g_free(clust_name); - if (!kvm_enabled()) { + if (tcg_enabled()) { if (s->have_aclint) { create_fdt_socket_aclint(s, memmap, socket, &intc_phandles[phandle_pos]); @@ -1370,7 +1371,7 @@ static void virt_machine_init(MachineState *machine) hart_count, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->soc[i]), &error_fatal); - if (!kvm_enabled()) { + if (tcg_enabled()) { if (s->have_aclint) { if (s->aia_type == VIRT_AIA_TYPE_APLIC_IMSIC) { /* Per-socket ACLINT MTIMER */ @@ -1682,12 +1683,13 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif - object_class_property_add_bool(oc, "aclint", virt_get_aclint, - virt_set_aclint); - object_class_property_set_description(oc, "aclint", - "Set on/off to enable/disable " - "emulating ACLINT devices"); - + if (tcg_enabled()) { + object_class_property_add_bool(oc, "aclint", virt_get_aclint, + virt_set_aclint); + object_class_property_set_description(oc, "aclint", + "Set on/off to enable/disable " + "emulating ACLINT devices"); + } object_class_property_add_str(oc, "aia", virt_get_aia, virt_set_aia); object_class_property_set_description(oc, "aia",