Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1515EC43467 for ; Thu, 15 Oct 2020 16:45:20 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FB4F22255 for ; Thu, 15 Oct 2020 16:45:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V4XLO+24" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FB4F22255 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.7573.19936 (Exim 4.92) (envelope-from ) id 1kT6NK-00058e-NI; Thu, 15 Oct 2020 16:45:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 7573.19936; Thu, 15 Oct 2020 16:45:10 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kT6NK-00058T-Jj; Thu, 15 Oct 2020 16:45:10 +0000 Received: by outflank-mailman (input) for mailman id 7573; Thu, 15 Oct 2020 16:45:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kT6NK-0004yr-5E for xen-devel@lists.xenproject.org; Thu, 15 Oct 2020 16:45:10 +0000 Received: from mail-lf1-x144.google.com (unknown [2a00:1450:4864:20::144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6ab12fba-4c45-497b-966b-2f9e79aa024b; Thu, 15 Oct 2020 16:44:57 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id l2so4403908lfk.0 for ; Thu, 15 Oct 2020 09:44:57 -0700 (PDT) Received: from otyshchenko.www.tendawifi.com ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id v13sm1482495ljh.66.2020.10.15.09.44.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 09:44:55 -0700 (PDT) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kT6NK-0004yr-5E for xen-devel@lists.xenproject.org; Thu, 15 Oct 2020 16:45:10 +0000 X-Inumbo-ID: 6ab12fba-4c45-497b-966b-2f9e79aa024b Received: from mail-lf1-x144.google.com (unknown [2a00:1450:4864:20::144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6ab12fba-4c45-497b-966b-2f9e79aa024b; Thu, 15 Oct 2020 16:44:57 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id l2so4403908lfk.0 for ; Thu, 15 Oct 2020 09:44:57 -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; bh=ttyepk04DroNuuyrE7kUju7fxJWgSwghlPrbVPtWZwk=; b=V4XLO+24Y+705cePezQYGyFCz4z/qSTZsDUC1r3kjVWfPe15UvtNa51bdKnC5PWUEd HuWtcD7Hps6VST0HuSisyxAjgQjlvzRPCctuFl93LA8p6I/81eHSCyWXKUEdAHbZolUs +ojIFwxgYDR3sBsjU3H1hJbX/u9rWVuEzYb2lZwKHxjwJzY3Q1xwdQV+FkdkuSbk+FSo nyFAydRwuly3soU+DooQ5MflsgYO9bk6TX1huLRcMR1fxj9iIbd9I8bBnphK9KRGMSfE HlzC6xNxadcAs1+QR9E3UVcbKcP+f9VqklUmddNeKPQMjaZqnedTzuiuRKDfmP6rbM+A P36w== 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; bh=ttyepk04DroNuuyrE7kUju7fxJWgSwghlPrbVPtWZwk=; b=Jpl4B48GkjVE8iMaD/H9eTnAnGYv4Qf8znanKam6CE1tmUU7z+nV1nviQJkiqBSldR J2nOkAdu9gsFdIBDIO8fce4HD1DToEd3FW8ApzmO5SWss8zNUk1NhKCKr/EcUltr0+qj 5SSGf0vNjUMUGQI/Xbxh36zpGSSqWbh2667ZoB5bNooIAMjlYTBlITVOoxb2Urxm69Dp ely3lOh3dAvwGHI+I0M1jLbbe7ea1jUEX06uEI3q9uNSOTOGuTnoSZcuC69MF8+4OELy mqU3G3SFMeleSltaGmACBA3bKxeZTsK6QSnfK4kN7hKevk9iyeaZfH7n9q7M3dz0XgJ/ EAug== X-Gm-Message-State: AOAM531NmNYkUloCXs+WXtlPrjJKR0LP+ESzw2UA1DsYSE0WIn6Cn+Qr qUHnpL6FvSHPPU4h6sNygRlDY/ncexyzHw== X-Google-Smtp-Source: ABdhPJz/slHPdEYDiEnJBk3d7otX848eBJ8VApE6o12yUQc60uWrA2Q3qdoeaPfm/qaplDbFmlu88w== X-Received: by 2002:a19:c857:: with SMTP id y84mr1338613lff.432.1602780296167; Thu, 15 Oct 2020 09:44:56 -0700 (PDT) Received: from otyshchenko.www.tendawifi.com ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id v13sm1482495ljh.66.2020.10.15.09.44.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 09:44:55 -0700 (PDT) From: Oleksandr Tyshchenko To: xen-devel@lists.xenproject.org Cc: Oleksandr Tyshchenko , Paul Durrant , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Julien Grall , Stefano Stabellini , Julien Grall Subject: [PATCH V2 04/23] xen/ioreq: Provide alias for the handle_mmio() Date: Thu, 15 Oct 2020 19:44:15 +0300 Message-Id: <1602780274-29141-5-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1602780274-29141-1-git-send-email-olekstysh@gmail.com> References: <1602780274-29141-1-git-send-email-olekstysh@gmail.com> From: Oleksandr Tyshchenko The IOREQ is a common feature now and Arm will have its own implementation. But the name of the function is pretty generic and can be confusing on Arm (we already have a try_handle_mmio()). In order not to rename the function (which is used for a varying set of purposes on x86) globally and get non-confusing variant on Arm provide an alias ioreq_complete_mmio() to be used on common and Arm code. Signed-off-by: Oleksandr Tyshchenko CC: Julien Grall Acked-by: Jan Beulich --- Please note, this is a split/cleanup/hardening of Julien's PoC: "Add support for Guest IO forwarding to a device emulator" Changes RFC -> V1: - new patch Changes V1 -> V2: - remove "handle" - add Jan's A-b --- xen/common/ioreq.c | 2 +- xen/include/asm-x86/hvm/ioreq.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c index c89df7a..29ad48e 100644 --- a/xen/common/ioreq.c +++ b/xen/common/ioreq.c @@ -200,7 +200,7 @@ bool handle_hvm_io_completion(struct vcpu *v) break; case HVMIO_mmio_completion: - return handle_mmio(); + return ioreq_complete_mmio(); case HVMIO_pio_completion: return handle_pio(vio->io_req.addr, vio->io_req.size, diff --git a/xen/include/asm-x86/hvm/ioreq.h b/xen/include/asm-x86/hvm/ioreq.h index a3d8faa..a147856 100644 --- a/xen/include/asm-x86/hvm/ioreq.h +++ b/xen/include/asm-x86/hvm/ioreq.h @@ -181,6 +181,8 @@ static inline bool arch_hvm_ioreq_destroy(struct domain *d) #define IOREQ_STATUS_UNHANDLED X86EMUL_UNHANDLEABLE #define IOREQ_STATUS_RETRY X86EMUL_RETRY +#define ioreq_complete_mmio handle_mmio + #endif /* __ASM_X86_HVM_IOREQ_H__ */ /* -- 2.7.4