public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v3 6/6] s390x: SMP test
Date: Wed, 25 Sep 2019 15:32:40 +0200	[thread overview]
Message-ID: <4afbfdca-e028-4bb8-0ed0-41f907e9acf3@redhat.com> (raw)
In-Reply-To: <df219ca6-b772-cfcb-2c9b-e53fe5b2c8b8@redhat.com>

On 25.09.19 15:30, Thomas Huth wrote:
> On 25/09/2019 15.27, David Hildenbrand wrote:
>> On 20.09.19 10:03, Janosch Frank wrote:
>>> Testing SIGP emulation for the following order codes:
>>> * start
>>> * stop
>>> * restart
>>> * set prefix
>>> * store status
>>> * stop and store status
>>> * reset
>>> * initial reset
>>> * external call
>>> * emegergency call
>>>
>>> restart and set prefix are part of the library and needed to start
>>> other cpus.
>>>
>>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>>> ---
>>>  s390x/Makefile      |   1 +
>>>  s390x/smp.c         | 242 ++++++++++++++++++++++++++++++++++++++++++++
>>>  s390x/unittests.cfg |   4 +
>>>  3 files changed, 247 insertions(+)
>>>  create mode 100644 s390x/smp.c
>>>
>>> diff --git a/s390x/Makefile b/s390x/Makefile
>>> index d83dd0b..3744372 100644
>>> --- a/s390x/Makefile
>>> +++ b/s390x/Makefile
>>> @@ -15,6 +15,7 @@ tests += $(TEST_DIR)/cpumodel.elf
>>>  tests += $(TEST_DIR)/diag288.elf
>>>  tests += $(TEST_DIR)/stsi.elf
>>>  tests += $(TEST_DIR)/skrf.elf
>>> +tests += $(TEST_DIR)/smp.elf
>>>  tests_binary = $(patsubst %.elf,%.bin,$(tests))
>>>  
>>>  all: directories test_cases test_cases_binary
>>> diff --git a/s390x/smp.c b/s390x/smp.c
>>> new file mode 100644
>>> index 0000000..7032494
>>> --- /dev/null
>>> +++ b/s390x/smp.c
>>> @@ -0,0 +1,242 @@
>>> +/*
>>> + * Tests sigp emulation
>>> + *
>>> + * Copyright 2019 IBM Corp.
>>> + *
>>> + * Authors:
>>> + *    Janosch Frank <frankja@linux.ibm.com>
>>> + *
>>> + * This code is free software; you can redistribute it and/or modify it
>>> + * under the terms of the GNU General Public License version 2.
>>> + */
>>> +#include <libcflat.h>
>>> +#include <asm/asm-offsets.h>
>>> +#include <asm/interrupt.h>
>>> +#include <asm/page.h>
>>> +#include <asm/facility.h>
>>> +#include <asm-generic/barrier.h>
>>> +#include <asm/sigp.h>
>>> +
>>> +#include <smp.h>
>>> +#include <alloc_page.h>
>>> +
>>> +static int testflag = 0;
>>> +
>>> +static void cpu_loop(void)
>>> +{
>>> +	for (;;) {}
>>
>> Won't that be optimized out completely?
> 
> Why? AFAIK this is the standard way to write and endless loop ... how
> can a compiler optimize that away?

Was messing it up with "just" an empty loop body, I think you're right.

-- 

Thanks,

David / dhildenb

  reply	other threads:[~2019-09-25 13:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20  8:03 [kvm-unit-tests PATCH v3 0/6] s390x: Add multiboot and smp Janosch Frank
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 1/6] s390x: Use interrupts in SCLP and add locking Janosch Frank
2019-09-20  8:12   ` David Hildenbrand
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 2/6] s390x: Add linemode console Janosch Frank
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 3/6] s390x: Add linemode buffer to fix newline on every print Janosch Frank
2019-09-20  8:24   ` David Hildenbrand
2019-09-20  8:31     ` Janosch Frank
2019-09-20 11:23     ` [kvm-unit-tests PATCH] " Janosch Frank
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 4/6] s390x: Add initial smp code Janosch Frank
2019-09-23 10:43   ` Thomas Huth
2019-09-23 14:15     ` [kvm-unit-tests PATCH] " Janosch Frank
2019-09-24 16:06       ` Thomas Huth
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 5/6] s390x: Prepare for external calls Janosch Frank
2019-09-25  8:50   ` David Hildenbrand
2019-09-20  8:03 ` [kvm-unit-tests PATCH v3 6/6] s390x: SMP test Janosch Frank
2019-09-25  8:49   ` Thomas Huth
2019-09-25 10:26     ` Janosch Frank
2019-09-25  9:03   ` David Hildenbrand
2019-09-25 10:24     ` Janosch Frank
2019-09-25 13:27   ` David Hildenbrand
2019-09-25 13:30     ` Thomas Huth
2019-09-25 13:32       ` David Hildenbrand [this message]
2019-09-25 13:35         ` David Hildenbrand
2019-09-25 13:39           ` David Hildenbrand

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=4afbfdca-e028-4bb8-0ed0-41f907e9acf3@redhat.com \
    --to=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --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