From: Avi K. <av...@qu...> - 2008-04-23 15:08:24
|
Laurent Vivier wrote: >>> >>> >> This breaks ordering on smp guests. batch_data needs to be a kvm thing, >> not a vcpu thing, and locked, of course. >> > > - is ordering between vcpu important when we already delay operations ? > Yes. Ordering is very different from delaying. Also, we will only delay writes which don't matter (those that simply latch something into a register, which is later read). > - using vcpu avoids the lock > Correctness beats performance > - Why PIO (pio_data) are vcpu things and not kvm things, then ? > pio batching is used for just a single instruction that can work with batches (ins/outs), so a guest can't expect to see partial output. With mmio, you can have 1. mmio 2. raise flag in shared memory 3. other vcpu sees flag, does mmio 4. spin-wait for ack from other vcpu 5. mmio You can't do that with ins/outs. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. |