[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v2 1/2] x86/hvm: introduce config option for ACPI PM timer
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Wed, 6 Nov 2024 18:17:36 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vrCHY9gmvzgb1cRGQ4VSIWnw/tGtMWTjyeWRGT5V2r4=; b=xI1YXRmL0eiLsnYeo5jPquYchXCD0AYcd0AOCkb+plQsrAnQOdHHrT6ojkSitkSSQzlGACg3d2P5sXnE5zZuXKQVYB0kcbr5X1Zgauujol07Nc4KnU/NDKQGUw+iFJ8/mKTJeTjJ3If+BGX23VP1WIAvVNWIwlT2pe5YxDtls/JVc6nDQirv7d2ZIKIaxur+WEz90Byix68tc27/Lq8onM/e3t7WTn1DuOX6oBrmWS6fByiuYmHWRmLFsikMCYrcEnOCEjm2EM0Nn8pamFF+i06TP8PVWKFw9AYayOL2sjDJJOwFCAYEAeC0+W9BpnEVnl6FrOYUpdsoYmt+6toMgw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CvNQ4mL468xEREdfBm33wRiWka58Iba5DCS1WgXKo2FhyqiUyCrC+atbzHSsOr4bEJ623bitBm+8Y5cAV6nd+Cc6Qi4gqYe5Cf5FZOMCItfml9WopoBnNTyjNeKiMLsETQkIKre3boj3/qWTLlWi3gypG12A0W6tYd5S9gohzAW83dNuk+hM7ov9Mq/GvNj+qlDv0kN3xO+eRH/g2Jrm4ViBZ9NYcqiXm/4LkYVWN8q/7yfo7ZcePwoEcqAjSGqoQf4z8e/F/2VNE3bih87bvLrZ+TPoIu9ctS1ZfxzRQfxvhd85oY6pVVcn60fiBMMQUFGe/zgC8iY3wl0UC1Lvhg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Wed, 06 Nov 2024 16:17:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|