From nobody Tue Feb 10 13:18:03 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610472930; cv=none; d=zohomail.com; s=zohoarc; b=Htz5E0i+Vd3+NZadm91v4Nw22Ne3xViQ8+TbMsliu5vg9iiOyMxTU42inX572Z03YFTS5thhwlKIrwfDMpKSFk/aL8bVsqdQqRSLrk1lgHXLAftCJBnW/vZFM15XhaQ7dZofE995HUmdDQ7aRWT2Z8hdT9Ywl8Jyb86XHUYMfKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610472930; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y2D++BW35zFmYTheLMBecjwElXG7eVrAjCSmYiIui/g=; b=Vj811jnWQP2aMYjY2xyda+xKo7lBcM+BAQ2W5xRzm2GYbTjtmvlDgH9O360tXJQtaN4/F2CrSDMOui/2mfkJ6MU7NpZj2ePhmsJpnKfQdqVywfwq1amTeJhdzXuBfYPXBNs9mMWGn102/8HYYZGIONRdNcTJCHimQOxkJsbU9yU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16104729301799.52487673970063; Tue, 12 Jan 2021 09:35:30 -0800 (PST) Received: from localhost ([::1]:39152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzNZm-0001A8-GU for importer@patchew.org; Tue, 12 Jan 2021 12:35:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzNFz-0003YN-1M for qemu-devel@nongnu.org; Tue, 12 Jan 2021 12:15:00 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:40555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzNFw-0004qU-BE for qemu-devel@nongnu.org; Tue, 12 Jan 2021 12:14:58 -0500 Received: by mail-ej1-x631.google.com with SMTP id f4so3497943ejx.7 for ; Tue, 12 Jan 2021 09:14:55 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id k22sm397302edv.33.2021.01.12.09.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 09:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y2D++BW35zFmYTheLMBecjwElXG7eVrAjCSmYiIui/g=; b=Vw0lKlQmWdjp4KavGpFzJiWQDuWTw7UhZ4Nyg/D/QLAeS2VlhMbqDGt3AhvFzOldWe 5HC4gXTf+viUesuCLCXbcblzklIwQkpXyTG2Rnjr8l7JeUC8PHWVTtUJVS6GnXeGsSaC 5j7iMCEEO3z+Hz+EwNK7AxB+MNfCd6VsdOzfz+xY600rGG4/ecmwYoE4g+E+RI4KPFOr G9hS/SBw2sGUH+s6fs29usks7jNYA2l/uJcxLIuFOVgZBozoRgbhq4wN6yPUnKf+vf9X yIGxkQe2d8C1LikWXwcVbBMbD/AqY/bZR0prawRTzbcgO4fixGB0+IPF0poNuHhXIAAX L32w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=y2D++BW35zFmYTheLMBecjwElXG7eVrAjCSmYiIui/g=; b=X+pRjVIH9siTzcvFUBc9qzjZrUKvpRnUW+YlX6gHhr6zndk4UH8D10xLm1L9UWaJSX G28lk69T4prR1RumZbiRALkMUQDX432aamvK2egZdQksGwrUuE2K+lTBDPuR4/knMaYm FbfBVkP6QRKQmYAoYbc9lr/zQ6ZVovLFS2jh1ryfup8H6pTB5t2uVZnUXleinxwaV7jP g23MIp9dZdVgSRLLiWtTg1k34AH6KPvwFelAY8Npf0l71vaDtoma6/ShhcHdgGOwOMt3 zPYa+QkWdh3A/odMI8x+h8vpltvROzemAqMdUk7G3WmTRnnbMhBUWuhRMzcuni+0Ap5x OUwA== X-Gm-Message-State: AOAM53219ZH9O/M5WzCC2UQMamk5zal9kWp6UhCkPzDcGjehh2XLKCvO SIiSdcdx5jCAnm9zCf4WNPJCIDnHaFAKUQ== X-Google-Smtp-Source: ABdhPJys8R/jCRgG2xnZsMexGN5TUrIDvaw+Zr3gSy0rvQKGxqE7+ht7ftp4R5Uuo4YrYOolUI/6/w== X-Received: by 2002:a17:906:b24c:: with SMTP id ce12mr3843435ejb.89.1610471695106; Tue, 12 Jan 2021 09:14:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/20] whpx: move internal definitions to whpx-internal.h Date: Tue, 12 Jan 2021 18:14:33 +0100 Message-Id: <20210112171450.791427-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210112171450.791427-1-pbonzini@redhat.com> References: <20210112171450.791427-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Only leave the external interface in sysemu/whpx.h. whpx_apic_in_platform is moved to a .c file because it needs whpx_state. Reported-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201219090637.1700900-3-pbonzini@redhat.com> --- include/sysemu/whpx.h | 22 +--------------------- target/i386/whpx/whpx-all.c | 4 ++++ target/i386/whpx/whpx-internal.h | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h index 9346fd92e9..8ca1c1c4ac 100644 --- a/include/sysemu/whpx.h +++ b/include/sysemu/whpx.h @@ -15,28 +15,8 @@ =20 #ifdef CONFIG_WHPX =20 -#include "whp-dispatch.h" - -struct whpx_state { - uint64_t mem_quota; - WHV_PARTITION_HANDLE partition; - bool kernel_irqchip_allowed; - bool kernel_irqchip_required; - bool apic_in_platform; -}; - -struct whpx_lapic_state { - struct { - uint32_t data; - uint32_t padding[3]; - } fields[256]; -}; - -extern struct whpx_state whpx_global; int whpx_enabled(void); - -void whpx_apic_get(DeviceState *s); -#define whpx_apic_in_platform() (whpx_global.apic_in_platform) +bool whpx_apic_in_platform(void); =20 #else /* CONFIG_WHPX */ =20 diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 12f79e2cd6..985ceba8f8 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1866,6 +1866,10 @@ int whpx_enabled(void) return whpx_allowed; } =20 +bool whpx_apic_in_platform(void) { + return whpx_global.apic_in_platform; +} + static void whpx_accel_class_init(ObjectClass *oc, void *data) { AccelClass *ac =3D ACCEL_CLASS(oc); diff --git a/target/i386/whpx/whpx-internal.h b/target/i386/whpx/whpx-inter= nal.h index e0a9ea1dce..8cfaaef141 100644 --- a/target/i386/whpx/whpx-internal.h +++ b/target/i386/whpx/whpx-internal.h @@ -5,6 +5,24 @@ #include #include =20 +struct whpx_state { + uint64_t mem_quota; + WHV_PARTITION_HANDLE partition; + bool kernel_irqchip_allowed; + bool kernel_irqchip_required; + bool apic_in_platform; +}; + +struct whpx_lapic_state { + struct { + uint32_t data; + uint32_t padding[3]; + } fields[256]; +}; + +extern struct whpx_state whpx_global; +void whpx_apic_get(DeviceState *s); + #define WHV_E_UNKNOWN_CAPABILITY 0x80370300L =20 #define LIST_WINHVPLATFORM_FUNCTIONS(X) \ --=20 2.29.2