[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eaf03d34-a85a-7e54-31f4-fa85fce1901e@redhat.com>
Date: Wed, 11 Apr 2018 11:26:42 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: KarimAllah Ahmed <karahmed@...zon.de>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: Radim Krčmář <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH] X86/KVM: Do not allow DISABLE_EXITS_MWAIT when LAPIC ARAT
is not available
On 11/04/2018 11:16, KarimAllah Ahmed wrote:
> If the processor does not have an "Always Running APIC Timer" (aka ARAT),
> we should not give guests direct access to MWAIT. The LAPIC timer would
> stop ticking in deep C-states, so any host deadlines would not wakeup the
> host kernel.
>
> The host kernel intel_idle driver handles this by switching to broadcast
> mode when ARAT is not available and MWAIT is issued with a deep C-state
> that would stop the LAPIC timer. When MWAIT is passed through, we can not
> tell when MWAIT is issued.
>
> So just disable this capability when LAPIC ARAT is not available. I am not
> even sure if there are any CPUs with VMX support but no LAPIC ARAT or not.
The alternative would be to remove ARAT from __do_cpuid_ent when the
host lacks it and userspace has requested direct access to MWAIT.
However, this is simpler.
Queued, thanks.
Paolo
Powered by blists - more mailing lists