From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS Date: Tue, 06 Oct 2015 14:02:28 -0400 Message-ID: References: <560D1C6E.2060803@suse.com> <560D278F.10801@redhat.com> <20151005095022.GX3036@8bytes.org> <20151005171537.GD12506@8bytes.org> <20151006102329.GC20886@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain Cc: Paolo Bonzini , kvm@vger.kernel.org, Dirk =?utf-8?Q?M=C3=BCller?= To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44107 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365AbbJFSCa (ORCPT ); Tue, 6 Oct 2015 14:02:30 -0400 In-Reply-To: <20151006102329.GC20886@8bytes.org> (Joerg Roedel's message of "Tue, 6 Oct 2015 12:23:29 +0200") Sender: kvm-owner@vger.kernel.org List-ID: Joerg Roedel writes: > On Mon, Oct 05, 2015 at 01:42:43PM -0400, Bandan Das wrote: >> Joerg Roedel writes: >> >> > On Mon, Oct 05, 2015 at 12:54:43PM -0400, Bandan Das wrote: >> >> Joerg Roedel writes: >> >> The problems is that the next_rip field could be stale. If the processor supports >> >> next_rip, then it will clear it out on the next entry. If it doesn't, >> >> an old value just sits there (no matter who wrote it) and the problem >> >> happens when skip_emulated_instruction advances the rip with an incorrect >> >> value. >> > >> > So the right fix would be to just set the guests next_rip to 0 when we >> > emulate vmrun, just like real hardware does, no? >> >> Agreed, resetting to 0 if nrips isn't supported seems right. It would still >> help having a printk_once in this case IMO :) > > I meant to reset it always to 0 on vmrun, like real hardware does. Atleast the spec don't mention this, I don't know how I got that idea :) The spec just say that it gets written to by hardware on certain intercepts and for others it gets reset to 0 on #VMEXIT. > > > Joerg