Possible improvements:
/usr/share/qubes/templates/libvirt/xen-user.xml
{% extends 'libvirt/xen.xml' %}
{% block basic %}
{% if vm.features.get('vcpu_pin_pcores', '0') == '1' -%}
<vcpu>{{ vm.vcpus }}</vcpu>
<cputune>
{% for i in range(vm.vcpus) %}
<vcpupin vcpu='{{ i }}' cpuset='{{ i }}'/>
{% endfor %}
</cputune>
{% else -%}
<vcpu>{{ vm.vcpus }}</vcpu>
<cputune>
{% for i in range(vm.vcpus) %}
<vcpupin vcpu='{{ i }}' cpuset='16-23'/>
{% endfor %}
</cputune>
{% endif -%}
{{ super() }}
{% endblock %}
Set vcpu_pin_pcores
feature to 1 for the qubes that should use P-cores:
qvm-features GamingQube vcpu_pin_pcores 1
Other qubes will use E-cores.
Automatically set the HVM stubdomains to use specific cores using libxl hook: