From: Keir Fraser Subject: Re: x86 instruction emulation in hvm Date: Tue, 12 May 2009 08:57:31 +0100 Message-ID: References: <4A08A389.9060200@ncsu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A08A389.9060200@ncsu.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Emre Can Sezer Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org On 11/05/2009 23:15, "Emre Can Sezer" wrote: > Yup. Not only did hvm_get_segment_register() work like a charm, but I > also ran into another problem as you have foretold. > > The instruction is fxsave, which uses a mask to copy some CPU > information to a 512byte memory. Any chance of an emulation function > for this instruction? Go for it. ;-) Define a 512-byte array, fxsave into it, and then write the array to guest memory. Look at how some other FPU ops that write to memory are implemented for further guidance. -- Keir