From mboxrd@z Thu Jan 1 00:00:00 1970 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.3 required=3.0 tests=BAYES_00, 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 34F35C433E2 for ; Mon, 14 Sep 2020 14:17:39 +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 EA6272074B for ; Mon, 14 Sep 2020 14:17:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA6272074B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com 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 1kHpIG-0002iW-Pp; Mon, 14 Sep 2020 14:17:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHpIE-0002iR-Vl for xen-devel@lists.xenproject.org; Mon, 14 Sep 2020 14:17:19 +0000 X-Inumbo-ID: b84e0026-90f8-4856-b39c-29f4dc3737e3 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b84e0026-90f8-4856-b39c-29f4dc3737e3; Mon, 14 Sep 2020 14:17:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3DCE4AE17; Mon, 14 Sep 2020 14:17:32 +0000 (UTC) Subject: Re: [PATCH V1 02/16] xen/ioreq: Make x86's IOREQ feature common To: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org, Oleksandr Tyshchenko , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Paul Durrant , Jun Nakajima , Kevin Tian , Tim Deegan , Julien Grall References: <1599769330-17656-1-git-send-email-olekstysh@gmail.com> <1599769330-17656-3-git-send-email-olekstysh@gmail.com> From: Jan Beulich Message-ID: <7de88222-1a45-7bff-0b45-95f76b4ec019@suse.com> Date: Mon, 14 Sep 2020 16:17:14 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1599769330-17656-3-git-send-email-olekstysh@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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 10.09.2020 22:21, Oleksandr Tyshchenko wrote: > --- > MAINTAINERS | 8 +- > xen/arch/x86/Kconfig | 1 + > xen/arch/x86/hvm/dm.c | 2 +- > xen/arch/x86/hvm/emulate.c | 2 +- > xen/arch/x86/hvm/hvm.c | 2 +- > xen/arch/x86/hvm/io.c | 2 +- > xen/arch/x86/hvm/ioreq.c | 1425 +-------------------------------------- > xen/arch/x86/hvm/stdvga.c | 2 +- > xen/arch/x86/hvm/vmx/vvmx.c | 3 +- > xen/arch/x86/mm.c | 2 +- > xen/arch/x86/mm/shadow/common.c | 2 +- > xen/common/Kconfig | 3 + > xen/common/Makefile | 1 + > xen/common/ioreq.c | 1410 ++++++++++++++++++++++++++++++++++++++ This suggests it was almost the entire file which got moved. It would be really nice if you could convince git to show the diff here, rather than removal and addition of 1400 lines. Additionally I wonder whether what's left in the original file wouldn't better become inline functions now. If this was done in the previous patch, the change would be truly a rename then, I think. > --- a/xen/include/asm-x86/hvm/ioreq.h > +++ b/xen/include/asm-x86/hvm/ioreq.h > @@ -19,41 +19,12 @@ > #ifndef __ASM_X86_HVM_IOREQ_H__ > #define __ASM_X86_HVM_IOREQ_H__ > > -bool hvm_io_pending(struct vcpu *v); > -bool handle_hvm_io_completion(struct vcpu *v); > -bool is_ioreq_server_page(struct domain *d, const struct page_info *page); > +#include > +#include > +#include Are all three really needed here? Especially the last one strikes me as odd. > --- /dev/null > +++ b/xen/include/xen/ioreq.h > @@ -0,0 +1,82 @@ > +/* > + * ioreq.h: Hardware virtual machine assist interface definitions. > + * > + * Copyright (c) 2016 Citrix Systems Inc. > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along with > + * this program; If not, see . > + */ > + > +#ifndef __IOREQ_H__ > +#define __IOREQ_H__ __XEN_IOREQ_H__ please. > +#include > + > +#include Is this include really needed here (i.e. by the code further down in the file, and hence by everyone including this header), or rather just in a few specific .c files? > +#define GET_IOREQ_SERVER(d, id) \ > + (d)->arch.hvm.ioreq_server.server[id] arch.hvm.* feels like a layering violation when used in this header. Jan