[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH] x86/hvm: make ACPI PM timer support optional
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Fri, 27 Sep 2024 12:42:24 +0300
- 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=UhnznkQSlXORm7PuZFJNaddsX3rwkwTwagp4RXo9aH4=; b=iu5AhA69p0qFXiQj+vrR9SX/3Rc33XnLrjCdjDUoJs6NYuhaM122vpaLyVNjIBejQG4SNePSXsA01V9HHVuFY9wxf2hxuKeeD6Z6j30uUkIFREB+XZAp+iI9pusRT+CHbes5W3ZfOMxs/UrrNkCJ54Nnc1SbK2VwR72+WLlXdRcJLHXttSLVopkNzKmV2mG51pq743TGnPI5hnavs52Ucb8WMoWUsxsS7TlJeirR9h2Kn6qDZx7fQbNdvTvDHzHgGInYEpKgyDzYVmVi/Jjh/gqL2Fdk0DLzgI9ToKYwvY4JY2q/CPZ/vq4M4ehTQUTsWh+qiTlhN+Zhp+DprK0qXw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qRzkQPc276Z8gBGvdqGCIBUJJkox2kf4kVqkglmfpoL2GhLzmH1/hPF21Vpi/4o+fXK+YAjk+0A44SfO6VO0+20bggEl34XwJTC/B2fWRggTynlS260yWxtZD0EAVvDFVdOMdtY0wG92DZ7mA5wOn6ZnZw0SZKTIeGC5TV/fVPnagtFrcEolJ7E7renGnwKe8wvuxwwWIHXn+5waJkZ/ZVD/zolqtxevtFwDPk/LWGlCQSIF4wx/dCRIhxgqmT04IFY6uAlXGOxdlkcEBHIfGlRhvz1db4UuYHGJFW7ldpgzNI7GwsyHr9rKEBedhuqUh7kbwkh7ygymKtg26JlfHg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 27 Sep 2024 09:42:31 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
23.09.24 13:01, Jan Beulich:
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -758,6 +758,9 @@ static bool emulation_flags_ok(const struct domain
*d, uint32_t emflags)
(X86_EMU_ALL & ~(X86_EMU_VPCI | X86_EMU_USE_PIRQ)) &&
emflags != X86_EMU_LAPIC )
return false;
+ if ( !is_hardware_domain(d) &&
+ (emflags & X86_EMU_PM) && !IS_ENABLED(CONFIG_X86_PMTIMER))
+ return false;
}
else if ( emflags != 0 && emflags != X86_EMU_PIT )
{
Why the is_hardware_domain() part of the check?
the idea was that since hardware domain has full hardware access it
probably doesn't need emulated timer. But this check will be dropped
anyway, as Roger suggested.
(probably with X86_PMTIMER option depending on PV)
HVM you mean?
I wanted to do it like this:
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -386,7 +386,7 @@ config ALTP2M
If unsure, stay with defaults.
config X86_PMTIMER
- bool "ACPI PM timer emulation support" if EXPERT
+ bool "ACPI PM timer emulation support" if EXPERT && PV
default y
depends on HVM
help
to allow it to be disabled when PV is on and prevent situation when pvh
domain can't be created because !PV and hvm domain can't be created
either without emulated timer.
-Sergiy
|