On 11/02/2012 10:00 AM, Jan Kiszka wrote:
> > 
> >> As I understand the series, as->lock == NULL means that we will never
> >> take any lock during dispatch as the caller is not yet ready for
> >> fine-grained locking. This prevents the problem - for PIO at least. But
> >> this series should break TCG as it calls into MMIO dispatch from the
> >> VCPU while holding the BQL.
> >>
> > What about add another condition "dispatch_type == DISPATCH_MMIO" to
> > tell this situation.
>
> An alternative pattern that we will also use for core services is to
> provide an additional entry point, one that indicates that the caller
> doesn't hold the BQL. Then we will gradually move things over until the
> existing entry point is obsolete.
>

I like it (or rather, least dislike it).  So we'd have
address_space_rw() and address_space_rw_unlocked() (or maybe,
address_space_rw() and address_space_rw_locked(), to indicate the
preferred way of doing things).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


Reply via email to