From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 0/3] KVM: Tie MWAIT/HLT/PAUSE interception to initially disabled capabilities Date: Wed, 29 Nov 2017 02:24:13 +0200 Message-ID: <20171129022129-mutt-send-email-mst@kernel.org> References: <1511615373-32615-1-git-send-email-jschoenh@amazon.de> <8971d9e0-388c-9934-1ab2-33508cbbeb8f@redhat.com> <20171128160528-mutt-send-email-mst@kernel.org> <20171129021958-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan =?iso-8859-1?Q?H=2E_Sch=F6nherr?= , Radim =?utf-8?B?S3LEjW3DocWZ?= , Joerg Roedel , KarimAllah Ahmed , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbdK2AYQ (ORCPT ); Tue, 28 Nov 2017 19:24:16 -0500 Content-Disposition: inline In-Reply-To: <20171129021958-mutt-send-email-mst@kernel.org> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Nov 29, 2017 at 02:20:34AM +0200, Michael S. Tsirkin wrote: > On Wed, Nov 29, 2017 at 01:07:32AM +0100, Paolo Bonzini wrote: > > On 28/11/2017 15:08, Michael S. Tsirkin wrote: > > > I think guests still want some way to halt when > > > giving up CPU for a long time. > > > > > > If you are not worried about guests entering low power states, > > > then you only need MWAIT and maybe PAUSE. > > > > > > HLT within guest only makes sense if you do not want to > > > allow guest to enter power state. > > > > > > If you don't exit on any of these, you want some other way > > > to actually halt the VCPU. > > > > If you want to do something in userspace, send a signal. Otherwise, it > > doesn't really matter (if you have a dedicated physical CPU) whether the > > task is runnable or not, as long as the CPU isn't in C0. > > > > Paolo > > If VCPU wants to give up its timeslice, how is it supposed to do it > if all exits are blocked? All this doesn't mean the patch can't be applied. But I think it would be handy to add another way to exit to host and stop until an interrupt. E.g. an access to a special address could do it. > -- > MST