From patchwork Fri Mar 7 18:03:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 871228 Delivered-To: patch@linaro.org Received: by 2002:a5d:64c8:0:b0:38f:210b:807b with SMTP id f8csp895761wri; Fri, 7 Mar 2025 10:07:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVY/9TcVuAwobHXQxIXnRdKJASG8GZ353SaGGRzFPEhtN21tewEA60NGUH7OVMRu1XsM3/ofg==@linaro.org X-Google-Smtp-Source: AGHT+IHa62gAGepUDPR6GaP66+sidb9IwMkuHspz6j5m8vf7O38GDZUMBUOs940zOtFcTP+wwJCt X-Received: by 2002:a05:620a:601c:b0:7c3:d17b:cce1 with SMTP id af79cd13be357-7c4e619fab9mr679785685a.45.1741370865512; Fri, 07 Mar 2025 10:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741370865; cv=none; d=google.com; s=arc-20240605; b=O+qglm1tr4pqrPz8IjB4xzoM3XyupJxywZkX8LSVT9xq5lNIPVEbN8+oEW5qdiXOwT sYcawOxyyOQK/q0fRD5J296gTjbFRPIJrFRzim4xJvVOMJJGIMcqj43Imxlk98joR3Fc PxdI5CJ3zGkvC/EI7zVj64EC6T624797Y06GecKY/mHxWWpy2o36CVID9s9T1OszqOfU 0F9TV1SliNcn/tQwaXhe1L/7EB7fMVviixejrRvw5TSG/W5CtUxUpUIpzImo3mMFAJUD cI3QcT+NtgTYnLvcXBmgUQJpohdaOPL/lzbXQ+mXPdeMJunweaujB2hjkYIi9y7f5OvD uV5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=Zein7nNBqGkN3Vk6l0GAK1eJKKbYG2EwAlAfLaPQUy0=; fh=ZyzqLhNGJAXkYZjVqygzIY1NON/Kumlz+Vm/jUj6bQE=; b=C8jdvaQMRUMvmKnUCHWalQAERXgR+OCndEnP8Pp6M2Uh/0b2wdEcse4/FXMlp52S3k 6BbLTJXHRi6PJFK1aggEqfnHIldprm9eCPwBZxH4cCghWlBuTnztJEaMQgfgT6//kBPc Q4aOaHBFKNyXyNSwPSXsjLpdHZHOd+IKLuKyccvsmRkI9wM1Hb7ampfsMi8nhTQHJFAQ fbg0lWBDt7Jb1mYHA4uAaQBbogLuGSxHrfHJ0EgW3u6/NSO5rAahuPcQHmVmFX5z7WmS wzspJ+BCaXY9APDiSKamzljeCBlQKvppokpVMnnbO87Mwi5rSq1Z/NYz+V3e1oqjYZWJ AT9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LS922t0g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c3e536f503si385903685a.193.2025.03.07.10.07.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Mar 2025 10:07:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LS922t0g; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqc3i-00046f-G0; Fri, 07 Mar 2025 13:04:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqc3g-00044U-Q0 for qemu-devel@nongnu.org; Fri, 07 Mar 2025 13:04:28 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqc3e-0002EX-71 for qemu-devel@nongnu.org; Fri, 07 Mar 2025 13:04:28 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43bc31227ecso12605835e9.1 for ; Fri, 07 Mar 2025 10:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741370664; x=1741975464; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zein7nNBqGkN3Vk6l0GAK1eJKKbYG2EwAlAfLaPQUy0=; b=LS922t0gmmWjeFetMZ/iHRNHCQhkAsBj3pHY0BSTtFhXbpQH4LsMEljxskNVtCiYmx NZANlVemkIIA/kUoqjwHl8jF+/jHQSDdFo7QTlTh1Pi73BH2WRgSCqy04yz9S51w0VPN AuSn7Eb+oMues7cqMl+VuyqXUN5rqjBZ4LlrU0kYjJP2PAkXBA4j8OHiyL/Vm2I6BzOe 3aWWvbUctrWUM6a6zjNZSsCyp4rF+ya/WE2McL+wKDkt3fwkhkZaSsrTwA3MM7dm+5ZE A6Ju+pnQkUzcDybALlenSAxf0FbGESIzTCbnudNNzVnZa5OTHo3eIz7egONcyFh9h//A mJ0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741370664; x=1741975464; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zein7nNBqGkN3Vk6l0GAK1eJKKbYG2EwAlAfLaPQUy0=; b=VEasGRbWCpI8ocllOiNOs17pGIaRkAhObY0qp1XQA8uD+xQ/JrwdBcMYgMb6f8XTwM rEdKO5dsvn838dNXB/idfcgdmrzX141K8aaq0vCVVBxJHG1kgz8dU8Jz3ph9Yqa1mMR5 PnjFbcdRCBZWioy/phrhKwINsL5rfCjSIyZijjNd+f9cuEu/67LINgRPxGNJIxcmM/sb iH4rOcf/f0RurSpJRj9iO9IWRYDzmvohp8muK8jxvYPPjDUvwEASoobOriHFKWeLYmJB NmrDWjdAExD7WIrCiwElNX8d/4b+UHeYGDKAUHI0ly2zIfZ435nDDbRGV0blTQafAU4u VCcg== X-Gm-Message-State: AOJu0YxvuqW1IFaAnIBWxaviF8O/qas/KIYRxUAkk2YMP3MTOry8luQa hMQXjnCO+ClkU4SU2Dn1eqydNKlbAUsqezLHBWRBtBOVXI/kciKzaQ6DEnkva+ELlVq1DCz23it CnxU= X-Gm-Gg: ASbGnctdZK9E+YmKnQ4rGOfZ5w1zuAFQgxnv7SmvKu8kqCzXi+T7HhoOtYqnRYVyRgl 7eohGp+SzURLfqZu6NRnCzAALKeOESHF36m3IxSyJP2IPORV0LNW09VhShyNbxUHDlxAr9qD7WJ juadj1rAy3cusPpB7PX862gnGByIy2Vwr2LqSMF8m8W5yRWsnyYTgDua75Hee/kyKbSt9g4vWBk /sYv7PT4K7sth7sT2y5lhx4FXbUrsXTiwJoGkiKfWjmNu4gneY6eUyJmoIJemuqbraNDSekZMDC TuzipLNnj4uoTAI5wu0qz2BGN+2YvAY3uMaW5QguVwvmUCrsATbfr4MTRgCKkahOkJU/dY+iLr2 LTvTTMRak4d1jPUJCNBo= X-Received: by 2002:a05:600c:6d8e:b0:43b:cc3c:60ca with SMTP id 5b1f17b1804b1-43c5a631736mr27612245e9.21.1741370663562; Fri, 07 Mar 2025 10:04:23 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bdd8da097sm60151705e9.17.2025.03.07.10.04.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 07 Mar 2025 10:04:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Igor Mammedov , qemu-ppc@nongnu.org, Thomas Huth , Richard Henderson , Tony Krowiak , Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , kvm@vger.kernel.org, Yi Liu , Paolo Bonzini , Zhenzhong Duan , Matthew Rosato , Eric Farman , Peter Xu , Pierrick Bouvier , Daniel Henrique Barboza , Eric Auger , qemu-s390x@nongnu.org, Jason Herne , =?utf-8?q?C=C3=A9dric_Le_Goater?= , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Harsh Prateek Bora , Nicholas Piggin , Halil Pasic , Christian Borntraeger Subject: [PATCH 08/14] system/kvm: Expose kvm_irqchip_[add, remove]_change_notifier() Date: Fri, 7 Mar 2025 19:03:31 +0100 Message-ID: <20250307180337.14811-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250307180337.14811-1-philmd@linaro.org> References: <20250307180337.14811-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Currently kvm_irqchip_add_irqfd_notifier() and kvm_irqchip_remove_irqfd_notifier() are only declared on target specific code. There is not particular reason to, as their prototypes don't use anything target related. Move their declaration with common prototypes, and implement their stub. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- include/system/kvm.h | 8 ++++---- accel/stubs/kvm-stub.c | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index ab17c09a551..75673fb794e 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -412,10 +412,6 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg); void kvm_irqchip_add_irq_route(KVMState *s, int gsi, int irqchip, int pin); -void kvm_irqchip_add_change_notifier(Notifier *n); -void kvm_irqchip_remove_change_notifier(Notifier *n); -void kvm_irqchip_change_notify(void); - struct kvm_guest_debug; struct kvm_debug_exit_arch; @@ -517,6 +513,10 @@ void kvm_irqchip_release_virq(KVMState *s, int virq); void kvm_add_routing_entry(KVMState *s, struct kvm_irq_routing_entry *entry); +void kvm_irqchip_add_change_notifier(Notifier *n); +void kvm_irqchip_remove_change_notifier(Notifier *n); +void kvm_irqchip_change_notify(void); + int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n, EventNotifier *rn, int virq); int kvm_irqchip_remove_irqfd_notifier_gsi(KVMState *s, EventNotifier *n, diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index ecfd7636f5f..a305b33d84d 100644 --- a/accel/stubs/kvm-stub.c +++ b/accel/stubs/kvm-stub.c @@ -83,6 +83,18 @@ void kvm_irqchip_change_notify(void) { } +int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, + EventNotifier *rn, qemu_irq irq) +{ + return -ENOSYS; +} + +int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, + qemu_irq irq) +{ + return -ENOSYS; +} + int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n, EventNotifier *rn, int virq) {