Received: by 2002:a19:5205:0:0:0:0:0 with SMTP id m5csp3606447lfb; Mon, 13 Sep 2021 05:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy568OkFPrJ2xt0aUnhuBH9SwUcOGjNxoynX3b9buFLNPffU7KjSbhrS3KnfwCRzYyzBDAE X-Received: by 2002:a05:6000:11d1:: with SMTP id i17mr12350809wrx.424.1631535015097; Mon, 13 Sep 2021 05:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631535015; cv=none; d=google.com; s=arc-20160816; b=R1OYYI7mqPRSotfWlWOjvPJRZvfA1F0kvEBF1sjgzNoBJrtCGyI3JD2D6n6QYByuKc x0mqJy5ManOVNQ8XnQEJ0KI62ExxLnT67tqRsAq3+P/55GHCH5hQGAFw5cXuElk3axJS AdxeAngUvMs5letbwme/PwzPx0zviJUdCRHoU9ciFCQfO66WXsWfPqSdWOuodm2Y+DzO Pb+9ffu9IQ/nqopAvpnnFk/anZh4Qc/hmRaka67CVPITLzq4JLT//zLSwl5qOoTg5h37 1jKBbRRzu90kjeWK+L5xGMolO1bjX6n4nbdNQ29qfToChxvQ7jCh5NjZwi1IvS5kV26s 4/6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from; bh=YP7FuNeKFSsC3SEtbUOH35dZ73aJZKJLOyayuxTxJiE=; b=ekaDv8zIhPx7TjonX1m20420Dcu8f7U6zifsJaaurdyTTDHHVpCjTHGElALXHjQ+nF bD032RnZX05dlhX0f40dhwdmvwibTOcOMjkhyPMFBdhwBPOnoB27SvhWs4CTAXbID8vS LltNHG2Q2RxN2UNkzr4pB17YYG9DIeIrYKZ/8OO4PtIEAM5woVZAIB1Mb5iEWlAVI+sJ tQ4vHTc/M0Bw0AhWmVMYAbGf+B3KTBx5LnvbkF5F1UJc4RuaKFb8wc1AVGnQNisUU1aX sdbKU0f5wOdpOkm4mSxkZd8bjivRk4Qh9QGAy/AuqSt+oZK6e0EjagiUzTQGFJQ5oUcv MRvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j10si7943605wrx.57.2021.09.13.05.10.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Sep 2021 05:10:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:52928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPkms-0004ox-3f for alex.bennee@linaro.org; Mon, 13 Sep 2021 08:10:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPklW-0002KX-Dq; Mon, 13 Sep 2021 08:08:50 -0400 Received: from mail.csgraf.de ([85.25.223.15]:44044 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPklT-0004ic-94; Mon, 13 Sep 2021 08:08:48 -0400 Received: from localhost.localdomain (dynamic-095-118-088-150.95.118.pool.telefonica.de [95.118.88.150]) by csgraf.de (Postfix) with ESMTPSA id 36BE960805EC; Mon, 13 Sep 2021 14:08:45 +0200 (CEST) From: Alexander Graf To: QEMU Developers Subject: [PATCH v10 03/10] hvf: Introduce hvf_arch_init() callback Date: Mon, 13 Sep 2021 14:08:35 +0200 Message-Id: <20210913120842.62116-4-agraf@csgraf.de> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20210913120842.62116-1-agraf@csgraf.de> References: <20210913120842.62116-1-agraf@csgraf.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=85.25.223.15; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , Sergio Lopez , Peter Collingbourne , Richard Henderson , Cameron Esfahani , Roman Bolshakov , qemu-arm , Frank Yang , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: CBajdN4pgvl7 We will need to install a migration helper for the ARM hvf backend. Let's introduce an arch callback for the overall hvf init chain to do so. Signed-off-by: Alexander Graf --- accel/hvf/hvf-accel-ops.c | 3 ++- include/sysemu/hvf_int.h | 1 + target/i386/hvf/hvf.c | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 71cc2fa70f..65d431868f 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -324,7 +324,8 @@ static int hvf_accel_init(MachineState *ms) hvf_state = s; memory_listener_register(&hvf_memory_listener, &address_space_memory); - return 0; + + return hvf_arch_init(); } static void hvf_accel_class_init(ObjectClass *oc, void *data) diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h index 8b66a4e7d0..0466106d16 100644 --- a/include/sysemu/hvf_int.h +++ b/include/sysemu/hvf_int.h @@ -48,6 +48,7 @@ struct hvf_vcpu_state { }; void assert_hvf_ok(hv_return_t ret); +int hvf_arch_init(void); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); int hvf_vcpu_exec(CPUState *); diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 79ba4ed93a..abef24a9c8 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -206,6 +206,11 @@ static inline bool apic_bus_freq_is_known(CPUX86State *env) return env->apic_bus_freq != 0; } +int hvf_arch_init(void) +{ + return 0; +} + int hvf_arch_init_vcpu(CPUState *cpu) { X86CPU *x86cpu = X86_CPU(cpu); -- 2.30.1 (Apple Git-130)