From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758019AbaFSLYE (ORCPT ); Thu, 19 Jun 2014 07:24:04 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:39040 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756577AbaFSLYB (ORCPT ); Thu, 19 Jun 2014 07:24:01 -0400 Date: Thu, 19 Jun 2014 14:23:56 +0300 From: Gleb Natapov To: Nadav Amit Cc: "Michael S. Tsirkin" , "Gabriel L. Somlo" , Eric Northup , Nadav Amit , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Linux Kernel Mailing List , KVM , joro@8bytes.org, agraf@suse.de Subject: Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation Message-ID: <20140619112356.GB429@minantech.com> References: <20140618184601.GE1695@ERROL.INI.CMU.EDU> <20140619101811.GA5777@redhat.com> <1B06E887-9D07-4E85-AE06-75B01787C488@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1B06E887-9D07-4E85-AE06-75B01787C488@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > > On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: > > > On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: > >> On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: > >>> On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: > >>>> mwait and monitor are currently handled as nop. Considering this behavior, they > >>>> should still be handled correctly, i.e., check execution conditions and generate > >>>> exceptions when required. mwait and monitor may also be executed in real-mode > >>>> and are not handled in that case. This patch performs the emulation of > >>>> monitor-mwait according to Intel SDM (other than checking whether interrupt can > >>>> be used as a break event). > >>>> > >>>> Signed-off-by: Nadav Amit > >> > >> How about this instead (details in the commit log below) ? Please let > >> me know what you think, and if you'd prefer me to send it out as a > >> separate patch rather than a reply to this thread. > >> > >> Thanks, > >> --Gabriel > > > > If there's an easy workaround, I'm inclined to agree. > > We can always go back to Gabriel's patch (and then we'll need > > Nadav's one too) but if we release a kernel with this > > support it becomes an ABI and we can't go back. > > > > So let's be careful here, and revert the hack for 3.16. > > > > > > Acked-by: Michael S. Tsirkin > > > Personally, I got a custom guest which requires mwait for executing correctly. Can you elaborate on this guest a little bit. With nop implementation for mwait the guest will hog a host cpu. Do you consider this to be "executing correctly?" -- Gleb.