[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PVH dom0 and MSIX memory mapping issue
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Fri, 25 Feb 2022 16:46:56 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- 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=JMwwkm+CmVlz7ID6wMu0ZzsE4q/CT+KGXGDH/hWKlwk=; b=NUXZIFz+r9HlmJZAHNaSXfBiFFdaLNu2Ncu9mWXnqnMCNkK6rzWgnCpqo9W7oV3lKtAHiIgQEEU9+dUHwH6NWRranTwPse0/HchvIhIZLkEyQIbgoQv33OxBsdQYVlJRJrZWp8ObANeSvG4K/SvL+uD4Hob7/HyJYpCThXJXHz3vRTCt/ZEg/GjXtMvkKRDbIv5TUd0bep8HxpalJLd0vtIt1r8daHGGkd0P3e0gcjDsYhZwF9GMVUywNIiDBlDcc2HkXIEav/4fKC0T3/UD9WkpPXj8MZT/Tht3o4Y7Wh9qtZXCPzEbgHu/0l0JFwpvZ+fdYXVxA5B35pQHJ0iYkw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yqxjpxw8kDzv3/Gv2fNX9ZAU3ZigskmPF11lxlXE0nE4VlHpdvsl+v5uPLRnpi0mycaChifYO3RZKg4IBRmfIN82GHg6HXWQolCFDGlomp9hSWHHRs4KH+GcETMUfxFWHd93RBTsWOYZAMwE8xiu7FSdwFyegz4BVwgsCW4PpCBeiVgw61XXx56OhwMqDfWgzm0Q31otmHeqKXpWAY9zf7DxvwwgKgW8l8mElG7vYl0xQ4vphafXwYtWPRjdPXktkHwEnX+r+osEeJJNBX7s0nV8bTBeBhX2NMoG9BpnvtKSQf62gunV4H4w+V4vkYIREA6lOZx9O2n8kkDbqY4oGQ==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Alex Olson <this.is.a0lson@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 25 Feb 2022 15:47:20 +0000
- Ironport-data: A9a23:poInTaKefz5aWqFUFE+R9ZUlxSXFcZb7ZxGr2PjKsXjdYENSgzcCz GMeCmCCOPeMY2X3L95yYd7g9EsHv5bRnN5mHgRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh2NQ12YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 M1hm8KIWyASB6P3orpDejhdGWJOILITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glv3J4fRKiOD yYfQRl3XU7POQ1MAUlNCIBjlcPwtEfPcCIN/Tp5ooJoujOOnWSdyoPFINfTP9CHW8hRtkKZv X7duXT0BAkAM96SwibD9Wij7sfTnSLgHoMJUrTg8uVthnWcw2USDFsdUl7Tifuzh1O6WtlfA 1cJ4Sdopq83nHFHVfGkAUf++iTd+EdBBZwASIXW9T1h1ILMzyjHPnojdQdPU+Z46uYXQDZp5 kKWyoaB6SNUjJWZTneU97GxpDy0ODQIIWJqWRLoXTfp8PG4/tht00unosJLVffs04arQW2YL yWi8XBm74j/m/LnwElSEbrvpzu37qbEQQcujuk8djL0t1gpDGJJimHB1LQ60RqiBNrIJrVil CJd8yR70AzoJcvc/MBqaL9QdIxFH97fbFXhbadHRvHNDQiF9X+5Zpx36zpjPkpvOctsUWa3P BKM5VoNuccLZCPCgUpLj2SZUZVCIU/IT4mNaxwpRoAWPsgZmPGvpkmCmnJ8L0iyyRNxwMnTy L+QcNq2DGZyNEiU5GHeegvp6pdynnpW7TqKHfjTlk37uZLDNC/9YepUazOmM7FmhJ5oVS2Iq r6zwePRkE4BOAA/CwGKmbMuwacidiBqVcir8JUMLoZu4GNOQQkcNhMY+pt4E6RNlKVJjObYu Ha7X05T0l3kgnPbbw6NbxhehHnHB/6TcVpT0fQQAGuV
- Ironport-hdrordr: A9a23:vMWk46oppDH6tC2+WJMByccaV5vHL9V00zEX/kB9WHVpm5Oj+P xGzc526farslsssREb+OxpOMG7MBThHLpOkPMs1NaZLXLbUQ6TQr2KgrGSoQEIdxeOk9K1kJ 0QDpSWa+eAc2SS7/yKmTVQeuxIqLLskNHKuQ6d9QYUcegDUdAe0+4TMHf8LqQZfngjOXJvf6 Dsmvav6gDQMEg/X4CePD0oTuLDr9rEmNbPZgMHPQcu7E2rgSmz4LD3PhCE1lNGOgk/iosKwC zgqUjU96+ju/a0xlv10HLS1Y1fnJ/ExsFYDMKBp8AJInHHixquZq5mR7qe1QpF6N2H2RIPqp 3hsh0gN8N85zf4eXy0mwLk303a3DMn+xbZuCulqEqmhfa8aCMxCsJHi44cWADe8VAcsNZ117 8O936FtrJMZCmw0BjV1pztbVVHh0C0qX0tnao4lHpES7YTb7dXsMg24F5VKpEdByj3gbpXXd WGNPusqsq+TGnqLkww5gJUsZyRtzUIb127q3E5y4OoO2M8pgE786MarPZv60vouqhNCaWs3N 60QpiApIs+P/P+UpgNd9vpYfHHfVAlEii8Rl57HzzcZdM60jT22tvK3Ik=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Feb 25, 2022 at 03:22:59PM +0100, Jan Beulich wrote:
> On 25.02.2022 14:50, Alex Olson wrote:
> > I realize PVH for dom0 is still experimental, but was trying to see how
> > well it
> > works in the state of "master".
> >
> > I found one issue with MSI-X interrupts in dom0 -- a fatal page fault occurs
> > when the MSI-X PBA is accessed from dom0. It looks like dom0 doesn't have
> > an
> > identity mapping for the PBA of a PCI device -- intentionally caused by
> > vpci_make_msix_hole() ?
> >
> > I was also wondering, what is the impact of "existing mapping (...) at 0
> > clobbers MSIX MMIO area".
> >
> > Is the purpose of vpci_make_msix_hole() to make MSIX table/PBA accesses
> > trap to
> > the hypervisor? Seems like the page-based granularity is too coarse since
> > the
> > PBA can be much smaller than a page as well as not aligned...
Page-size granularity is the minimum that we can do in the second
stage page tables.
I guess we could do with some logic to forward accesses outside of the
MSI-X table and PBA that falls into a valid BAR region that shared the
4K page.
> > I was able to get something potentially usable by adding a "ioremap" call in
> > msix_read() and msix_write to deal with the access of the PBA. Wasn't
> > sure if
> > this was a proper way of handling things... Was also wondering if it would
> > make
> > sense to do the same for the "clobbers MSIX MMIO area" cases too.
>
> You happen to ask just over two hours after a patch was posted:
> https://lists.xen.org/archives/html/xen-devel/2022-02/msg01657.html
> Since Roger didn't have an environment to test his change, maybe you
> could do so, offering a Tested-by if successful?
I had to post a new verison because I idnd't recall that for dom0 we
also allow writes to the PBA, it's here:
https://lore.kernel.org/xen-devel/20220225153956.1078-1-roger.pau@xxxxxxxxxx/
Roger.
|