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

Re: [PATCH] x86/hyperv: Adjust hypercall page placement


  • To: Alejandro Vallejo <agarciav@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Thu, 24 Apr 2025 14:47:46 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=tjELUaRyGnu65+y6Em3aUiAYggDmeOzHUcwOuoPQDvU=; b=UXIyMT2/UwKNwdc5+hzcqi4b6yiQKMJXHIUDyZkR2IM6QQBad5rkIZWu5jYE9+khQypQCkAMm13mHQM1KSzBXHqDJ/384FOvLXrRo9YLqFT0OEfhqt/gMs3x50L4ngdaJ/6xW9ZELoDGa4pbdwB5BIuuw7NjG3AA4OCjxqdA2h1i3h/n19XCPNP2X9REZS4UwaBSszebGqRzStlbbZfHk8kVbVWl1ZHhHtT0/EOGO5wjZZasj08G3rtlIhR3I50zM7H7WL9P7sHyj5kd1FljEM2PI6R4/18a8+2gYG7ABYEg5FzHdvBG9N6WXrknad+WqK2f4m6CNf1KjBGCLimF/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jux8II3mVEX4pMN3qSWCYZIefs3dVKQKz9XxXlF5YI+p35H3qc/Fh9Ns15l2clOa4pPh3mYo0raIIYsUsnULRWsRzjSeTh+1WAQEBc7ZpwJNCU3sv8GUtzTLUh79javNFWXU936DprtcSWipXI6XNeChZhLpB2plyVEkYaKs+F9wAao3SIGS41hlAr8h9AWHerAIagF0/2VrdYAMEZJuebEbhC1t8LC2zEADkgqMmVeH59rfSReNd200bI/mP1nDO5jrUuY0IiNabGM759bUn8I5BEw62iZ1Da5Ti6/ixHJmkrvDEME2PiR+DeNrFX13H+nMpT3eCd35SD43/vAbkw==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Thu, 24 Apr 2025 13:48:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Apr 24, 2025 at 1:45 PM BST, Alejandro Vallejo wrote:
> Xen nowadays crashes under some Hyper-V configurations when
> paddr_bits>36. At the 44bit boundary we reach an edge case in which the
> end of the guest physical address space is not representable using 32bit
> MFNs. Furthermore, it's an act of faith that the tail of the physical
> address space has no reserved regions already.
>
> This commit uses the first unused MFN rather than the last, thus
> ensuring the hypercall page placement is more resilient against such
> corner cases.
>
> While at this, add an extra BUG_ON() to explicitly test for the
> hypercall page being correctly set, and mark hcall_page_ready as
> __ro_after_init.
>
> Fixes: 620fc734f854("x86/hyperv: setup hypercall page")
> Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>

After a side discussion, this seems on the unsafe side of things due to
potential collision with MMIO. I'll resend (though not today) with the
page overlapping a RAM page instead. Possibly the last page of actual
RAM.

Cheers,
Alejandro



 


Rackspace

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