From patchwork Thu Sep 7 12:59:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720601 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp219764wrp; Thu, 7 Sep 2023 06:02:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAY45Cfc9GbAGH4iMbHrzpPOhv509MBIjnQJb6GFhf/4pi3Q8WszQ98QU11S+0FVv4v9Re X-Received: by 2002:a05:6808:30a2:b0:3a7:62ff:24c1 with SMTP id bl34-20020a05680830a200b003a762ff24c1mr23019008oib.46.1694091761466; Thu, 07 Sep 2023 06:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694091761; cv=none; d=google.com; s=arc-20160816; b=h7SuGRdmvHx00WYsugSTQP4TZ0J9YSUyCWGKLEQEkhFQ2L0lG7bknZ4iE7J0Zj4OyD p9e58Klx8YhAQQzs+TXDzyay9MfZlU6t6HbS2nqe1sYJ70wH2YgUfCJ792uoF62/+zke Y6IlC+8WgpiRsM+jMOC/wKjBoZqAShfIkdicQT2xNjZQkfSxCT9FltQ4WPT9oZVlGtBi opcM5tLUplHNAGRo02X8iB9F99yGjyjEJ8ayL4Ma+3/foSO1J4u8nXpaR2fulrRF0jVw QQhPQ6BIlPch7oUG85CJ5yqR6JRvDvPGx1ktSG+7Od+Y+f99KNz5/o5c9sO0rBXbdQlY FExg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YUBmQE/WZcRmgCjgL8iIiSyqO6NGliX6M17Mh1v8/jk=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=UGIv9676fp3J6H6BFPH3LKhJj53M5XkN9DLMr+4MN39Cs+JpQPWVUJ4RXgCScMOalQ 1puCzQ3seBT5Ja0OntfKiHmJfZ5Bz6kaIYWeQv9zlBhnKiIPHDZe/yKx6y8HD4l7axX9 7Mf9TtqBL4PTdZRpNsxFIIQuQkB/54/Wkm+EJNzT4l57FvyMJOd7+AwzeeMhyqXAGZqG vAMCiY1vT5sjyQQjQ29LGbM7MvaxY8rhDPt00EvWJ6/NkTEoUHPC+cIDSHuaTmIMJal9 fGrF2J/BVMkIsb2gQKql4dFlrAXSW+XVj7wH1NlQaYcf8HoH8ZybTAC/GfgQ8HkK/4B0 jndQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O2nwXzzk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n15-20020a67ac4f000000b0044d3c2f551dsi1911072vsh.798.2023.09.07.06.02.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:02:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=O2nwXzzk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdG-00034Q-Gq; Thu, 07 Sep 2023 09:01:14 -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 1qeEd2-0002sG-IG for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcu-0007Im-HU for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YUBmQE/WZcRmgCjgL8iIiSyqO6NGliX6M17Mh1v8/jk=; b=O2nwXzzk1eS+Q3NUMWLDhu8pCtXrQKkLq+fLkBD44MBbszbRgls4uT+MGY7aU8OZupKk8G bfwQJxObBbXfm4z9kA3f9YEwWuvFoQ4hkAIkGaz6e2HKVio594J19dnH+80a48yG0znbXG /+Meeztp9FhWK2qt+4sru8eacg1Zveo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-dzICH9lANAiFpPb4ZWOk7A-1; Thu, 07 Sep 2023 09:00:46 -0400 X-MC-Unique: dzICH9lANAiFpPb4ZWOk7A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-31c5c47807aso580450f8f.1 for ; Thu, 07 Sep 2023 06:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091640; x=1694696440; 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=YUBmQE/WZcRmgCjgL8iIiSyqO6NGliX6M17Mh1v8/jk=; b=Wlelh/cNIvRdG5P4K8f8LbeNRh+FxbrAYU4VC0OGZGjzTzxvfXxqU9cB45PNCfek4W t1+ZZSgUwYAictjpNMKfGszReZsIhXFm3rDQYT605JtJDy+lTSjRkmr2h82jId50poZD O/M1xphFCzv6J0YfpOEfBlvjeen4q3Dy3RCDHJ6XWZM6rJsdWhMmDxx+KgoFnx50Z3Oz YOIwBcFLaB0oOdrW32bmgUTR72sg8fviVBHwLDQiUfvE5WB/FUbfWXubNlCRbAPsiKmY Pm4sR5ZlSYDCchzwPwGNIvHxyPU+yIgSRqPc10wZ8erRaaShFljDUSeHbND7V4O/z2fi bUZg== X-Gm-Message-State: AOJu0YxX2bhT0NZNvzYfxq0rPpGv09NaS6CF+W1zepmOxv2Ea0EuinI1 VgaxxYIFVxty7me/Hq034zgm8ehih0Gq5sRFGW2Fe8aRVtrMkh9sHWtvaFEf/cIiOnIdczeYJdm br9HhhEoTMiQG/DcIuZvxLszIxgpJEIUtb4Pacf8eYXCHWLkwztH7PZ748Zh1v9fPC5XXka6Rqj s= X-Received: by 2002:adf:dc8e:0:b0:317:634c:46e9 with SMTP id r14-20020adfdc8e000000b00317634c46e9mr4898581wrj.43.1694091640090; Thu, 07 Sep 2023 06:00:40 -0700 (PDT) X-Received: by 2002:adf:dc8e:0:b0:317:634c:46e9 with SMTP id r14-20020adfdc8e000000b00317634c46e9mr4898553wrj.43.1694091639788; Thu, 07 Sep 2023 06:00:39 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id b4-20020adfde04000000b0031aef72a021sm23106658wrm.86.2023.09.07.06.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/51] contrib/plugins/cache: Fix string format Date: Thu, 7 Sep 2023 14:59:24 +0200 Message-ID: <20230907130004.500601-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/cache.c:550:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_daccess, ^~~~~~~~~~ plugins/cache.c:551:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_dmisses, ^~~~~~~~~~ plugins/cache.c:553:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_iaccess, ^~~~~~~~~~ plugins/cache.c:554:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_imisses, ^~~~~~~~~~ plugins/cache.c:560:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_access, ^~~~~~~~~ plugins/cache.c:561:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_misses, ^~~~~~~~~ plugins/cache.c:665:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:678:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:695:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, ~~~ ^~~~~~~~~~~~~~~ %llu Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/cache.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 5036213f1b8..0b636d53ae9 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -545,8 +545,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, l1_dmiss_rate = ((double) l1_dmisses) / (l1_daccess) * 100.0; l1_imiss_rate = ((double) l1_imisses) / (l1_iaccess) * 100.0; - g_string_append_printf(line, "%-14lu %-12lu %9.4lf%% %-14lu %-12lu" - " %9.4lf%%", + g_string_append_printf(line, "%-14" PRIu64 " %-12" PRIu64 " %9.4lf%%" + " %-14" PRIu64 " %-12" PRIu64 " %9.4lf%%", l1_daccess, l1_dmisses, l1_daccess ? l1_dmiss_rate : 0.0, @@ -556,7 +556,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, if (use_l2) { l2_miss_rate = ((double) l2_misses) / (l2_access) * 100.0; - g_string_append_printf(line, " %-12lu %-11lu %10.4lf%%", + g_string_append_printf(line, + " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, l2_misses, l2_access ? l2_miss_rate : 0.0); @@ -662,8 +663,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_dmisses, insn->disas_str); } miss_insns = g_list_sort(miss_insns, icmp); @@ -675,8 +676,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_imisses, insn->disas_str); } if (!use_l2) { @@ -692,8 +693,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l2_misses, insn->disas_str); } finish: From patchwork Thu Sep 7 12:59:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720604 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp224536wrp; Thu, 7 Sep 2023 06:09:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEqkgcc6rVp3BSpKmdHG6YPLQ7pSUYfelXWoua/O+SmhwwOh4I2SerA/olE7fmLp+yHBc/ X-Received: by 2002:ac2:5f51:0:b0:4fe:7dcb:4150 with SMTP id 17-20020ac25f51000000b004fe7dcb4150mr4523965lfz.67.1694092190724; Thu, 07 Sep 2023 06:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092190; cv=none; d=google.com; s=arc-20160816; b=ZlqSJ2mWuf2AqHBLJgz1zi+Ilyr5F8Efz2fpsnvyrgD7yvuof/XYspcPb8LV8iwMIq wqwjcr9IqStxPalsIhAGmLKwhBMHNBT7x0CZ/PlFxKgSabQDQwfKlfLFuIDF/ECZ3Lb3 h3BNn+avXCvG9NM9/3h5nbbIKQY6Y/2qmV+aNKvWrBi35PREWmnkp4uqhiWZHTirjC6b RsrM3aZoUlo7IIxBIPPwmpKP8cMfKi/l2HadelQiiHYZmtSo4tuaPB5b3ylAy/NmgWhq S908YduY0npp+PsGAjuPAqoMgxuvIk5fEX5jF+9aVmEE4ePSVIWY7r99KguP5s7mpKmQ LX5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SNGxCcskM5CtdJOrttdHLKr3u4GjeZuEossSiUwH/70=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=HTN2OS5QxI7iGowkxL7qTQJk7Lac9WVF/JdCV6v0eYCIlBskwARqH5jvwAvElSnKP/ mq2tpW9msxTzuhdhE82H3oWc9tzq3diXDx4l5u3J8+w1rApqwABtGfPnIgPzxSdtdt3O sJFt3BTWeC6LOPA6yR9vIfjwahvrThv91D+bHlsQmDMVhoBoRAu73i9LcxBUUpuPSL1U uiwls+EF3yCBEStVNs7SHx/BWbnBV3lvwkE3qO8gJWmIoLkDy9hdP0+mPNyNAWtaw1sN JopW80AlDCi1B3tXKqurK3WpZ57XcbVOGysA4DqaJTpxS/25xgFlkeyMJwdplGTIPSWz 2W5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UD9sJgcQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fc14-20020a05600c524e00b003fee38fa1a6si1102473wmb.20.2023.09.07.06.09.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:09:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UD9sJgcQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdG-00034S-H5; Thu, 07 Sep 2023 09:01:14 -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 1qeEd6-0002si-GO for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0007JJ-Ak for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SNGxCcskM5CtdJOrttdHLKr3u4GjeZuEossSiUwH/70=; b=UD9sJgcQk76pyMobEK3v2fhtacUQR0hkQLW9XJct0ApC5x43BDaxq9dK8BccMKlfjKJiWV wU7iM+Ew+iRAUqnWEeR/BSKCIMJXhJjtf0ZuDqdP4+o+/eX9a+tr2cqxW1zEl8oUWd7qBv /6Q085ZVnRTDnRbrsC9HRCsnGsB375k= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-VdnSzAf-NLi9K5siCC7TZg-1; Thu, 07 Sep 2023 09:00:51 -0400 X-MC-Unique: VdnSzAf-NLi9K5siCC7TZg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-401be705672so6871295e9.2 for ; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091642; x=1694696442; 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=SNGxCcskM5CtdJOrttdHLKr3u4GjeZuEossSiUwH/70=; b=dsUgj9W6tmwneVLPJnpPCrcz2qYlCzteyTjGgN/1VGjV7QV8prMz/Qu7f9xJG4spFz 0EGdDHFT5h+NMXvbehyy/YXHeg22FbhnHcOceiZMpjvXcv4EhEN8CLCxc6WzfPG1Ra+Z 7ZatritKnQvyKtPtk2X+vnuYioC2IDvg/faOUQsQ5X+gFNTq2QHUVYmTMeVODMQHYfC7 O/gZ53NmDKai8rOMTDJlVmsP4sAsOeSGOqVk3DbyUyCDQcQ0nQMuT/liMRVBD+XmoQet ZlxSttVsWBqnCzo/3ASNC4Bg+n+MfxyeA4J+fKrj8Xa3zQo5dbqZ2jV+r9SIMMVGNMfu Lw6g== X-Gm-Message-State: AOJu0Yz2WYlhIh9uXb8EmTfDJ+tW24cIJEzuA1nvVsMMxF22h8Vu7OBY rXeUCLPV8OXb81QUbJpzQX/R78fTBmx5z/BGe0H+X60gG7ZLRndVgvkm7X7cAd8vteGAYnWqG7g VqdfMkcfxLCkTE7Fmab58DxuTxymMhCyQ8g6MDqDz/VD+BaTWGkuP+hawKVleugcE/pr0CAGxTv g= X-Received: by 2002:a1c:7718:0:b0:3fe:1679:ba7b with SMTP id t24-20020a1c7718000000b003fe1679ba7bmr5177783wmi.24.1694091642511; Thu, 07 Sep 2023 06:00:42 -0700 (PDT) X-Received: by 2002:a1c:7718:0:b0:3fe:1679:ba7b with SMTP id t24-20020a1c7718000000b003fe1679ba7bmr5177742wmi.24.1694091641771; Thu, 07 Sep 2023 06:00:41 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id x16-20020a05600c21d000b003fbca942499sm2480623wmj.14.2023.09.07.06.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 16/51] contrib/plugins/drcov: Fix string format Date: Thu, 7 Sep 2023 14:59:25 +0200 Message-ID: <20230907130004.500601-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/drcov.c:52:13: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~~~ plugins/drcov.c:52:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~ plugins/drcov.c:52:35: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-3-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/drcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 686ae0a537d..5edc94dcaf6 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -48,7 +48,7 @@ static void printf_header(unsigned long count) uint64_t start_code = qemu_plugin_start_code(); uint64_t end_code = qemu_plugin_end_code(); uint64_t entry = qemu_plugin_entry_code(); - fprintf(fp, "0, 0x%lx, 0x%lx, 0x%lx, %s\n", + fprintf(fp, "0, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64 ", %s\n", start_code, end_code, entry, path); fprintf(fp, "BB Table: %ld bbs\n", count); } From patchwork Thu Sep 7 12:59:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720607 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp224836wrp; Thu, 7 Sep 2023 06:10:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4+GNhwB4WeDJF5CGdh61/HGXEYui7CWBMKyNMdLoy1A3oij/t6//TwC5RHSt/ot9PCEwc X-Received: by 2002:a05:6512:3d24:b0:500:94aa:739c with SMTP id d36-20020a0565123d2400b0050094aa739cmr5844150lfv.61.1694092217533; Thu, 07 Sep 2023 06:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092217; cv=none; d=google.com; s=arc-20160816; b=ad2eIBGXtr08MfzPQouOJPmDqW4/fryHtTajzw7ClK/GMTPmqUB3hKIO2gcbd2WxC/ 7ahZhiKNHxIbdDiBI77cxC6XVVVAIG+qIADWL4H5r5RGyl5/PFCTxxPsfbH/pBbt1iVQ GIYkeApHwO6uzq3nIT5Aot4YOWef4oWpoZyG6ulu5w5K82+NiMZMOJrfxXaZv2uMX5/C fmVPmo56oIglAxAWMQVrza5N9Z+MidF9GKKQSlF+nfnkgZGnTXa70xbu2djfSXa964IO +NuyU9LONe23Q0yE5uCa5N00iGCA7ZiSb1D5M9EcxfUrzxGy5nsN7GfTlTg5hk8MNbY0 DyxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=deDGl1ZSdh4eDpSF5HH/DX8AUIwg+yuy4UZLXOALgvk=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=QBntQnpvDnT8SzZwseNPMTnSYP2Hl4rW366dnSeT0HIfP571/BGSQZ4V1atJTebVdN 7t/UXHFXBRQdYs6+4/D27X0hoCk5FBQzKwq3UwFSoSs8GS7j9UqxuGxCicWz1s8XzZiE qyX3TYe0LpqILX3qdFmRxj8xuLEidR7iLHFTtTgNJKeNxfbRD2kUXD4A/4GHKplEB4nN NZrsu7FnCZbAZLXbydAHOEaKwhm+R5KOV4k1VZzDX5EWh69iAygdgDsMXRI1X84hKVnl 9slgTi3rDBhkzbGnq55KMzM/JJRx3qWo0wIFDz01qhKaCtuj3Q+W8ckmLmQAqHf8h265 ACDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUdoE8w2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 19-20020a05600c029300b003fea723ed60si1086703wmk.205.2023.09.07.06.10.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:10:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AUdoE8w2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdP-0003FM-6v; Thu, 07 Sep 2023 09:01:23 -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 1qeEd4-0002sR-Gc for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd1-0007JY-4E for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=deDGl1ZSdh4eDpSF5HH/DX8AUIwg+yuy4UZLXOALgvk=; b=AUdoE8w2OCdxWpE24ZbSDTzBJDcstuqMbyNknNI3KsDB9Q1R1vuOTAfA5/jU2CtZUUuklC HA5JFDJ3ukJoIfEKNWJGvFuw4XvkZA5GfSNPTVjCh17ZmJzHzQpteZF2Id0bknTkxeUIUA TKQMXErrNRule6tNVaEGwlUfEItrEn0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-tjAS4tBRP1SWgRwVVfhlLg-1; Thu, 07 Sep 2023 09:00:52 -0400 X-MC-Unique: tjAS4tBRP1SWgRwVVfhlLg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401dba99384so6530935e9.3 for ; Thu, 07 Sep 2023 06:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091644; x=1694696444; 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=deDGl1ZSdh4eDpSF5HH/DX8AUIwg+yuy4UZLXOALgvk=; b=SiAxBXh40CFy8toATTuO6kw7p/nnPJV1BtHbfeDQeXUu8d767lOI/bnW7jAwBj/oqW FjAKdw4FHBZvLuC/vQWm/dMOCpMSPGP4W85cWVFyn8e/7IeqY895qnC59AFutSUgf59m Rg8CpqVZgZBKzL1xhx4Y2/y96WBbgf8bKuYdUTc+eEslooQvWV97rqlTTqS6GSbtlT9x WwKw+uBdzt1jS6MQm7kZqiF9EacmvfkiQmjIO2bMZH3dKaQTLY75kxOdHUj8OdqYChK9 LLurlbXAMDuVyihyMCC0vDQU/6eLAUhVlCuDY3xbsSXqYakG3BCw6p+s/BqPtZmmigBR G3Lw== X-Gm-Message-State: AOJu0YwLCvoWBuWK1MSA1cU4Jpvayart1ogunXEtQvLXGys8S0dbvVYR ACvwMNyya4SAbTGgVfIjn+sMLsPhY9PQ54YDD4R0rA8WozVn2Xm5LTt1JCfXAbNKcXe+pqxcWsK Lm+H9hN1VoAf3kP7OwukO4exGqvrEdKpNiUJPiaCOC69wXX8JhcZaGixl2LxU3ZkF1GvfkaCHq2 Q= X-Received: by 2002:a05:600c:21d0:b0:3fe:1548:264f with SMTP id x16-20020a05600c21d000b003fe1548264fmr4727852wmj.22.1694091644455; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) X-Received: by 2002:a05:600c:21d0:b0:3fe:1548:264f with SMTP id x16-20020a05600c21d000b003fe1548264fmr4727828wmj.22.1694091644066; Thu, 07 Sep 2023 06:00:44 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id w7-20020a05600c474700b003fed9b1a1f4sm1662943wmo.1.2023.09.07.06.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 17/51] contrib/plugins/howvec: Fix string format Date: Thu, 7 Sep 2023 14:59:26 +0200 Message-ID: <20230907130004.500601-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/howvec.c:186:40: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] class->count); ^~~~~~~~~~~~ plugins/howvec.c:213:36: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] rec->count, ^~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-4-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/howvec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 0ed01ea931e..644a7856bb2 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -181,7 +181,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) switch (class->what) { case COUNT_CLASS: if (class->count || verbose) { - g_string_append_printf(report, "Class: %-24s\t(%ld hits)\n", + g_string_append_printf(report, + "Class: %-24s\t(%" PRId64 " hits)\n", class->class, class->count); } @@ -208,7 +209,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) i++, counts = g_list_next(counts)) { InsnExecCount *rec = (InsnExecCount *) counts->data; g_string_append_printf(report, - "Instr: %-24s\t(%ld hits)\t(op=0x%08x/%s)\n", + "Instr: %-24s\t(%" PRId64 " hits)" + "\t(op=0x%08x/%s)\n", rec->insn, rec->count, rec->opcode, From patchwork Thu Sep 7 12:59:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720610 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp225916wrp; Thu, 7 Sep 2023 06:11:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKTztOllWqIN8U2gnp8rH7xRoiRuiceK4kNSZ2m1qrQYdquIqCY/P4b+kw2xmsIH7y8M/j X-Received: by 2002:a05:600c:22d6:b0:402:bda9:74d1 with SMTP id 22-20020a05600c22d600b00402bda974d1mr4609115wmg.8.1694092301386; Thu, 07 Sep 2023 06:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092301; cv=none; d=google.com; s=arc-20160816; b=Elm5zngewzEtZ4Mk8cTVzGyV3Evxm8fR+ULGHyIMXUiX8WI3CVZAc57puBThyWssem YNILZmC4hMDrhLSrBQl1AMkwnHd/107xIkfy/KT/YdGw0Op8Tlrs2s+mTgVvo03uKgXC Y247NBfmzEBCdSYfj7y1eAkpvuC8DK8KhKg3YNHs4udd2wcdLTUoXWNY4vtT4nPAfUKy HLO5xg4iJYt1rh+fE3IiGEI/PRYfYw2TcXQbgzPZsS+yCiSM/9Kay7ciEnVGmJtGP10j Ia8BFWj7PBift1LY8TVxO1S8+7zfXk2Q0f93cWu7lpXvzuDsdoLBtK0igLSWPH97fn7m Q4xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qSTq9iC4n1L9oUzK6f1smjHpV+ZLU2lzqzefWCqatbA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=sHCwW1tySWyodurR5KQAuuNKm9jIaLGal5bShHz4Rj0sPJJ3n0VYFJYQwD6+db0Wny bcaIolC8WK7ehOvs1a/Wc3OdX5wKlU5uXRJ0Epp6BG9pNoD0T9qDlVtjp2r1rA3y5twl v8Uu8Ziwm8W2mI7pEX3XkcIkZRiEBHcQ3nNVHrB/FTlFYyAXK+BnztNRr0lirKsXAfad j6C/F4v78Y2JvwFUIK/bL5++/D7tkqNiT5S9vC33AynDVuGW1GhNzoLskw1qLY3uF0m2 6P2gDTu4fAu/4TMPZY5SgQfyr4by51rktcFR0Rnoptak5mFCsQDkNKLZ2hyHp/Oi3Lbg u0WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cUYpHGF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p13-20020a05600c358d00b003fe141184f1si1071616wmq.117.2023.09.07.06.11.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cUYpHGF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdQ-0003NO-8u; Thu, 07 Sep 2023 09:01: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 1qeEd6-0002sw-Sz for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEd2-0007JG-B1 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qSTq9iC4n1L9oUzK6f1smjHpV+ZLU2lzqzefWCqatbA=; b=cUYpHGF0fJP9gXBSAgZaBqlWLbTEPYtMXV1HGTYUnkbf+qHmBr1fX3GVf6QEhXbVlPGsGm U3C++BKnuYcdVgfZgJ+pINXWa3u2SjWwjxOLl3UtriCXghvc5i19hSa3Q507l7H83edVDX j4ZlOsn9TNw1nCpJWrsbE4mW7MdeEG0= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-WgfwpV59Pzu4chMVsdFb8g-1; Thu, 07 Sep 2023 09:00:51 -0400 X-MC-Unique: WgfwpV59Pzu4chMVsdFb8g-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-500a10289e3so961091e87.2 for ; Thu, 07 Sep 2023 06:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091648; x=1694696448; 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=qSTq9iC4n1L9oUzK6f1smjHpV+ZLU2lzqzefWCqatbA=; b=QVf5oKXbqf5qMwLzMwFpn7Hq05YKXqZyzia8mvRqYILOpzMkicyCVGtb8ZbwfVq0ub 16EBDgq+wC5/JlpK8NtwUkCYHdaY2s80gUlxnyVff7IoVDrO3NIzDIwvgEw94cH4d7L9 3cY9J3f67eAjR7D1OZsCUXBkyJbP1/delSm/6AUHhhakPyJIfOjYRfmghsoY7f+KBk6o uLCDyzXm3C0B6Up3Vdzx4Ycc5U+LMbCEbDQkhIC/tluiERt2HfgTN7Q9ro/NTMa32W7g WbwJMz+78UIjvambQR8unqVZAciEo/R3IhNR+FAusMinnG7HiNTPtUdAst+T2exy8a+Q HIRw== X-Gm-Message-State: AOJu0Yx4toMistxcU9MbbbgNasnBwY1qPCCKizZMzhro57XwOOMobucQ JalSzkio00bl4wx9aG70qvqMF1/0L85XoX693itvZQwp12BPu9pgV0NarS/IB3WaBBU/5WxGDYQ pyuamiMD1dJRhXTRNkwNTkal/5PRy1iAwpqMgt0aaI8VFvgYM9WNl2AGpQtgqkQvlBjFbbTOrxU g= X-Received: by 2002:ac2:4a66:0:b0:4fb:89b3:3373 with SMTP id q6-20020ac24a66000000b004fb89b33373mr4340762lfp.43.1694091647732; Thu, 07 Sep 2023 06:00:47 -0700 (PDT) X-Received: by 2002:ac2:4a66:0:b0:4fb:89b3:3373 with SMTP id q6-20020ac24a66000000b004fb89b33373mr4340713lfp.43.1694091646549; Thu, 07 Sep 2023 06:00:46 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o7-20020a05600c378700b003fe4548188bsm2451233wmr.48.2023.09.07.06.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 18/51] contrib/plugins/lockstep: Fix string format Date: Thu, 7 Sep 2023 14:59:27 +0200 Message-ID: <20230907130004.500601-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~ plugins/lockstep.c:138:33: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~~~ plugins/lockstep.c:148:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~ plugins/lockstep.c:148:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~~~ plugins/lockstep.c:156:36: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~ plugins/lockstep.c:156:53: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230907105004.88600-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- contrib/plugins/lockstep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 3614c3564c2..57748e86eb3 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n", + g_string_printf(out, + "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + " (%d/%d since last)\n", us->pc, them->pc, g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); @@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx (%ld)\n", + g_string_printf(out, + "Δ insn_count @ 0x%016" PRIx64 + " (%ld) vs 0x%016" PRIx64 " (%ld)\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0; @@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them) entry = g_slist_next(entry), i++) { ExecInfo *prev = (ExecInfo *) entry->data; g_string_append_printf(out, - " previously @ 0x%016lx/%ld (%ld insns)\n", + " previously @ 0x%016" PRIx64 "/%" PRId64 + " (%ld insns)\n", prev->block->pc, prev->block->insns, prev->insn_count); } From patchwork Thu Sep 7 12:59:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720603 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp223326wrp; Thu, 7 Sep 2023 06:07:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaL8j5b6efx5ueDFVx5H9VEFBw83JBPaYu5GjOZOQs+FF48/k6J8cUZb/Km+RRzRFtkztF X-Received: by 2002:a0c:b2ce:0:b0:64f:4bae:96c3 with SMTP id d14-20020a0cb2ce000000b0064f4bae96c3mr16889426qvf.5.1694092072926; Thu, 07 Sep 2023 06:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092072; cv=none; d=google.com; s=arc-20160816; b=WWvD7ZRqHeS/q1F2350J5qXabLtgBtSCv/m9xKi07QCn6OzCgCXZvgsgn8P+MtiST6 457bjcDhLxZwgl9114Lr3ckHvaAIVy+Pc027fW1mCXq7PN+od2jH5xsXoxs+cUupvkVD cHDUuPV25MY6JE3VcEni+mRVfnbHSYjHKiwSob9bu/1fH31dtl5slgDLp6SWrkSSLfZK Joi0/cu74/uJIL+1LTwSHHKvGK8qB04PxodU78w/lil38FMDR2R2q7FIVGAR+gB5bUrX SsWuBOHe6SMLqnXmzL+p+0x/fmVHswI1/fh3Ufv3UIvycbsOHR9DA3mqaE0KSAY6kOvH FJsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PgF+PG80iyOuIUfn5Y8pnguhmR9BA/NiFCqaB6x+twA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=S6GsTdm8fRWtJBN2OoZOgTDaf/xsNtRf29DpgCjhMeH8zhiy5gyyoEj8WvSh3kwzCL aeVeEOkYuczjOHpfftiTgXUxNRwxC6mVZ/+IfTZKgPfrIc5Th5id0sME2vwWZ5RuHRf2 o6ZLJGTpc0SK96FHT655BAhKL/x+IiEGS33guMxagfB8+zXFyF3ZKiWYf1smIgB86otj 3HZpDX9baM//qO8H9I1W2CCd7/dD/iG1kETfALt0UmsXGzKW1YYb39EKVX5YqzilDyL6 GyKrMueik6jclcCbPVC9eASAQ6+rtBFNa3rmd4oy/8G0tNGNb1+WiAWKYlfIBd4rpNpN 8gjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fwxqnZq0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f9-20020a0ccc89000000b0063d4907b605si11305776qvl.129.2023.09.07.06.07.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fwxqnZq0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEe3-0004Ow-Lv; Thu, 07 Sep 2023 09:02:06 -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 1qeEdi-0003gl-2A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEde-0007RR-G5 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PgF+PG80iyOuIUfn5Y8pnguhmR9BA/NiFCqaB6x+twA=; b=fwxqnZq0M+c6QajCM2hT3gfCYomFw0+R+O4oSc3GRkjhqwa5S9LnKutUhuy2/gjB9iKNfj YE3d6I7i168bRBWqSVORXvnyFFkVLVPZzfi7Mr+S4q/Qt7ilXp5FX5kBk5r7yWjK4lZ2+/ VPQuHlDAMTgPU+kWlolT354uYAAg2VI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-414-kcit7G3nMQy0SloaBqPzUQ-1; Thu, 07 Sep 2023 09:01:35 -0400 X-MC-Unique: kcit7G3nMQy0SloaBqPzUQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4011fa32e99so6679535e9.0 for ; Thu, 07 Sep 2023 06:01:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091693; x=1694696493; 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=PgF+PG80iyOuIUfn5Y8pnguhmR9BA/NiFCqaB6x+twA=; b=G+U6apbtMwzWVoLUCZTox5mi9UO3aSJ80mLT29YtioOiORJnCo0fST132j9OgklohA vd/cp27R8QXhMRXnXgcgCKW+9tvG1fiEMSLg7tcO7HH83urBnGiyRMxVdtxCq7WABHD7 1SYuWKPj245OqZxXIuY4n7/dHzR+LWugpQnZM75683WL98hiGuuHtyoINkt3tYjcyG8c cyBW1ezDkAV0ViDM9yeIEFDvm/b0XDDmAhruIq9v08uF9tlsMiQvdxZVzE/2CokQIXvF X85m5mDRxAuqMfwP4MYZPlVxzJiCoP7dNSWPiB9IK/Yu7QnqzO04GI/nKuPb87wcLVzf P/HQ== X-Gm-Message-State: AOJu0YwN2x7zPC+DVDXb7PJXduDmI0QwoI6NM+xJ7NYc91KwDFYYVpER rHFqrdZV+eShgVeo1FHaldZEDYu4kzsOtwZWrZu75ehnkxynuRY82xe2YKWk21H6oMKwCMA8c6r /KZ5fppaxG4hxIMkaiVsyDO/lBeWIQxvOYjRaObbQIQPRlqNXgBl3KoRWbZG6TgB65+PTl7MmRe s= X-Received: by 2002:a05:600c:45c8:b0:402:ee67:45d1 with SMTP id s8-20020a05600c45c800b00402ee6745d1mr1183840wmo.36.1694091693246; Thu, 07 Sep 2023 06:01:33 -0700 (PDT) X-Received: by 2002:a05:600c:45c8:b0:402:ee67:45d1 with SMTP id s8-20020a05600c45c800b00402ee6745d1mr1183826wmo.36.1694091692971; Thu, 07 Sep 2023 06:01:32 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c378500b003fefca26c72sm2493496wmr.23.2023.09.07.06.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 37/51] hw/i386/pc: Include missing 'sysemu/tcg.h' header Date: Thu, 7 Sep 2023 14:59:46 +0200 Message-ID: <20230907130004.500601-38-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 37c4814bedf..43413dd1ac4 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" From patchwork Thu Sep 7 12:59:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720609 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp225885wrp; Thu, 7 Sep 2023 06:11:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFF5VH8MR3PjQeMoblRtBoPeB2Ng4XwCNKUHiJsRL9wdMPsizYadkQUo1Q3n1U+PxDrP8qT X-Received: by 2002:a5d:590c:0:b0:319:8333:a2cb with SMTP id v12-20020a5d590c000000b003198333a2cbmr5718699wrd.13.1694092299345; Thu, 07 Sep 2023 06:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092299; cv=none; d=google.com; s=arc-20160816; b=zZc5VeSrMOFyJTkyURbG2RVypUOLSYgksHZzCeFxZ6rybwuKkPPFLOJktet06m6VDr 40PWbgLM4LGyAIo8GTcCMv/B5LaJRt+7eExoLKC2i7SaX3/Zxwhcqu8L41JoZT07znue 5rutvv2Lk8mM27MjMPaukn2lytRV9PLZUAlarl5VBHWTnotsYOvBOaPvigiDEdSkOk0b 0LAcgiSR8S8hFSeKmZpz4s6Hs0YbNlEB4sBzEcOd4cgH1QHsbIUcWH3WSo9YAmcTDX7T B4N4pipXx7/f9XBbQPqfRyNIWGfxHsFwk5VcXvgxnPVZQBbWtRfUnk89P4FUn3KreaL8 7fVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f5QQm0oilMjeexogAgNze3HLGFf4cWGHlkML0hXaL90=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=Q/o2VUmov+SoEdOf8ig9QtkDI154ojVckWK1YhG3eLqDOyghst2wqhalBUqMsm6vqq W2pm4b6Y8UX/p4wLA+NOu0GSn6b0BQuxFnl7+r4ezuRvacsE/H9tQuLyqCkoo226jrYK Q9WCpfmo0YG8VgZXYOzFRxVO9T44dWBj8y9/ryMZ14+xTMzBCvCdRk5ySX94BdZeLO2l axLqIKilRSbngdtHNMFtwbGt9rOUB9SnRMgmZ1MmPMb4nDyTmMd/xJIklnBHFkwB3kzS 5kABLAxXn7+3HLHmwCHjWYmqXsuqSKL+M7m21cYkrmBF/OiyWdiQrtXQyMeT8eCp15iV YE4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FYi+k/lQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q4-20020adfea04000000b0031c4fc1df78si8272386wrm.822.2023.09.07.06.11.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FYi+k/lQ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeY-0005e1-SZ; Thu, 07 Sep 2023 09:02:34 -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 1qeEdk-0003tz-6A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdh-0007SV-Qj for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f5QQm0oilMjeexogAgNze3HLGFf4cWGHlkML0hXaL90=; b=FYi+k/lQIC1kMy/9WLSSaMgkjoS7ki1VD2yUs7gJwHoWnpv7DKs/1VOPG6oz8An0AuTozu 4/0KhTIp1LlOxYGUMSVWa/61Ck0hNG2H0IpaKMSOdvDx3m6cGO+SewToTTyNv68Hgfvqst f5dlS7o787S5Uc9GbnfWU9xrPcvrYkc= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-29-7tOSXF9xOECLA_xICvG19Q-1; Thu, 07 Sep 2023 09:01:38 -0400 X-MC-Unique: 7tOSXF9xOECLA_xICvG19Q-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ba1949656bso11289741fa.0 for ; Thu, 07 Sep 2023 06:01:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091695; x=1694696495; 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=f5QQm0oilMjeexogAgNze3HLGFf4cWGHlkML0hXaL90=; b=CWhMN9EZn8UJrQDXgIXEBo1lAe+TOPTdCxOaGN9tCkzKOuJ2tTmoh0QI4YjvqlgRCm KphjHkE3k6TWYgtYGuq3MC1TWtx1RJc2KdAA6Z3+9WvZ0rKB00FCBlgU2VEZr7Klk3Oi aZJgJf7dq8AospLfuHclAiSnYmi9Sq5x2pfWBr5Zz91YvJ0ONAtNu2Q4VwCigx5/7zfR YMF3WkHyWy4cMRqgNKGxGOoUDDg7q2/3hC7GJtnU83C425uGUxhoFVsRC/AG6n3wkZp3 POXNpTcOF+jKq5kONwNmlVJumh5WirEP/evsDwl0SZYdlExFmtQCcD/pl9Ain8hRU6br 7emw== X-Gm-Message-State: AOJu0YzM98Ie56hSLouEpWhvN+XGOizgfDM/5ZtAh1bZwNIPrMM2ywAk 5vWQamXVpQyQUoUn/LOvQQqmMTvaNwmlWckyYeshIMT17DJZ0JtySVl3zoa/Nff3oH7B9fRQdv2 0GAlUaM3rs41LzG/TnGQGunaDyJMmLsI9b5l0JcsME4MRAew5/vS7KvpPRPKWLtfSsFv7xylSpN E= X-Received: by 2002:a2e:87cd:0:b0:2bc:d097:2b72 with SMTP id v13-20020a2e87cd000000b002bcd0972b72mr4796096ljj.48.1694091695510; Thu, 07 Sep 2023 06:01:35 -0700 (PDT) X-Received: by 2002:a2e:87cd:0:b0:2bc:d097:2b72 with SMTP id v13-20020a2e87cd000000b002bcd0972b72mr4796079ljj.48.1694091695189; Thu, 07 Sep 2023 06:01:35 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y25-20020a7bcd99000000b0040210a27e29sm2454449wmj.32.2023.09.07.06.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 38/51] hw/i386/pc: Include missing 'cpu.h' header Date: Thu, 7 Sep 2023 14:59:47 +0200 Message-ID: <20230907130004.500601-39-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-3-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 ce1ac952749..f0df12f6fa8 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" #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 43413dd1ac4..8ecc78c822b 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" /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 From patchwork Thu Sep 7 12:59:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720616 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp228462wrp; Thu, 7 Sep 2023 06:15:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/4ZVxM5flJu4eSQbzR7mhAEw0XR28sQFiRLccsCwEkbg0La43mkHv8RlrP/qFREPD4E+j X-Received: by 2002:adf:e648:0:b0:315:9993:1caa with SMTP id b8-20020adfe648000000b0031599931caamr4746218wrn.12.1694092558781; Thu, 07 Sep 2023 06:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092558; cv=none; d=google.com; s=arc-20160816; b=03/atPMMg/2LhmyAO1Uq/7YtX6+Btae1F5RLSQ1SBUOhOehV3qTyr/90TctkoSTNJv ytKa9RDI32pl4DjBnvt7U2u/q92lgsESL+odJP8okBhxCeD3XwVzACVae2Dzyvda42xq RfaKy/8Z0bzVFa8oTzUyYPfThM/67vVLJPllvbkKM2xPmzVB81rM+Ax03oRd/4zHfu4P 2uqK+LKuyNyWZgFPbe8xtXiC0p4HJOAabCZyWqSn/XKtyx9+BTNYIPd1NV1maA8SuEfR uqR8p1irfAA37A6vftNTG4DwKyUc28sFCIn47h7xsyr5U7n9adkLw9af9ScxaAmaiyrl ez5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CnS6kpClTYzSsSYS2ANTQx/6JTtxTxc5WwCUea/91dA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=F0KuGNQOptEMghORqHs9nu2XRIIqmWDPh5VeaTuzdBb6wayf5EEtFnGi6yhuHuRnC1 AnfqpwK1fPvkvB+KYP8m+Xbpqpw+eEDJ1x234Xb0I5UmUceR4zhRm+IkPiKRj/yzQXWH 4imQsKOfHhnXBkLm1rxwXHKKHFkuUEIhTCHQuZQd3kP+5D4ijkY5Wm5vl+vgUU/yiROm EkPYt2+EooP76aHhPMAQTJV4L2abG7zwgV8EfciiqLHOSuVMEaVrng7SbwEmPCUQnqav hJcUdZDNqyd7m/kkVibSddxpmN7IPLPZ66AF4BmmozAvpkI8I0xL4zhANO4LrkKDhkdr Xb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EHaO1mm8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o8-20020a5d4748000000b0031dd4feaa5dsi6715984wrs.555.2023.09.07.06.15.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EHaO1mm8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeQ-00057o-Sf; Thu, 07 Sep 2023 09:02:27 -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 1qeEdj-0003sW-Pp for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdh-0007SR-EK for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CnS6kpClTYzSsSYS2ANTQx/6JTtxTxc5WwCUea/91dA=; b=EHaO1mm8JnPB/jNqccufYvV9hU3021Iv43aejodScqYR2hwJd4YBRDvpSjHk8PvH28jwYO Jtk9GIalYe1TpJ6MDJ0Qagup5CL8ONy8tfYLCgFtYe1hrx2NTehQyDhw1AlsOdcvzGy+n/ jrTBEqcCyNDT1Pg4o6AS+jOqmfPdvvw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-fBhRkRu_ORWjz22ExgsuOg-1; Thu, 07 Sep 2023 09:01:38 -0400 X-MC-Unique: fBhRkRu_ORWjz22ExgsuOg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401c19fc097so6611805e9.1 for ; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091697; x=1694696497; 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=CnS6kpClTYzSsSYS2ANTQx/6JTtxTxc5WwCUea/91dA=; b=SIeVFItEn/o8GORbYUvTqfCO5MjVuBO2iYT2tABD6Og0nDd4Xj6gWKNk/tjFurtj5Y 6X9flav/tV6mr88IZiH7ZcGCCpgHc/t5MGypGpTAjMluefif6dUT+0CSTKOiuyecW7RO 2Q6hEPfhKqtqLD9Ge2i2il0mSUqXksD/87SFnSzmlWyYay8Kz6beErkMsJtUXMWQb33f VD9BOCf0tW5aS/kg7cWVFXubxtI+jcKhsuxVC4IUFgXqeJAcZNJnyjJ1Jua4n08sp9V/ RA7pcqUhdnCfBgpiSYnI3BwXio5ANb6hJqeISjWtaK1JoY467C6CqI0rLuqXq211z3pQ aoeQ== X-Gm-Message-State: AOJu0Yy8JkEpfS0b1MXOjPD3vHHIJ7usaQd8nKaLTVHZXRRUtVVTc9Sk dXR1lDP9HG+tzhCvAdTxQ0jx+BJS92joG4p7aWSM0JbncT9XWIO8dA9Pbcel6zSrlD9vXLuY2CF OElM8paOnPWEdJYRBqVfDBJFmprQJXpmR18Y8tIpmN+YE+w87E/w8yZ4IK4QpBHqZGhM9z6dbf/ I= X-Received: by 2002:a7b:cd97:0:b0:401:c944:a4d6 with SMTP id y23-20020a7bcd97000000b00401c944a4d6mr4510546wmj.28.1694091697251; Thu, 07 Sep 2023 06:01:37 -0700 (PDT) X-Received: by 2002:a7b:cd97:0:b0:401:c944:a4d6 with SMTP id y23-20020a7bcd97000000b00401c944a4d6mr4510531wmj.28.1694091696931; Thu, 07 Sep 2023 06:01:36 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o8-20020a1c7508000000b003fed7fa6c00sm2516617wmc.7.2023.09.07.06.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 39/51] hw/i386/fw_cfg: Include missing 'cpu.h' header Date: Thu, 7 Sep 2023 14:59:48 +0200 Message-ID: <20230907130004.500601-40-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-4-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 72a42f3c66d..7362daa45a6 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" struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; From patchwork Thu Sep 7 12:59:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720617 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp228575wrp; Thu, 7 Sep 2023 06:16:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNyfeFqgxK8nPCwuaXcyOMaO1i+dB7VVwcxItvZml0YKNKudjyicu0JZrHRT2AZEh/sU4o X-Received: by 2002:a5d:40c8:0:b0:31d:d58a:4b5 with SMTP id b8-20020a5d40c8000000b0031dd58a04b5mr4704090wrq.22.1694092572339; Thu, 07 Sep 2023 06:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092572; cv=none; d=google.com; s=arc-20160816; b=dUr6Nm4zBtRb3lUnWvF+iQYcmFmF4LBz/wGvXz7RtmGnAyMruu/BqsSZiYy1e+clS7 zfxhifGxSbIr3+HAN/R3QQX1IERL1hIC+HkRjHeWzvn3F0gZqt5VlsJRuC/e4TdR7KIj n+5+1+pPzfWlJnWjZwqM6ONHBtEOWtAPTcwWkqvvg73YpOgkxvXN/io+qZsUFVBO4SGR viWtTiSR9PxrV4i3E6yWOXnuZrPOVmhfiCg77aut9GleIcqtERvgsbnqRiRmxpTisoiJ 7Y5MFiY0zEZfnK7izFciabeWlfGUZ1D0I6ZWnSk/0yoUXUeEFDe8RqaNXSZLiRxApweY OwMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2HNKEIMd5+PbfiqiQhNPm82diOnCV8my5uMrbrI4ek8=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=a7mEJuMA+bRZ8AHjAkd2A7bsslus5vABkhQ6ixeiEtxbeBAf+I0jyCSKe0XwMoF16R AtVRXtOB7PI0TEu0z24JFb/8JM6wNi3SIaw0L1EA6KnIyBshb9evO6/+kCMM4es2cTGb bOKbnHbrCxw4FaYIBR9d0TcQXDs8nlA9EZAoOTeR9ad/dkaai3tF3T6okszsmjB+OVPJ VGZR1cYrdNXVIpHio29oFNZ9pLYRCfk2H/wdr4eE1ElkYFiqdktNt6GADUlu19PPEOEn hLe3whAQw01iKDSfvkp2LaqAkJbm7G/C0kT3o3soaPSM5VxFumQ/17pyVDurBmJgr8nc nGMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qc3J0NIp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j28-20020a5d453c000000b0031808803c83si8208227wra.531.2023.09.07.06.16.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:16:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qc3J0NIp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeT-0005QQ-Ns; Thu, 07 Sep 2023 09:02:31 -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 1qeEdm-00046p-63 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdj-0007Sr-Pr for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2HNKEIMd5+PbfiqiQhNPm82diOnCV8my5uMrbrI4ek8=; b=Qc3J0NIpFmJgcFvQQ1/A+IBbzBLhHtgGwmCPVomwlAOQKrwtWMRFKs2Cs1oC4fwOJYbMKD UdhpMIxvOJslrQ9qEpy6sJKS7Cy9RBNj3nZ/Ukpkj5qeZuqWUGWmzdx9HAedjzbHypQcUY jQ9EttpKLlMWxSg+8+TIKDlypxv1hoo= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-BsdP6BHHMkm68t5rjRtxGw-1; Thu, 07 Sep 2023 09:01:41 -0400 X-MC-Unique: BsdP6BHHMkm68t5rjRtxGw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f42bcef2acso6997215e9.2 for ; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091699; x=1694696499; 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=2HNKEIMd5+PbfiqiQhNPm82diOnCV8my5uMrbrI4ek8=; b=ceVNAlzeS4xcs+JcbusQ7IGZRWN3ErpdQBJmrcx5q/X14Yju+QiT8uBzRrhhUb37ID 8YLcfu1+bTXoiNxCj3sUBVCRbXd+kPU93kMeHVUedohKHEz2th5ltx4AKywQR9ZgxfiC DZsFo4ucODUNTLFyg+8Gc0Jg+mQJXWQ2U5zA9WEK+e/MNp3ycFT060x6iaelublZcvSG QGe5/nKQg7+czdkQVkmDKJVRPhUvPnTWyM5miT4wE/z91gXpKQKFnoaHsDFJLjyV8Yb4 jLprzVqg1JyqJpIqnUlN1dLO/FtgPdRRSEcTqSMf02CRmHiyoyHQ+6vpC6G3rxS8Dntr Z7UQ== X-Gm-Message-State: AOJu0YzG/AcXuu5jEZi046a/sko+AC2dqmFz/kSIcyCTu0E919mH1ldI 1TLE0rICK3eP/M00CObO8bFRXbU9o0APa7BBdLM1hoXB3IdeFzopNcquvaliDLnYEnz2+U3XCsd gIRmPyxJCnFU4dgeDdn8OomcxAAScVldMTEtZnmjdy88vAwevD/HN/nbUoTEMvs4f9NZ3sCLZKk s= X-Received: by 2002:adf:cd86:0:b0:314:152d:f8db with SMTP id q6-20020adfcd86000000b00314152df8dbmr4636255wrj.58.1694091698921; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) X-Received: by 2002:adf:cd86:0:b0:314:152d:f8db with SMTP id q6-20020adfcd86000000b00314152df8dbmr4636239wrj.58.1694091698621; Thu, 07 Sep 2023 06:01:38 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y1-20020adff6c1000000b00317a29af4b2sm23102235wrp.68.2023.09.07.06.01.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 40/51] target/i386/helper: Restrict KVM declarations to system emulation Date: Thu, 7 Sep 2023 14:59:49 +0200 Message-ID: <20230907130004.500601-41-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 89aa696c6d5..2070dd0dda1 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 From patchwork Thu Sep 7 12:59:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720614 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp227492wrp; Thu, 7 Sep 2023 06:14:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXEWBzz6yGk/wDvCh3I65IsDnDT09v1V5GaBIfHYkw+kYEbkqYrwSEm7U7l7yNwRmYtwZ+ X-Received: by 2002:a05:600c:2349:b0:3fb:efe2:34a2 with SMTP id 9-20020a05600c234900b003fbefe234a2mr5162563wmq.5.1694092456584; Thu, 07 Sep 2023 06:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092456; cv=none; d=google.com; s=arc-20160816; b=gRMVnuM57hlG0vCRBHx3RIH4DnvOwwY8wogKuk81lW3p9L2zLu2KRyiUmUY5TrTanX jRfR/6PN+Oxp6+sfjmnvzt1VFt1/XQTFCAGwAgE1J7Sxz40qmIo+9e4p+NfpKTAYHZ6a DpIeHk5JoAQBtxchMTTHqSCmS177X4v7TieFLmYLqXEZHvsO2muVC1VQFQrtHm7jhEg8 bWybJzKI0117hbF8joqfYaKpifnDbZzPV7e9YIxRdgXF26b7Md247t94b+JQO2AzfKxr 5mSLAXNbnaF9bCbazjC3vXzbz4xRaKwc/IIol9nIE9lWtJTXhmkPtZVL/XhZmuklTTiA cszw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G5NZradxD71uQje+nwhEcOPdnjx/zNavwCfId1yJRzE=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=yucGdvXyDdHJzbfSK2bnQ/iuqHaP/Iar2xJlGm15jp3csKFrAMI8+UHq/wUdLYXMxM s9H/F0nvSYg8AxCiv8lxw9gnOfNazn9qZjIyF8dM0xPGF0yYQD+xiLaFN0tdzEjPwhVg 0QsFnTz7gH5hNpJbEUNtHRrc3Dw1CXONlFerStGjkn2u/Q1TorqZitl41vqyDJGk2i9w q0D8KRp84T/4xGIqcSruT5S7q+g8bJC5xDe5sWFNijSGGdCv+EeLz5pJz2/v47ZKbe58 OPaMhyqjSYf3xkrKxTx5a5FMgE8OJkKnuGJ+ALrUyOC0PwnW1pkE7F6OORWBgEuaMbPY 5ffQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dvvdk9st; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id be15-20020a05600c1e8f00b003feb1b6cc6csi1082963wmb.75.2023.09.07.06.14.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dvvdk9st; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Wl-1F; Thu, 07 Sep 2023 09:02:40 -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 1qeEdo-0004FC-At for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdm-0007TP-5u for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G5NZradxD71uQje+nwhEcOPdnjx/zNavwCfId1yJRzE=; b=Dvvdk9stfeB/nrq6u5SnTwZv66DjMHMj4xwQhFpM3aRA9nuvVNIDzAp4I+72lgtNOhFykY o5sqdH6WC8NERUBELtHgXZDSrtOItL0kzex6g0tnMBj3L/tVtHqf90HNobUPNVoiXV7DfT 6996xpEExok57736ABtRyRC5j4UomRY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-iNSwMGc-PRGsrYmxcQjCrA-1; Thu, 07 Sep 2023 09:01:42 -0400 X-MC-Unique: iNSwMGc-PRGsrYmxcQjCrA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-401d9abf21cso7522695e9.0 for ; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091701; x=1694696501; 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=G5NZradxD71uQje+nwhEcOPdnjx/zNavwCfId1yJRzE=; b=NjbXIIG1tv96fzNCHMqTmIOK4/xuNNcyAlHePj1H7hpVMGGF5h6Fe3n7YRpXZKRMKq AZnVMpuXAFgK+LIJG/S4LDVJvuNV3kK6tl4b94iXSB/R2DbO8bpariDgHnnho5qOQBiD ClTNnMebPzveQAp9A3tM1d03Lldd81ru2tMs4FuRyGYEBvZ1Nl0YCwxsah65iG/d8BOG Jzus4Kbp3BoBiq81IJgQZkxId0xOReuuNjA9H20bw5tZV2oy4+Ie4q+2NsjfjsF3QAcg rVN9jpcam6e7FL/LQA0KTVpxDLAu/H+9SzvKX5mVRP7PkJ87RkDwofCPExDzDTIHnO0v I1tQ== X-Gm-Message-State: AOJu0YxM4FlZDRP40uXBrRlvrDk3VyA8L9qzD/Du+srk/VvzvGmJR+O8 3HUUwQ6mEZyzz3aTmWPSBwnpBos/yjnhWG/uA7+9WNcsacH5IpzKq1Lyxno27S+zicSoFSLWtzG 0H6LxDKLDPZVyOcDN4sNgoyrV0kk7+Fvj8CSIMJiY+jY5LuCdbmx2LOmfvLAsuvNRxhkRGWhHH6 Q= X-Received: by 2002:a1c:4c02:0:b0:3fe:111b:7fc4 with SMTP id z2-20020a1c4c02000000b003fe111b7fc4mr5061295wmf.21.1694091700806; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) X-Received: by 2002:a1c:4c02:0:b0:3fe:111b:7fc4 with SMTP id z2-20020a1c4c02000000b003fe111b7fc4mr5061275wmf.21.1694091700492; Thu, 07 Sep 2023 06:01:40 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id fa9-20020a05600c518900b003ff013a4fd9sm2509978wmb.7.2023.09.07.06.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 41/51] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel() Date: Thu, 7 Sep 2023 14:59:50 +0200 Message-ID: <20230907130004.500601-42-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-6-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/cpu-sysemu.c | 4 ++-- target/i386/kvm/kvm_i386.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c index 28115edf44f..2375e48178f 100644 --- a/target/i386/cpu-sysemu.c +++ b/target/i386/cpu-sysemu.c @@ -19,9 +19,9 @@ #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) /* 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; } diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index e24753abfe6..470627b7504 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -13,8 +13,6 @@ #include "sysemu/kvm.h" -#define kvm_apic_in_kernel() (kvm_irqchip_in_kernel()) - #ifdef CONFIG_KVM #define kvm_pit_in_kernel() \ From patchwork Thu Sep 7 12:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720608 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp225824wrp; Thu, 7 Sep 2023 06:11:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG87vUX0ENR1A1kXoy9nGiR6wlteQAfJEyaM3FwnSXuIduxFRn64lKkm90KuG1MXsk6B1Uc X-Received: by 2002:a5d:4982:0:b0:314:4437:beab with SMTP id r2-20020a5d4982000000b003144437beabmr4682002wrq.55.1694092295542; Thu, 07 Sep 2023 06:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092295; cv=none; d=google.com; s=arc-20160816; b=l3r+S0FkGuKEmL9GQDU8/hfxfG5cTW+o1NItfbnmlSP2Urk0ZJwOGV24xzl3qWYcC9 I34ecR6dGhXtaFouuo7ThHOaV6SVsWqeAtEBgZ2q/bmACniJeqSTnKLjq0EqMhfRNKfl Cb6rU9d0mHCKDGm6f0YsH6+30ogzbih+aZhBeJGiLpe+wiToNS2UuY4TMX3Uw8BdybRB /1OfFoaIpomALwlqohHEqdKAILTreFaL8a+JUwJ2bfXdu1JI5rKi8RURc78SKkDatf6Z tkEYvKscPTwrq91ASzCbSb1M+YdbvtF8WBdHey5PuXAwUYx1/54k5LiCJVtyeK7xvGyY 87Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dCbm6ozKk3fuAa8+Z4gDpKuSJgbF8JCXqIUlO58WCyM=; fh=QFCe5Jk24fiK20qflZxwfoCL+eQZI/E3YbYpomTJI5Q=; b=UME2sdtLyUbT5wB29Rl8YvIlt1JLJqCQnqaTOQBGQHhBTg7z3Xv+XhFig0qO+PLLbq hBiLP2dmGVvk3M03GrGq9rkg4PuYjbH/O3X+Fa0qG9TpkXtcj0Ts5uAd1HX3JzbH6msr 9tQNOpTLRY8gjPnNSi/RPr2M8s6YaWFV/JT3pJcHA3Ef8Y176CtXiUQ44NaV9MyQZ3E6 tD5/nBxQIl8FHjnG6V+xnpYGXkBCb2Y0FWB7irjKhfS8iHq6ocaOPsurr5EBUigKGOyG ro8C9OI+K6ehpdACRw6aN0E6slE8AjOjgHRHXmfeWXNslIZs6SBCF1XhtLqIYJWxAKJO 0FNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h48tif8V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y16-20020a5d4ad0000000b003175d761d13si8015930wrs.393.2023.09.07.06.11.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h48tif8V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Yp-C1; Thu, 07 Sep 2023 09:02:40 -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 1qeEdw-0004WI-II for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdt-0007Vn-MI for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dCbm6ozKk3fuAa8+Z4gDpKuSJgbF8JCXqIUlO58WCyM=; b=h48tif8VJETDT5YKJpwoEqga/ZV/m0xh2D0fEu0nQ/ypSSh3ZvasE+45ZNz3cjWJxwZK3e p2sEelm4MNjVfHje/V7GLQo4AeU3z9eDTiabEn1SIu9B1dIGAo+X9fWKAmnQKvDx9ENCtJ MDC7WKaqkIhkXWf4jUT1eu105zCIASQ= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-167-tIM18cV1MmanC01zsvzoqw-1; Thu, 07 Sep 2023 09:01:50 -0400 X-MC-Unique: tIM18cV1MmanC01zsvzoqw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-50081b0dba6so973579e87.0 for ; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091703; x=1694696503; 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=dCbm6ozKk3fuAa8+Z4gDpKuSJgbF8JCXqIUlO58WCyM=; b=mCz0xe0wG0ovNps4u1VTqkUNW/qwl5Dt6T9GlFWpmgAsLMZ9n467I/4YsyLe5Svi6u mFwlv6pBHVqTbeqxQv2gngeQDTYyjrCzIwcb/SmSOXtqwLWYnrkLY/8xEhtbpHpCJmQU 5zXtatmWUSDfK/yoJcXDR382tfIKETtiq4tVg4bAjFW6xRwTMUmBOkbyRSrlzNU4Wg+V N9AqX82PgjOzDqC+0YwJeFPS/NA47Tvzij87NKM2sF1n4iSuFYIyoOOe2NuICnFdC6M/ g2Xbr6STL+gKE+5C65pwBEzyHWAIZwxYtpT5DZaqNQcI2C5ARJ0YbaTso8J1uJHPYbDm YHXg== X-Gm-Message-State: AOJu0YzIyP9haN+dS3kvSXX7Gi5QIDiPqh09N21i6JHR4mbzJHuGnyTj o57PKqcGBczoLR1QOSWA15LprWyey8NZEnAQ4CDw3EJVjo/ciVc2SNiUqeLGYJe7y/H6Y+gjd4f m7wZNIVGCSNGe64iXT0DEADiumdsDi/EbD8N4YlgywiVQxwj+HzxvEOp7lajCoF5xh/JYOTfFff E= X-Received: by 2002:a19:5054:0:b0:4fe:8ba8:16a9 with SMTP id z20-20020a195054000000b004fe8ba816a9mr4988065lfj.55.1694091702753; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) X-Received: by 2002:a19:5054:0:b0:4fe:8ba8:16a9 with SMTP id z20-20020a195054000000b004fe8ba816a9mr4988046lfj.55.1694091702463; Thu, 07 Sep 2023 06:01:42 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id a28-20020a5d457c000000b00317f70240afsm23314381wrc.27.2023.09.07.06.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 42/51] target/i386: Remove unused KVM stubs Date: Thu, 7 Sep 2023 14:59:51 +0200 Message-ID: <20230907130004.500601-43-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-7-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 e052f1c7b0e..f985d9a1d39 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" #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 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; -} From patchwork Thu Sep 7 12:59:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720605 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp224617wrp; Thu, 7 Sep 2023 06:09:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRaIJIp1TeGl/3QhtDsfX0inMT1Z8cirPEIieD69n0dQtZPc+5KPuiiVFu5eXEJW2DlzCO X-Received: by 2002:a5d:4912:0:b0:317:e542:80a8 with SMTP id x18-20020a5d4912000000b00317e54280a8mr4974552wrq.15.1694092197965; Thu, 07 Sep 2023 06:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092197; cv=none; d=google.com; s=arc-20160816; b=ax3Jb3dVLjNYFFkAvjxqyylFEmd9KdIQpm+XkCMqWgJ9gM6ko5UWIFPEAidZQSQTqO WVm+k9x0VBODlQz/WXd16npVYV/Hf6LPdH7+nnnAUKLlOf34qtv99QyRBo7mZ4xeEfr/ cUNEFdkrXd4uNjbqyfjrqJJDuOiA7eulUDOZ2FjETlu+8B4flbEIXInCfcVD5AxNrLEi 4tzX/at0V6ZpA+HTHDktN24jN1VNZaS5G8pIlw0ScBFEcAPzmLQ61xHndW4RMYvx+yEv fFXviXgdVJlUEcTVG3O+yOcWFAx2+p0Ue+h3BDX2AGntpA3Nc6vrWs1++T4QgQ9Doh/q Nzgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UsfWLScmy6sLnC82kfJQtErbSOoNvAJXLrmyFBPVqo8=; fh=QFCe5Jk24fiK20qflZxwfoCL+eQZI/E3YbYpomTJI5Q=; b=mlBEN9WOL+TpQ3JszazeLWIVxni+iZM2QGRv5HrUNwHluDKtuLOsCC5K2rXn5uya8x dgUSyguJQkoK6hC5kR/6JZPQmwxJVL79MAZvgOLXNXi7unJ5tSSRbyjpB+qrGk5EcirH hzxBvqdymw8jjYlI9wWEs6JLm0UYwL9xsB9WVDphbul7xfpbVjJ0WCXya5Jw8IXzRchr B9QoZBeeGrDArdMa5rGT/6oMBlT9MOW/y74UxF4UhacJ7hasg4y4YbnCMu0+wssrZ2e/ u2iDqaBl85wrGufgW71v8vCh04Pj5Luypisntzj0VmLTTSU19IL7qexv+CWZQYq+bv1Y wizQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y7+SKpN4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e4-20020adfe384000000b0031988bb0b08si8233577wrm.990.2023.09.07.06.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y7+SKpN4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEei-000710-Az; Thu, 07 Sep 2023 09:02:44 -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 1qeEe3-0004ap-TC for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe1-0007Wl-5T for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UsfWLScmy6sLnC82kfJQtErbSOoNvAJXLrmyFBPVqo8=; b=Y7+SKpN4QpMteCP0e0k3mPYpxWq1gwPd72LfTOY9VfpmlbabFQesOmmRD2kNWuP9BiSXzO InFxV0uRLqxd05tPEbRKaQgWT0q85ePdAunIht327wcKHiY7+gpWCJly0+iHnUVIk7P52I 6IwwxR/mxyJitkD8OvE7mVmH8Yo3934= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-xecEF51WP2aDSS8dWa0FTA-1; Thu, 07 Sep 2023 09:01:50 -0400 X-MC-Unique: xecEF51WP2aDSS8dWa0FTA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401d9abf21cso7523245e9.0 for ; Thu, 07 Sep 2023 06:01:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091704; x=1694696504; 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=UsfWLScmy6sLnC82kfJQtErbSOoNvAJXLrmyFBPVqo8=; b=cHOvttZa8t/JJxVemg4DlNyu1Q3GvNTH2kMtpv9jqGccWSciW9XEbEiqK7Eh2BvOoH PUPb4BAbEJQDh7Sg7yckz4c15TxbsH/qTyqe74RdtssBbYR4yYeHsSTtaOobFM3nvVNc N+cjuIOOspITZLSRb4IyiAUf6GRzkQuRyqBPLYbAH06UnjwZLwpyKff7Jl08e5ZpG+XN FOVNNJs1CYP3Wt6DYZYBTStWX8G3P+6ozqA7MAqn4peNRZTvwP2HhQZQ3T/l9yi0Zj0D rJghV8M+LEyf270ue7jt2vAEeSUwnWDAc3hBcy9nuHV99U8t9nuUVxwhOsCAMER7eBvk h+4Q== X-Gm-Message-State: AOJu0YxFOOI8F2BkrNFyOb0v4HgxvQGR4NQ8IMIpiRejL5n8oPPCb3jH SqDIVgVQ5dxRHKj7rs9FkIaBIPk6Mj6CLD5SHVlcvePUYbkkSKG/KSHocW5EiTAfyOkR5LvDF+e nzgv+ZG7dc27oiCXtvYxBaIASShK0NRVZ8Y6Mw8KOMGVIEscJeHyNbqnSdnQk+tlMs77qlA4gRz 8= X-Received: by 2002:a5d:54c8:0:b0:313:f33c:24c4 with SMTP id x8-20020a5d54c8000000b00313f33c24c4mr5130102wrv.39.1694091704530; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) X-Received: by 2002:a5d:54c8:0:b0:313:f33c:24c4 with SMTP id x8-20020a5d54c8000000b00313f33c24c4mr5130083wrv.39.1694091704194; Thu, 07 Sep 2023 06:01:44 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4083000000b0031435731dfasm23154975wrp.35.2023.09.07.06.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 43/51] target/i386: Allow elision of kvm_enable_x2apic() Date: Thu, 7 Sep 2023 14:59:52 +0200 Message-ID: <20230907130004.500601-44-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Cleanup the code by simplifying "!xen_enabled() && kvm_enabled()" to just "kvm_enabled()". Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-8-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/intel_iommu.c | 2 +- hw/i386/x86.c | 9 +++------ target/i386/kvm/kvm-stub.c | 7 ------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 3ca71df3693..c9961ef752c 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -4053,7 +4053,7 @@ static bool vtd_decide_config(IntelIOMMUState *s, Error **errp) error_setg(errp, "eim=on requires accel=kvm,kernel-irqchip=split"); return false; } - if (!kvm_enable_x2apic()) { + if (kvm_enabled() && !kvm_enable_x2apic()) { error_setg(errp, "eim=on 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 a88a126123b..3e86cf3060f 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -129,13 +129,10 @@ void x86_cpus_init(X86MachineState *x86ms, int default_cpu_version) ms->smp.max_cpus - 1) + 1; /* - * Can we support APIC ID 255 or higher? - * - * Under Xen: yes. - * With userspace emulated lapic: no - * With KVM's in-kernel lapic: only if X2APIC API is enabled. + * Can we support APIC ID 255 or higher? With KVM, that requires + * both in-kernel lapic and X2APIC userspace API. */ - if (x86ms->apic_id_limit > 255 && !xen_enabled() && + if (x86ms->apic_id_limit > 255 && kvm_enabled() && (!kvm_irqchip_in_kernel() || !kvm_enable_x2apic())) { error_report("current -smp configuration requires kernel " "irqchip and X2APIC API support."); diff --git a/target/i386/kvm/kvm-stub.c b/target/i386/kvm/kvm-stub.c index f985d9a1d39..62cccebee4f 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" -#ifndef __OPTIMIZE__ -bool kvm_enable_x2apic(void) -{ - return false; -} -#endif - bool kvm_hv_vpindex_settable(void) { return false; From patchwork Thu Sep 7 12:59:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720602 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp220008wrp; Thu, 7 Sep 2023 06:03:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTjTwePs1drnsomZkDDP7A5chZx19PvlL5sEpNC6libViD3HEMiFHtuhnDRkzpqNd8oB8o X-Received: by 2002:a05:620a:29d5:b0:767:96e2:a9cb with SMTP id s21-20020a05620a29d500b0076796e2a9cbmr27937551qkp.38.1694091783777; Thu, 07 Sep 2023 06:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694091783; cv=none; d=google.com; s=arc-20160816; b=KM2EgiKp5otACaYfefytSVrcPLAc/TQNRVuf6T97sxaGjAkR5hZwfKrGDPY8zZKp8k DXbUk6cL5zwv69sa0ixlNJtPSRV/uG760zYfJb5fbiaG7amj/VbU+ccv3pRu1gz7DNR7 0Asht3sX6dcf4ULNpii6h3kX6MaK7jILosViZvWNCeUWwFkKK7JEhQYQd6ASaNPBHb1K bC+k4lUNlU3RBVLPVwzxwZRptvdcQ9WaU4ooSPIw6APwCAzhn7v6DEG3ntWZ1PZ5yOCE jN7Y2zK8NqTY/ZvtHAGGT9HVAyD1QzQwNixbOhNrtTPNMPii4xm8nNOXnnZ6Y42Kt9gJ eb9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oIq/O9qNMjpRAveEr93SV2nGg4KhrTDskMws53vhy7U=; fh=QFCe5Jk24fiK20qflZxwfoCL+eQZI/E3YbYpomTJI5Q=; b=eKFgnqk2EJU3NqU6G7zxDtfdPFZ4gHIV/FLG887OjB+6Utsz0ikqJcRqkZY5v1UTZG VX3s/O/M7jgoY0uYEJLKwD9qRfzTDBFyQFdKeypES9/KFT8dE0E3iFW45Dl/KmA0m99Q gsQSA5yiVxaqOyvg5UvqRMAzmab55bWbnDQKgW4l/kfRrEqqMKNxJ9Mb9P+6/KvpibT8 ZSZ/b4TkHrO2z3VCnJlbTbV5HaFPPd8TMTbToG06saCxZGdImTNzX0aBoDZLb1ScIpO/ IK/kX9SDTklephzSfhIVcn/oQGWpcKwbJJo+IRby3i4H2ujigBPytYrWdaP4CBpfdsGI SIoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c3CQQ1dW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id br31-20020a05620a461f00b0076f1a6b0551si11954856qkb.386.2023.09.07.06.03.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c3CQQ1dW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEea-0005pE-H6; Thu, 07 Sep 2023 09:02:36 -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 1qeEdw-0004WH-8b for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEds-0007VP-Lv for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oIq/O9qNMjpRAveEr93SV2nGg4KhrTDskMws53vhy7U=; b=c3CQQ1dWLUmAR2Bd+ulPlyQxNA9YCgfOOTSNrsRct1Rq+W0ct9qdOHLsJxwo0V6pxUwvKM MKxc1KGkJS2kxGjLbHn7DX+uw0L6NakWGezSImKv4Uxcgxe8nME31MN/OZXnxZJLqTSIrX 97VBWnGqCEL4xPaJmCrhwKSk7BCnRgk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-hJAO2njFM-yE4Va-O-Cnaw-1; Thu, 07 Sep 2023 09:01:48 -0400 X-MC-Unique: hJAO2njFM-yE4Va-O-Cnaw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-31c5adb698aso574687f8f.2 for ; Thu, 07 Sep 2023 06:01:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091707; x=1694696507; 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=oIq/O9qNMjpRAveEr93SV2nGg4KhrTDskMws53vhy7U=; b=LI2CQRGCOHmtZQHgmE31XTvzigY63YjcCq3IEPimB/XrCSPz3lrd/NhoT0HaPr/zqP 1FjlL4JJPRQUlkCzUtG3xy71YoTtBzEfrjLo+W5KFL+7x40d+spKvjQCEK6jQp7SEhXg q6uBXKiVeQLpCpYmA0AnaVbjolWes18N8UEqRdrBShbyPQ4ps+76Fv4oKLmPWcOBZS9h vlnunzz2w/T1BjsIHTWLMufizpwljgcZtG9QukEhs9aXtAcSIocLrq3fYx7w1CuvE63x 1FALEgBhzicEyFKta8HoxSvB88fL6F7egXfo6WxbR4uIIQAt8RMwj7N7PL32pUjq29Fi hcqQ== X-Gm-Message-State: AOJu0Yw3E7qh+IQgM4rDLCBsGYKONPARYmVqUQEYO/85SC0Z11RxXQvN Y8Hc6cOPcdVINqPajRu7zWFxiOwpmzQKJbq5wxdrHivpxIVcCARjqBGJ/pZdA/AbSDSeC8B726l AYHEDo7u6DZfdNn7KmA9UR776om/qB0cMGQpuO1Bpwhczu0oib0RQ6saKhjmAlq1WQZzQULWteD 0= X-Received: by 2002:adf:ce8c:0:b0:31a:d112:954e with SMTP id r12-20020adfce8c000000b0031ad112954emr4891376wrn.46.1694091707203; Thu, 07 Sep 2023 06:01:47 -0700 (PDT) X-Received: by 2002:adf:ce8c:0:b0:31a:d112:954e with SMTP id r12-20020adfce8c000000b0031ad112954emr4891356wrn.46.1694091706860; Thu, 07 Sep 2023 06:01:46 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id c1-20020a056000104100b003179b3fd837sm685464wrx.33.2023.09.07.06.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PULL 44/51] target/i386: Allow elision of kvm_hv_vpindex_settable() Date: Thu, 7 Sep 2023 14:59:53 +0200 Message-ID: <20230907130004.500601-45-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-9-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 3e86cf3060f..f034df8bf62 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -421,7 +421,7 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev, cpu->thread_id = topo_ids.smt_id; 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 62cccebee4f..00000000000 --- 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 later. - * 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 40fbde96cac..5d9174bbb5d 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 = ss.source_set() i386_softmmu_kvm_ss.add(files( From patchwork Thu Sep 7 12:59:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720613 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp226727wrp; Thu, 7 Sep 2023 06:12:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0s8s8p5Bm1oxTzLE1TUbXcDIgVQ9ND3SuUSdZfrj5vTcdGQSYmBhj3EJjled+RO6fk5uD X-Received: by 2002:a05:6000:11c8:b0:31f:651f:f84d with SMTP id i8-20020a05600011c800b0031f651ff84dmr2115239wrx.12.1694092379458; Thu, 07 Sep 2023 06:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092379; cv=none; d=google.com; s=arc-20160816; b=Y5ZYp7G0/VYVi4AsIGo2H+W1n1cgAYmOkbAN3WTn5AL4xvvZvtl+8yYczok9uKlniQ 0QrONhORvWx82rW/oMjHNcN1aKf/n254h1fZmgWTsZMLZp+VwDMezyh/6Kc8U2IM9zQb GZGX3iwIDnHzMJP7A+vA/U6u65N3NcAVQX+PJ3uRAHnfdRj7Lf1DUyKKLbtdhsiag0HR qYGJelc0wV4rhW4YkNRjxL8Li/MzRYGeyuKySI4r7vAke/nFbtNKrKfOkxgx2ILmG682 Pv3KoDLaTavl8FmIG1UfY0Z3TVxDXsAAtnn+rQieBEC7IrjpXQfBgiI+UrNkp/C7CJFm cYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SpvS7kXL3QPxpjC9VxkOF+3EPpNlxl8dKSrXGx/rLrM=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=gGet6V6TEOxU1GJqgpqCfq8Fjy+ZfDKfDSRzdnreaRDaHazO3VQ+vo2qtEmCuKvEYC vaqRGzm9a0iARGXgTPKtzNYjr9K3lt5TGwbH+eM0aOLheoCusxGPz393U6Gst+cEFMe9 ssvbZ202FyQCRXJ3HeI5MZ4aMilv+nBHnhpj4OuHRp6byGzHodx89Vg+W4hTI7SUKJ6i hY1gpuF6oyvRuepQHmQUvEdVSMBQ4dcFPOx9/N5ZVeFs8DgAFkFE7lbmx5BjRag8+Wd+ otW5UZcXe0BIZG4dosh6QjZddSfA9Kd88Ygm5nHyUmJ/a/u0gBtgfn4xdXNk09P2S6ID JwYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gEmbZPkI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id iv19-20020a05600c549300b00401fbd5c687si1105206wmb.206.2023.09.07.06.12.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:12:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gEmbZPkI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEej-0007G5-0I; Thu, 07 Sep 2023 09:02:45 -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 1qeEdy-0004X7-EP for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdv-0007W6-Bh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SpvS7kXL3QPxpjC9VxkOF+3EPpNlxl8dKSrXGx/rLrM=; b=gEmbZPkIxcWWUEe0TlbkPC6B9jRl9kGD+sT5fgRSe2RpIyewi0qyFcjEO67sKtz/WqDUcu BR6rnH6++DS4FfsEiKLQmQmuPzlCKm657W+w8T2TXlcCzvfDkwrPc85rq92mOS64I70XfW +/cH8BrP/67Q+Key7T3LU44rNCS345c= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113-W3AORoUBNraZhigSKtqqXw-1; Thu, 07 Sep 2023 09:01:52 -0400 X-MC-Unique: W3AORoUBNraZhigSKtqqXw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4011f56165eso8835735e9.0 for ; Thu, 07 Sep 2023 06:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091710; x=1694696510; 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=SpvS7kXL3QPxpjC9VxkOF+3EPpNlxl8dKSrXGx/rLrM=; b=cs+usAVTvyDLcX8XSUaM992Loc7M9aS5UGGfzEItfB3YNLeMbSKIW7SdsDCix2+YKG LISNMAPUfwQ76cxtFL06iS7wqgRNVRVFPgCUm/I4gTqjgvBaII4vAW6akoHKbIpsMudT 8xYWJSf4HCOb7LDRm9h7Xo+duI80F+gsVTHDL9wUpTCXXaxWJY0MuPmRrryp0dajgjlt HYZgJLluDk7Qbz0dNZ9iuDhiaa3txgBMQCuxUReYaERfJg7i/UEDFoltCeoxqIt52Ntb Y7djwiGLv1Of+l/oitLfTnmPpb63idPVfzqY5QEyeLHnwHuKI8LnJPE6hiASJa3Hw4b+ r3cg== X-Gm-Message-State: AOJu0YxcgjFLNLff6RvKwOhK/7gsyKB4jJqjt0r70Bpj45Nj0SUMg/0J uFk5ZehbqzpPLRfzo2DFayFekzQFEpcRh8BWBc/56OzOnOSGYOfs1dn5j0R4//0vfGsn/CIAkHR TfRdbYPf/najtr0ip5Vlmp6AGO/UJhri9IQT4C0oEqgBdE+vMww8oLNBqy0DJnnoKXCjqmSW3Ln M= X-Received: by 2002:a05:600c:1d1c:b0:401:bd94:f45b with SMTP id l28-20020a05600c1d1c00b00401bd94f45bmr2127646wms.4.1694091710487; Thu, 07 Sep 2023 06:01:50 -0700 (PDT) X-Received: by 2002:a05:600c:1d1c:b0:401:bd94:f45b with SMTP id l28-20020a05600c1d1c00b00401bd94f45bmr2127578wms.4.1694091709283; Thu, 07 Sep 2023 06:01:49 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id 17-20020a05600c025100b00402c0a8a084sm2501217wmj.17.2023.09.07.06.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 45/51] target/i386: Restrict declarations specific to CONFIG_KVM Date: Thu, 7 Sep 2023 14:59:54 +0200 Message-ID: <20230907130004.500601-46-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-10-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 470627b7504..ff309bad25f 100644 --- a/target/i386/kvm/kvm_i386.h +++ b/target/i386/kvm/kvm_i386.h @@ -31,30 +31,35 @@ #endif /* CONFIG_KVM */ 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); +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); -bool kvm_enable_x2apic(void); bool kvm_has_x2apic_api(void); bool kvm_has_waitpkg(void); -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); -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); -void kvm_set_max_apic_id(uint32_t max_apic_id); +#endif /* CONFIG_KVM */ #endif From patchwork Thu Sep 7 12:59:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720611 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp225937wrp; Thu, 7 Sep 2023 06:11:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9PPHd23sa271XyCIyvi7Eq5YGYt3MrSqQPmROVODLO9O3vjXntGt3ne0qVZldhKAJ2SK5 X-Received: by 2002:a5d:4811:0:b0:319:7230:d76a with SMTP id l17-20020a5d4811000000b003197230d76amr4908245wrq.38.1694092302484; Thu, 07 Sep 2023 06:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092302; cv=none; d=google.com; s=arc-20160816; b=kzbX0G/CDkjdAe8EyHvWQLGXtOaGadtaA+9ZhQ3ZcMOZfGO+6ELIXOaoeKBozbFzvh qMS+dbROpcBO00gHewKVi6aTYi/qsjO3pyVDU9Z2in55Yad8cqThe6Zd0FvOzWBAucEY oO/8EDe9I/SVSXKJmm9cxwk5g4pFEynaUUxXus+12HkBrx91Kg2ssf4C1DNiKOZK0Dvv SZ+m0kwfeQEDOl/td4Oy43TXcftEg5PFO0KdI2kiycIuEiNwNKAYjkXo0xDIANsgoRc5 Ulr+cp4aAti0dgdBMFw7IhSgfH/JRwulZksbhTehWt+9wyvy/WtFtHZwymGHQYvKDtCd Nqaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qmixq+DPUWzXn9es08YKOqzSkEEgLhEbQB5clQHVKAY=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=RRrct2GrN+H9Up8ytF2VZHw+sDfn1mB3CpFobWQ3FNV1RrRSXtF/ro0dL72zzNPiNP Nusi4lWIVOBDf/xjUPybrfRTDIrucVcofjJujnGnJi9VqHb9NXI3RM2OSeAo//cDmtxE OiyYJ8RPU4OP6X50z2f+We3T1cT4+QE1FGzqMC2MQPNv8Ul3puK0meytZ5/8BHthCT92 ERzVpvDgpOQh1390bfr54+J6x0+GGBobQQH70ZXE30+JQUT3kxnb4szcNnKUpnGK06NU WQRmi4oHA5nOLn24hJkZiFjzB+zhPK+OMsODQP/6Sls4ihHKI3oYrpqXR578oJI9e4DB 3pZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P+IRII4G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y11-20020adffa4b000000b0031c6d9a5bf6si8141015wrr.1051.2023.09.07.06.11.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P+IRII4G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEec-0006DK-8L; Thu, 07 Sep 2023 09:02:38 -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 1qeEe1-0004aJ-RF for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdy-0007Wg-98 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qmixq+DPUWzXn9es08YKOqzSkEEgLhEbQB5clQHVKAY=; b=P+IRII4GqWJGK97BuyQWXPwjPabJwLE8Cjn/OIi7fL0colZs+fb8sFU8AsaS1Zilcapbdf Wpe12GOLGuJegYWo6rWcYV2uBnjslOU6Ecznw1Eq9naMhOGX6l/XnGyXE5ToHH1paWxiCm hllDyW9HeGc2xs/GDiI46n3KTD1f7aQ= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-351-iOdTimzhNO2_CqfpCe2X7A-1; Thu, 07 Sep 2023 09:01:55 -0400 X-MC-Unique: iOdTimzhNO2_CqfpCe2X7A-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2be51691dd5so10224331fa.3 for ; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091712; x=1694696512; 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=qmixq+DPUWzXn9es08YKOqzSkEEgLhEbQB5clQHVKAY=; b=b2BdpqbPrK3vZ9Cgcsp8C+rFji7gXjZR8XZ8zOpGB2iFJppDerHKIXWFIg6UA7SWIJ o4MhYNJ7r5b5ecS90wCzoE+UV7pV96pne6hsioSNlprF+tpa5RTR2czE2uYxFGKitn9v BDCvbKF+TgiunNtPcGYVPC1GrXZf0MZZcEE3EGYmvX5AEmDT8vh9JpK0Juz3scSS1QBf EhZUumiZuawNK9LdqrmtDXLf0s6ak5wJpHszgVXjU5tiAuuwZ+VOTvfcSfpmlX9YrcLu +Wg3YtQ6uulEwP3xh14wDXzD7MI1ZgyZ/KfKeN4CziBJCPjEYAYfj+9TgMfCh2wngwUS H3hQ== X-Gm-Message-State: AOJu0YxXd3le0Yj1szb5NDoPSnFaMDX2904dROEm7es1GGSCK8LN+9Sd S22UCUDWemHMjhjLUjJGcG60WIP535ugtBotvlaj3O4nTUDu8eFWXzrK5vT4XKK4vA8FSOPFBYe oTRBcucPQxYOYkKcI+1EQHcGjhXYazxlsvoK7HnIY/ZL5Tk6owrtc7YrOgQ2BJlMrU+rBRURAVz 4= X-Received: by 2002:a2e:300e:0:b0:2ba:18e5:1064 with SMTP id w14-20020a2e300e000000b002ba18e51064mr4128676ljw.14.1694091712368; Thu, 07 Sep 2023 06:01:52 -0700 (PDT) X-Received: by 2002:a2e:300e:0:b0:2ba:18e5:1064 with SMTP id w14-20020a2e300e000000b002ba18e51064mr4128656ljw.14.1694091711913; Thu, 07 Sep 2023 06:01:51 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id y11-20020a05600c20cb00b003fc080acf68sm2455738wmm.34.2023.09.07.06.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 46/51] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets Date: Thu, 7 Sep 2023 14:59:55 +0200 Message-ID: <20230907130004.500601-47-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-11-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 ebdca410527..a578961a5e4 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -464,11 +464,6 @@ int kvm_vm_check_extension(KVMState *s, unsigned int extension); kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, &cap); \ }) -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); 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 ff309bad25f..b78e2feb498 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); void kvm_set_max_apic_id(uint32_t max_apic_id); void kvm_request_xsave_components(X86CPU *cpu, uint64_t mask); From patchwork Thu Sep 7 12:59:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720615 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp228446wrp; Thu, 7 Sep 2023 06:15:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdiHM7jO35wGTCaRt1ZhA4feFeMWf67rYKdI/cLqrT9OuESlWT/VPqa40BlgBDAqIAR8yx X-Received: by 2002:a05:600c:25cc:b0:401:b493:f7c1 with SMTP id 12-20020a05600c25cc00b00401b493f7c1mr4449447wml.35.1694092556583; Thu, 07 Sep 2023 06:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092556; cv=none; d=google.com; s=arc-20160816; b=fEuBkKuCm5F6q+z2WpeP+s/TzcwzoObpxl6oeisqR0u2ILsep6V3Ve55+PTSGxBEQm MvjNqenK5FSY9/hGOyoxmd9r87Nwvo+50/r9knI0QACCd9UR5erJoJB2jpFb3liQCImf iPSjYdmPGYuch3boPh9+pdqlKgYryAkPiDBxDuda1jtncr3RnvFqJLK6uMDOIen5JA41 I8kinfo71DhD4O7KWSSbETdV8jAwyInwWl7GJs3ovudcIXcAn6auNpx6ZWDOrALLn624 4Zodp5ObWJpyBFgVinZAtrdyEnm7IM7ZUVZIk6oTk1ih8metEm8P764ZkvU6f4FeXQni 5C/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A7Xqf7ZLFg5wkXV1H3hDfFHEBrjbErGhe3RTeVJ2jls=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=G3xpRLgOI7cqP1zKjUu21vGou+4ur6WtjPTZpJ5MikJUaa16uhWtg8fXXDgvhtBOmG OpYCNR2s0YYQZdIBcGVXFq/GEJyBHM8axw9UXeJ3pJNoxsPHQ5d5X6Y7CYMSVYf8SuZo Re1v203JThmLo+2pGZL3pIRkSNJf/uXC+V8yz4nLReijdXURQOPwxyUl06Yn54k7Q3o9 Wu4KH464E0DWdjma7M8bI4K32pBMqeWHyZBnuvk9GftvEnzBmKafXqQ198mKuPYQe1IU XqH0s4wBAm3ZBNsYuaJ3muKwZeqy2OXmOc8pC6a/qau/9VrKM84Km+Juv5WZ353a2C02 7xRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CNDCatb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n16-20020a5d6610000000b0031790746dfcsi8028243wru.945.2023.09.07.06.15.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:15:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CNDCatb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEee-0006Yq-Cg; Thu, 07 Sep 2023 09:02:40 -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 1qeEe2-0004aK-4t for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdz-0007Wz-Mf for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A7Xqf7ZLFg5wkXV1H3hDfFHEBrjbErGhe3RTeVJ2jls=; b=CNDCatb8vT/rBlpiU8b/r63zkor3xtq0AZHvEGXnknh7BksYQ9z6cOJAL7U5Rf/32Nxz8b Q3d2/djQTj0BIQa4VUYzNBYnH9koruanaRZzzDQ1zyCjlWKGLd+pFH1l7fb0fobLB8YEeB EqEgnN9kS/iDDFtqvVlNOsOtqGHYojY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-44_jM1cxPGCYsNkW8D2g9g-1; Thu, 07 Sep 2023 09:01:57 -0400 X-MC-Unique: 44_jM1cxPGCYsNkW8D2g9g-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f5df65fa35so6186265e9.3 for ; Thu, 07 Sep 2023 06:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091714; x=1694696514; 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=A7Xqf7ZLFg5wkXV1H3hDfFHEBrjbErGhe3RTeVJ2jls=; b=jwx8xIbtNFmVeB39dxhntrfMqXdVuT60zONrfnQfnCMx1zhLw3QkfWtpzbP/PPZ7Wo Cs+WmJcSCLnImWCdSIZUpcLnsd2oyPUni9gub6cietgr+InM1HxarW/zXaVz9sF0AoN5 FNB+ajlp06Cd+AmiEqZ134JtJVfddkRo3usV5CAl3M2JAcREuzf81irjW7nnj9Z0Ey4b /4dqpYnJyNfTFlsQek/it7Npdf+JcrJbVTKr2SxK+Lj3DN+s9NnpMMni6EehfhTqs+fc LikRLk+zjZ16uBSp6CW0E6mvIgodPzg+vLw870ULxoASUeIEFGsy+Tms6pmBdB0VWQbn YYoQ== X-Gm-Message-State: AOJu0Yyy87pjjXexyzXcOLTr/RMZjazm9FuDBkyvlpQ00ho144eRglGE +g4SQdW0JXaNZ2dw6y7VTi+Y+tW/XR7avsJZHJP7N89Y9I7T71EnIFcviwgmw84YhAjTbM8HupW d20iKxSNZHBgNH90HSH97RCba68l20YOpOgSe8rgleHzOu0mu3a8vQX6wiURkzlUfm3guoir6FM w= X-Received: by 2002:a05:600c:2285:b0:3fe:d630:f568 with SMTP id 5-20020a05600c228500b003fed630f568mr4150914wmf.39.1694091714350; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) X-Received: by 2002:a05:600c:2285:b0:3fe:d630:f568 with SMTP id 5-20020a05600c228500b003fed630f568mr4150898wmf.39.1694091714002; Thu, 07 Sep 2023 06:01:54 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c294400b003fbdbd0a7desm2475470wmd.27.2023.09.07.06.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 47/51] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets Date: Thu, 7 Sep 2023 14:59:56 +0200 Message-ID: <20230907130004.500601-48-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-12-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- 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 a578961a5e4..4326b53f90f 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 */ struct kvm_run; -struct kvm_lapic_state; struct kvm_irq_routing_entry; 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); -void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); - struct kvm_guest_debug; struct kvm_debug_exit_arch; diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index b78e2feb498..d4a1239c68e 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); +void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); void kvm_put_apicbase(X86CPU *cpu, uint64_t value); bool kvm_has_x2apic_api(void); From patchwork Thu Sep 7 12:59:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720612 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp226077wrp; Thu, 7 Sep 2023 06:11:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3bh/5Zh7ggLhpS8a2akvFyqS6VIDUwPDTEVFw3/sJ2JXz54Zch6b+wSVhs34X12HumCIq X-Received: by 2002:a19:6557:0:b0:500:b553:c09e with SMTP id c23-20020a196557000000b00500b553c09emr3873786lfj.32.1694092316293; Thu, 07 Sep 2023 06:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092316; cv=none; d=google.com; s=arc-20160816; b=dgY4AJgF783RjQMHaT/03BFwxxHGV4pZlnYWe44AVLnH5FNm2dKz0RqD3c7cFab0Vh LaVKFnoxu/V7OdMbrEC+oTZZS0lYrGqOyNo6czxPwD5pLN9tiUhBTCNfgdG7vGbPpKML fWTJsX0Zsy3s5UOjhKaR8U1ffLGpxIOhE0eQDqz1R7Lav05Z77RPpk5juU7X3iyr55aK 0+C7psnrxEHF5vJzXzADuVlq1UChE7dcl0sj2+joldCQHCuth0WtByaxhe1caMz9IE4C GdHhbLMUE8eVVgG8kpcIAj7xRrPf/eikyo+dyfrhL4SoAcu0VYKI2PS4oTFTihcPpXhM dBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AIIvR3K4rXWSNaWNDTeRXv+dkuqfOIauPPV/2IMVpP4=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=HTKW28ZRs40lthTXIQv8GSecUU1mri0+90MGS3Kv7Z6rkg6+GZTGwi6PHtOn/HZ2HQ nnK+Q/BrvFxU73Ye8AgsWpSebYbuka1AVM4xaaWPKXk8r6gfl6f5LSyjLUQU5j09TLmb fdLUjIVfTcxCdkHgW+Ntfa8uxpGt6UIl1jvSX7PYVuY8JxW66MB0/lFzfg1+HoCbEqR1 cBVHsovaHU2ZUthU4Z5Y7I6jh57BNu6BPtGOS9bhsgyVmwsxZd0ayP285x2gKSNPDfCP 93EfLTQdAAN55QYVPapXaJzmtgUTwMATVvO3w545f/Efd7ZjEirJHmch9sgOr5ZQTPUI D7yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B3bEX4E2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i8-20020a05600c354800b00401d2e11b15si1082260wmq.193.2023.09.07.06.11.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B3bEX4E2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEeg-0006rP-A7; Thu, 07 Sep 2023 09:02:42 -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 1qeEe7-0004fG-0d for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe3-0007Xp-IT for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AIIvR3K4rXWSNaWNDTeRXv+dkuqfOIauPPV/2IMVpP4=; b=B3bEX4E25DJR+mVmTEjY5RIryD/vZLJkSDX2hNqzk14n+eMVdmAHRLAoIsljEAYytGijEU rW2S8FCbVF21yY5ZyNyEbkvE8VH9H/uwE8DLYug4vgHL0Ewn4beC4lCTKzAT8vrcFRsSRW lGyXjYSk6mrK+j7TVDe57y3d1G0FSmU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-571-m1YurfUkOiiPL3wqtNeroA-1; Thu, 07 Sep 2023 09:01:58 -0400 X-MC-Unique: m1YurfUkOiiPL3wqtNeroA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4011fa32e99so6681815e9.0 for ; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091716; x=1694696516; 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=AIIvR3K4rXWSNaWNDTeRXv+dkuqfOIauPPV/2IMVpP4=; b=TLgH7T1FlvfOAwVMdD8SsCtpbLHnR8obyUuodQNzytEx6NWTV1zt524GO3tpm4qcNH NVWU1Cl/Kw3q4DXh80Pg9R+5voHxUyOX4qZGLqNwwU/2uA2+J8rQLfyyWu9F+Uuvxy4K nRUVXDTCLfq+IQLmCaL9VSX2RuMH1Q3f2617l/ppcMXiG6rutVeOvzgr9o1Vyua29NoO yPWSq51b3J5J9Ot5BtZIKlZiyRjoM+s94Yv0DdgVZVVLxX4mclweDnQC6oqKvh6xZJNs JMzfpobKh+xEewFXjU9Rs2xNcz9/nOr+8Ro9IcuU98MjLfGyWsKSD4pypCYYzzAm6r4J qlYw== X-Gm-Message-State: AOJu0YwBwFuHXXB0yUwOx6OGG+Ht59nksMfrAl3xRKjwjdNBS+t4O2lD XxlQ2F+eRJC7UD1CoegX4f8b/yHmw8O/QoLAO6qOLR42yAyxsODi+vHfMGBuLcHwJ3Db9J2x5D/ DzrsCop6JewP23RodPyc/IdZ07aEgiVdGYo19pF1+TbOIKfbtqf7Mrirc/svlFkHfbY6Jk+F0ZW 8= X-Received: by 2002:a05:600c:249:b0:400:6bee:f4fe with SMTP id 9-20020a05600c024900b004006beef4femr4610441wmj.21.1694091716273; Thu, 07 Sep 2023 06:01:56 -0700 (PDT) X-Received: by 2002:a05:600c:249:b0:400:6bee:f4fe with SMTP id 9-20020a05600c024900b004006beef4femr4610429wmj.21.1694091715951; Thu, 07 Sep 2023 06:01:55 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id l12-20020a7bc44c000000b003fe61c33df5sm2457667wmi.3.2023.09.07.06.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:55 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 48/51] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets Date: Thu, 7 Sep 2023 14:59:57 +0200 Message-ID: <20230907130004.500601-49-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-13-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/kvm/i8254.c | 1 + include/sysemu/kvm.h | 1 - target/i386/kvm/kvm.c | 4 ++-- target/i386/kvm/kvm_i386.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index 6a7383d8774..a649b2b7caf 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" #define KVM_PIT_REINJECT_BIT 0 diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 4326b53f90f..147967422f4 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.c b/target/i386/kvm/kvm.c index 639a242ad8c..e5cd7cc8061 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_RANGES]; static RateLimit bus_lock_ratelimit_ctrl; static int kvm_get_one_msr(X86CPU *cpu, int index, uint64_t *value); -int kvm_has_pit_state2(void) +bool kvm_has_pit_state2(void) { - return has_pit_state2; + return !!has_pit_state2; } bool kvm_has_smm(void) diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index d4a1239c68e..76e8f952e5f 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); bool kvm_enable_sgx_provisioning(KVMState *s); bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp); From patchwork Thu Sep 7 12:59:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 720606 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp224657wrp; Thu, 7 Sep 2023 06:10:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWFd5B4L7APW9dQ1HuZtukoJKSM65Vo5+8RLu84RfhUeeaGuEDyguzdEgJD9kpjhkk5BS9 X-Received: by 2002:a5d:4809:0:b0:31c:82ad:a015 with SMTP id l9-20020a5d4809000000b0031c82ada015mr4388004wrq.49.1694092201583; Thu, 07 Sep 2023 06:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694092201; cv=none; d=google.com; s=arc-20160816; b=Fty1OSanFW8EDxPR6EPP0LggWAuCcEpSPMh20wZBT3ty7ok32Mxxh9g5vz712nAUac BeeZli/kjiwb835YYfqxBHJLQRCjS190vuNL16s7LeVV1EzRo+p8lnnvma5bOmrqgiOK LVVvqsywL6sIXj9u1ehZtX7KiiWt7gRY/mp+6HvbwjoPn4S5Ky3Bx9Sv3Oh7r815NAg0 Fq/9j/U7u/DaRXs3YEKstHrf8uQFMXJ1+OyVrp3dQ5QTmK71Ehgkr6QF7TYMP/7nxWXu EQlPBNF8TPFUPuXzYtfv5Tsxe/2nCtkFBxt4YtPCJjN1ksqqRr97BIypGkZZOvbz9wul fiIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dnYWCqXFYjnf7iiegsI+BpRqPdw9Nfqs+eiyxPvUq20=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=Io5AvyxEttcr2K/4hzXN8WWg2N0nqeoX0NG5GksdZ9G1i2LKShsyllSsTTfM7FPUEy QNwv+OL2IAP3LURAxsCCsNfBSm95igKMPfCDAsZvdhRacNzIVFNadRreXL0mxTt8lbIi gywk43vUXCSHFksAb+dEUJwR8ECP/PjC4JY2PJBP4iOsHya+iSi3VTE8IWgAhBFdFwxC Cj/8bUKH0boyucLne69ea01YoC2+IgiujyveFMuMLyaDX6HVWuKBNAD3TOuBGsDhjr/k 47Fw3de6BjZzBpSkLIwDEBarhM1R6udBMDLYVgODO9b+PuG+VmZ04jq6/dSn9v+m2JFC szSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XH4MZdkd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h12-20020adffa8c000000b003176014ec92si7844583wrr.488.2023.09.07.06.10.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 06:10:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XH4MZdkd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEel-0007Zv-QU; Thu, 07 Sep 2023 09:02:47 -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 1qeEe7-0004fr-2A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEe3-0007Xn-CC for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:02:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dnYWCqXFYjnf7iiegsI+BpRqPdw9Nfqs+eiyxPvUq20=; b=XH4MZdkdkB4RYaLdPC+GrrZUYZ6U7ZR+BvSvVBlmtkTx2enJACuHUkr3PNX1ZKXqDgK68x ECEgnqUhTjArQ3mIz/zjVBP6LHHGn0nLmkaCyp9YzvPUlMjU1u1iEgXQbIszgL85yh/gys c7zepviYi6bSsfNj2Uh+4obxICVER7w= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-SUrJEXPzM1OdLuOv1i79-g-1; Thu, 07 Sep 2023 09:02:01 -0400 X-MC-Unique: SUrJEXPzM1OdLuOv1i79-g-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f5df65f9f4so6541135e9.2 for ; Thu, 07 Sep 2023 06:02:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091718; x=1694696518; 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=dnYWCqXFYjnf7iiegsI+BpRqPdw9Nfqs+eiyxPvUq20=; b=Sn/kw7dKJVL/Avj69KeuS3w17W9IytF2Yz7dJEl4qN9cUN6QxDdEFfo323xEWI1n/X oS8Igf/S8pEMhm+/YfAL485G8Ijx5PaR88vlziEjEWgCCNsnrpUiex6PDvzfHgX+3O6I c+P5rtbW8wI1O5OS2ophkJm5eWfGFOlCU7EK1FO4sLcdVp3jEw3s91FRGyY/zZ5JRjJ6 /yULX4dktGztceNCTD16CaiM/k1iHeBvN8dttfLHkFfGOjsplN0SxcwiVAYQx7L6NU/V nZPW7NzCl5qAdw1f23lQbFWC+I36sDU5wMtUDhnHSDriYkiyzc2NfTmg+WjR6T7AyNvn hDhQ== X-Gm-Message-State: AOJu0YyWto9lMUMu6qd1yU6ioWWKjR5q7SkMHePDTLMX09SK7n1GVyfJ mx17JHblpPm7YeTsXRDFhWtkd5DPpfjFIIjtTx6C2SA6LmnNN4OE3CF8KSrO11MpTirpgtBie1Y oW8+8sNJdUl1zsXGN1E8jsKMzep70bFuX9Lxt0sk7FNgas0L6BTsA3aRes7DTetBp7adkssNP+j A= X-Received: by 2002:a7b:c7c7:0:b0:400:57d1:4910 with SMTP id z7-20020a7bc7c7000000b0040057d14910mr4480993wmk.17.1694091718427; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) X-Received: by 2002:a7b:c7c7:0:b0:400:57d1:4910 with SMTP id z7-20020a7bc7c7000000b0040057d14910mr4480975wmk.17.1694091718090; Thu, 07 Sep 2023 06:01:58 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id c7-20020a5d4147000000b0031de43fe9bfsm23505088wrq.0.2023.09.07.06.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 49/51] sysemu/kvm: Restrict kvm_pc_setup_irq_routing() to x86 targets Date: Thu, 7 Sep 2023 14:59:58 +0200 Message-ID: <20230907130004.500601-50-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Message-ID: <20230904124325.79040-14-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/kvm/ioapic.c | 1 + include/sysemu/kvm.h | 1 - target/i386/kvm/kvm_i386.h | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index cd5ea5d60b1..409d0c8c766 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" /* PC Utility function */ void kvm_pc_setup_irq_routing(bool pci_enabled) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 147967422f4..ee9025f8e9e 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -514,7 +514,6 @@ int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *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); bool kvm_kernel_irqchip_allowed(void); diff --git a/target/i386/kvm/kvm_i386.h b/target/i386/kvm/kvm_i386.h index 76e8f952e5f..55d4e68c342 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, QEMURDMSRHandler *rdmsr, #endif /* CONFIG_KVM */ +void kvm_pc_setup_irq_routing(bool pci_enabled); + #endif