From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szjug-0003Nb-A2 for qemu-devel@nongnu.org; Fri, 10 Aug 2012 03:45:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Szjud-0000wZ-I6 for qemu-devel@nongnu.org; Fri, 10 Aug 2012 03:45:42 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:60820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szjud-0000wD-9M for qemu-devel@nongnu.org; Fri, 10 Aug 2012 03:45:39 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Aug 2012 08:45:36 +0100 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7A7iuOi17039572 for ; Fri, 10 Aug 2012 07:44:56 GMT Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7A7j2Dt029252 for ; Fri, 10 Aug 2012 01:45:02 -0600 Date: Fri, 10 Aug 2012 09:45:00 +0200 From: Cornelia Huck Message-ID: <20120810094500.0211c349@BR9GNB5Z> In-Reply-To: <1DF99033-5FD5-40ED-9221-61E7EA5A9219@suse.de> References: <1344351168-2568-1-git-send-email-cornelia.huck@de.ibm.com> <1344351168-2568-2-git-send-email-cornelia.huck@de.ibm.com> <1DF99033-5FD5-40ED-9221-61E7EA5A9219@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: linux-s390 , Anthony Liguori , Rusty Russell , KVM , Carsten Otte , Sebastian Ott , Marcelo Tosatti , Heiko Carstens , qemu-devel , Christian Borntraeger , Avi Kivity , Martin Schwidefsky On Fri, 10 Aug 2012 01:09:15 +0200 Alexander Graf wrote: > > On 07.08.2012, at 16:52, Cornelia Huck wrote: > > > Running under a kvm host does not necessarily imply the presence of > > a page mapped above the main memory with the virtio information; > > however, the code includes a hard coded access to that page. > > > > Instead, check for the presence of the page and exit gracefully > > before we hit an addressing exception if it does not exist. > > > > Signed-off-by: Cornelia Huck > > --- > > drivers/s390/kvm/kvm_virtio.c | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c > > index 47cccd5..408447c 100644 > > --- a/drivers/s390/kvm/kvm_virtio.c > > +++ b/drivers/s390/kvm/kvm_virtio.c > > @@ -418,6 +418,21 @@ static void kvm_extint_handler(struct ext_code ext_code, > > } > > } > > > > +static int __init test_devices_support(void) > > Today we know what this function does, but the next person running into it has no clue. Maybe add a nice description here that you're trying to access memory above ram? (is this even what you're doing here? my s390 asm is slightly rusty) :) Good point, will add a comment.