Re: [kvm-unit-tests PATCH v2 2/2] s390x: pgm interrupt handler and a way to test them

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
[...]
> 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@xxxxxxxxxx>
> + *
> + * 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?

Apart from that, patch looks fine to me now, so with or without that change:

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux