From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831453; cv=none; d=zohomail.com; s=zohoarc; b=Idvmd1wy0hs3PV4R9hFcuhPd3E8VqZl2bEXfqMbTOn6JPzBQK5dkHvHLtGDKZinbvZRJDjx+tNrfhPA5p81tMZR9XaR6q1EYvGj03J2VKkGjibRg/CaoHCxIVWe5OAEPX47xC6f5DiUmE9wsHXnwV3lZ0HP3oi+iKbODGF0x5Fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831453; 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; bh=aJCm9ielSGbSry5cbeI+YJvG0psfGNIv8B+tATNPjpc=; b=JfHoLCD4f5kIs5V/b+zQBSZTio8PT4smn6chQdWQTcu6XUigVvaoOKFTVq8/jQpbo4kh/ttiBtWvLNwxbo3EW5SlykVvjUr9FoM6ycbHZds95sRvyvYuCIYtQYJqtYu3K4EOhTYMQwp+yVRQgHqWmjkEc42maGxN9q2R5sx28i0= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831453674316.8570051252734; Mon, 4 Sep 2023 05:44:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8vb-0001FK-9T; Mon, 04 Sep 2023 08:43:39 -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 1qd8va-0001DE-0Q for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:38 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8vX-0004cX-MC for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:37 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bd0a5a5abbso21117381fa.0 for ; Mon, 04 Sep 2023 05:43:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f3-20020a170906824300b009786c8249d6sm6163671ejx.175.2023.09.04.05.43.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831413; x=1694436213; 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=aJCm9ielSGbSry5cbeI+YJvG0psfGNIv8B+tATNPjpc=; b=BcpVQzQeY+8d9RsVWQiy1VBVzzeyR6OkhEIrMeEOU50iOKjXNpTeu0Shm22GtCumGl ZuvosTK7Ee7SGSGto43LCoN56sGb2UPaD4adMMqEr9DF9FZ7U+E3SHDpsgWYHQHQ/tnt LecuXfyOLMSVwcpyZzStKgW08UlGrlR0csHcxwCrDLpN/diVfZTesC3WGjPvm4HxAety LZm80i39s9ltEn1EHbkXoeO2ZwIIAT1pwfYkFe0Ik38Mzkl9b5BmdAE1PxSSBLPiA/FW V3gJ1lyuuBeeq9X9Hl0fM/czRoZKH5urRfIed+//OR7+BN+OzXiYtyYOefdyXA6dRJd6 bXDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831413; x=1694436213; 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=aJCm9ielSGbSry5cbeI+YJvG0psfGNIv8B+tATNPjpc=; b=AmWMUVmWcCEApM0Ld56uU8tlj6fGobhXj9Ji3M9I52euraRgTS70kvQci1L6Wn2T7O jdth3NfaVYZulLr/FxLoLTAv2wF/wAZUz2qngGrTv6KMdYFWLNKT/6nv4CCMbEw1NUEC 2BtiU4ymvhA/QDSjECL5i/M6/75tavC03dyYQikMKHS73Zt2g6GI4km+Pu0aylLWQd1h tv32eHLGyNF37ykV6VRMSvabtMgnI30rsrfn3KGJk5elKlxR8eC1hi+T4vkKAb0zBrvU EntoXMY6hEk+YuSxIzZyNDQr+u0NUdCKn/A2Wj9qcUZRM4sHltm+KOnPSP8Gk9gRBMa4 nX0A== X-Gm-Message-State: AOJu0Yxd8j9GfWLfwobvHOxe1qKef1PLJrEVPolQnaIc1GlKcOoQ4lfi NPnzN40T/v5W6VyWmaMJQX8WjMVKoSwOz5IfNbQ= X-Google-Smtp-Source: AGHT+IF1LC+yWQ0PhXvd9yzZgLb7+mH1K3LMUlqzrxxaMQCoDCfGxeabIkm0GVrCgphK+2vgyIMWHQ== X-Received: by 2002:a2e:9a8e:0:b0:2bc:b0ae:a9e5 with SMTP id p14-20020a2e9a8e000000b002bcb0aea9e5mr7458665lji.42.1693831413634; Mon, 04 Sep 2023 05:43:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 01/13] hw/i386/pc: Include missing 'sysemu/tcg.h' header Date: Mon, 4 Sep 2023 14:43:12 +0200 Message-ID: <20230904124325.79040-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831455415100003 Since commit 6f529b7534 ("target/i386: move FERR handling to target/i386") pc_q35_init() calls tcg_enabled() which is declared in "sysemu/tcg.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/i386/pc_q35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 37c4814bed..43413dd1ac 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,6 +34,7 @@ #include "hw/loader.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" +#include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831478; cv=none; d=zohomail.com; s=zohoarc; b=ipjvT16W+8AQVWGs0DeVS7pOb+g5bOYPZQrDhdovJsmhWWXykGXe393zBsD0AcXA9EEa1MPs8ZEV7Um8YPCoOucyB68pTx7BIiBGO/Joc58E+Y1OYxW7AJfZ6FiPf5nRxnGlDgE5LfK48o5GNy9jnjPbqfDPLRBDf4Hgjjq3OVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831478; 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; bh=r6Qgqbn+d1/I+gSK8St7x7NRj+2INTDRnnggirvl8K4=; b=GoUbdjE/LnOhaNyZkSKr1a87TgRrAWDjrxgQZJ4361PMAqdERQBMxoiwsg4r8twgT45ABQjAL+JakD3je0+nJsPa59F8peWS1AkuYin00C+nlttM8wmssSvZ86J6Cjzem+r948Q+ndBv724NSA9zHDVxq5/7MjVjkmjBvd8IcJ0= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831478170787.6641072229868; Mon, 4 Sep 2023 05:44:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8vi-0001VM-0T; Mon, 04 Sep 2023 08:43:46 -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 1qd8vf-0001OA-Oy for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:43 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8vd-0004d0-F4 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:43 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5009d4a4897so2355452e87.0 for ; Mon, 04 Sep 2023 05:43:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id lg16-20020a170906f89000b009a0955a7ad0sm6087296ejb.128.2023.09.04.05.43.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831419; x=1694436219; 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=r6Qgqbn+d1/I+gSK8St7x7NRj+2INTDRnnggirvl8K4=; b=rjLbOf8dipYWQBszPzvkRe9wBVCtjJcGqNeF1e0ziUpFlwPgQzhdgaRXTVRXx/344E Wl9L4sCrHZJOElaMy7nvXQSECAkCpnDOB1qCZazq5NLZ4SWzR1ki2js3l5CL6RuF779K W3VXoaug2UxuQsPEtGjiWrgx907U8GEAFYw3HvU5YyBW4nmfVEYOFDrrZvgDpCqg6+vY mzSol6+/RhNfxsVCMDX0qkqqd2Fkxs9P0RjSDlP1/a09yUrwkx8TwlE/62Q1FDbeRlCn PbFQ1mEhwBybpSKVqSPcL4y5wWArn2MO4r+5vL0qX498fEMHTeKHei/KI8lJxj9cP6Hm w8lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831419; x=1694436219; 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=r6Qgqbn+d1/I+gSK8St7x7NRj+2INTDRnnggirvl8K4=; b=YevuE4XXR5NUUc5x+jn5UclUkMSuEgmnc7C+nrDNGWxq+dv11fWh3iRyHB3Z5UiI92 +0WEDMqGf2QYYlW9gtVK/ORn9b7KsqLo0Kn9sEb0DJvy57U54aJjiZOVBWVaBDwLhEhT b1kxeiZllHKOR2IOrO5Yr57NLSZdaJsjBXaEXtYA1w1yHrPKixR5i8cUETaP0yUbteMC 46eTrsdSZrPIl0O4hzVzr2KS675BzrRU1LHZjLz1W5MK/sRR6AtePqfLPz3bMagz2XNG Y6yGUzG9vrMZgDttPx7PaKVOcRYqYmms4VeSJgmdFS6pJm85sQpW3xOeXV2V4opDRlql m+Hg== X-Gm-Message-State: AOJu0YwxBXRhuu2FYkS9k+5cI8NVKAC0F9ChjrpC+Z/HwSMvzBoejLO/ HQIIybcV7gTSRwYJkp3wJSx/g73hh/alOwKhNQY= X-Google-Smtp-Source: AGHT+IHAvtxselt1b1hV5LdDZn5OMGkxc7bjsWnN+/jQkXccg9G0McaZkj4DLfPBkIFLocObukSlqg== X-Received: by 2002:a19:2d45:0:b0:4fd:f84f:83c1 with SMTP id t5-20020a192d45000000b004fdf84f83c1mr5836726lft.64.1693831419642; Mon, 04 Sep 2023 05:43:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 02/13] hw/i386/pc: Include missing 'cpu.h' header Date: Mon, 4 Sep 2023 14:43:13 +0200 Message-ID: <20230904124325.79040-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831480038100007 Both pc_piix.c and pc_q35.c files use CPU_VERSION_LEGACY which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ce1ac95274..f0df12f6fa 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -69,6 +69,7 @@ #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" #include "kvm/kvm-cpu.h" +#include "target/i386/cpu.h" =20 #define MAX_IDE_BUS 2 #define XEN_IOAPIC_NUM_PIRQS 128ULL diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 43413dd1ac..8ecc78c822 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -58,6 +58,7 @@ #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" +#include "target/i386/cpu.h" =20 /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831476; cv=none; d=zohomail.com; s=zohoarc; b=JytJcQxZnDCqvunXbsbgm/ylmuqc0yWztO9hD0MTNHDcr4TyNkwfWRdsuHEXnw2nrxpQ7GF1jQedmse0g+T+5Nsi/AZapQ53MiWUKHo4vZpCoFPIAprdYHTPqNWk3SwTjjvHTOjfOyiBk6pGdX9ZF8A7jWNA4qDn/DTqoX/64V0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831476; 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; bh=EAX70gb1DRp0U5HpIrsPRfVqNXXnjE75o2367gc+/Ss=; b=EBMKCFUM93emcrze2LPqCdP11njbfAmt44KBCVwvQVV8cI9JJCCSQ+C2g7SsZjKOKO2JVk0zJDOH/OyW4/e2jgJxr/VWGelULUOT9sneqOsibw2Uo0tmsp+j9pDb+o8JEkbv21tztyy6ifGEWTRnbC/p/SmrBu1ZlUlaki6geSM= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831476507572.6783135538083; Mon, 4 Sep 2023 05:44:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8vo-0001dR-1j; Mon, 04 Sep 2023 08:43:52 -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 1qd8vm-0001W6-1r for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:50 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8vj-0004db-Rz for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:49 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-98377c5d53eso207589566b.0 for ; Mon, 04 Sep 2023 05:43:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id pv9-20020a170907208900b00993470682e5sm6063351ejb.32.2023.09.04.05.43.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831426; x=1694436226; 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=EAX70gb1DRp0U5HpIrsPRfVqNXXnjE75o2367gc+/Ss=; b=qes/yffyt7CA99mz2FaV9THd3U2bxKjGOZFjOTZTHb//avor3vmPF1K75fo7hDlGYc /1SddMKmEUk1919Q2ZSghDBEbQUA3fsY2IxCIMHhwdEhzOoi7HO0bEi0U+XbSNcVmqje EDy+LdP/6QF7QoBOzbuY3+9CITYN4T/O9F4uZs8cApnGgjsn2MMV0mxL2pNVTrBxW7oc 28+aNuvbsWNiZU6pT/ssQ9pGR6q73YRxbeIhlGmTpJw67y0mG/KA0DoZshTQ8wYyhIDu xEFJw/ghqrxYgpp/Z6uT7hcqlBmvg+f+W5RYxRlTzNPanNFiVaZMZrRliq6C8PwZdjUa CWIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831426; x=1694436226; 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=EAX70gb1DRp0U5HpIrsPRfVqNXXnjE75o2367gc+/Ss=; b=KD/txOuyURBmGv+t6QHN4+rTwEyJ7OnvCaFMQfxVOMR1/Bcu7jYhEGdSa0R12wNvil 5EOmhJYBMUN6fr9g5DW2lPqMDWPVRSvoqHx4hbKvo0n6nSOKuNO1MSwQV7iXCXeSws71 2hzpSRcSC1tA5jMFL3rWTsYcs99lPm54X5trTA0QFQWIBmlFqY32AyyBjFmcEgYe5lQy MdBwtfG0uBNMN012/O4/uCzZA6LUiC0PoGiZB8IYbVLurbvO3h5g+vZBB14rko64osI6 /Tg3Tl4ya52795Gi1+UgJGFNeD04CeEbdMG1lu0vpaOqD2so9oU/Fo3/z3jq32oRTDKf tSQQ== X-Gm-Message-State: AOJu0YypSiohchJkULY0xNuZAQeLzropmLmfWrHiEsSk22CO4ygrboYk /jtZOnp9eKEEp4yN5Exwo39ID3/GVcD4zmvh8dg= X-Google-Smtp-Source: AGHT+IFkSqJnsshKBauxCddr+GUPT4A6KXmj88c6crUPHo9OljUs8uCyfcujmDG6A70sYs/Xauvxnw== X-Received: by 2002:a17:906:30c1:b0:993:d5bd:a757 with SMTP id b1-20020a17090630c100b00993d5bda757mr7133775ejb.19.1693831425876; Mon, 04 Sep 2023 05:43:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 03/13] hw/i386/fw_cfg: Include missing 'cpu.h' header Date: Mon, 4 Sep 2023 14:43:14 +0200 Message-ID: <20230904124325.79040-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831476779100001 fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/i386/fw_cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index 72a42f3c66..7362daa45a 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -24,6 +24,7 @@ #include "kvm/kvm_i386.h" #include "qapi/error.h" #include CONFIG_DEVICES +#include "target/i386/cpu.h" =20 struct hpet_fw_config hpet_cfg =3D {.count =3D UINT8_MAX}; =20 --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831461; cv=none; d=zohomail.com; s=zohoarc; b=n1H56jnwelrp9Mu/Wg2J4aljdvT1UhhErovKKUB9NOGUbpCkC2MzuDwccAt2vO2uCFV3RMjHFETS7tmpffullEh0PqfsGdPci5EcIshev3WoBQPpf0+nrMo5ypImEeHVpyB0UH1maw6DplFiD2QpTp2B1a7lIs4a17zTsd2taps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831461; 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; bh=SdbPeRb3rqucMV4G8DmJatCRkQTtO6zKzLYWXw0g6yM=; b=nGEzgwO+aAdd51LfzkdEBKnA8ySnJHHqc6yfWEYW0CMcLFAdibe7fFXUA5pHEfeSzhgqjhZuo9rNVLHoOTkP9gytv6cMOWi5tP99RpbNWuHb3f1rY9nLlMSwmD9lvH6kKp9fElQ9yYU5Ak6BDnnu08cbRs39cUX3wbCspi5hs5I= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169383146128754.424359697653585; Mon, 4 Sep 2023 05:44:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8vt-0001lP-S1; Mon, 04 Sep 2023 08:43:57 -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 1qd8vs-0001i0-Bn for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:56 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8vp-0004eM-43 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:43:56 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9936b3d0286so220810266b.0 for ; Mon, 04 Sep 2023 05:43:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id y8-20020a170906914800b00992f2befcbcsm6120980ejw.180.2023.09.04.05.43.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831431; x=1694436231; 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=SdbPeRb3rqucMV4G8DmJatCRkQTtO6zKzLYWXw0g6yM=; b=dWfNtNbki2/Zlt/y2OdYsxFGajq1Ih3AqV2bzLc2IHjHjEXl5U7M0naJEkts/MtRoj KADVM2tNtm/tvQXx+riLrju6AOakWTAlJdm3v5LBrkXSTsajYxNJSFeZ7bluGVDzzq0U /GVoj96gjvaukMRuvcsrEY0gy0xhTdIhauYj3HAYXT5L0MqLBQUZamgkD2WKl+T3hs2W 08UZ2V06y8fDIAYev+UkTobenjHR60q9KFJFmjdm+ci3El5a1JaPGiAn+9Hf8fIjfprk yYAx4JWmO4y1aIwkeWuHaYCckINHHW9uNDkN5v3vlUZCgiGv6BLie09lSyU3IUO7Z4Rg IVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831431; x=1694436231; 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=SdbPeRb3rqucMV4G8DmJatCRkQTtO6zKzLYWXw0g6yM=; b=C0EF3qlEC+BECjxs+YOrzgGq/+++d+Yw5ntBXD+bCSvAQDE749I+zyYhuGN8/980Nk sNUO2HnLSW/znFvs/nqpJK52LHMnFhNomiWSE7saEbF4xI4g+JpTW21wuxhF6If9Ozhd eBB7/FQ1/zrF3JW6Ov6gyOsHdEM0VLoo3fA1zcOR3Hq2PRvrHcZNzzjT+UBgmel1Eib3 kJK6M9xdgnhMx9hMAlNwi5oSszEjCVVQhSBukOCvGtZLETTQiK6tKssMbVeGGcPh/gnO KlLDh3osAiVPUIXRmk1feeBfexpJjBuYYqOOyA/d21Q6pAeW9roMo7Y8JtMChmw/u3ym 17fQ== X-Gm-Message-State: AOJu0YzbQVTRpJqI3Rbf0Q/6Mgm+jnvlfSoNAuaA14mAZ8oyFdA7Js7H yrwlTxJKdh8LrkgKd6scg/KDFP9xHX8xXYS0oRY= X-Google-Smtp-Source: AGHT+IEsBFqUtTTs6WqvZHff9CgEl9Cr75zp000xY/akplngwM5ibOARO4pqK/3xRP1h2a6+OrAUVw== X-Received: by 2002:a17:906:cc5b:b0:99d:fd65:dbb2 with SMTP id mm27-20020a170906cc5b00b0099dfd65dbb2mr7528978ejb.33.1693831431480; Mon, 04 Sep 2023 05:43:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/13] target/i386/helper: Restrict KVM declarations to system emulation Date: Mon, 4 Sep 2023 14:43:15 +0200 Message-ID: <20230904124325.79040-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831462546100003 User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index 89aa696c6d..2070dd0dda 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -22,10 +22,10 @@ #include "cpu.h" #include "exec/exec-all.h" #include "sysemu/runstate.h" -#include "kvm/kvm_i386.h" #ifndef CONFIG_USER_ONLY #include "sysemu/hw_accel.h" #include "monitor/monitor.h" +#include "kvm/kvm_i386.h" #endif #include "qemu/log.h" #ifdef CONFIG_TCG --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831481; cv=none; d=zohomail.com; s=zohoarc; b=gg2EdIjLiHmadELMGghhSOODimxwZef+sVqNrhkrEnmjJAEU4xvbwYX6A93GrBh9e1n3AVcoxYwucH7fpnc+MimN+nVlsmgqyqK7gWpOVMepm+9myg3Pl2B38jnvGQrA8nk+5o0PUMSWd6jtn5Uk6MS1rVd+aX1W6aCN7k4IEqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831481; 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; bh=J86j5mSNtE6sux8EpFhfC+5G/8PZx0ftCeNpTFb29eU=; b=HSn0mgBtJM7q8Ix7kcvR20BHiirW13gFwAZh5aTLiPb7NCvXPVRFjRjjaqxF9D1b8mmxKAlBgneFtpdY8LsQDNzrvmuY43uMMmL6oxKYsh5QCY8QeJGdGKIrZorS46daLOvv7110y57P7PY/xN0eONrdG5APpoxVM7REMzrLHrE= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831481362158.27579156869808; Mon, 4 Sep 2023 05:44:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8w0-0001uk-TG; Mon, 04 Sep 2023 08:44:04 -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 1qd8vz-0001pc-Ex for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:03 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8vx-0004fj-1q for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:03 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2bd6611873aso20725161fa.1 for ; Mon, 04 Sep 2023 05:43:59 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id qc8-20020a170906d8a800b009944e955e19sm6102288ejb.30.2023.09.04.05.43.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831437; x=1694436237; 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=J86j5mSNtE6sux8EpFhfC+5G/8PZx0ftCeNpTFb29eU=; b=rugoFjQY5QZTWmWx26g58vw+nqGgLXLA8xgvMQ4aeIwkgPrVrkMilAr1KJS1ytKHpB GK2tLEienrThJgUVPi2krz8sjY1GnSaAcwCX9PgMXcGEs0gBSaF3aMP6PR82R0H474ro 8ALHjsLUVvQM4TvAd5+lmFWW4/ap4eAl5/Dk1glbToIMD3VQ0Ks/7aBfWD2ssWwHoi1t iW0kOqFrFnTJIdJSXfn+0A+sJGP6DAqhOeK2xnHNH0SNWQUrNJp+LSoi6ZclcgXqV0Xx T0rFu9CJWiKTMZiH8LJGBLdxgljGFE7AOYgPXyqBwqNRsCY6097Iu8UoMcuIAtO6Qc5W U5ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831437; x=1694436237; 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=J86j5mSNtE6sux8EpFhfC+5G/8PZx0ftCeNpTFb29eU=; b=EjUVAvbCNi8tXCYRwk8NAaEoq05Xmt2zusZMA8hJXWO0iW6ujTRvmWpsQfIb9ZhG2c lqPCaXyqTgeRTH548QRDIMJmRkdW5Tp0PQ3WjcMuPtSb35wGYqww943Z6u9bAef0LX+N Fx+oj1X3I7sOWTkMZX77hOjzYNHFc9yrV19kKa2BUZs/R05e5+oLVwyOvEufOLd8ylZx iatyVTBq79hig3X/1PSTI8bbfUzrMEN8oTAvIXJo/SY8Of2ARmyYXiPKxCv1EZOUx/w4 3lZwXsACJhAU+qfLZll1w8pqunvtLBeRW15ETb8vbUjS9TTPWphz5Yf45fQIstUCWm51 nEXA== X-Gm-Message-State: AOJu0YxVYnYhM77+aSUvanoyhJOvP0ZAUAqSt79+2FBYtaekMb3ywh+j VpiwDsFYeB5jaSGtw7wmTN5HmOZgw9zj26Iq+EQ= X-Google-Smtp-Source: AGHT+IHTKfewe5UyKQ+3sAtZlufz27CBCCuRSsD4I35Lg5dnHNAx7JD/gpJfXGmmCvEgfuCO6tDe+g== X-Received: by 2002:a19:ca4e:0:b0:4fb:9050:1d92 with SMTP id h14-20020a19ca4e000000b004fb90501d92mr5895100lfj.51.1693831437006; Mon, 04 Sep 2023 05:43:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/13] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel() Date: Mon, 4 Sep 2023 14:43:16 +0200 Message-ID: <20230904124325.79040-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::229; envelope-from=philmd@linaro.org; helo=mail-lj1-x229.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831482252100009 In order to have cpu-sysemu.c become accelerator-agnostic, inline kvm_apic_in_kernel() -- which is a simple wrapper to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h" header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/i386/kvm/kvm_i386.h | 2 -- target/i386/cpu-sysemu.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index e24753abfe..470627b750 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -13,8 +13,6 @@ =20 #include "sysemu/kvm.h" =20 -#define kvm_apic_in_kernel() (kvm_irqchip_in_kernel()) - #ifdef CONFIG_KVM =20 #define kvm_pit_in_kernel() \ diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c index 28115edf44..2375e48178 100644 --- a/target/i386/cpu-sysemu.c +++ b/target/i386/cpu-sysemu.c @@ -19,9 +19,9 @@ =20 #include "qemu/osdep.h" #include "cpu.h" +#include "sysemu/kvm.h" #include "sysemu/xen.h" #include "sysemu/whpx.h" -#include "kvm/kvm_i386.h" #include "qapi/error.h" #include "qapi/qapi-visit-run-state.h" #include "qapi/qmp/qdict.h" @@ -253,7 +253,7 @@ APICCommonClass *apic_get_class(Error **errp) =20 /* TODO: in-kernel irqchip for hvf */ if (kvm_enabled()) { - if (!kvm_apic_in_kernel()) { + if (!kvm_irqchip_in_kernel()) { error_setg(errp, "KVM does not support userspace APIC"); return NULL; } --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831497; cv=none; d=zohomail.com; s=zohoarc; b=kov4m2LTlBLWg5ivIpi8zngwAHFcQitZB5l6HOLLAOZLynivl9fFgpNbniiNbou731+VC13aTwqDazMgMy3DW4XWlibWzQ3mGxIZ+oMpzWtJV4774n84tEwMWpHT+HhncsKeKmHXLq3C6RXSFK42HQ9LdRtYARDEw3pXE+YwJGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831497; 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; bh=uvgb1mY0EmO5+OIh91wyTfD/dyJ0WPXCogU6akizjwQ=; b=HTSIx1Qc47ua6bC/oFMCbzrLrXkVXn837OM+cyai/v4Gu4TM23xyM7IMDnvj8mhR8mWy8qNLnO8jH/Y4MfoFXMwIsuJNqHxZUD+I0l8bZM5+U3Nbl6ADrefU04EtUO9x93jPOJ0Tpm3vBL13cRo6KPE3hN3icmmV2d5392p8nZU= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831497747598.2498792977425; Mon, 4 Sep 2023 05:44:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wI-0002DE-E2; Mon, 04 Sep 2023 08:44:24 -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 1qd8w5-00024q-O3 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:11 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8w2-0004ge-Ao for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:08 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-52a3ff5f0abso1860381a12.1 for ; Mon, 04 Sep 2023 05:44:05 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id b22-20020aa7d496000000b0051dd19d6d6esm5820773edr.73.2023.09.04.05.44.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831443; x=1694436243; 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=uvgb1mY0EmO5+OIh91wyTfD/dyJ0WPXCogU6akizjwQ=; b=SiHzq6iOllrj4sisDqppUQIXfwq88s9s2I40fOvl+t4FtBDz6QP0rFa1YHjVlH/kYe Nc2ipq7f9gOXJA14jcyhhD5iFZLk/SgXsUh5tT+2w4vjxwlFS/rdL+QKi930Aeov6ycn AV/JJkwUCByV0U5T+E33cWI7C41eQJ+ws8ggb/ZqEu7H0KyLzuPMWZTOMR1O+yXUj0wY ds8KmTKSB3rYTVHrKhiBHbcIjyFDVIcnYJ7Nj/6fABjOVTpwOFzPhM8nslb3VKkaQMmZ v0zV/JrmPfMp2+dzHiZfVOsdaYzBaz90Rod4MIVE5TNZP7bex+UNpPCUGrwjaGxYOu4W Vy0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831443; x=1694436243; 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=uvgb1mY0EmO5+OIh91wyTfD/dyJ0WPXCogU6akizjwQ=; b=kTK+v7rpF3wPXOohtGlsChPbmjGWRbUnt5NY6jR3x+AEneqi8OfFQ97rqwAbc9OuMt t9K06cYHJTZZM4RCtVxenimbUDFJIhvzjqG9EGr35B6H2mqDP9MCvlKR2Ycfi1vrk6Mq YDG8jBz6hAnghwITK6kt+Jczjb3B2pgV/126DUcDeBFLxUmk9hFx9EsgTED4xHdipwpH CfXaVKD6HaebB6EOcbkToWle4Ka7VOIUXKRK1a0UfRWWbv5l9GFeA0ADZu35SwALrVEQ yg9ohgZE+bWlaQSyHqm03y5NZKnqMI1eq9PRxXW+R2MhDT6pKHfxFVRj1b70N+iHBreW 9jGA== X-Gm-Message-State: AOJu0YyxTOW7jNyrP/k9+wY81s/dVubd7/zfQAxjKIzoKhfpQXHzRHXQ bNJ6ysy0tmIMlN6/NsHF+Fz17TVNeAN5SekwT0Q= X-Google-Smtp-Source: AGHT+IEKCW36+yHgpY2ZBNqNwkC4Vzs3gfJURNdlqSjhdC3qvST4PZ0o00mxq38nx3QQCXyG1+Hd8Q== X-Received: by 2002:aa7:d699:0:b0:525:6588:b624 with SMTP id d25-20020aa7d699000000b005256588b624mr6061172edr.37.1693831443293; Mon, 04 Sep 2023 05:44:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PATCH 06/13] target/i386: Remove unused KVM stubs Date: Mon, 4 Sep 2023 14:43:17 +0200 Message-ID: <20230904124325.79040-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831499400100002 All these functions: - kvm_arch_get_supported_cpuid() - kvm_has_smm(() - kvm_hyperv_expand_features() - kvm_set_max_apic_id() are called after checking for kvm_enabled(), which is false when KVM is not built. Since the compiler elides these functions, their stubs are not used and can be removed. Inspired-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/kvm/kvm-stub.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c index e052f1c7b0..f985d9a1d3 100644 --- a/target/i386/kvm/kvm-stub.c +++ b/target/i386/kvm/kvm-stub.c @@ -10,42 +10,16 @@ * */ #include "qemu/osdep.h" -#include "cpu.h" #include "kvm_i386.h" =20 #ifndef __OPTIMIZE__ -bool kvm_has_smm(void) -{ - return 1; -} - bool kvm_enable_x2apic(void) { return false; } - -/* This function is only called inside conditionals which we - * rely on the compiler to optimize out when CONFIG_KVM is not - * defined. - */ -uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, - uint32_t index, int reg) -{ - abort(); -} #endif =20 bool kvm_hv_vpindex_settable(void) { return false; } - -bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp) -{ - abort(); -} - -void kvm_set_max_apic_id(uint32_t max_apic_id) -{ - return; -} --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831509; cv=none; d=zohomail.com; s=zohoarc; b=WQAVn/jI4Iz/H5kk6UE8FhN0/qrggt/8qRqNd37s1jpisn94EV0B4NUm+0zo7eZjKOeHo8o7jw88EGXdYfHyff7a6g+DCD3odj6DsjIKWyWUDcOPUrADnnDaVoX4BisfwgKlAugBxEj4PO4FPKf9LAZEWYx7eJFbeQPvXX79fBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831509; 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; bh=y1KRPJbXgs1nETBjJNmlr2PmeFCKIGRCFU9IErPdUTo=; b=lwV+2zce1xkHtvMOpW+/jsjsne9BeJ1i7fqhBkbBPw42wV3Z+dxzb+mQnVgOb0qNkiyYLzny46YGTXWte29ysN8J9dGkBqA+oCuYzAemYtIDPeNBOQy+p4s+NahUu+ww4V2WOGUWI2C6jbCDvAyF4C/KiBfyd8UCi2ZVD9R/YXs= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831509495296.2588028132965; Mon, 4 Sep 2023 05:45:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wj-0002hP-VD; Mon, 04 Sep 2023 08:44:50 -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 1qd8wB-0002BD-0D for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:16 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8w7-0004hR-2k for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:14 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so1969801a12.1 for ; Mon, 04 Sep 2023 05:44:10 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id lt14-20020a170906fa8e00b00977eec7b7e8sm6153822ejb.68.2023.09.04.05.44.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831449; x=1694436249; 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=y1KRPJbXgs1nETBjJNmlr2PmeFCKIGRCFU9IErPdUTo=; b=PF/J7Sp+O9zlBr9zE9ws5fv2ICxnWGaVkVK+5CH0ZN3Dz551s2G4Su/82pgQcOoqlF jXM+303olIGV7R5bJTswxSGiMRmVt7eOq0VjJg12BtZqzpXYMfjO9TuUwwpBo0+WOK+P miNO8RNuV9pVkzmekniU8u2rIp/Rq7EMeCPad4+3O7yijGg+Dnh4KzQR1g1tFcyOMpFF faiPsq0Jafc3rL/zDfcj4I8EhDrn5jlbbpbjgfS3bq9kyYmtNEJWvVraeyEWpIVhMNij T2emOpYmWRy4BmP8nerdTBXFv7n/N/1j5kT1RKqgMohMJAENk1MSXKYkMZA7NAvyQ/lU 4AmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831449; x=1694436249; 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=y1KRPJbXgs1nETBjJNmlr2PmeFCKIGRCFU9IErPdUTo=; b=Y2kq631CNe/YnQmoUOuNffltpYTVsHj+ZxLdcyGlFCQywTmxLmWRhoJNAYg2eJWJSa VGwt3l2Hirw4dXwTKf6lI0RgJGl6uV2WFZLKDVVnbYaQ/5Kp6XBSg1F4dK3L+789Gtp0 +jRTlXAXbYQyEcC1iTL0p3VO2juXkrCeOyYF8OzXDHMq+j8nCrFJplavVPJkkuNRgX3v fnUaP3ePPOmyCm7S8/eWgi3iXcPj7Gu5Mui3RTyUAtqkC6yd6HiG5z/ITkb3AXhgF06z saogign4G653iqsUtpCxnxGctI+Of9pXXY1yo2RgAouvyDphayLcK1Fv5kHMUfjSBbSq Z9XQ== X-Gm-Message-State: AOJu0YxQejGMflLUhvS0OlbJSzvOWI5UjEmrdtloc81Fw26berowpv9o B34x8qzWU5zQGg4dyYSRv9SY5MCkN3yGcEhKioo= X-Google-Smtp-Source: AGHT+IEWg2VEI4Vi7IulTZgNKdrHE2WZNrX8LJFTMhv1AYpEjEk8Q1zYIfhClVUZKE72XnRCdYjEhg== X-Received: by 2002:a17:907:2c75:b0:9a1:d29c:6aa9 with SMTP id ib21-20020a1709072c7500b009a1d29c6aa9mr5782355ejc.11.1693831449576; Mon, 04 Sep 2023 05:44:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Peter Xu , Jason Wang , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH 07/13] target/i386: Allow elision of kvm_enable_x2apic() Date: Mon, 4 Sep 2023 14:43:18 +0200 Message-ID: <20230904124325.79040-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831511027100009 Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/intel_iommu.c | 2 +- hw/i386/x86.c | 2 +- target/i386/kvm/kvm-stub.c | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 3ca71df369..c9961ef752 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -4053,7 +4053,7 @@ static bool vtd_decide_config(IntelIOMMUState *s, Err= or **errp) error_setg(errp, "eim=3Don requires accel=3Dkvm,kernel-irqchip= =3Dsplit"); return false; } - if (!kvm_enable_x2apic()) { + if (kvm_enabled() && !kvm_enable_x2apic()) { error_setg(errp, "eim=3Don requires support on the KVM side" "(X2APIC_API, first shipped in v4.7)"); return false; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index a88a126123..d2920af792 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -136,7 +136,7 @@ void x86_cpus_init(X86MachineState *x86ms, int default_= cpu_version) * With KVM's in-kernel lapic: only if X2APIC API is enabled. */ if (x86ms->apic_id_limit > 255 && !xen_enabled() && - (!kvm_irqchip_in_kernel() || !kvm_enable_x2apic())) { + kvm_enabled() && (!kvm_irqchip_in_kernel() || !kvm_enable_x2apic()= )) { error_report("current -smp configuration requires kernel " "irqchip and X2APIC API support."); exit(EXIT_FAILURE); diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c index f985d9a1d3..62cccebee4 100644 --- a/target/i386/kvm/kvm-stub.c +++ b/target/i386/kvm/kvm-stub.c @@ -12,13 +12,6 @@ #include "qemu/osdep.h" #include "kvm_i386.h" =20 -#ifndef __OPTIMIZE__ -bool kvm_enable_x2apic(void) -{ - return false; -} -#endif - bool kvm_hv_vpindex_settable(void) { return false; --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831639; cv=none; d=zohomail.com; s=zohoarc; b=KQpltpZnvEwvEjzoOVPKP9yIHTGMlAWV5AtiIXbIEO7YU2ky+TRqUXlxQ/18Y8absynFIyIwQ5yVEcmHwDV0Pt7+y4aZ2nCtnLH9Z/qwAY4A4ANfNAJ6BhLCjFYIdvNXd53y0Xp8eFO5hSQoiytW6AI1EyrNkBMS3Adf3kFO5Ho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831639; 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; bh=yBy9B8/ychOxzyt4MqhLID6RA2iJpJf7s2rkxq992Dw=; b=epBcZp2R5LNYoWwjTfgtXkaESFRpJ2C9BHDqaeOXTr+iU8Ij/e/dw82RlwrbOaCbLqG8629yhi3ass7X6CkBWUfrc8nTFN5UmePxfVpV41kAif3hkrU2Pr6j4nKIdd5Js1mcck0yWXWeuvmz5Pzl0dKR/syric2kYnYLH+kX1xo= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831639651136.30592320461028; Mon, 4 Sep 2023 05:47:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wn-00039Z-4O; Mon, 04 Sep 2023 08:44:53 -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 1qd8wJ-0002Sz-Ck for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:26 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wG-0004jm-IJ for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:22 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-52c74a2e8edso2066318a12.1 for ; Mon, 04 Sep 2023 05:44:18 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id m7-20020aa7c2c7000000b00523a43f9b1dsm5777597edp.22.2023.09.04.05.44.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831456; x=1694436256; 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=yBy9B8/ychOxzyt4MqhLID6RA2iJpJf7s2rkxq992Dw=; b=n9Zlk/JxQSQeyjWxZ0k1QN5K7D6XrWm2b3o4NH4540tb1b1p0D0S5lYxkMpbLlu9Ln H1SMqdDqu1dukMczUMpMWbkZR9uLMO22/ML7KlBxJGIjFhjVo+3vvMTW25/x6glgdtL8 DcCs4wrq2XcUnM1Vnmj3a3qetfkln48Nd2uGWEREv6dXMQWYimxt6FQRPd8xpZhUtVqV +qFZBWGqzwdsdp73e6c3BUkDkiIWOpM6yg7C6b7EPGv2Rju8VRpNBLbAh+YkSY3S82J3 TI5/VlF8z8afAfVniWqi9K78LYIeDB6vztQGZbgfMs+SLyMbfHAuCtWrSRz21BTbiMGQ peHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831456; x=1694436256; 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=yBy9B8/ychOxzyt4MqhLID6RA2iJpJf7s2rkxq992Dw=; b=KJcYLMlNtTAsTPezXPBq/J2nSdUHU3zjyf4Uh6g41gl+pxRSycscXOLr6uzmzjOfMK Dp+saZBAHoazXh2e6ALF6grcrZ8kPyAcMJ50qkdz1+rbzfZc0XcxZlsUhMVqta4+8Zrq UziNftkcSpdebalYuZVI6tVjyPiXl9bsSaeKjQHWKVkEtEFVtlReRQx7InX6WCif7FYI bnamYcw09jt/bJ+Wbyya3kGsAtv/V0IiuDJj8leycm/3vNHVIj4SL19CBKzFyPhwR8ce XLCF54Ror4fMMbJan/AZ2r4JoF1+Fdx6XWLcta93+WvjsnaNVexLE1w73VSkmNxOuz7t 0KNA== X-Gm-Message-State: AOJu0Yye3qeKDkc4nVQA1CZ0UquyxwvSrHB1LVtQY+dPysUdLBDJG7Ah nLR5kUvDDAizd/TwotveToCx/obHXo6xMvuR09k= X-Google-Smtp-Source: AGHT+IG4z1vB/QZFvcTz4ZepoUXgBUZve8udAT7n1n0cJ/4FcFU6pkPiPnNOm13Rql1ddwKB2By5rQ== X-Received: by 2002:aa7:d3d2:0:b0:523:2dd6:62bf with SMTP id o18-20020aa7d3d2000000b005232dd662bfmr8674466edr.34.1693831455850; Mon, 04 Sep 2023 05:44:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 08/13] target/i386: Allow elision of kvm_hv_vpindex_settable() Date: Mon, 4 Sep 2023 14:43:19 +0200 Message-ID: <20230904124325.79040-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831640834100001 Call kvm_enabled() before kvm_hv_vpindex_settable() to let the compiler elide its call. kvm-stub.c is now empty, remove it. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/x86.c | 2 +- target/i386/kvm/kvm-stub.c | 18 ------------------ target/i386/kvm/meson.build | 2 -- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 target/i386/kvm/kvm-stub.c diff --git a/hw/i386/x86.c b/hw/i386/x86.c index d2920af792..ecf16ef402 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -424,7 +424,7 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev, cpu->thread_id =3D topo_ids.smt_id; =20 if (hyperv_feat_enabled(cpu, HYPERV_FEAT_VPINDEX) && - !kvm_hv_vpindex_settable()) { + kvm_enabled() && !kvm_hv_vpindex_settable()) { error_setg(errp, "kernel doesn't allow setting HyperV VP_INDEX"); return; } diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c deleted file mode 100644 index 62cccebee4..0000000000 --- a/target/i386/kvm/kvm-stub.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * QEMU KVM x86 specific function stubs - * - * Copyright Linaro Limited 2012 - * - * Author: Peter Maydell - * - * This work is licensed under the terms of the GNU GPL, version 2 or late= r. - * See the COPYING file in the top-level directory. - * - */ -#include "qemu/osdep.h" -#include "kvm_i386.h" - -bool kvm_hv_vpindex_settable(void) -{ - return false; -} diff --git a/target/i386/kvm/meson.build b/target/i386/kvm/meson.build index 40fbde96ca..5d9174bbb5 100644 --- a/target/i386/kvm/meson.build +++ b/target/i386/kvm/meson.build @@ -1,5 +1,3 @@ -i386_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c')) - i386_softmmu_kvm_ss =3D ss.source_set() =20 i386_softmmu_kvm_ss.add(files( --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831561; cv=none; d=zohomail.com; s=zohoarc; b=RAF9REUaCWp53ClVFxTNqO+kHjqRLuG/GmoJT/Xcz+Vc/OU+brlZwiHD3+N0yr5pVqcSpWX4w2WrlK6Ub1ymaS6QGMCPOO/dzvdmTW68Ip/nD5f5o1BLOE8u+FOTdT7qSxhRDWNx72/jv3PimjJwJRj3B2Z0g25XYviu6ARdEoo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831561; 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; bh=EfDnH2zi19spDXT1YZEdk2e2zvrpSHkYzKDFanumPPE=; b=FNz+kgh+bVFsWoexXepF7dhMG4twHB+8dvC4Re5NxokFjoftwlRRBK0RdaV+wyg8ahv9Sz7O/zVFGd9RPaTy9NkT4Zc90Bbu/oBQd2iFdyjzSdHxOdwmLhTv/zjgmY1MpI0oIh8ewKopfOH7TTLxegxk2E0/qDN3M0/ts5bsAu8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831561788171.91586655453136; Mon, 4 Sep 2023 05:46:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wn-0003IW-Tn; Mon, 04 Sep 2023 08:44:53 -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 1qd8wM-0002Ui-NC for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:34 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wJ-0004kN-GI for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:25 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2bbbda48904so22935531fa.2 for ; Mon, 04 Sep 2023 05:44:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id gu18-20020a170906f29200b0098f99048053sm6215400ejb.148.2023.09.04.05.44.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831461; x=1694436261; 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=EfDnH2zi19spDXT1YZEdk2e2zvrpSHkYzKDFanumPPE=; b=OFetcV02ajE+PqlKu5fqrE509BbUwXTdtoYOnacoN56eVwIUD8S9s/eAzrY+iwiYkE j/MLAyUjbv9KoKG9HAyA5Cnh6EimPxQJVuHvp/g69foed4PfuRYzfBTNHrr0DEkiUy/I 6VaJH1sL747WCUNBjzHcJU9iqApHFI3PHqRxCRN65+11KR/WAmgdEMyaO7q/fNoZvNLi sNAAZjNfA10HzA0hpUgTT/pQnkdYWo/rtZN2nbupMG4DRQB5pgEtyRPCxH5gdJLA7VvS UcJaMlTLSZyzBX/7R9lSAQ9El5fS1Ntu0kXH0BuCd5lMNSIxZ+Gc38PYyAKiONduYAIk zN5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831461; x=1694436261; 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=EfDnH2zi19spDXT1YZEdk2e2zvrpSHkYzKDFanumPPE=; b=J4pYeDN9hgR3ct6tpmEBMG0Hj7KusIWtsP4ASm+gcnOHuK5y3j9e5e1hV06Rw7PSaN Ah8Hdu3fJTjDS+CF6X+efWQlvhtZ12ZG5m9Ug8nqmBiTkk3KdO0Yr2hDR9YwDC0/j5Gt EuGEL5lErkPNshR5D/B+PnOCmMQhIMzq0Moh2h3V8rI8a9panOluymp7CCDnQb2I6M4G WcLepNDkyT5xFpWi4BajUfBvfzXSw8WM0lNEQ3Kcn/HW73FUfY0wTjmMy5c/loo5x/q0 nKNbadkp+HpcugrA3m06JOPNen7tuNxvjRqpn9vyqtbmbJApC/uWRC/hF2hxmUXVvuET wuww== X-Gm-Message-State: AOJu0YzMOZhQYYfdLXniYUNE0go+RRqYiMGWwQxpQwmh7pmF1eL8zfQ8 oQCiAO6S2v2w9pUcUYWDT++epzEwRq+pMZe/06U= X-Google-Smtp-Source: AGHT+IE976/wb9043fTOX1jLNvYiAsS+SMGWMVP8cKCaRkt7WlpkXdAiG5q4d7+oUS7QvOusWuayLw== X-Received: by 2002:a2e:a176:0:b0:2bc:c466:60e9 with SMTP id u22-20020a2ea176000000b002bcc46660e9mr6704259ljl.49.1693831461543; Mon, 04 Sep 2023 05:44:21 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 09/13] target/i386: Restrict declarations specific to CONFIG_KVM Date: Mon, 4 Sep 2023 14:43:20 +0200 Message-ID: <20230904124325.79040-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831562525100001 Keep the function accessed by target/i386/ and hw/i386/ exposed, restrict the ones accessed by target/i386/kvm/. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/kvm/kvm_i386.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 470627b750..ff309bad25 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -31,30 +31,35 @@ #endif /* CONFIG_KVM */ =20 bool kvm_has_smm(void); -bool kvm_has_adjust_clock(void); -bool kvm_has_adjust_clock_stable(void); -bool kvm_has_exception_payload(void); -void kvm_synchronize_all_tsc(void); +bool kvm_enable_x2apic(void); +bool kvm_hv_vpindex_settable(void); + +bool kvm_enable_sgx_provisioning(KVMState *s); +bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); + void kvm_arch_reset_vcpu(X86CPU *cs); void kvm_arch_after_reset_vcpu(X86CPU *cpu); void kvm_arch_do_init_vcpu(X86CPU *cs); =20 +void kvm_set_max_apic_id(uint32_t max_apic_id); +void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); + +#ifdef CONFIG_KVM + +bool kvm_has_adjust_clock(void); +bool kvm_has_adjust_clock_stable(void); +bool kvm_has_exception_payload(void); +void kvm_synchronize_all_tsc(void); + void kvm_put_apicbase(X86CPU *cpu, uint64_t value); =20 -bool kvm_enable_x2apic(void); bool kvm_has_x2apic_api(void); bool kvm_has_waitpkg(void); =20 -bool kvm_hv_vpindex_settable(void); -bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); - uint64_t kvm_swizzle_msi_ext_dest_id(uint64_t address); void kvm_update_msi_routes_all(void *private, bool global, uint32_t index, uint32_t mask); =20 -bool kvm_enable_sgx_provisioning(KVMState *s); -void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); - typedef bool QEMURDMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t *val); typedef bool QEMUWRMSRHandler(X86CPU *cpu, uint32_t msr, uint64_t val); typedef struct kvm_msr_handlers { @@ -66,6 +71,6 @@ typedef struct kvm_msr_handlers { bool kvm_filter_msr(KVMState *s, uint32_t msr, QEMURDMSRHandler *rdmsr, QEMUWRMSRHandler *wrmsr); =20 -void kvm_set_max_apic_id(uint32_t max_apic_id); +#endif /* CONFIG_KVM */ =20 #endif --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831571; cv=none; d=zohomail.com; s=zohoarc; b=B0/WjPDCBvElrniHbZDRfe01a4hQAfRMnkquwNngs/Lnz/h6q7oD8K86zHcVUMzn38+3Fq+EeBd7t7CBzr9lgcgvJAmx4LKTnsdzdbV790d0S/lg1s4qjZ3Twn6kDDcjdyDzSJF1WEl6eEtmAXi27Q3cRFNpc6h6XUWwpYwY0M0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831571; 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; bh=9c1++OFXiKHirX3uQNfDd/RXZK+lEL70eHdHIGvdol4=; b=YTx5v9HEDdvLNHgT1av4Z8ylX0g1sAdYfne3RM5tP8cmEVDh2oOuEbAIBw6ycRRrJsjyxxLopYvsv4iYgQ63HYPYd6KUfCw1mKRpdlr7k5JlRw3P465fqi53IugoLnGZW5E9WSA4iecL1utG9slW9hx/gB3CYABfLceC/oVAi48= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831571593468.9488193732998; Mon, 4 Sep 2023 05:46:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wq-0003kf-HE; Mon, 04 Sep 2023 08:44:56 -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 1qd8wS-0002Y9-VJ for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:36 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wP-0004ks-4H for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:31 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2bcc4347d2dso20034271fa.0 for ; Mon, 04 Sep 2023 05:44:28 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f15-20020a1709067f8f00b009934855d8f1sm6127181ejr.34.2023.09.04.05.44.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831467; x=1694436267; 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=9c1++OFXiKHirX3uQNfDd/RXZK+lEL70eHdHIGvdol4=; b=fWk/Zq3ceQ7UglWsyYHnFamB0IOzavOkRrA4EjYZGAHdfTPMrV7c9E4sDCqPH/+HWI M3cu+rqvJ4zrVI7Oiwu8ho8g9L8KlJhXSqNSicL+ooarZ+bGE/UoKYJ+wrVFegscKE6I 6gk6/+FzHoqjZakkgi/yWhtUKHy7zj5035b4Js21fQBkXZdb2cpWIyx8I4YtJW2ROjA2 Ic55XjrlPML0gTzqavSGxFDNHi37d8b+WVnD2XwlvRYJhrM7YS4h7YNdSspBeP73EBWN pGWpT2+i9UJnxqHBR+lsodFOh7ns4pzbhdMCCOmLvoag/ELIEl5PUEsTtb1hHrjYKq/4 sr/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831467; x=1694436267; 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=9c1++OFXiKHirX3uQNfDd/RXZK+lEL70eHdHIGvdol4=; b=Ap1VDdxCwjAcAbJzVwksu1wRDndEtaRw7SEFNcW0fggNMIk8itraMgQ7b8MCpxczwK VpZWE4JvvaEAnswY21covSlxtx+XumcvMoKDbHO9znWq53eivf9C2Uj/0Iv5mk5umIwC MakJPu7a4sn0Th5Z/TFmQva674V97w1BBIPgbYo1NSHFF/LqQE34ZQVEKptqdqnm/oI5 RKDnJkYCIvr2vcvGku53xPAXC0m4WOtovxWax+0w7phHLeUMBDd3xNRaMlRWK8iV4QSr ZmCTZ/zLadXhRTnZElCV5WKR90PzzQ90vLP/tVLa2WEUFj04U2Un2F+Dk00C5I4dwHdt 3gLg== X-Gm-Message-State: AOJu0Yyhbn1skzyRVMA+I3BDgpQhE714IwBR3ZVQkhV9YxNGaMchIFQ1 PcG6TQ5MRr0lTJIyMVXqOYtrzrcrC7lHll0YqjM= X-Google-Smtp-Source: AGHT+IEWA9agBIka4/UEdzmAwtfRA+imBetPWuYVWeGSiJIg5JmAaXx74MtNWsYTkyhrhZ9vNtQo1Q== X-Received: by 2002:a2e:908a:0:b0:2bc:fce1:54d3 with SMTP id l10-20020a2e908a000000b002bcfce154d3mr7414408ljg.41.1693831467132; Mon, 04 Sep 2023 05:44:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/13] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets Date: Mon, 4 Sep 2023 14:43:21 +0200 Message-ID: <20230904124325.79040-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::22d; envelope-from=philmd@linaro.org; helo=mail-lj1-x22d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831573500100007 kvm_arch_get_supported_cpuid() / kvm_arch_get_supported_msr_feature() are only defined for x86 targets (in target/i386/kvm/kvm.c). Their declarations are pointless on other targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/kvm.h | 5 ----- target/i386/kvm/kvm_i386.h | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index ebdca41052..a578961a5e 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -464,11 +464,6 @@ int kvm_vm_check_extension(KVMState *s, unsigned int e= xtension); kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, &cap); \ }) =20 -uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, - uint32_t index, int reg); -uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); - - void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len); =20 int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr, diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index ff309bad25..b78e2feb49 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -40,6 +40,9 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp= ); void kvm_arch_reset_vcpu(X86CPU *cs); void kvm_arch_after_reset_vcpu(X86CPU *cpu); void kvm_arch_do_init_vcpu(X86CPU *cs); +uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, + uint32_t index, int reg); +uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); =20 void kvm_set_max_apic_id(uint32_t max_apic_id); void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831507; cv=none; d=zohomail.com; s=zohoarc; b=dRQ+CCJMiiegkb9PScMfJNxFos/OIc8dBDYZYZbVcWUv9G1QB/xUxTn94BwqlC+Ve0X0OFa86d1O5cFV/LyK38nmgQv2WY33Y0Z8h+0Vb8RD+gLe/WObavbPOASp8XeZe8/Z6S/X8MFdBLmMmSyCVY4E7uv7uLT6YNhB2fqP20E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831507; 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; bh=wQp1ZwukkzwgrEJecGe85e61/jQRSJ79TXphHOkDcps=; b=gByiATt3ArhMOr4MSW3HOQternkjjwhXkU5uAA2ciezQ17uf9Rep4wSMiOFizWbs9MDFJV1ozpXrtKNKKgNrYCSknvyVJYe+TK9rIvzoQjHeCJBHeuVWr4sV6aAa45HhfcvQ7m5dFO5fGGgF5oDVcmFEM/H1BC3pvMh1h6kcSTw= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831507797745.0840750352487; Mon, 4 Sep 2023 05:45:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wp-0003Yb-Au; Mon, 04 Sep 2023 08:44:55 -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 1qd8wY-0002hM-Kk for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:43 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wU-0004q1-8N for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:36 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-99c3c8adb27so221339266b.1 for ; Mon, 04 Sep 2023 05:44:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id x24-20020a170906299800b0099cadcf13cesm6132052eje.66.2023.09.04.05.44.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831472; x=1694436272; 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=wQp1ZwukkzwgrEJecGe85e61/jQRSJ79TXphHOkDcps=; b=kdM4fmih7f7PIXry0I6KDgO3ccjLjcYsaaIES5rX5783shZBjvqesxw6xJJnZgToju q4HT2kWEXWU2NkDVHMBTN6S7aSMEUp7nUyMm7PPZt/eO628pvWP0MGNOqFCzDLarFH0N 30orC0f7UPti1MDYHXPRMm+h7D2MVcRbOO3R98xuOluEj4oPWNpQj0xo4A8TLpOplaWh 5iDQ+ZYrSUVxwYwXAHeLz3B44pJJMNwJ53L6J3+IWRv1e2cZit99YG1EjQW7CD8tCSoD YXyBjHn5Z2bUd/zqviSboydn79io3X+yZ0ywiBpS9Qmw0GH+G3i806e6YU3mujR0Okbl vhaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831472; x=1694436272; 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=wQp1ZwukkzwgrEJecGe85e61/jQRSJ79TXphHOkDcps=; b=L7om7tDGaHDZ1UqelNfMJaUQqv/T4Dy8g+pu1bz9U9To0lDuLXNzHHbhuq/MiKRljZ Biec5woowqJ8QZr5Jjzjgh61hISHIQqaKgdfkCoO17zA2af/52cGSiguBv/mrJzOZ68D sXR8QD8IiHRRntf8x8weuXik890jLqH3sztBToKr1iR/gCP6Xsh4Ej40AoKQHTh+lUYW E78cdLPdBotHh5EJV8obwMqsMteqeYK/wz8R8y2ZadvZgEIyO0b6bJdh2pgRrQ0RJWww 7x60ux0T7SaniIIRegNcUVJwmrNpBTy8o8cYV5qpPlCqhdrleaYNDAJ6aU1WBRyA+VuY R7qg== X-Gm-Message-State: AOJu0YzqO5MYqg0uD+MUCU+b1iuANmNIAWoFwjWpQGNpBrK0sp2o+PKr gO7qEJmmNoD/B9SZ1TzEAr4pV3bQJNbVdPC+T8E= X-Google-Smtp-Source: AGHT+IHuyIx4y8Ds8coh9sd7t5uoyGE2ek+jqkPzJtAFpTx/gIGSHZIy1qj15vmm5PPTTvaYTKuKSw== X-Received: by 2002:a17:907:2c64:b0:9a1:b43b:73a0 with SMTP id ib4-20020a1709072c6400b009a1b43b73a0mr8116583ejc.20.1693831472606; Mon, 04 Sep 2023 05:44:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 11/13] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets Date: Mon, 4 Sep 2023 14:43:22 +0200 Message-ID: <20230904124325.79040-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831509279100001 kvm_get_apic_state() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Since we include "linux-headers/asm-x86/kvm.h", no need to forward-declare 'struct kvm_lapic_state'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/kvm.h | 3 --- target/i386/kvm/kvm_i386.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index a578961a5e..4326b53f90 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -188,7 +188,6 @@ extern bool kvm_msi_use_devid; #endif /* CONFIG_KVM_IS_POSSIBLE */ =20 struct kvm_run; -struct kvm_lapic_state; struct kvm_irq_routing_entry; =20 typedef struct KVMCapabilityInfo { @@ -407,8 +406,6 @@ void kvm_irqchip_add_change_notifier(Notifier *n); void kvm_irqchip_remove_change_notifier(Notifier *n); void kvm_irqchip_change_notify(void); =20 -void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); - struct kvm_guest_debug; struct kvm_debug_exit_arch; =20 diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index b78e2feb49..d4a1239c68 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -54,6 +54,7 @@ bool kvm_has_adjust_clock_stable(void); bool kvm_has_exception_payload(void); void kvm_synchronize_all_tsc(void); =20 +void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); void kvm_put_apicbase(X86CPU *cpu, uint64_t value); =20 bool kvm_has_x2apic_api(void); --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831508; cv=none; d=zohomail.com; s=zohoarc; b=kuhK7GKcYWzWUHfNIFXy6p022rEHOFsljXtJUFd9RtuXwOay9njonHiuFuZRoA52O7E+cXKRyFp97EVRasIzlZXlgMzD0XntV7WybScScw5KDHEgjphe02Pe808NDywh0n6Q2RQQjEiSw8fRxmXZFGQkBFSLUd96tC3R/TbPPwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831508; 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; bh=c18azMn+jtI1YAn3dB0AGJOCqMNVzX0REantB+5g0DU=; b=MLtQmtjcyqmlQOyc6DJZ0GLmyE5jSky+WByP721qKjOchn6GbgyMgZt6ZHT6NbNocX70oCBoKnhLrd3uo5kw3xpCb82D8kUyKi//RJpsMqmTndJbaiq7KAYxw31Vjn3S/KH3bLPVDQGE6TeDZpNlMbSSyk9u2b+U6WnBIRdB5V8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831508124128.45180110238857; Mon, 4 Sep 2023 05:45:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wr-0003v8-QF; Mon, 04 Sep 2023 08:44:57 -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 1qd8wi-0002sR-2D for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:49 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wc-0004sh-6r for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:47 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9a6190af24aso219547166b.0 for ; Mon, 04 Sep 2023 05:44:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id hb26-20020a170906b89a00b0098cf565d98asm6058630ejb.22.2023.09.04.05.44.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831478; x=1694436278; 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=c18azMn+jtI1YAn3dB0AGJOCqMNVzX0REantB+5g0DU=; b=WlkJXLjDr5p81463F//uUUFzTs4M3arxxHO3pd0X7GwKzvVMD4KAs/HnnrqHH9CKnl hZ96fLDTUuzcWAggBeM8QdCRAT18r1mkHgiKDITDMGv3wgoKS3DC7d5qfKsbTw9Oe7Pb XYleYjG3CudJ9aU+1h0xdBtz7ya1ZqSb1/01zyRdSWfZcQu1kc0dhei2zfdINxEAmGnx vOM6p7Is+nJ1h/8c83AZtF9N3BZqbh19qsxMqn4PmHe6s4g9psg2tGvGQ5Q2ZkMKqab1 tRDsnOv4yaDzZPgDFjRUGFybk9o6HiJ9h19xHdHV+5tEFwde751i5w82b0/liA7sJl53 nolA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831478; x=1694436278; 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=c18azMn+jtI1YAn3dB0AGJOCqMNVzX0REantB+5g0DU=; b=gd+JXPHhHuqyqQegIRpH23sOIJNaNcAuMObZzKVH4V4MvlLOYe6zUDvpAGZ0c/IJUL 3IceZWcX+w4Pcpr9JEBiTDa3Lx6AVrc51k4L2NKVvvXAO21h2RzKDMJsYYOpSs9bja4m 6u+alArqNZy1m8xEuZZRa/alFgYG24y5OD0FqMb1hWw1QTpmeGQ23WvZT8Cq08UTbqIC NpVQO2IGlQL8u4B5QAQnuYo5UN1RxofSwEKwczPPLR5rXMgw71YHLqz9L1f0ENBfOhR7 70JDLUwLn8h/wshHy/bfNzuIDuN1VJs/7K4foCnhzyfOHsyC0dy663ITdYXltwFZPaE1 hVfQ== X-Gm-Message-State: AOJu0YxKVPLwM+rbS4Q63slFggnAfN48ZeYP68i3ZHIcEGoYHdEe3BDK k1BIoDDGHnXl289INoVnPCq94I3vvneNMdVTQWo= X-Google-Smtp-Source: AGHT+IGkBWzlSRGBOELBpUf+dLc0WEpvu9JCETivRhredxbliVAZerUGcF4mTiM1Pqigg7YcHDOtcQ== X-Received: by 2002:a17:906:5a6e:b0:9a2:24f9:fabe with SMTP id my46-20020a1709065a6e00b009a224f9fabemr6871711ejc.66.1693831478762; Mon, 04 Sep 2023 05:44:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 12/13] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets Date: Mon, 4 Sep 2023 14:43:23 +0200 Message-ID: <20230904124325.79040-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831513214100001 kvm_has_pit_state2() is only defined for x86 targets (in target/i386/kvm/kvm.c). Its declaration is pointless on all other targets. Have it return a boolean. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 1 + hw/i386/kvm/i8254.c | 1 + target/i386/kvm/kvm.c | 4 ++-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 4326b53f90..147967422f 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -221,7 +221,6 @@ int kvm_has_vcpu_events(void); int kvm_has_robust_singlestep(void); int kvm_has_debugregs(void); int kvm_max_nested_state_length(void); -int kvm_has_pit_state2(void); int kvm_has_many_ioeventfds(void); int kvm_has_gsi_routing(void); int kvm_has_intx_set_mask(void); diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index d4a1239c68..76e8f952e5 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -33,6 +33,7 @@ bool kvm_has_smm(void); bool kvm_enable_x2apic(void); bool kvm_hv_vpindex_settable(void); +bool kvm_has_pit_state2(void); =20 bool kvm_enable_sgx_provisioning(KVMState *s); bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 6a7383d877..a649b2b7ca 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -34,6 +34,7 @@ #include "hw/timer/i8254_internal.h" #include "hw/qdev-properties-system.h" #include "sysemu/kvm.h" +#include "target/i386/kvm/kvm_i386.h" #include "qom/object.h" =20 #define KVM_PIT_REINJECT_BIT 0 diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 639a242ad8..e5cd7cc806 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -154,9 +154,9 @@ static KVMMSRHandlers msr_handlers[KVM_MSR_FILTER_MAX_R= ANGES]; static RateLimit bus_lock_ratelimit_ctrl; static int kvm_get_one_msr(X86CPU *cpu, int index, uint64_t *value); =20 -int kvm_has_pit_state2(void) +bool kvm_has_pit_state2(void) { - return has_pit_state2; + return !!has_pit_state2; } =20 bool kvm_has_smm(void) --=20 2.41.0 From nobody Thu Nov 28 07:44:09 2024 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=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1693831571; cv=none; d=zohomail.com; s=zohoarc; b=msYxoPfR68jVSjKeuRf/x7HESPwdodhEMgqaMeNakUYq84Ryo2ZRy61wH3YmxIUvBFH0P+GNS3rWR1Ewesh9CmsjBh6UPs/Xavtmj9wH0RBB5yVOumRn+HFpChu/02fRse7Rnwg8izEMc/0cdzD//wrXH0RLC3Pi4i83Spf6A7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693831571; 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; bh=QgUPYLmjXf0NM9VXdRKjm+MRqu9ErWeVIsJU5m+yYDU=; b=jCV2FNAEOg88JwWkphcVL0z0jDqLSon2VYvylhgy2Ar4ffgFtoH/3WzSyfmGHU65g+v9wZOY7k9Ird3fLqelda0++x1E7tqTmUGxdQtRXXmEPBLGyH6Wo7J/HtxaIkzqNCLDUo2c9S9O2+cIzRYgYyMUnXcM+hgRBiXVGxTNI7Y= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693831571462297.2840975451246; Mon, 4 Sep 2023 05:46:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd8wo-0003RI-LL; Mon, 04 Sep 2023 08:44:54 -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 1qd8wk-0002tk-6U for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:52 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd8wg-0004tB-GN for qemu-devel@nongnu.org; Mon, 04 Sep 2023 08:44:49 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52a23227567so1871459a12.0 for ; Mon, 04 Sep 2023 05:44:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id d4-20020a50ea84000000b00521d2f7459fsm5753793edo.49.2023.09.04.05.44.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 05:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693831485; x=1694436285; 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=QgUPYLmjXf0NM9VXdRKjm+MRqu9ErWeVIsJU5m+yYDU=; b=ElGuqkKPb4tccOJZzDdzhDceFkTKIqylpNDmc649b6nbMf1REbF1Efa0VFpwrGWSM3 2xKl0K+rIs/6CovWnoWd8DSYsfZ5odFhQ9ORInIdwJwk+P3jUmMJNv332kKBVjNcav0+ nl3UPRkchznUU2UQhb/mgadNEJB2hkwv355uNDCh696UmxOgHL0iurJHI7N6r14OPCW5 +qJx/03q9RA0C+9rJ6CB8ODB6WR36FavEUtPE5P+9s3lzPjqfkTa8ZBCBIeGeD9Jb0hY 87L4ZRMryQ76hoLnfEWbQPxdA+9IkPdDdzhsUM0oZtIizjvAg1zORD2B17oUnblvQbqk UWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693831485; x=1694436285; 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=QgUPYLmjXf0NM9VXdRKjm+MRqu9ErWeVIsJU5m+yYDU=; b=BNoqDKPhINO0+DGoX242DIdUOAXWBKy4kK6DiQqqp6W4vCiov4jR/dGy18S6pHEYmY Ktp8E6A9c0reBjvgHGj3AjxmlWsPurczQUFsjiEZqOdZnzUedaasKLkgfvYTnAeUEkcb nM2sAQKriW8lanu4Lpditd0xX0HT7BKC/94aEgnr3h2Nk7nYSi8I0LSNc/JJqY8Dnv0B uebFUURL7MquKrYTPqFDA3Y/Lii5Mq2CMjkI5KygkXFWqm/IzitDlaOCc3NNT/jtJxNn WeFHLg2NXfLlqW70V/nFplxWD+Io/mJnHe8W2EOgT9CDnLKIpTWzUYLMcyVw7/fhRr8H yLHg== X-Gm-Message-State: AOJu0YwzzXM8s3DTKJprruRtFmPKHEWCD9OIBSB6kF+5jPybxuq8/sK/ s9DjIiZD06XI0U1XOhbWK28pQHojtse1OoWF8xc= X-Google-Smtp-Source: AGHT+IGpqxvPFHv+7iL7JBf8coc8ir/WyqX6mJSQUkJ8wn20F+l+BdUJBcSdl1rEC9tKrnU3giCDUw== X-Received: by 2002:aa7:c393:0:b0:525:570c:566b with SMTP id k19-20020aa7c393000000b00525570c566bmr6829285edq.22.1693831484850; Mon, 04 Sep 2023 05:44:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH 13/13] sysemu/kvm: Restrict kvm_pc_setup_irq_routing() to x86 targets Date: Mon, 4 Sep 2023 14:43:24 +0200 Message-ID: <20230904124325.79040-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904124325.79040-1-philmd@linaro.org> References: <20230904124325.79040-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1693831572359100005 kvm_pc_setup_irq_routing() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 2 ++ hw/i386/kvm/ioapic.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 147967422f..ee9025f8e9 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -514,7 +514,6 @@ int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNo= tifier *n, int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, qemu_irq irq); void kvm_irqchip_set_qemuirq_gsi(KVMState *s, qemu_irq irq, int gsi); -void kvm_pc_setup_irq_routing(bool pci_enabled); void kvm_init_irq_routing(KVMState *s); =20 bool kvm_kernel_irqchip_allowed(void); diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 76e8f952e5..55d4e68c34 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -78,4 +78,6 @@ bool kvm_filter_msr(KVMState *s, uint32_t msr, QEMURDMSRH= andler *rdmsr, =20 #endif /* CONFIG_KVM */ =20 +void kvm_pc_setup_irq_routing(bool pci_enabled); + #endif diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index cd5ea5d60b..409d0c8c76 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -16,6 +16,7 @@ #include "hw/intc/ioapic_internal.h" #include "hw/intc/kvm_irqcount.h" #include "sysemu/kvm.h" +#include "kvm/kvm_i386.h" =20 /* PC Utility function */ void kvm_pc_setup_irq_routing(bool pci_enabled) --=20 2.41.0