[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux 6.12-rc2: xen-privcmd cannot be loaded in domU anymore


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Wed, 9 Oct 2024 03:41:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=f50rXRPHpiEQHUOITFL7rhPgpJrUGW/bC8TjM9O8YMk=; b=EjXmTVv1eN80f2cnwk830vRzThyvI7C/AE3b7AwtbV6DT8JSTqSsxrGSzWifmLuJzWQJf6XAPE9ZhCsQaK9L50xJKHZrtoyxJLB//V0uLpmYks1Sou7BFWCdhRrs+29tXgGCLsglmXOgnog8Q4B7t5CXO/HngUQUDg1YTu70jLyDUVlHSTy4kcldjC0GuRf1T0BUr7Wq8ruZJ1eXTPt1ztyhUqLhSusV25SMk4BheQk6MKZoeH2iKa/EgRfyblEafaiWl4c6cCOHDyCAx/k5LntdO7IWiLgkZeqm6D01GNYvIfPFcEuDCHqAa4fCVq7bQn+izwdO3eImUHIneLVhWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s20HgENfdfOEmZZxIR5QXgSVRz3UT6oTC8yX/jcqg/IAbkSW4F4ZXX0+l5es+iNF6ZISrNkAKcUI2LK93YgW1hFVq/KhZRQ8KIZtiAKWCWetXbjWuyMhtRi8fmDv+C3m3QSMKWqNZaR47+SQ2yWsDNXIISyPoHZapPoh6HlQ48EDyojIPuBLQcn7p1szOTVwgboVe9K6Hzx7uhMchajdr9bgIrBQ6LimIYaNGU/Hcz7HtTeJp+jNl+wb1zBZQrXUe3g7+2dlEtokn0GlykpqNnkzrxZhwm2BViYf27NDPJ9lD9kEHxWOIgiTEeBUC1B5cBlZ36vG0awwUAwcfJCGlA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Wed, 09 Oct 2024 03:42:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbGeNgnDbabu8lHkipFVKSzhoZJrJ+SluA
  • Thread-topic: Linux 6.12-rc2: xen-privcmd cannot be loaded in domU anymore

On 2024/10/9 08:36, Marek Marczykowski-Górecki wrote:
> Hi,
> 
> It looks like xen-privcmd now depends on xen-pciback, and the latter
> (expectedly) fails to load in domU with -ENODEV. But that prevents
> loading xen-privcmd too. And that's bad.
Sorry for introducing that and thank you for reporting it.

Maybe that dependency can be removed.
I used it to pass the combination of compilation(CONFIG_XEN_PRIVCMD=y && 
CONFIG_XEN_PCIDEV_BACKEND=m).
But from my patch, "IS_REACHABLE(CONFIG_XEN_PCIDEV_BACKEND)" is enough. And I 
have tested locally just now.
Juergen and Stefano, what's your opinion?

> 
> The dependency looks to be introduced by this commit:
> 
> commit 2fae6bb7be320270801b3c3b040189bd7daa8056
> Author: Jiqian Chen <Jiqian.Chen@xxxxxxx>
> Date:   Tue Sep 24 14:14:37 2024 +0800
> 
>     xen/privcmd: Add new syscall to get gsi from dev
>     
>     On PVH dom0, when passthrough a device to domU, QEMU and xl tools
>     want to use gsi number to do pirq mapping, see QEMU code
>     xen_pt_realize->xc_physdev_map_pirq, and xl code
>     pci_add_dm_done->xc_physdev_map_pirq, but in current codes, the gsi
>     number is got from file /sys/bus/pci/devices/<sbdf>/irq, that is
>     wrong, because irq is not equal with gsi, they are in different
>     spaces, so pirq mapping fails.
>     And in current linux codes, there is no method to get gsi
>     for userspace.
>     
>     For above purpose, record gsi of pcistub devices when init
>     pcistub and add a new syscall into privcmd to let userspace
>     can get gsi when they have a need.
>     
>     Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>     Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
>     Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>     Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>     Message-ID: <20240924061437.2636766-4-Jiqian.Chen@xxxxxxx>
>     Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> 
> 

-- 
Best regards,
Jiqian Chen.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.