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=-5.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 3EBC1C433E1 for ; Thu, 13 Aug 2020 20:17:23 +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 0FFBA20791 for ; Thu, 13 Aug 2020 20:17:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="NdgppCtJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FFBA20791 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k6JeZ-00035A-0N; Thu, 13 Aug 2020 20:16:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k6JeW-000355-V9 for xen-devel@lists.xenproject.org; Thu, 13 Aug 2020 20:16:46 +0000 X-Inumbo-ID: 5cf6f435-22fe-442b-bd5f-4da532392567 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5cf6f435-22fe-442b-bd5f-4da532392567; Thu, 13 Aug 2020 20:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=n4atXAS6AvGuuBYNrAJ+ohIcUP78yGukOZPCXu1prXw=; b=NdgppCtJklOT0te3Vge9u1bw1h 5bvQFbS52PXB0QVnPQT9CyaaugjPeL5aR85KkroqLuG7uNx5aWwK0V+oT2V5LacJNB3M0bYhA6BCe 99zlzeWKLvDNOqzagkRRCxX9nwCJghcaRRMuBkGtyCWqiwLRIT/Oy5EKJvTCMzo/z5e4=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k6JeH-0002ON-Ti; Thu, 13 Aug 2020 20:16:29 +0000 Received: from [54.239.6.185] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k6JeH-0003E4-IJ; Thu, 13 Aug 2020 20:16:29 +0000 Subject: Re: [RFC PATCH V1 01/12] hvm/ioreq: Make x86's IOREQ feature common To: Stefano Stabellini , Oleksandr Cc: Jan Beulich , paul@xen.org, xen-devel@lists.xenproject.org, 'Oleksandr Tyshchenko' , 'Andrew Cooper' , 'Wei Liu' , =?UTF-8?B?J1JvZ2VyIFBhdSBNb25uw6kn?= , 'George Dunlap' , 'Ian Jackson' , 'Jun Nakajima' , 'Kevin Tian' , 'Tim Deegan' , 'Julien Grall' References: <1596478888-23030-1-git-send-email-olekstysh@gmail.com> <1596478888-23030-2-git-send-email-olekstysh@gmail.com> <000c01d66a33$2bd56510$83802f30$@xen.org> <9f83a7ed-ca97-449f-c7b9-a1140644abe9@gmail.com> <2ab4c567-8efa-1b9d-ab00-4ea7e1ab323e@suse.com> <013b142d-5296-5bbe-7d19-903f59e0c974@gmail.com> <06f78323-b8f5-fd11-486a-437267eccc29@gmail.com> <27513b2b-e59b-d446-7e68-eac4bc503409@gmail.com> <441f4413-b746-035e-948e-da3ff76a9a3b@xen.org> <870b70b2-97da-3b3f-c06d-ffb5479328ac@gmail.com> From: Julien Grall Message-ID: <09cb9fdf-e41e-1fdf-997b-89921d72968b@xen.org> Date: Thu, 13 Aug 2020 21:16:25 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 13/08/2020 00:08, Stefano Stabellini wrote: >>> It is very similar to your second patch with a small change on calling >>> try_handle_mmio from handle_mmio and setting the register there. Do you >>> think that would work? >> If I understood correctly what you had suggested and properly implemented then >> it works, at least I didn't face any issues during testing. >> I think this variant adds some extra operations comparing to the previous one >> (for example an attempt to find a mmio handler at try_handle_mmio). But, if >> you think new variant is cleaner and better represents how the state machine >> should look like, I would be absolutely OK to take this variant for non-RFC >> series. Please note, there was a request to move try_fwd_ioserv() to >> arm/ioreq.c (I am going to move new handle_ioserv() as well). > > Yes, I think this version better represents the state machine, thanks > for looking into it. I think it is good. > > In terms of number of operations, it doesn't look very concerning (in > the sense that it doesn't seem to add that many ops.) However we could > maybe improve it by passing a reference to the right mmio handler from > handle_mmio to try_handle_mmio if we have it. Or maybe we could save a > reference to the mmio handler as part of v->arch.hvm.hvm_io.io_req. There is no MMIO handler for the IOREQ handling. So I am not entirely sure what you are suggesting. Cheers, -- Julien Grall