UPDATE: You can use LibVMI with Xen (KVM event support does not yet exist) to capture CPUID event/VM Exits and return the CPUID of your chooosing at runtime in the callback, - without compiling xen or seabios youself yourself. You can look at the example in the LibVMI repo. This will incur a small performance overhead. Manual patching as shown in this repo may have a slight performance advantage in the unlikely case that your VM calls CPUID constantly.
You can use this as an example to patch newer versions of xen, but the patch and exact locations in files will need updating.
EDIT: In Reference to the issue posted, make sure you don't have spoof and viridian enabled at the same time.
apt build-dep xen
apt build-dep qemu
git clone https://github.com/xen-project/xen.git
patch -p1 < xen.patch
This also requires a tiny one-line patch to SeaBios to detect the new hypervisor string.
Add
if (strcmp(signature, "XenVMMXenVMM") == 0 || strcmp(signature, "ZenZenZenZen" == 0))
at line 72 of xen.c removing
if (strcmp(signature, "XenVMMXenVMM") == 0)
Follow instructions on both githubs for general building and installation instructions.