From: Cornelia Huck Subject: Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory Date: Thu, 5 Feb 2015 14:00:52 +0100 Message-ID: <20150205140052.390cc8d3.cornelia.huck@de.ibm.com> References: <1422965498-11500-1-git-send-email-thuth@linux.vnet.ibm.com> <1422965498-11500-2-git-send-email-thuth@linux.vnet.ibm.com> <54D0C76B.70603@redhat.com> <20150203161601.1319f7ef@oc7435384737.ibm.com> <54D0E7B8.2060501@redhat.com> <54D1D7A3.8010508@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , Thomas Huth , qemu-devel@nongnu.org, kvm@vger.kernel.org, agraf@suse.de To: Christian Borntraeger Return-path: Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:51238 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbbBENBA (ORCPT ); Thu, 5 Feb 2015 08:01:00 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Feb 2015 13:00:59 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1679017D8059 for ; Thu, 5 Feb 2015 13:01:05 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t15D0uNY3080594 for ; Thu, 5 Feb 2015 13:00:56 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t15D0swK007672 for ; Thu, 5 Feb 2015 06:00:56 -0700 In-Reply-To: <54D1D7A3.8010508@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 04 Feb 2015 09:26:11 +0100 Christian Borntraeger wrote: > the classic channel I/O does set the storage key change/reference and > also triggers errors in the storage key protection value mismatches. Just a bit of background for the benefit of innocent bystanders: When classic channel I/O is initiated, the caller provides a so-called operation request block (orb) which references the actual channel program it wants to start. In this same orb, the caller also provides the storage key to be used for all memory fetches (either of the individual channel commands or of the memory they reference). qemu interpretation of channel commands currently ignores all of this. > Conny: > I am asking myself, if we should explicitly add a comment in the > virtio-ccw spec, that all accesses are assumed to be with key 0 and > thus never cause key protection. The change/reference bit is set > by the underlying I/O or memory copy anyway. > We can then add a ccw later on to set a different key if we ever need > that. I don't think we need to clarify anything for the normal channel commands used by virtio: They are treated as any other channel command wrt key protection; and the lack of key checking is a feature of qemu, not of the spec. For the memory used for the virtqueues, I agree that we should clarify that we assume key 0. I'm not sure whether there's a case for extending this in the future, but who knows. I'll probably have to open an issue against the virtio spec for this.