From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/9] Implement GIF, clgi and stgi Date: Tue, 02 Sep 2008 12:15:01 +0300 Message-ID: <48BD0415.6040508@qumranet.com> References: <1220270281-15720-1-git-send-email-agraf@suse.de> <1220270281-15720-2-git-send-email-agraf@suse.de> <1220270281-15720-3-git-send-email-agraf@suse.de> <1220270281-15720-4-git-send-email-agraf@suse.de> <48BBEA06.8090206@qumranet.com> <48BBFB41.8090004@qumranet.com> <7318388C-B414-424F-9A3E-5A9433D2A192@suse.de> <48BC12DB.5020204@qumranet.com> <9444E915-41DE-4266-B810-3E5EE370D1D5@suse.de> <48BC1584.4020404@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM list , Joerg Roedel , Anthony Liguori To: Alexander Graf Return-path: Received: from il.qumranet.com ([212.179.150.194]:12338 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbYIBJPD (ORCPT ); Tue, 2 Sep 2008 05:15:03 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: > > Ah, so we don't sync hflags with the userspace on every transition but > only request it on save/restore? Yes. That's how all of the other state is synced. >>> >>> Do we really want to support storing the state when within the >>> Level2 VM? Can't we just #VMEXIT as soon as we switch to userspace >>> or so? That would probably simplify things a lot. >>> >> >> Great idea. What do we give as the exit reason? > > I thought of INTR here. That should be a nop in every VMM. Even if > not, worst case it would end in an hlt that still fires on the next > timer. Yes. Luckily svm doesn't support capturing the vector number like vmx does. There's only one case where this doesn't work, AFAICT: when the INTR intercept isn't enabled. Once can think of a microkernel hypervisor that forwards all interrupts to a privileged guest (and when that guest is running, it can disable INTR intercepts). I don't know of any hypervisor which does this (Xen doesn't and can't), so I don't think this is an objection to using INTR. -- error compiling committee.c: too many arguments to function