|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/3] x86/HVM: fold hvm_io_assist() into its only caller
On 15.07.2020 14:40, Paul Durrant wrote:
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 15 July 2020 13:04
>>
>> static bool hvm_wait_for_io(struct hvm_ioreq_vcpu *sv, ioreq_t *p)
>> {
>> unsigned int prev_state = STATE_IOREQ_NONE;
>> + uint64_t data = ~0;
>>
>> - while ( sv->pending )
>> - {
>> + do {
>> unsigned int state = p->state;
>
> I guess this is beneficial from the point of view of restricting cope and...
>
>>
>> smp_rmb();
>> @@ -132,7 +121,6 @@ static bool hvm_wait_for_io(struct hvm_i
>> * emulator is dying and it races with an I/O being
>> * requested.
>> */
>> - hvm_io_assist(sv, ~0ul);
>> break;
>
> ...(as you say) allowing this early break, but a forward jump to an 'out'
> label would be more consistent with other code. It works though so...
Since this gets restructured by subsequent patches I thought I'd
avoid the introduction of a disliked by me "goto".
> Reviewed-by: Paul Durrant <paul@xxxxxxx>
Thanks, Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |