From: "Nadav Har'El" Subject: Re: [PATCH 10/27] nVMX: Implement VMCLEAR Date: Sun, 17 Oct 2010 15:25:22 +0200 Message-ID: <20101017132522.GD14069@fermat.math.technion.ac.il> References: <1287309814-nyh@il.ibm.com> <201010171008.o9HA8g4E029408@rice.haifa.ibm.com> <4CBAF4B2.5000505@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, gleb@redhat.com To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:27874 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756613Ab0JQNZY (ORCPT ); Sun, 17 Oct 2010 09:25:24 -0400 Content-Disposition: inline In-Reply-To: <4CBAF4B2.5000505@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR": > >+ vmcs12 = kmap(page); > > kmap_atomic() please (better, kvm_write_guest(), but can defer that for > later) Sorry about my ignorance, but why is kmap_atomic() better here than kmap()? While handling an exit (caused by a guest running VMCLEAR instruction), we aren't in atomic context, aren't we? If I use kmap_atomic() here I'll need to kunmap_atomic() below which will break the newly combined kunmap & nested_release_page function ;-) > >+ vmcs12->launch_state = 0; > >+ kunmap(page); > >+ nested_release_page(page); -- Nadav Har'El | Sunday, Oct 17 2010, 9 Heshvan 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Diplomat: A man who always remembers a http://nadav.harel.org.il |woman's birthday but never her age.