From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH v2 2/2] s390x: pgm interrupt handler and a way to test them Date: Wed, 31 May 2017 15:22:38 +0200 Message-ID: <9a904c9c-a91c-e685-605d-b67b577b8068@redhat.com> References: <20170531123925.4547-1-david@redhat.com> <20170531123925.4547-3-david@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Christian Borntraeger To: David Hildenbrand , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbdEaNWn (ORCPT ); Wed, 31 May 2017 09:22:43 -0400 In-Reply-To: <20170531123925.4547-3-david@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 31.05.2017 14:39, David Hildenbrand wrote: > The program interrupt handler will detect unexpected program interrupts and > allow to expect + verify program interrupts for testing purposes. > > We need "-fno-delete-null-pointer-checks", otherwise trying to access the > lowcore at address 0 makes GCC generate very weird code. > > Add two tests to test for simple operation and addressing exceptions. > > Signed-off-by: David Hildenbrand > --- [...] > diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c > new file mode 100644 > index 0000000..8d861a2 > --- /dev/null > +++ b/lib/s390x/interrupt.c > @@ -0,0 +1,82 @@ > +/* > + * s390x interrupt handling > + * > + * Copyright (c) 2017 Red Hat Inc > + * > + * Authors: > + * David Hildenbrand > + * > + * This code is free software; you can redistribute it and/or modify it > + * under the terms of the GNU Library General Public License version 2. > + */ > +#include > +#include > +#include > + > +static bool pgm_int_expected; > +static struct lowcore *lc; Cosmetic suggestion: Maybe make it "static struct lowcore const *lc = 0" to be more explicit? Apart from that, patch looks fine to me now, so with or without that change: Reviewed-by: Thomas Huth