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);