06.11.24 12:14, Sergiy Kibrik:
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 78a13e6812..b340818ee2 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -742,11 +742,16 @@ int arch_sanitise_domain_config(struct 
xen_domctl_createdomain *config)
static bool emulation_flags_ok(const struct domain *d, uint32_t emflags)
  {
-#ifdef CONFIG_HVM
+    const uint32_t disabled_emu_mask = X86_EMU_PM;
+
+#if defined(CONFIG_X86_HVM_PMTIMER)
      /* This doesn't catch !CONFIG_HVM case but it is better than nothing */
      BUILD_BUG_ON(X86_EMU_ALL != XEN_X86_EMU_ALL);
  #endif
+ if ( emflags & disabled_emu_mask )
+        return false;
+

oops, disregard this chunk please, it should be:

if ( (emflags & X86_EMU_ALL) != emflags )
     return false;

with disabled_emu_mask completely removed.

      if ( is_hvm_domain(d) )
      {
          if ( is_hardware_domain(d) &&


 -Sergiy

Reply via email to