From nobody Mon Feb 9 11:06:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614206826; cv=none; d=zohomail.com; s=zohoarc; b=nJH7p85Sdn0XT6Kta2m8LK2zSBE9mL3hpKUG11tadHdseQDpufqs/CxHb5M2u9AZt2jkhLNowU3BOmtH+zAvXGQsC1apRLDtKL3HuFZXmXLCqRgnA8PpuE8wQMqsA63QjZ+fq7Oo4g9zHsqsmHnZgWNkDxwMZ3RDK2fZOxe5uGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614206826; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=TGc1XDROpJa7heiKjiNOwGMcXXvKXrCBpdUx/v/xVvI=; b=cKZIvGFNqAg3DWRv+R8VKTfCFVXPepiiUiIsW1lIQaHFN92Ai2/5c2qizzI+PGA557n2XvYOm/nvMb1NUcG0+E/Ihteu/kDqdbhah3IiBXsS0wn3XUuLgrjuA+sRFAQ1fwGpiaRLa1fSUc7WT11hwTnpFxb8nU0mBICIaRIzgNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614206826342855.4802565914908; Wed, 24 Feb 2021 14:47:06 -0800 (PST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-kiu87brgOLyAi_IMarWZ4Q-1; Wed, 24 Feb 2021 17:47:01 -0500 Received: by mail-wr1-f69.google.com with SMTP id v13so714477wrs.21 for ; Wed, 24 Feb 2021 14:47:01 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id k128sm4650445wmf.42.2021.02.24.14.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 14:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614206825; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TGc1XDROpJa7heiKjiNOwGMcXXvKXrCBpdUx/v/xVvI=; b=DKB2EBeKbt/RLRnIuF9okL91Sxt4yMiMWOiKv4SZTt1mZUmdkBMgO518pwRvG7iOutxnkp eoS5mDjukve9Ehe4Dcri5RVaOeLR3iVXMPRWj8TwMJlHiHBkAlrJ/Vf8ywInG6cu0nYzuX JD7JeXPJpcWXDS7Ji4+qjRztssbKAfM= X-MC-Unique: kiu87brgOLyAi_IMarWZ4Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TGc1XDROpJa7heiKjiNOwGMcXXvKXrCBpdUx/v/xVvI=; b=EC3B6w1lXbjfBH4XJ8C2fNK7vzNxwK+HvgzJIWptbRLV06oJevqTyzq0F114Wg0H3i 6s/ZdGyhY2YTh2xY9LGbHg/OFU4RjPhifvbD1TFjvlvXTt1v4G/d4u9BbpNhTdad7wea LnJa3o9Q7ScTaygB3yL1fasyJrEf51MwrQ7igMRhUcAsT0U/zcWA4jQ/NpD0Xlsk4tPT DB9SpBygvwOxJV090jdENBc93mVrg7ibQJDy4tpB3/cbCw+XKsrCIsxjDk9Ynbwmknlc weF1S7o5R2f2aPStWxSEfFjNjsNwbSs3jCvpJm9MwJxyz1I86fB+YDGgOUU90Fef1BQX 3xGQ== X-Gm-Message-State: AOAM533JO3iBHnZoZt1bVXcB338UnqkEAdjb+LLvDfJXjJ1ZfT39wb5X o7gHSKza8o6KiE5Xkyy8jCFUWdfhxGeljtNaVjQY72djQS1XQHcuvr+psF+AuLBowxmEUxB7kab 203LiIg37+fIV9w== X-Received: by 2002:a1c:b6d7:: with SMTP id g206mr252291wmf.123.1614206820136; Wed, 24 Feb 2021 14:47:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwC3nRTJpkI8hwMSqLH5Jsmo0ek5gPNs5pMiwn1v7m2ICWfSmZdd04F/nOhzG34hmes6j6rvg== X-Received: by 2002:a1c:b6d7:: with SMTP id g206mr252284wmf.123.1614206820015; Wed, 24 Feb 2021 14:47:00 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Eduardo Habkost , Markus Armbruster , Laurent Vivier , Eric Blake , Marcel Apfelbaum , Claudio Fontana , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v5 3/4] qapi: Move X86 specific types to machine-target.json Date: Wed, 24 Feb 2021 23:46:42 +0100 Message-Id: <20210224224643.3369940-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210224224643.3369940-1-philmd@redhat.com> References: <20210224224643.3369940-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X86CPURegister32 enum and X86CPUFeatureWordInfo structure are specific to the x86 architecture, move these entries to machine-target.json. Restricting the x86-specific commands to machine-target.json pulls less QAPI-generated code into non-x86 targets. Acked-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine-target.json | 42 +++++++++++++++++++++++++++++++++++++++ qapi/machine.json | 42 --------------------------------------- target/i386/cpu-softmmu.c | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/qapi/machine-target.json b/qapi/machine-target.json index e7811654b72..106fbd2e9ed 100644 --- a/qapi/machine-target.json +++ b/qapi/machine-target.json @@ -329,3 +329,45 @@ ## { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'], 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386= ) || defined(TARGET_S390X) || defined(TARGET_MIPS)' } + +## +# @X86CPURegister32: +# +# A X86 32-bit register +# +# Since: 1.5 +## +{ 'enum': 'X86CPURegister32', + 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } + +## +# @X86CPUFeatureWordInfo: +# +# Information about a X86 CPU feature word +# +# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature= word +# +# @cpuid-input-ecx: Input ECX value for CPUID instruction for that +# feature word +# +# @cpuid-register: Output register containing the feature bits +# +# @features: value of output register, containing the feature bits +# +# Since: 1.5 +## +{ 'struct': 'X86CPUFeatureWordInfo', + 'data': { 'cpuid-input-eax': 'int', + '*cpuid-input-ecx': 'int', + 'cpuid-register': 'X86CPURegister32', + 'features': 'int' } } + +## +# @DummyForceArrays: +# +# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally +# +# Since: 2.5 +## +{ 'struct': 'DummyForceArrays', + 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } diff --git a/qapi/machine.json b/qapi/machine.json index 330189efe3d..8053803a0e0 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -681,48 +681,6 @@ 'dst': 'uint16', 'val': 'uint8' }} =20 -## -# @X86CPURegister32: -# -# A X86 32-bit register -# -# Since: 1.5 -## -{ 'enum': 'X86CPURegister32', - 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } - -## -# @X86CPUFeatureWordInfo: -# -# Information about a X86 CPU feature word -# -# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature= word -# -# @cpuid-input-ecx: Input ECX value for CPUID instruction for that -# feature word -# -# @cpuid-register: Output register containing the feature bits -# -# @features: value of output register, containing the feature bits -# -# Since: 1.5 -## -{ 'struct': 'X86CPUFeatureWordInfo', - 'data': { 'cpuid-input-eax': 'int', - '*cpuid-input-ecx': 'int', - 'cpuid-register': 'X86CPURegister32', - 'features': 'int' } } - -## -# @DummyForceArrays: -# -# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally -# -# Since: 2.5 -## -{ 'struct': 'DummyForceArrays', - 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } - ## # @NumaCpuOptions: # diff --git a/target/i386/cpu-softmmu.c b/target/i386/cpu-softmmu.c index 34fd7b0de02..a7afa7963db 100644 --- a/target/i386/cpu-softmmu.c +++ b/target/i386/cpu-softmmu.c @@ -23,7 +23,7 @@ #include "sysemu/whpx.h" #include "kvm/kvm_i386.h" #include "qapi/error.h" -#include "qapi/qapi-visit-machine.h" +#include "qapi/qapi-visit-machine-target.h" #include "qapi/qapi-visit-run-state.h" #include "qapi/qmp/qdict.h" #include "qom/qom-qobject.h" --=20 2.26.2