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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EBD7C433EF for ; Mon, 18 Oct 2021 17:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8487F60F11 for ; Mon, 18 Oct 2021 17:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234180AbhJRRr6 (ORCPT ); Mon, 18 Oct 2021 13:47:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40843 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbhJRRrx (ORCPT ); Mon, 18 Oct 2021 13:47:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634579141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n2ED4js5lS0lxq3Ati1A3TDBCk1NySWWfjAQp8swFKk=; b=Nlzhcpb7JsiClQTGG6+SKUkjkgM8vdD93nYdR3rYTImjLCmaDSjiFDoKDjdVlJ6SLPQG+4 /wELIIlHP4ap/l8mWqWy3bXNC2/+kXxY+nPN6VELRdsZsbH+1p74ncgKeTUgZbxRAzFeyG Ez5lwp0VBAdX0WA3tlNOSeGqzPOnMq8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-138-pz_mOnSLPKeZlu0lI2NNpA-1; Mon, 18 Oct 2021 13:45:40 -0400 X-MC-Unique: pz_mOnSLPKeZlu0lI2NNpA-1 Received: by mail-wm1-f69.google.com with SMTP id h22-20020a7bc936000000b0030d998aa15eso3427475wml.4 for ; Mon, 18 Oct 2021 10:45:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=n2ED4js5lS0lxq3Ati1A3TDBCk1NySWWfjAQp8swFKk=; b=JgjKlGBg+dTET9bxcin8xQL6jw1l+B2RPBnIClDkfVrreN2Ry65oKpgCq4/ov6SyB2 9UnIrGZXUCu1ygabDttMN32ryo2a5my9NUs01jYmfe2iRCq50ePwCKkLQYsghPujDly5 qpnwzX5BU2SHAFc+/a0+rUgTvjwoLpcWeCy5KGRoaTBvk6lo9g34EARwt0q9pKlBm0QB yH3gSVb4U0ADELUlDl8eBzveyaLC+Thl/EQYWLxr0WJGcsFwIt8I5AfAnZGHEsvyiTvE CKiZD/5m+cywFq9wNGXXkZR7rT2qtNPteOVuzJ6V+zvvVJPsU6vOAiWyiM1LfhwBS/dh 6e1g== X-Gm-Message-State: AOAM5331A5LvOWXONVkI+mY5ThQgnIfCO1N80Bo2rY6uR8RgWyio2G7C szsZP5L9TYLaIY8suvfC2zOJZFYdBUPlUbdeNpYhSgvPkEWL0P0+6lNLwSRa6lSmYlvU+gXthyx xqzC3xnYYokpuLe0nBISPRWGF X-Received: by 2002:adf:9bce:: with SMTP id e14mr37390911wrc.353.1634579138894; Mon, 18 Oct 2021 10:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb3V17dtLU+oGhGUjA+36f3EHbAZynBn9/WOoQF719tD7ufpt4f37VqVGYlkWuNnsselkE1A== X-Received: by 2002:adf:9bce:: with SMTP id e14mr37390885wrc.353.1634579138691; Mon, 18 Oct 2021 10:45:38 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id q12sm9473183wrp.13.2021.10.18.10.45.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Oct 2021 10:45:38 -0700 (PDT) Message-ID: Date: Mon, 18 Oct 2021 19:45:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v3 2/2] x86: sgx_vepc: implement SGX_IOC_VEPC_REMOVE ioctl Content-Language: en-US To: Sean Christopherson Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, dave.hansen@linux.intel.com, x86@kernel.org, yang.zhong@intel.com, jarkko@kernel.org, bp@suse.de References: <20211016071434.167591-1-pbonzini@redhat.com> <20211016071434.167591-3-pbonzini@redhat.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/10/21 19:17, Sean Christopherson wrote: > /* > * Report errors due to #GP or SGX_ENCLAVE_ACT, but do > * not WARN as userspace can induce said failures by > * calling the ioctl concurrently on multiple vEPCs or > * while one or more CPUs is running the enclave. Only > * a #PF on EREMOVE indicates a kernel/hardware issue. > */ > WARN_ON_ONCE(encls_faulted(ret) && > ENCLS_TRAPNR(ret) == X86_TRAP_PF); or != X86_TRAP_GP, just to avoid having a v5? :) Paolo