[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] [RFC] xen/vpci: modify pci_get_pdev_by_domain() & pci_get_pdev()
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Rahul Singh <Rahul.Singh@xxxxxxx>
- Date: Tue, 9 Aug 2022 15:51:52 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Od+KecJCNPVCEehzJeJRC4V/NyG90OB7EfBVXM/9Y/Q=; b=TYW0Idgc0CjgXdA7h0IkZ53TMk14AbgLuq5bSfYlVaMDJsiJoTkB5ytkhS6V4epE7p2W0+XlH95Z4JZFVjs6x52jOvk5G2K4ZlF9MHFzp3g80m9plyBFDGtd72l6jyRuswF+4bf1O1GfidakSGtsvvZHlL5DN59k6vVOHE/vw3AeRxtJ+mL081ET4dl01t8Dk5IDRj0mSuLidLPrjuGD5G8SiiK/QNbAk/QesFK9EQCQqnzsN4Vg7S/PO89q6+IkVHLiAkSV3YnR9NZ2c/TJkYdvE66LoAcCtt7uqjBFhxZvBuvA2hGoKhAvGToqWmfUVOP8n4WAv5F84j1WOFCvyQ==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Od+KecJCNPVCEehzJeJRC4V/NyG90OB7EfBVXM/9Y/Q=; b=KksE62B2HVD0wnXRYAKOD00iYHhQ0PIEML3BoBvUKVobe24VuVRW5uXEpb9sQ5mhkxLp54sG+AKKUHglMQQI11yFN/fOGNvgFEGMwB7vG+iCBe3thJyxMUO3LAzS9tqeUE81OLC+A+SCLNw/0HpmUybTrY772wzTwa8j+DAJ6RkvOnhCQ/3BeUiDB49q0UgiJRZFykY3DXMtjOEQXcP0wju6a1Z1LP8k2cXc41lAMWcYJs4X1zWFo/wKClyEaswMAz5A+RueeCMgFKme8IbQLlQ5YQ3kuYI/qvIVUZQKY6asgc3KDQtvhCxjyY6OfJY3smAmU46I6WZOX3S7EE/mMA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=YrqRk20ve9LBAXs6697cJi9JLI5KxXVF5agMFeC3PTU6k5qsQWxoruVwRQ6NdedNDkKmZFzKxRTyd2QYRy1acR8h8g4ZSOkpZ7dTLClko8GGGIRGeyyTrh31YlW6DumzkA+B1/QEE8dQQ5Krh+WwoyMMbuzfFbOnCYmgL0IIhrEFOAQjV1G3c2mip2AmN96MSpY5IrTEr0ZTfdPpi6sVXfkYuyhfMAASBtge4s8zAhn320KUzTNTKc5w0ap4ROrwgdzqpoV9P9BUtl/iSXyOy7laFuMqdwpDZMyDE2Dwb1GMIn8+pWqtUDoVI+JGDUTHFgkunbWQ8izoOMvovA6rlA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mnOZcQ5dnmbbHLXFLTfpnshoMJuM3NF90wpMdqP7hiewRvHGs3vkek6A1PUV3fOMmUiGl5K/5ImIZ08hPBaOuD/TYt1+0fj20iqTN/TdCP0W66SD2NArA8RQj+XevytQygsMJM44NwyRVF9QVkaBtyIauDzMhLdDhISBaxp4ebFWBWYIVRU298lN4L6A6tL679tIzsu3MLSMV25qbZopd+x2bFtSm37HszwnhoEDaInkNRpYyEHH4q1DCu0O+tjBQYbNd3TyoO5rXbuY9askyuxvxUXsHcNG5b+5Fx05I4JyJFrRd8HM1pbrnGsGQxC0hXLttXM9MkhKAn+rMP/xkQ==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 09 Aug 2022 15:52:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYqOI28IdG0PHJfUiTCQKz3s6xa62ms9EAgAAKSYA=
- Thread-topic: [PATCH] [RFC] xen/vpci: modify pci_get_pdev_by_domain() & pci_get_pdev()
Hi Jan,
> On 9 Aug 2022, at 4:15 pm, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 05.08.2022 17:43, Rahul Singh wrote:
>> pci_get_pdev_by_domain() and pci_get_pdev() functions find the pdev in
>> the pseg list. If pdev is not in the pseg list, the functions will try
>> to find the pdev in the next segment. It is not right to find the pdev
>> in the next segment as this will result in the corruption of another
>> device in a different segment with the same BDF.
>>
>> An issue that was observed when implementing the PCI passthrough on ARM.
>> When we deassign the device from domU guest, the device is assigned
>> to dom_io and not to dom0, but the tool stack that runs in dom0 will try
>> to configure the device from dom0. vpci will find the device based on
>> conversion of GPA to SBDF and will try to find the device in dom0, but
>> because device is assigned to dom_io, pci_get_pdev_by_domain() will
>> return pdev with same BDF from next segment.
>>
>> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
>
> Actually one more thing: While you're working on vPCI as I understand,
> the subject prefix here really wants to mention PCI, not vPCI.
Ack.
Regards,
Rahul
|