From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86: Add instruction length to VCPU event state Date: Sat, 13 Feb 2010 12:21:47 +0200 Message-ID: <4B767D3B.10306@redhat.com> References: <4B76762C.10107@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33444 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069Ab0BMKVu (ORCPT ); Sat, 13 Feb 2010 05:21:50 -0500 In-Reply-To: <4B76762C.10107@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 02/13/2010 11:51 AM, Jan Kiszka wrote: > From: Jan Kiszka > > VMX requires a properly set instruction length VM entry field when > trying to inject soft exception and interrupts. We have to preserve this > state across VM save/restore to avoid breaking the re-injection of such > events on Intel. So add it to the new VCPU event state. > > Can't we fake it? set instruction length to 1 and rewind rip by 1. The only case where I think this can fail is if we have a fault during the soft exception injection. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.