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

Xen Summit 2026 - "Nested Virt <-> WinPV drivers" design session notes


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alex Brett <alex.brett@xxxxxxxxxx>
  • Date: Tue, 22 Sep 2026 12:55:06 +0000
  • Accept-language: en-GB, en-US
  • 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=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=PMvDmdURcCKCX8S8qDj2J5NhrZcfw0jh8u43/yP7kPE=; b=GdTebdoaRwl3p/ZhHMVKCr71swKtxljW22YNPmkNlXsdER6mftd5Hu/99XRApE6a/BVDjMsMGfCGGvvhoV7HUdXIiA63Q8mGKm+skjyUQdlbUuO2r8BCorNjBISyPzeDPHor/LaQ+Plj/fC/gOEo+pusgN2ZEpQ0ZVBNrPDOPBSHyLql6wmeSWoNm3iYaUaogflqhtJM2+ay1CLU6y3eK14CT8T5gGm6A6abyo47P81VSqefzqWaP/FYQrXzpAenqz6dN7jHLhI1WpgQCTBDJHQbAFZzoK2MfXmJ2yh2WGhXFuNYZht58zxR1Of+iy4x9ZgMv31jLvGIVSu6xaf8Iw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h+i2fPDUH683qhhcD7+UCmcWM+V2OUm+v9Pgae0lbL67d+OFuUkZFm5f46rbU6p91nmz7aASC2to2zMHvqr1BDnKPeL1Qo6R1SX25xaiODFN9DylVFdNR6AYmtvtJiiGLSd2n6w9pCZEVa7yQHftRr1/aMkdS4tyjZHLq4FrlvDIJcuMOvOlsJYD0watBd1uJ0qAPjd1AXNXQrCMV+bWjJrsLeAyWqoNQP7rxy0sn7IGpVy1wS3AjZY9Htl6RF3dBeKnhp3uUfRrekQNBLnsG2n1cwIbIum2iSRCO8mdEA+YBMdIGpG9Bfd79b/ML/e/NTNEvSnpWOto2umORTmZZg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Delivery-date: Tue, 22 Sep 2026 12:55:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels:
  • Thread-index: AQHdSo9DZLcioeW9H02VyiyxNJb//w==
  • Thread-topic: Xen Summit 2026 - "Nested Virt <-> WinPV drivers" design session notes

The following notes were taken during the design session on Thursday 
17th September 
(https://design-sessions.xenproject.org/uid/discussion/disc_bpkf1nkpeOyiAehjw4xN/view)
 titled "Nested Virt <-> WinPV drivers":

This is an issue identified during XenServer's nested virt development.
With HyperV, your nominal Windows machine becomes an L2 guest as the root 
partition under HyperV (~equivalent to Xen dom0). HyperV at L1 handles things 
from the L2 (flowing via Xen at L0).
Specifically this affects CPUID and VM(M)CALL operations - L1 handles these and 
doesn't give the Xen parts that the PV drivers expect - consequence is PV 
drivers are unable to communicate with Xen. 'Feature' of the design of nesting.

A Viridian enlightenment allows L1 to provide information to L0 as to which L2 
is the root partition. A workaround was implemented using this where Xen can 
modify the responses so the L2 still 'sees' Xen and can enable the drivers. 
This relies on a _currently_ invalid input to HyperV, but this may fail in 
future so not a safe solution and not shippable.

Tangent: Bromium. Different way of solving this problem, did all hypercalls 
using the CPUID instruction (Intel doesn't permit you not to have an exit on 
CPUID, AMD permits you not to intercept but everyone does). ABI for CPUID says 
nothing about high halves of the registers, so Bromium puts a magic constant in 
high half that L0 can recognise, or if not present the nominal L1 would still 
answer the normal CPUID.

What are people's thoughts on such an approach?
  Would it be restricted to root partition? Yes.
  
HyperV doesn't seem to have good provision for nested virt on hypervisors that 
are not MS. Can we stick to just Viridian enlightenments in the nested case and 
avoid the problem?
  Ideal world we'd do a full VMBus implementation and abandon the PV drivers 
but we can't (potential legal issues with doing so. Might change if MS do an 
implementation in Linux which is rumoured, but no sign of this as things stand 
- would be complete replacement of I/O model and not practical in the timeframe 
of the nested virt project). Could be looked into in future, but not a short 
term solution.
  HyperV knows about PCI and enables this for the root partition, but our PV 
model uses hypercalls.

Some questions to put to MS
  Never found a situation where the root partition doesn't have an identity map

Ballooning will break everything?
  Apparently MS has an API to add/remove memory that may be a solution here.
  Ballooning implementation in PV drivers uses API.
  Concern as to whether this API is designed for HyperV and not a nested case 
like this?
  Tu would like to retain ballooning in the drivers. Andrew wants to make it an 
admin choice (whereas currently it must be available even in dangerous cases). 
Interaction with ABI enumeration questions...

We have the Xen PCI platform device in HVM domains.
  Root partition will see this device, could we send hypercalls to it? In 
principal maybe. Specific BAR for hypercalls where qemu tells the hypervisor a 
specific range? Would mean every hypercall goes into x86 emulate! Maybe could 
have some sort of special flag?
  What would benefit be over CPUID mechanism? Don't need to check it's the root 
partition, can just do it by access to PCI device.
  Wouldn't work for PVH.

Could we do something with an MMIO range? Can't have a Xen specific driver use 
this as HyperV comes up before Xen drivers. Could declare in ACPI and then 
Windows knows a driver can bind to it?

We only want the root partition to be doing PV I/O to L0, not any L2 guest. In 
a virtio model it'd be down to HyperV/root partition which guest it passes the 
PCI device to.



 


Rackspace

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