From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] SVM: forbid guest to execute monitor/mwait Date: Thu, 22 Mar 2007 14:01:18 +0200 Message-ID: <4602700E.1030500@qumranet.com> References: <20070321184700.GA20139@amd.com> <46023264.4010105@qumranet.com> <20070322095605.GB20139@amd.com> <46025528.5010707@qumranet.com> <20070322101729.GC20139@amd.com> <46025D94.8050606@qumranet.com> <20070322110733.GE20139@amd.com> <46026B2A.2080501@qumranet.com> <20070322115602.GF20139@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Joerg Roedel Return-path: In-Reply-To: <20070322115602.GF20139-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Joerg Roedel wrote: > On Thu, Mar 22, 2007 at 01:40:26PM +0200, Avi Kivity wrote: > >> Joerg Roedel wrote: >> >>> Right. But it is possible for userspace to enable monitor bit for the >>> guest. Without virtualization of these 2 instructions the guest would >>> idle in the guest state after calling mwait and prevent other processes >>> and guests from running in that time. >>> >> Won't an interrupt during mwait cause a vmexit? >> > > Yes, an interrupt would cause an vmexit. But depending on the HZ value > of the host it may be a lot of time until the next interrupt. And over > time this will sum up and slow down other tasks. > Well, a guest can cause exactly the same effect with cli spin: jmp spin without executing any instructions that are not reported by cpuid. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV