Xen can implement things like a CPU scheduler exclusively focused on VMs, while KVM has to deal with the normal Linux scheduler for processes.
Xen can do advanced defense-in-depth techniques like driver domains -- something impossible to implement on KVM.
Xen has a mature security response process; if you're a cloud provider, or ship anything with Xen inside of it, you can be notified of security issues typically two weeks before the public disclosure; and we're quite thorough about what we issue security alerts for. For KVM, you just have to hope that your functionality is worth issuing a CVE about, and unless you're a distro, you're only going to be told after it's been made public.
Xen is a microkernel, so you can run it on tiny embedded devices for which Linux / KVM would be too big. Xen is small enough that it's actually feasible to do Functional Safety Certification on it.
That's why Xen is still used by QubesOS, the NSA, and various defense contractors; why a number of cloud providers (including say, Ghandi.net) use Xen; why Xilinx has their own Xen distribution; and why Xen is in the reference implementation for ARM's automotive stack -- in addition to being officially supported by SUSE, and being the driving engine behind Citrix Hypervisor and XCP-ng.
So it's basically a niche thing, mostly used by those who already had it/know it (VMware vSphere is going down that road as well, it's basically legacy today).
Regards,
Xen.
To name one example, nested virtualization support is not only hopelessly broken, it's MORE broken in recent releases than it was a decade ago. You can see right here how the feature kept getting broken by every other release until nothing worked anymore: https://wiki.xenproject.org/wiki/Nested_Virtualization_in_Xe....
And Xen is literally the only virtualizer out there that does not support nested virtualization, which is a rather critical feature since many (dev) stacks assume one has hardware virtualization, and Windows is going to require it sooner than later.
Regarding nested virt, you are mostly right: it's only "working-ish" for basic things, but indeed, it's broken when you start to use anything heavy in your nested VM. The main reason nobody fixed it is because it's not really used: as any other open source project, you find what you need if you contribute. Obviously, as soon someone will need this and willing to contribute, it will change :)
Even if it is a custom hypervisor, AWS likely derived it from Xen and sponsors the project to continue doing so.
AWS does continue to support older instance types, however, but only legacy workloads are using them. They actually now even run the XEN based legacy instance types on nitro. https://perspectives.mvdirona.com/2021/11/xen-on-nitro-aws-n...
The implementation is split between KVM and their proprietary equivalent of QEMU.
I do still want to flesh out the Xen guest support in Rust-VMM at some point.