From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/9] Implement GIF, clgi and stgi v3 Date: Sat, 27 Sep 2008 15:55:38 +0300 Message-ID: <48DE2D4A.4020101@redhat.com> References: <1221658886-14109-1-git-send-email-agraf@suse.de> <1221658886-14109-2-git-send-email-agraf@suse.de> <1221658886-14109-3-git-send-email-agraf@suse.de> <1221658886-14109-4-git-send-email-agraf@suse.de> <1221658886-14109-5-git-send-email-agraf@suse.de> <20080925184759.GL27426@8bytes.org> <20080925212749.GN27426@8bytes.org> <589E0687-811B-4F93-984A-F7185B6FB988@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , kvm@vger.kernel.org, anthony@codemonkey.ws To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55808 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbYI0Mzk (ORCPT ); Sat, 27 Sep 2008 08:55:40 -0400 In-Reply-To: <589E0687-811B-4F93-984A-F7185B6FB988@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: >> >> Hmm yes, this is a problem. So this optimization will not work. We need >> other ways to optimize :) > > Well it would work for the KVM-in-KVM case, where we know that VMRUN > is always triggered with IF=1 and V_INTR=1. The only case that hack > fails is when we have IF=0 and V_INTR=1. Everything else should work > just fine. And in this case we would simply issue some VMEXITs 0x60, > so no big deal IMHO. It should be worth the tradeoff of making most > VMMs a lot faster. > > There should be a compile-option to enable the "correct" behavior > though. If we join that with the VMLOAD and VMSAVE hack there would be > only the VMRUN and DR exits left. That sounds like a really good > improvement where I wouldn't mind to break some specs :-). Maybe a hypercall, so it can be enabled on a guest-by-guest basis. I must say that if we do guest-specific hacking this way, a paravirt approach doesn't look so bad. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.