From nobody Mon Feb 9 17:24:58 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=1614795773; cv=none; d=zohomail.com; s=zohoarc; b=Db84cXwZwwfcH1pVVYZB4WlErLON8IwzOH8loOrBy/4NFpHZDOlhJwUKbUomfSBtUJXtVCLzCIbW3UsyzrVf7fJe5QPSlgC9dW5y2WXWjI0DgMjhMasHUqld6G8LKch3V+k4xtnHasNF2n3kZKE7cJVyonF9EzjdMLXyE0ri0d4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614795773; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=3WOU0ObUPkLYlvbEIzar57F9vUZTGCF79gCYDqtyU50=; b=IAz+7JP+jaTXg3G38384LEDGIaHUgbSi1nk1m7eXhUm9/qIXmWPP85v4TslngYKtptUcd1eDtgIgy+2rWSo/a+2q6t3WnAzoYPUFZ/HSeFJz+Zoexxcs13GFn3rhA3D9G7heuN9Ah6MfQAfnUIxAK22HbM9H4QoCBVd12VOnFRs= 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 1614795773885416.5055036228706; Wed, 3 Mar 2021 10:22:53 -0800 (PST) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-5DFQyKehO8CNcDnBCiyWyQ-1; Wed, 03 Mar 2021 13:22:51 -0500 Received: by mail-wr1-f72.google.com with SMTP id m9so7426413wrx.6 for ; Wed, 03 Mar 2021 10:22:51 -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 a198sm6785613wmd.11.2021.03.03.10.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 10:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614795772; 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=3WOU0ObUPkLYlvbEIzar57F9vUZTGCF79gCYDqtyU50=; b=Hha3r2HPWnbBWyxtmMfX0u9TlOBBnh25+SyMkClY4IPwjztsiLNrsHQ7WVMIjliHqHPRpr IR8ROuxcT54wx3xAKC3cH3cO0ZQ6y9nbW/RfrmmuIgQBBQDFK1bJW9qwDiMvZD4z0e2yg7 XdBTIZiWj9DGZJbVOwesuDvrv8BqE7I= X-MC-Unique: 5DFQyKehO8CNcDnBCiyWyQ-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=3WOU0ObUPkLYlvbEIzar57F9vUZTGCF79gCYDqtyU50=; b=a0zIseYdLfut/6Iv4EISdSQFMABE9SD7sm0YpGOjwGDf1YUC566IIj4NjH6ge2uft5 VNVJymM2tlFXjr1LTa4XMR1/i7N2dh+qYj6x5vP/Et7j0Cqm8M8aSYu0zdZqYDSVDfSu 7smYe3Y+GbUCV3ls8TNH3zSTEL5NHhdkE1djKNqZ9+dVUa5RsRYbADA/yxvp3EycUfLx e2qHNSEWP7lkxnjx66SEQ78CHwynPbQ2TBHEvYxQvfM+/H9cke8X7rpCaAFY3b6zA+hj aL7F7tVYzCqAL1aZpRQoFr8Pi4m5VWGs8FBF5qmlHX2hEU+/v6GfZZ7EyeDs8DtrqMMc GCUA== X-Gm-Message-State: AOAM5318LH/TO9JNe/4mkNzHEWn5thJ/l+aTJT7ooI6SLs4coppxkD16 dSPCx67GcSKD14b94/6PlIs6QHcA86kUcsd1rablJewR1KkFwIjN0NL3uT84eSywi8H3luJfIY0 l1zDc8kir3d/9ZQ== X-Received: by 2002:adf:fe01:: with SMTP id n1mr28570487wrr.341.1614795770242; Wed, 03 Mar 2021 10:22:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqqykw9kqMqftlN/tD2Ahqv9Vq5lqc3xUzYUUXIkr2YeSmzmNjmOGpzqJYOAdnlKq3vN7dKg== X-Received: by 2002:adf:fe01:: with SMTP id n1mr28570454wrr.341.1614795770019; Wed, 03 Mar 2021 10:22:50 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Cornelia Huck , Richard Henderson , Sunil Muthuswamy , Marcelo Tosatti , David Gibson , Marcel Apfelbaum , kvm@vger.kernel.org, Wenchao Wang , Thomas Huth , Cameron Esfahani , Paolo Bonzini , David Hildenbrand , Roman Bolshakov , Peter Maydell , Greg Kurz , qemu-arm@nongnu.org, Halil Pasic , Colin Xu , Claudio Fontana , qemu-ppc@nongnu.org, Christian Borntraeger , qemu-s390x@nongnu.org, haxm-team@intel.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/19] cpu: Croup accelerator-specific fields altogether Date: Wed, 3 Mar 2021 19:22:04 +0100 Message-Id: <20210303182219.1631042-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210303182219.1631042-1-philmd@redhat.com> References: <20210303182219.1631042-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) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/core/cpu.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c005d3dc2d8..074199ce73c 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -393,10 +393,6 @@ struct CPUState { */ uintptr_t mem_io_pc; =20 - int kvm_fd; - struct KVMState *kvm_state; - struct kvm_run *kvm_run; - /* Used for events with 'vcpu' and *without* the 'disabled' properties= */ DECLARE_BITMAP(trace_dstate_delayed, CPU_TRACE_DSTATE_MAX_EVENTS); DECLARE_BITMAP(trace_dstate, CPU_TRACE_DSTATE_MAX_EVENTS); @@ -416,6 +412,12 @@ struct CPUState { uint32_t can_do_io; int32_t exception_index; =20 + /* Accelerator-specific fields. */ + int kvm_fd; + struct KVMState *kvm_state; + struct kvm_run *kvm_run; + struct hax_vcpu_state *hax_vcpu; + int hvf_fd; /* shared by kvm, hax and hvf */ bool vcpu_dirty; =20 @@ -426,10 +428,6 @@ struct CPUState { =20 bool ignore_memory_transaction_failures; =20 - struct hax_vcpu_state *hax_vcpu; - - int hvf_fd; - /* track IOMMUs whose translations we've cached in the TCG TLB */ GArray *iommu_notifiers; }; --=20 2.26.2