Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3216123pxb; Tue, 13 Apr 2021 23:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW2Q2Pbo08RFpe/pkjykA/mqoVSnREPdgA2SwjgehoT7DDgG1OE4308nVNtEXmhJI14im5 X-Received: by 2002:a63:d556:: with SMTP id v22mr3536459pgi.310.1618380935507; Tue, 13 Apr 2021 23:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618380935; cv=none; d=google.com; s=arc-20160816; b=OZjwa/3BaprTmG51QMS1Fa5MymZqw1XG46cBMriT8ZmMQ+EPPHIFffxMyNNqlhBgRj /xppUdfWXedfK2VoZvW0MonlCd+RMQV5M7xpQZ/xAtj4Q1EI3Q0fX6sWiAn7HYHlrXQW xdVQaalU5LQJyl/CWPGsNyN/xt3hx/L3ctRe2qy0fR+aoZhqCjVPIy161NfyY8wccebB nj7k9h0p3DNthM9uv+ydn9OfunsA98NWgRa3J1sqkjN/6F+ZfhASq+rfp0cWsYfkbn4A p+C5GnCxagnL5QjD3pAeOQj1t3UM1RmpFdlpYzkAZQogy0q4qzOJ+unR+QGqdo9Oga3O sDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BMGgkIUNC5wWSbI0C1p7AMY+wrQiOl3v5uY4HYbC/nA=; b=fy0lrvuVVa0wcTvA8P2DRgXlbS2dX6N7sg2OTOrgKKiR5g6O5AjN599BeQ+FXZaZSG wFUsEWSBDN0Ejl/8cSmp8Xxy1A+oqgsMXyy3SvWh4SjPZ3KOSrbc2NNtS3rnoqHLRhnz by1au4gKJKsJ9eHGvuInBQaWNfHUaVQpounFphcBqbY2GaZ2uDe6B7nysewwZuDGmyF+ 4O7KgRJtZvuMEGcyADK7eAMw8VhBgCwLR53+zVgEqEUg2eu8NPwFdqFBa1XrWnB6U2Os 9EM4sd6HTuI8U8qVdtcSoClAzzvljtSa5UNkqjkrYPFgJa/ak+j+WStE76cYy21F4TqL 2bMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mRHHof94; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw3si1566509pjb.124.2021.04.13.23.15.23; Tue, 13 Apr 2021 23:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mRHHof94; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347698AbhDMSq3 (ORCPT + 99 others); Tue, 13 Apr 2021 14:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346390AbhDMSq0 (ORCPT ); Tue, 13 Apr 2021 14:46:26 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB75C061756 for ; Tue, 13 Apr 2021 11:46:05 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id v6so26292459ejo.6 for ; Tue, 13 Apr 2021 11:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BMGgkIUNC5wWSbI0C1p7AMY+wrQiOl3v5uY4HYbC/nA=; b=mRHHof94dBTjnv2kql1qxtKewllGuJC7CJTPW+gffF3hjEG/vYqShSSh9lDYIGDTZW +2f5H5GYi9BMd979sRs2hichgCR1CFTVXFx13NO7FvDVI1Kp44mYBorL/ls0WUNneyyB /JTqivyXzzjZJpZ4llQutwzxtvBSsTvz4bB3cPR+5JNtBakN5/VYtzIvJdaEBUethCfG 0bGzPtJhwx5x3rsBUsU7MaC+/gPylvCadXuMIBW3DaK/KN5FffKAyDdlMyUcpNVBXuQ7 DjYoNZT+Jj4RHjC8Bt37cCXI9UPgPC0qZ9/z4htSGHq1+v/huhtfkdApmWjZxdcIOxk1 DnQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BMGgkIUNC5wWSbI0C1p7AMY+wrQiOl3v5uY4HYbC/nA=; b=qvChCi9zon3rJ28SJ4FOEzKeUNa9vAQcM5q2wiAn+sWm8WCXDQRuyz7GgySYBm1hqi 8AAz7pbfLQqOLQY46fh7+s1U0l9BKi82npcaoZZzvQWGp7zLP7DJcQB3XerY48IyrggR 0C4yqfOcfJnJcoGT11AzP091Rbixg6yPsbQ0kDzNFBekBnCDWyHruPp8Ocfk6UF0q/hY 6EEc+qB83k6ewlFDQIECm6+LX5LY8cGFtO9J0NHx3XrwtDWpCjvnB2owieRhMEgTmm6l bgAi6Lgf/+ZB7qb2O5bYcWaaq2BM8J+RtGS+Z07aN3bEhNd17kDTxbmJKT4tEmg9EJMO ReKg== X-Gm-Message-State: AOAM533++91JBMR8RbTCjHQFBivgrKfj4rRzJVYQs4C0sFw1dJYpf7RT pcoRyLUfqWRTOwBpYvcGzdo1UwOsP0deQAqMBzjQcA== X-Received: by 2002:a17:906:48c4:: with SMTP id d4mr14395692ejt.548.1618339563693; Tue, 13 Apr 2021 11:46:03 -0700 (PDT) MIME-Version: 1.0 References: <20210412130938.68178-1-david.edmondson@oracle.com> <20210412130938.68178-6-david.edmondson@oracle.com> In-Reply-To: From: Aaron Lewis Date: Tue, 13 Apr 2021 11:45:52 -0700 Message-ID: Subject: Re: [PATCH 5/6] KVM: SVM: pass a proper reason in kvm_emulate_instruction() To: David Edmondson Cc: Sean Christopherson , linux-kernel@vger.kernel.org, kvm list , Paolo Bonzini , Vitaly Kuznetsov , "H. Peter Anvin" , x86@kernel.org, Thomas Gleixner , Joerg Roedel , Wanpeng Li , Borislav Petkov , Jim Mattson , Ingo Molnar , Joao Martins Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > Depending on what you're trying to do with the info, maybe there's a better > > option. E.g. Aaron is working on a series that includes passing pass the code > > stream (instruction bytes) to userspace on emulation failure, though I'm not > > sure if he's planning on providing the VM-Exit reason. > > Having the instruction stream will be good. > > Aaron: do you have anything to share now? In what time frame do you > think you might submit patches? I should be able to have something out later this week. There is no exit reason as Sean indicated, so if that's important it will have to be reworked afterwards. For struct internal in kvm_run I use data[0] for flags to indicate what's contained in the rest of it, I use data[1] as the instruction size, and I use data[2,3] to store the instruction bytes. Hope that helps. > > I'm happy to re-work this to make the exit reason available, if that's > the appropriate direction. > > dme. > -- > And you're standing here beside me, I love the passing of time.