*/
#include <stdlib.h>
+#include <stdbool.h>
#include "xc_private.h"
#include "xc_cpufeature.h"
#include <xen/hvm/params.h>
static void xc_cpuid_pv_policy(
xc_interface *xch, domid_t domid,
- const unsigned int *input, unsigned int *regs)
+ const unsigned int *input, unsigned int *regs, bool pvh)
{
DECLARE_DOMCTL;
unsigned int guest_width;
if ( (input[0] & 0x7fffffff) == 0x00000001 )
{
clear_bit(X86_FEATURE_VME, regs[3]);
- clear_bit(X86_FEATURE_PSE, regs[3]);
- clear_bit(X86_FEATURE_PGE, regs[3]);
+ if ( !pvh ) {
+ clear_bit(X86_FEATURE_PSE, regs[3]);
+ clear_bit(X86_FEATURE_PGE, regs[3]);
+ }
clear_bit(X86_FEATURE_MCE, regs[3]);
clear_bit(X86_FEATURE_MCA, regs[3]);
clear_bit(X86_FEATURE_MTRR, regs[3]);
{
set_bit(X86_FEATURE_SYSCALL, regs[3]);
}
- clear_bit(X86_FEATURE_PAGE1GB, regs[3]);
+ if ( !pvh )
+ clear_bit(X86_FEATURE_PAGE1GB, regs[3]);
clear_bit(X86_FEATURE_RDTSCP, regs[3]);
clear_bit(X86_FEATURE_SVM, regs[2]);
if ( info.hvm )
xc_cpuid_hvm_policy(xch, domid, input, regs);
else
- xc_cpuid_pv_policy(xch, domid, input, regs);
+ xc_cpuid_pv_policy(xch, domid, input, regs, info.pvh);
return 0;
}
uint32_t ssidref;
unsigned int dying:1, crashed:1, shutdown:1,
paused:1, blocked:1, running:1,
- hvm:1, debugged:1;
+ hvm:1, debugged:1, pvh:1;
unsigned int shutdown_reason; /* only meaningful if shutdown==1 */
unsigned long nr_pages; /* current number, not maximum */
unsigned long nr_outstanding_pages;