From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAhGm-0005E3-Cr for qemu-devel@nongnu.org; Mon, 23 Apr 2018 15:37:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAhGj-0002Y5-7n for qemu-devel@nongnu.org; Mon, 23 Apr 2018 15:37:00 -0400 References: <20180412192602.13430-1-david@redhat.com> <20180423124528.2eead1de.cohuck@redhat.com> From: David Hildenbrand Message-ID: <3bc9fc9c-0e05-df7b-1d5c-bf554147a51c@redhat.com> Date: Mon, 23 Apr 2018 21:36:46 +0200 MIME-Version: 1.0 In-Reply-To: <20180423124528.2eead1de.cohuck@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] s390x: refactor reset/reipl handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Richard Henderson , Alexander Graf , Christian Borntraeger , Thomas Huth , Paolo Bonzini On 23.04.2018 12:45, Cornelia Huck wrote: > On Wed, 18 Apr 2018 16:33:13 +0200 > David Hildenbrand wrote: > >>> static void s390_ipl_class_init(ObjectClass *klass, void *data) >>> diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h >>> index 0570d0ad75..102f1ea7af 100644 >>> --- a/hw/s390x/ipl.h >>> +++ b/hw/s390x/ipl.h >>> @@ -87,7 +87,17 @@ int s390_ipl_set_loadparm(uint8_t *loadparm); >>> void s390_ipl_update_diag308(IplParameterBlock *iplb); >>> void s390_ipl_prepare_cpu(S390CPU *cpu); >>> IplParameterBlock *s390_ipl_get_iplb(void); >>> -void s390_reipl_request(void); >>> + >>> +enum s390_reset { >>> + /* default is a reset not triggered by a CPU e.g. issued by QMP */ >>> + S390_RESET_EXTERNAL = 0, >>> + S390_RESET_REIPL, >>> + S390_RESET_MODIFIED_CLEAR, >>> + S390_RESET_LOAD_NORMAL, >>> +}; >>> +void s390_ipl_reset_request(CPUState *cs, enum s390_reset reset_type); >>> +void s390_ipl_get_reset_request(CPUState **cs, enum s390_reset *reset_type); >>> +void s390_ipl_clear_reset_request(void); >>> >>> #define QIPL_ADDRESS 0xcc >>> >>> @@ -129,9 +139,11 @@ struct S390IPLState { >>> bool enforce_bios; >>> IplParameterBlock iplb; >>> bool iplb_valid; >>> - bool reipl_requested; >>> bool netboot; >>> QemuIplParameters qipl; >>> + /* reset related properties don't have to be migrated or reset */ >>> + enum s390_reset reset_type; >>> + CPUState *reset_cpu; >> >> Wondering if storing the cpu number would be nicer. Opinions? >> > > Is there any difference in the number of QOM operations? Not that it would matter much. Just another VCPU lookup by ID. > > Also, do you need to distinguish between 'specified cpu' and > 'default/any cpu'? Should be deductible from the reset type, though. > Yes, I deduct that from the reset type. -- Thanks, David / dhildenb