From nobody Mon Feb 9 10:47:44 2026 Delivered-To: importer@patchew.org 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; 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1585989029; cv=none; d=zohomail.com; s=zohoarc; b=ezNw9GmDrNH7Gpw4hvdEBTbqzKTBkuKJhmLtilKaMvYHhvnyJZU1BFs+9bvBrilB+OGx2+/Pw3yVu3gYcIYjHWRpClfr2HIt6joLnBDAUwghZhcknTY/vcM8S9yPU85JR9ksMzjyKw09mkXqr3G/O0EasIyjH5T7iUfh18gErHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585989029; h=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=ZGszGX7/dlFFly+wjt/H+SDs19eZmIByirBcMM+A3k0=; b=faGfcCvKLchfXadpLd6q4MCnO9LA5tJDsmrENEA3j15MQEqI/HQMY2EXK6Ae5gls1nhuI/ECZKTINudCaeZDDu84sZ1Yab7W2GPdmwh4vjXbu99woUR7w8VmGtjH5Aw4/PSmQbJHeaUTtij47wJZM83klCjaTL0T+djNTVeJFBM= 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 1585989029803211.63101060553834; Sat, 4 Apr 2020 01:30:29 -0700 (PDT) Received: from localhost ([::1]:36530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKeCC-00078J-Bc for importer@patchew.org; Sat, 04 Apr 2020 04:30:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47547) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKeB7-0005jA-38 for qemu-devel@nongnu.org; Sat, 04 Apr 2020 04:29:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKeB6-0001tr-6w for qemu-devel@nongnu.org; Sat, 04 Apr 2020 04:29:21 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54821) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jKeB6-0001t9-1g for qemu-devel@nongnu.org; Sat, 04 Apr 2020 04:29:20 -0400 Received: by mail-wm1-x343.google.com with SMTP id h2so1455966wmb.4 for ; Sat, 04 Apr 2020 01:29:19 -0700 (PDT) Received: from jondnuc.lan (IGLD-84-229-155-40.inter.net.il. [84.229.155.40]) by smtp.gmail.com with ESMTPSA id a10sm15884778wrm.87.2020.04.04.01.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 01:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZGszGX7/dlFFly+wjt/H+SDs19eZmIByirBcMM+A3k0=; b=d98Uhjb/5WsY5PZfure8a9iu/Xrj3F1GYFK4Yzy2YNhLI5mo6MYqW2UpuuLNVnDBud 3JJY9PfS1W/GgFcWg2jZe3gQHUjvgPzNzPnE2gIzGzxEFPO866TTQRIq7X5heUP4L1+5 nuRamnFHJFXb7fQrcTmtayLlkxgzp/aWHY6/3V1cYgk9XjKAoYBLd3/1rONBpjwtIr5N cZ5oGG60OzQwasATotUke8/QkFlghTef+d+UAhZJGE7DFdM4NyG+n97CJzM2d1P2reN3 qMeZodwnuRdGbmyx+Y/pMBUTWkgh8smdLLbTrBIcwQsnEgaScbVErA0vC6yR4ipnnpI0 zNEA== 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=ZGszGX7/dlFFly+wjt/H+SDs19eZmIByirBcMM+A3k0=; b=nWyduu3t+3PhJ2lBAEBaYdedKYUYs+S6WkZiytKuhBn2+NNmVkOvqIOSRQ0ir46bFu oVRhw3Jn2aRVfPZezAxu6R9gCnAG8YMbV0CPLpiIsj32LO8JqjVTBfV2nl+ev/7pWMAG NM/kyXUqaw1Dq6G9QkOkfJw3HGiWI2uqlTM9SuR0eFxzZHkeCNTjJTS/1Diy7QGbOYnc 9PgDfG3zwZrzaUE/GNJfGDekuy1RDbG8xPTB02WJnduuWXURugoxW0RvPExbpn8sHNXl ceppVfg5KgVrnfmIbk06yxMRwkB7F3yjr3mNv6I//a8DPVHKDX/73RZKVmeWrgwDJzOZ RIlw== X-Gm-Message-State: AGi0Puad79yiuEKc4t44vYW+/CQH0fQvs9ejbxuNbjD9hW1GSD4JfX2j dGYtawtI+JHPdkrw2kRXNmS3r8QG+ibOYw== X-Google-Smtp-Source: APiQypLbDr0KzIjLr/in3SPg/3OxM21h1VeFknW1n80N9qiRQyICQUWMrwC8sv/klTQk0o0nwBH1oQ== X-Received: by 2002:a1c:5ac4:: with SMTP id o187mr1529335wmb.79.1585988958774; Sat, 04 Apr 2020 01:29:18 -0700 (PDT) From: Jon Doron To: qemu-devel@nongnu.org Subject: [PATCH v2 1/7] hyperv: expose API to determine if synic is enabled Date: Sat, 4 Apr 2020 11:28:54 +0300 Message-Id: <20200404082900.33711-2-arilou@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200404082900.33711-1-arilou@gmail.com> References: <20200404082900.33711-1-arilou@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 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: mail@maciej.szmigiero.name, eyakovlev@virtuozzo.com, ehabkost@redhat.com, rvkagan@gmail.com, liran.alon@oracle.com, pbonzini@redhat.com, vkuznets@redhat.com, Jon Doron Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jon Doron --- hw/hyperv/hyperv.c | 8 ++++++++ include/hw/hyperv/hyperv.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 8ca3706f5b..ddf4f32c60 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -37,6 +37,13 @@ typedef struct SynICState { #define TYPE_SYNIC "hyperv-synic" #define SYNIC(obj) OBJECT_CHECK(SynICState, (obj), TYPE_SYNIC) =20 +static bool synic_enabled; + +bool hyperv_is_synic_enabled(void) +{ + return synic_enabled; +} + static SynICState *get_synic(CPUState *cs) { return SYNIC(object_resolve_path_component(OBJECT(cs), "synic")); @@ -133,6 +140,7 @@ void hyperv_synic_add(CPUState *cs) object_property_add_child(OBJECT(cs), "synic", obj, &error_abort); object_unref(obj); object_property_set_bool(obj, true, "realized", &error_abort); + synic_enabled =3D true; } =20 void hyperv_synic_reset(CPUState *cs) diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h index 597381cb01..a63ee0003c 100644 --- a/include/hw/hyperv/hyperv.h +++ b/include/hw/hyperv/hyperv.h @@ -79,5 +79,6 @@ void hyperv_synic_add(CPUState *cs); void hyperv_synic_reset(CPUState *cs); void hyperv_synic_update(CPUState *cs, bool enable, hwaddr msg_page_addr, hwaddr event_page_addr); +bool hyperv_is_synic_enabled(void); =20 #endif --=20 2.24.1