From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15255C433FF for ; Wed, 31 Jul 2019 13:50:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB2C6206A2 for ; Wed, 31 Jul 2019 13:50:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726281AbfGaNug (ORCPT ); Wed, 31 Jul 2019 09:50:36 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:33116 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfGaNug (ORCPT ); Wed, 31 Jul 2019 09:50:36 -0400 Received: by mail-wm1-f66.google.com with SMTP id h19so1359801wme.0 for ; Wed, 31 Jul 2019 06:50:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=xiMsAjiDDo/ioi8HvaBXBSlL3/9tipDJZfJL08Je2vI=; b=eEiKcXpCXU1ndb3v3TAXFbB4wx4Y6FX9gEZyNaY1VBxHfH7mzlUn1wxwsZMMuPxyCM 9Dr5DVilZpT780wLwFP2RAY9hcEMxu5Zq8DT+zTLkiCKKBOSfrMgbQWcJ1Adjf7nD48+ k10tPP4tKyFOvgBmIf1MFVmhMZVddKJbuxeXiN8y9xsdCoOqnY2Hon2tK55fW7z98bUK bM1HfGDq0Z1sUC6xb5JU+tB2SFl063R5mmG268Je1izVRwzBrz8w1a0BEjx0Qw1fL1g2 QwvVtpIz6aXAMrblAY3KKyLSM94QRWLXdDF2z+qvrxMxgQ+iYd0R902zNveIVw4BP9+O uuXQ== X-Gm-Message-State: APjAAAX6+WEvHTpg7vNXJ4PH3o7VxmE1r0NSpzy361ciZHI/i6B8oVXM qMQdbJD0Xre9ot62BErOXbh8UQ== X-Google-Smtp-Source: APXvYqyHaBpgxxRj2uo8Nfd7YRV3VKghabyOA1q/9XZIpgUAeDUPX+n7PU6c96hFKkpOXsnROLRBBg== X-Received: by 2002:a1c:2dd1:: with SMTP id t200mr287523wmt.1.1564581034087; Wed, 31 Jul 2019 06:50:34 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id y24sm49973593wmi.10.2019.07.31.06.50.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 06:50:33 -0700 (PDT) From: Vitaly Kuznetsov To: Jim Mattson Cc: kvm list , LKML , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Joerg Roedel Subject: Re: [PATCH RFC 3/5] x86: KVM: svm: clear interrupt shadow on all paths in skip_emulated_instruction() In-Reply-To: References: <20190620110240.25799-1-vkuznets@redhat.com> <20190620110240.25799-4-vkuznets@redhat.com> Date: Wed, 31 Jul 2019 15:50:32 +0200 Message-ID: <87ftmm71p3.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Jim Mattson writes: > On Thu, Jun 20, 2019 at 4:02 AM Vitaly Kuznetsov wrote: >> >> Regardless of the way how we skip instruction, interrupt shadow needs to be >> cleared. > > This change is definitely an improvement, but the existing code seems > to assume that we never call skip_emulated_instruction on a > POP-SS/MOV-to-SS/STI. Is that enforced anywhere? (before I send v1 of the series) I looked at the current code and I don't think it is enforced, however, VMX version does the same and honestly I can't think of a situation when we would be doing 'skip' for such an instruction.... and there's nothing we can easily enforce from skip_emulated_instruction() as we have no idea what the instruction is... I can of course be totally wrong and would appreciate if someone more knowledgeable chimes in :-) -- Vitaly