On 23.04.2018 12:45, Cornelia Huck wrote: > On Wed, 18 Apr 2018 16:33:13 +0200 > David Hildenbrand <da...@redhat.com> 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