Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp432697rdb; Thu, 5 Oct 2023 09:58:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUKonemiitut9n086Q6NtS5e/QH8mwZ+lGoV4LIZWecmxVAoJO7rKMqdZk2BchsYk7djKL X-Received: by 2002:a05:6358:5924:b0:135:24ed:5106 with SMTP id g36-20020a056358592400b0013524ed5106mr4516340rwf.9.1696525132865; Thu, 05 Oct 2023 09:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696525132; cv=none; d=google.com; s=arc-20160816; b=RPp+4OkIdkJTJNr475xoh3puBYJoMFsrHUlBZ6b1JIIxItKDEd3BoqbgHzaulwg1Cb MacbLdUge0hVXKZhACMYN1K+DHEm8UhVr1gO3cG6km1oLyEBgZYFtjviBY90sGaM1wbM 8gR1AgAxtb8oe2lyoPQH2v/SjnL9+IWNObgOCwr84JJZjrI8xBdhEHoxdmT9MrfFgACo LQKt29NJQszv16VD/Mp6ozsYClwVy/TjddG55rrWZMOneGQ1Q9Dhl/2PNP9p/Re/6OZJ 8O3B8UX+CWLkyvGj5nTPeeJeoDhXCdIYdhmCrpHSzwyBy9G26WxsV98wp+5DzWbixTtI 16yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KWho0skhSMaRa5vCqQiBImFsTWWtuPWOPJgKv2q/8Qk=; fh=BoylY5xwNogZ1c5ouUTs5nTaFA8PMSlXV/3kNFTMtmQ=; b=0xPUXm5+7lF0jKEHH2a81oNXFeZ9jnTu9XG76acAJtlFxLgRdJP9pIH554F+KQXCgG vVqSKi9nCTbwsyHaVbehN8PyJa1oUaPinRE8N4a9Yh16BWvT29dZGTzN3tf7bwt0dpJN /SQbOKnrqnAtHdcv1xnhylltNh0/4gZDd2cqs8FfPrRZRTwCUNaAiKmqzN1pcPbHiIri htU7HbeQRPa9X/oFSVBJu8zpKJAgu2LQ74xs8nIVpH0x9ibbjaYZKQcwMsoY0z8qeBcY BmXnbMgBwiMtXj4WGxfIBfgulO1ZDovSLp0LREhrEunkZptusRS7gv0oBz8oIeu31U8Y meBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hA/xL0iI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id m27-20020a63711b000000b005893a7c43a4si1712305pgc.320.2023.10.05.09.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hA/xL0iI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 43C26823C11F; Thu, 5 Oct 2023 09:58:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234179AbjJEQcw (ORCPT + 99 others); Thu, 5 Oct 2023 12:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjJEQcR (ORCPT ); Thu, 5 Oct 2023 12:32:17 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA9020E43 for ; Thu, 5 Oct 2023 03:25:18 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-691c05bc5aaso681890b3a.2 for ; Thu, 05 Oct 2023 03:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696501518; x=1697106318; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KWho0skhSMaRa5vCqQiBImFsTWWtuPWOPJgKv2q/8Qk=; b=hA/xL0iIrvnt1RXTv9JK4ZdJMFI6RgChT6ejXg3G9b60q1J+YKdAXGNxRXUBVp2AVo em2EW8vY2lmNS7y9/TTh3rMf4pgX56mxHx1pSSjGhVszv9ahzpYPCWIASXuQBThJGF1d 63/4EP+1XG5v6AkUeS8esOukhGJLTYA+8DBN+KuInN0frNzetk2Hc08Dnu9bQ19fmzYq CoLDmG5qbT0RuTMD2ite8F/3BsUQoer8C+M/oTwcMMVhf63XhBasUpq+T7+hpME6qQMG 5q50qE/U7MNiPZC5WBcd3TodQS+ot10kohjx0erimOP3gtRgg+MOoYSTJ6mH57QhoQ2p kL7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696501518; x=1697106318; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KWho0skhSMaRa5vCqQiBImFsTWWtuPWOPJgKv2q/8Qk=; b=AOzGtuGcAidd48Rap9HLhg+URotO8WMSDzQA3U3e6AOd58BbbgpFkSugxn4VQserik YBmgcbRd1HDA/+1DLxnB46HbtAI0Qhe8fTVJVcV8RYuNhoenc0fPHUppEZmvb+gxcMND Zsbi4++LcI2pKtHPTYMroyhf6ZJS7cW/913B7/p66BjhXqzv4w/x1q9TGi6k2i6Pho3g QspBnlJx8RXqe0kK1QCMlZM82uIhXlZ+DP1IggESAQHDGXqtdk3qPvSR0a79UA4Ty2o3 S/sj4emRf5F2EmEhnBLBYhf915SWtjAmA9HuTaIU/IeQDn/ioNKKbwRjsAAfsHKQFe6i zK7A== X-Gm-Message-State: AOJu0YxNeqSjLHip4PZnXdYuWtNvPKubSP3jRIcWaxPIQm+2X3pQQztA vhXyqeFmGvXz/UZs3ghdhwuLAg== X-Received: by 2002:a05:6a20:3d1b:b0:12e:4d86:c017 with SMTP id y27-20020a056a203d1b00b0012e4d86c017mr5640315pzi.10.1696501517838; Thu, 05 Oct 2023 03:25:17 -0700 (PDT) Received: from localhost ([122.172.81.92]) by smtp.gmail.com with ESMTPSA id j4-20020a170902c3c400b001c61bde04a7sm1269088plj.276.2023.10.05.03.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 03:25:17 -0700 (PDT) From: Viresh Kumar To: Juergen Gross , Oleksandr Tyshchenko , Stefano Stabellini Cc: Viresh Kumar , Vincent Guittot , =?UTF-8?q?Alex=20Benn=C3=A9e?= , stratos-dev@op-lists.linaro.org, Erik Schilling , Manos Pitsidianakis , Mathieu Poirier , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [PATCH V2 0/2] xen: privcmd: Add ioeventfd support Date: Thu, 5 Oct 2023 15:55:10 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:58:49 -0700 (PDT) Hello, Now that irqfd support (backend to guest interrupt) is already merged, this series solves the other part of the problem, i.e. ioeventfd (guest to backend interrupt). More details inside the commits. -- Viresh V1->V2: - Increment irq_info refcnt only for valid info. - Use u64 type for addr. - Add comments for use of barriers. - Use spin lock instead of mutex as we need to use them in irq handler. - Add a warning when kioreq is getting freed and ioeventfds list isn't empty. - Use struct_size(). - Validate number of vcpus as well. Viresh Kumar (2): xen: evtchn: Allow shared registration of IRQ handers xen: privcmd: Add support for ioeventfd drivers/xen/Kconfig | 8 +- drivers/xen/events/events_base.c | 3 +- drivers/xen/evtchn.c | 2 +- drivers/xen/privcmd.c | 398 +++++++++++++++++++++++++++++- include/uapi/xen/privcmd.h | 18 ++ include/xen/interface/hvm/ioreq.h | 51 ++++ 6 files changed, 472 insertions(+), 8 deletions(-) create mode 100644 include/xen/interface/hvm/ioreq.h -- 2.31.1.272.g89b43f80a514