Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1165349pxb; Fri, 21 Jan 2022 11:14:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/wwBq4SHjW16ZOqZ8HZH4AVEiXOAnuq9adVzFMVL9K9Cfi+xfKhJ5lDyjbsYePc17xR0N X-Received: by 2002:a17:903:2447:b0:14b:20ad:c1b1 with SMTP id l7-20020a170903244700b0014b20adc1b1mr2939696pls.82.1642792453114; Fri, 21 Jan 2022 11:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792453; cv=none; d=google.com; s=arc-20160816; b=w57jIao7N97dpqo8SddoHnhlV4lWCg3rqZN9IGI5vmfACua4CI4dowfR7DDxYFGLhu 09fyKMVngWGmiPjhmS7h1pHb7Lk6mKD+hpXMXIZTiyI91kU1R9DV32oZRggL76eNOJOq zajWId/FcF2qd4xJep/dZWIED/MZqmNHtiPeyaiyyxj5UVvRXP8MmQoI9EOn/QPkqGlt c+q5+YffVHpb9k9C+5WLHg4v6xec9m4NsPA8j5+niFBwXSQJdNYmIHR84JFNwLW61qq4 51oxsK4TDZOHGnUb6zTGvv8Z3OgZ2AN2GUTDVti67un5BN7Spy5wpEyUzl00y4wx4NeR C9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SwkPmMBPZm2f8iJU9JjWAPgSwc2rs82HeO8OQaaXdTM=; b=kITUEGKgDKKQ6S6/7cc3C0JPkLFMdxRd7bM2s2sH5TZTZvMtkLLzd4LSrjHCdYSo44 K7fxfabSD5tVOy0Ht9kZJwRVVg5idbtkLLdyscWinbBgi0aNnSkE/QnKBILfwO/nBcX6 +f9vccL4l5+mqIzhrVf6PAOu1hIQdgl4zjO1FfZLGG2O78tAzuHPwU/RRHWQ5wkCahzH td1cp6MasSMmzPV/p7XcPlG4P1lm6c4RLJfGjGpgkYnZ/zQ1VwvGGxtwkP/YGygke3K4 4k4WTQSIrlwxyAAzxXuLa7StMTpXazl24hNbifo6KH7Zp1Sz0fZRBMIxFAn9TcTLvzUs aVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="aLDS6/P8"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a67si3205106pfb.115.2022.01.21.11.14.01; Fri, 21 Jan 2022 11:14:13 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="aLDS6/P8"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240927AbiASMxo (ORCPT + 99 others); Wed, 19 Jan 2022 07:53:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53089 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235241AbiASMxn (ORCPT ); Wed, 19 Jan 2022 07:53:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642596822; 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=SwkPmMBPZm2f8iJU9JjWAPgSwc2rs82HeO8OQaaXdTM=; b=aLDS6/P8XXHlv8NBX27L2bhO16Y3WDEH43L+RKCyb7Q5eBEt+r5Mlhj09dBIaMbFr/YxH0 lfOAMWEf2FenExb4VqcESg1hSkZkjg7L03OeQZ9W+EMqZ0r3+fQ+QuU7yiIP990+YEzwZB M1QeSYCv667UZcTWcMOAAk1CZ+DCoDI= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-hGUiKVyePTGXrYbd4N60IQ-1; Wed, 19 Jan 2022 07:53:41 -0500 X-MC-Unique: hGUiKVyePTGXrYbd4N60IQ-1 Received: by mail-wm1-f71.google.com with SMTP id i26-20020a1c541a000000b0034dc8bd7078so800990wmb.8 for ; Wed, 19 Jan 2022 04:53:41 -0800 (PST) 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=SwkPmMBPZm2f8iJU9JjWAPgSwc2rs82HeO8OQaaXdTM=; b=VBTHCVD0/7wsBP/UTNSz1ZKHpk/hhf5IX1CYXjX5XTMzv/Y8tSeFX45HjwwpzILBJg RDP9UagGWw7C51FKX6AUCf6XGGT2mPrQ75oo/pMQwfTm4BJK7QSpbw3HLdsIhtsZdsBc cdKsrNrzUBJD3ctOhyTQm0VDxdHr8sGsmym6M4EY75d5eFu7UCSVBrOqeIrFYMxZ7p2O feFM9GBlVPaoBsTLRC6Yct8Oy503IfGnH/3TKAfyM/aeMy84nrvF0966QCT+98qlWyeX sM8cDTUOlHJ/fXyBqm4L1+Rm9c0G+Rvq+SSPbpaM8PvnBeapEfqF5DeajuybmGmFmIDh wiUA== X-Gm-Message-State: AOAM530GfAd2fAQUvur94+Pk0qYhR/tnbSvbPuAiiPAbpPV6HmzaA/fn bdwuje1u75H17At8K9ykYKG01iWsIqqux+BEg1eTn8WifiIAP4GdGMxqiPugecKQQO2v55QiwZU M+Beix+moz5Y451htj4J71cOB X-Received: by 2002:a05:600c:6013:: with SMTP id az19mr3437722wmb.53.1642596820159; Wed, 19 Jan 2022 04:53:40 -0800 (PST) X-Received: by 2002:a05:600c:6013:: with SMTP id az19mr3437714wmb.53.1642596819996; Wed, 19 Jan 2022 04:53:39 -0800 (PST) Received: from [192.168.8.100] (tmo-096-151.customers.d1-online.com. [80.187.96.151]) by smtp.gmail.com with ESMTPSA id i12sm18158062wrf.100.2022.01.19.04.53.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 04:53:39 -0800 (PST) Message-ID: Date: Wed, 19 Jan 2022 13:53:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [RFC PATCH v1 06/10] KVM: s390: Add vm IOCTL for key checked guest absolute memory access Content-Language: en-US To: Christian Borntraeger , Janis Schoetterl-Glausch , Janosch Frank , Heiko Carstens , Vasily Gorbik Cc: David Hildenbrand , Claudio Imbrenda , Alexander Gordeev , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220118095210.1651483-1-scgl@linux.ibm.com> <20220118095210.1651483-7-scgl@linux.ibm.com> <8d09dc2e-2d2d-e5f6-8cc7-eecfc94a17b2@linux.ibm.com> From: Thomas Huth In-Reply-To: <8d09dc2e-2d2d-e5f6-8cc7-eecfc94a17b2@linux.ibm.com> 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 19/01/2022 13.46, Christian Borntraeger wrote: > > > Am 19.01.22 um 12:52 schrieb Thomas Huth: >> On 18/01/2022 10.52, Janis Schoetterl-Glausch wrote: >>> Channel I/O honors storage keys and is performed on absolute memory. >>> For I/O emulation user space therefore needs to be able to do key >>> checked accesses. >> >> Can't we do the checking in userspace? We already have functions for >> handling the storage keys there (see hw/s390x/s390-skeys-kvm.c), so why >> can't we do the checking in QEMU? > > That would separate the key check from the memory operation. Potentially for > a long time. > Wenn we piggy back on access_guest_abs_with_key we use mvcos in the host and > thus do the key check in lockstep with the keycheck which is the preferrable > solution. Ok, makes sense - Janis, could you please add this rationale to the patch description? Thomas