From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a19:ad09:0:0:0:0:0 with SMTP id t9csp316300lfc; Wed, 2 Sep 2020 00:55:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIY8P1Rj4nGrxFKSyFJjMQuudpYThHNp6bxC00S7ZUYyvgkk0XGnWNHCQaHJVJVE8w5ds5 X-Received: by 2002:a05:6902:1026:: with SMTP id x6mr8955348ybt.349.1599033305385; Wed, 02 Sep 2020 00:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599033305; cv=none; d=google.com; s=arc-20160816; b=UoX3t/I9KHW99Blro1gEX2u3xsBRFPvnmex0XcEwOkDhUs1XLZ+HX6TH/PMBCCVfaB 83kXG6YrYgkaWgiUp0maZ4lKmbx1JhLOHZl+wvc6eDpfyULe0Nk1GbDB49niM5m6+PP4 FJ0qyHzHuUeYafzIYuM/gC8JyMXHSHEfFc+7XbEyumzVcG98tfnecJCpQ1hMPoHry/2N 7wzQT1/QAuiQjLGulVz62ubWSG/U24hlpJ6Gbnj66+tyHnxXIgMepbZ6ESfVENJ4rZvr zgSoreUSbLJnMKRHXWtbzwEAoVbOHq1YQXtLLNcQSQcWarCF78KQbGivSbQYQoZyWoAB 3hrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:to:from:dkim-signature; bh=yOA20L0iSMPYexLO/OU8ZL9jAdX526i29iU+udPXTyw=; b=QeHkp+QKgQXuzDADanP8ykV2LKyEl+UkBUevnP5CrtPHCWGGqy+tjuCS9g1pjZuriD vGNqE5WR7snpJ/wh6GseauBQrtLLYZB1OOA7hYsDFQSMyw8CA3EFTbfsLi3+3aUnZV5b HHRledYrHqxU7QySPbhMO88J119wAozE2iUx08XOn0mmmpByTSFeac2XgVKPvIPbjMHV C8qG67s8hVz60F8y7rI4QUV+X3jHIT+8tGa+SOz4sUtMB6VIs+haVSY2owxU0A6uMgVk J1w4MzBijjL7NuI4KVlRuGF0wHHSp3j+WfAOmvoIpS1F1SIaL0SctKF5T35lqIYzh9Fl gz8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="g/Ofgd/4"; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s4si3470743ybq.70.2020.09.02.00.55.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Sep 2020 00:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=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=@redhat.com header.s=mimecast20190719 header.b="g/Ofgd/4"; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:45332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDNbk-0004gN-PS for alex.bennee@linaro.org; Wed, 02 Sep 2020 03:55:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDNb6-00046R-Hi for qemu-devel@nongnu.org; Wed, 02 Sep 2020 03:54:24 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:50816 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kDNb5-0008I7-0m for qemu-devel@nongnu.org; Wed, 02 Sep 2020 03:54:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599033262; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yOA20L0iSMPYexLO/OU8ZL9jAdX526i29iU+udPXTyw=; b=g/Ofgd/4CiyvE8WA/ILk+thruCUqzl4IzD6DA/RgdwlBjoDEghi628c2QIjZ+6y1mWGnA5 jFHCIr2WVI+/9vXvybzTy3bJ6GIbz8EmKwg/5XXZMyw6Kzf+IQsDhJyXglvqyrvhtAj9qv LZmnt+vmY7+IW4FthU+0GqHhMUb8s1U= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-RTWhNIoEMXynQBhsFlBDiA-1; Wed, 02 Sep 2020 03:54:20 -0400 X-MC-Unique: RTWhNIoEMXynQBhsFlBDiA-1 Received: by mail-wr1-f71.google.com with SMTP id g6so1632754wrv.3 for ; Wed, 02 Sep 2020 00:54:20 -0700 (PDT) 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:in-reply-to:references :user-agent:reply-to:date:message-id:mime-version :content-transfer-encoding; bh=OjnHSDu0G6t4PQwW9qrNEegf66R8/fX12d8ERs6/4aM=; b=BM/loJ/UoDOdIHl8HY573VNyJKoYXgafYu1aoL2UEd1mKa5dPI9AgqjpWQDzavHLKj jubJzFmqjyBsTsDh+t25EdbJSU/8QBNEyKmi2kOXn6byemeZXB86g9rjhOCGgqCM6h5n ykWzhP96z4y2oyvqnVS+D6LST2NyoVRXihG2RgxAMkvZYCy27ODiQKCEOOsqmpHKdcm0 bnpQWbxODnyrj4TGast4zMsjxL7mhBfqagtj8pQYxlFG48s2kog/SPYyaVeqcsusw5XV Y3Jva8bijy/CvX+ulRH4epItJPKmJ601kRDTWoZiuCDZRUBxORZbe66x/vMTnvrNV2zX kpyw== X-Gm-Message-State: AOAM532C6mvRCOC9PtPawIeAV8cP34RWT4ySL4eMd2u/TQ6UTPa3yZyn QqQ0pb5lVjUJN8tzU4MeOqumGDES7P+rBqP7SPzTKluf2yEUbP9j8w52TaNcBRy90rthmYhXSbM i1zuaLtlpqU20PaE= X-Received: by 2002:a1c:9a8c:: with SMTP id c134mr5252365wme.136.1599033259730; Wed, 02 Sep 2020 00:54:19 -0700 (PDT) X-Received: by 2002:a1c:9a8c:: with SMTP id c134mr5252332wme.136.1599033259472; Wed, 02 Sep 2020 00:54:19 -0700 (PDT) Received: from localhost (trasno.trasno.org. [83.165.45.250]) by smtp.gmail.com with ESMTPSA id c4sm5996242wrp.85.2020.09.02.00.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 00:54:19 -0700 (PDT) From: Juan Quintela To: Eugenio =?utf-8?Q?P=C3=A9rez?= Subject: Re: [RFC v8 2/5] memory: Add IOMMUTLBEvent In-Reply-To: <20200901142608.24481-3-eperezma@redhat.com> ("Eugenio =?utf-8?Q?P=C3=A9rez=22's?= message of "Tue, 1 Sep 2020 16:26:05 +0200") References: <20200901142608.24481-1-eperezma@redhat.com> <20200901142608.24481-3-eperezma@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Wed, 02 Sep 2020 09:54:18 +0200 Message-ID: <87a6y8r4ut.fsf@secure.mitica> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=quintela@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=205.139.110.61; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/02 03:24:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: quintela@redhat.com Cc: Peter Maydell , Aleksandar Rikalo , Yan Zhao , Eduardo Habkost , "Michael S. Tsirkin" , qemu-ppc@nongnu.org, Jason Wang , qemu-devel@nongnu.org, Peter Xu , Eric Auger , qemu-arm@nongnu.org, =?utf-8?Q?Herv=C3=A9?= Poussineau , Avi Kivity , Paolo Bonzini , Richard Henderson , David Gibson Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: QnihCGi2kiHv Eugenio P=C3=A9rez wrote: > This way we can tell between regulars IOMMURLBEntries (entry of IOMMU > hardware) and notifications. > > In the notifications, we set explicitly if it is a MAPs or an UNMAP, > instead of trusting in entry permissions to differenciate them. > > Signed-off-by: Eugenio P=C3=A9rez Reviewed-by: Juan Quintela if you have to respin for whatever other reasons, two suggestions. > @@ -1430,10 +1435,10 @@ static int vtd_dev_to_context_entry(IntelIOMMUSta= te *s, uint8_t bus_num, > return 0; > } > =20 > -static int vtd_sync_shadow_page_hook(IOMMUTLBEntry *entry, > +static int vtd_sync_shadow_page_hook(IOMMUTLBEvent *event, > void *private) > { > - memory_region_notify_iommu((IOMMUMemoryRegion *)private, 0, *entry); > + memory_region_notify_iommu((IOMMUMemoryRegion *)private, 0, *event); I know that it already was there, but if you respin, you can remove the cas= t. > @@ -1281,12 +1286,12 @@ void memory_region_notify_iommu(IOMMUMemoryRegion= *iommu_mr, > * notifies a specific notifier, not all of them. > * > * @notifier: the notifier to be notified > - * @entry: the new entry in the IOMMU translation table. The entry > - * replaces all old entries for the same virtual I/O address ran= ge. > - * Deleted entries have .@perm =3D=3D 0. > + * @event: TLB event with the new entry in the IOMMU translation table. > + * The entry replaces all old entries for the same virtual I/O a= ddress > + * range. > */ > void memory_region_notify_iommu_one(IOMMUNotifier *notifier, > - IOMMUTLBEntry *entry); > + IOMMUTLBEvent *event); I didn't catch the missing of indentation on the previous patch .... O:-)