From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nadav Har'El" Subject: Re: [PATCH 16/24] Implement VMLAUNCH and VMRESUME Date: Sun, 26 Sep 2010 15:06:53 +0200 Message-ID: <20100926130653.GA13736@fermat.math.technion.ac.il> References: <1276431753-nyh@il.ibm.com> <201006131230.o5DCUk2i013070@rice.haifa.ibm.com> <4C161569.3000602@redhat.com> <20100926111412.GC29641@fermat.math.technion.ac.il> <4C9F4316.5090906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:53206 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751502Ab0IZNHB (ORCPT ); Sun, 26 Sep 2010 09:07:01 -0400 Content-Disposition: inline In-Reply-To: <4C9F4316.5090906@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 26, 2010, Avi Kivity wrote about "Re: [PATCH 16/24] Implement VMLAUNCH and VMRESUME": > I don't see how vcpu->arch.cr0 can cache cr0_read_shadow. But this is precisely what the (unpatched) vmx_set_cr0 code does: If you look at it, it takes a parameter "cr0" and builds an additional variable "hw_cr0". "cr0" gets written into CR0_READ_SHADOW, while "hw_cr0" gets written into GUEST_CR0. vcpu->arch.cr0 gets a copy of "cr0", not of "hw_cr0", i.e., it is a cache of CR0_READ_SHADOW, not of GUEST_CR0. Or am I missing something? Thanks, Nadav. -- Nadav Har'El | Sunday, Sep 26 2010, 18 Tishri 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |What's the greatest world-wide use of http://nadav.harel.org.il |cowhide? To hold cows together.