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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F089ACDB47E for ; Wed, 18 Oct 2023 13:07:07 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt6GO-0003HH-C1; Wed, 18 Oct 2023 09:07:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt6GM-0003Gp-8Q for qemu-devel@nongnu.org; Wed, 18 Oct 2023 09:07:02 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt6GK-0007mE-7O for qemu-devel@nongnu.org; Wed, 18 Oct 2023 09:07:02 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-53e2308198eso10775207a12.1 for ; Wed, 18 Oct 2023 06:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697634417; x=1698239217; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=InBhXZDxFDmM7NR1t7WFW6depBIdokbP7326PUBCHis=; b=yKBw6JvDN9Adf+9afc0U2DwLVzpvjVmkywzv944SXiJS2l1LOnbm42cwopboXu6LT6 jcOEa/MEXO0i1If8MZPlN1S2HQByDNSe/xuGdpnkHyji6lJ/WbwWbBrE9qraCJjFgadz qQHLj9PbsfhIBCS7MxXdwRoVwpXZTJsNQto62KMNUWdpi8EF0nsQWdMl3qhz5R3hfCyx 1yd7X/w+aGPWa9/ISbCakhAu8dQVfIVDzJ84dWlTCEOzX9VVfvvlUW+2ZLdPPHrlHJ47 +iRhA6ML5CqZjNlSkT8899lPjdZFrwPNHqANPI0dVi+yjtEx11hAyyfmZi2DZvr1Fv8+ JP/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697634417; x=1698239217; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=InBhXZDxFDmM7NR1t7WFW6depBIdokbP7326PUBCHis=; b=BDREphv7/0wxcvj4dNFMBSErXbZ44UxQX5CL3ztIpx0KCunDYNLrcEW8Jx/Dmju1An qOQRW+VXrjKCBIxKBZsbzzoXef2LiywLEpb36MKM0LLJyp3FVH9nnHyEiXNjApXtt7zU Ymd0s6Xcg7sgzMwZH8AMBwlQgSWkYLVQlL8c8BJ/lND2SeNlMO2MRZoISaiG8hitn9MF XVngHh8GlmZNr0mFjUdy2v3ahpCZsxbvbIQcp6ntQtrwaBycZgJvCAaQW+EF4KCXgPc0 y1cvlMYmr3djN2O1nM/rkC66B4CPEtxZxDWg85Otlzdli9Ucxg0FGZtkGvE33XmyC8YD 9eVw== X-Gm-Message-State: AOJu0YyUEf/05Qpx/AXOuTHOjk/me+aLIO/6ZoWNTWxVyM19HvLOzB7h qek3Q/NFKcWZdvCKrflf45aS9+QsjnS7TzU4LWI= X-Google-Smtp-Source: AGHT+IEwuXNqwj54yZ6zF0xl/AF35yRrz4mC/CYDTUVIyElfQV767ZSl48o8fgj/+jYzyvWeqasupQ== X-Received: by 2002:a05:6402:5186:b0:53e:3ba1:d40e with SMTP id q6-20020a056402518600b0053e3ba1d40emr4276384edd.26.1697634416853; Wed, 18 Oct 2023 06:06:56 -0700 (PDT) Received: from [192.168.69.115] (gyl59-h01-176-171-218-149.dsl.sta.abo.bbox.fr. [176.171.218.149]) by smtp.gmail.com with ESMTPSA id f17-20020a50a6d1000000b0052ffc2e82f1sm2894874edc.4.2023.10.18.06.06.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 06:06:56 -0700 (PDT) Message-ID: <17eb43f1-7a85-70d4-ca50-a824c2e06cd9@linaro.org> Date: Wed, 18 Oct 2023 15:06:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps Content-Language: en-US To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , qemu-devel@nongnu.org Cc: Joao Martins , Liu Yi L , Kevin Tian , Jacob Pan , Peter Xu , Eric Auger , Yi Sun , David Gibson , "Michael S. Tsirkin" , Peter Maydell , Paolo Bonzini , Jason Wang , Andrey Smirnov , Helge Deller , =?UTF-8?Q?Herv=c3=a9_Poussineau?= , Mark Cave-Ayland , BALATON Zoltan , Elena Ufimtseva , Jagannathan Raman , Matthew Rosato , Eric Farman , Halil Pasic , Christian Borntraeger , Thomas Huth References: <20231017161404.615145-1-clg@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: <20231017161404.615145-1-clg@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.google.com X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.339, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 17/10/23 18:14, Cédric Le Goater wrote: > From: Liu Yi L > > This patch modifies pci_setup_iommu() to set PCIIOMMUOps > instead of setting PCIIOMMUFunc. PCIIOMMUFunc is used to > get an address space for a PCI device in vendor specific > way. The PCIIOMMUOps still offers this functionality. But > using PCIIOMMUOps leaves space to add more iommu related > vendor specific operations. > > Cc: Kevin Tian > Cc: Jacob Pan > Cc: Peter Xu > Cc: Eric Auger > Cc: Yi Sun > Cc: David Gibson > Cc: "Michael S. Tsirkin" > Cc: Eric Auger > Cc: Peter Maydell > Cc: Paolo Bonzini > Cc: Peter Xu > Cc: Jason Wang > Cc: Andrey Smirnov > Cc: Helge Deller > Cc: "Hervé Poussineau" > Cc: Mark Cave-Ayland > Cc: BALATON Zoltan > Cc: Elena Ufimtseva > Cc: Jagannathan Raman > Cc: Matthew Rosato > Cc: Eric Farman > Cc: Halil Pasic > Cc: Christian Borntraeger > Cc: Thomas Huth > Reviewed-by: David Gibson > Reviewed-by: Peter Xu > Signed-off-by: Liu Yi L > [ clg: - refreshed on latest QEMU > - included hw/remote/iommu.c ] > Signed-off-by: Cédric Le Goater > --- > include/hw/pci/pci.h | 7 +++++-- > include/hw/pci/pci_bus.h | 2 +- > hw/alpha/typhoon.c | 6 +++++- > hw/arm/smmu-common.c | 6 +++++- > hw/i386/amd_iommu.c | 6 +++++- > hw/i386/intel_iommu.c | 6 +++++- > hw/pci-host/designware.c | 6 +++++- > hw/pci-host/dino.c | 6 +++++- > hw/pci-host/pnv_phb3.c | 6 +++++- > hw/pci-host/pnv_phb4.c | 6 +++++- > hw/pci-host/ppce500.c | 6 +++++- > hw/pci-host/raven.c | 6 +++++- > hw/pci-host/sabre.c | 6 +++++- > hw/pci/pci.c | 18 +++++++++++++----- > hw/ppc/ppc440_pcix.c | 6 +++++- > hw/ppc/spapr_pci.c | 6 +++++- > hw/remote/iommu.c | 6 +++++- > hw/s390x/s390-pci-bus.c | 8 ++++++-- > hw/virtio/virtio-iommu.c | 6 +++++- > 19 files changed, 100 insertions(+), 25 deletions(-) Reviewed-by: Philippe Mathieu-Daudé