kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>
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:30:51 +0200	[thread overview]
Message-ID: <932230a1-898c-7f6d-59a2-1f5027bd3277@redhat.com> (raw)
In-Reply-To: <9a904c9c-a91c-e685-605d-b67b577b8068@redhat.com>

On 31.05.2017 15:22, Thomas Huth wrote:
> 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 <david@redhat.com>
>> ---
> [...]
>> 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 <david@redhat.com>
>> + *
>> + * 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 <libcflat.h>
>> +#include <asm/interrupt.h>
>> +#include <asm/barrier.h>
>> +
>> +static bool pgm_int_expected;
>> +static struct lowcore *lc;
> 
> Cosmetic suggestion:
> Maybe make it "static struct lowcore const *lc = 0" to be more explicit?

You most probably mean
static struct lowcore *const lc = 0;

(otherwise it won't compile)

makes sense. If I have to resend, I'll add it.

> 
> Apart from that, patch looks fine to me now, so with or without that change:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

Thanks!

-- 

Thanks,

David

      reply	other threads:[~2017-05-31 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 12:39 [kvm-unit-tests PATCH v2 0/2] s390x: program interrupt handler David Hildenbrand
2017-05-31 12:39 ` [kvm-unit-tests PATCH v2 1/2] s390x: generate asm offsets for the lowcore David Hildenbrand
2017-05-31 12:39 ` [kvm-unit-tests PATCH v2 2/2] s390x: pgm interrupt handler and a way to test them David Hildenbrand
2017-05-31 12:51   ` Paolo Bonzini
2017-05-31 13:25     ` Thomas Huth
2017-05-31 14:23       ` Paolo Bonzini
2017-05-31 13:26     ` David Hildenbrand
2017-05-31 13:22   ` Thomas Huth
2017-05-31 13:30     ` David Hildenbrand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=932230a1-898c-7f6d-59a2-1f5027bd3277@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).