On Thu, Jul 28, 2011 at 12:01:54PM +0300, Sasha Levin wrote: ... > > struct mmio_mapping { > struct rb_int_node node; > - void (*kvm_mmio_callback_fn)(u64 addr, u8 *data, u32 len, u8 is_write); > + void (*kvm_mmio_callback_fn)(u64 addr, u8 *data, u32 len, u8 is_write, void *ptr); > + void *ptr; > }; I guess no need to name it *that* long, probably simple struct mmio_mapping { struct rb_int_node node; void (*mmio_fn)(u64 addr, u8 *data, u32 len, u8 is_write, void *ptr); void *ptr; }; ... > > if (mmio) > - mmio->kvm_mmio_callback_fn(phys_addr, data, len, is_write); > + mmio->kvm_mmio_callback_fn(phys_addr, data, len, is_write, mmio->ptr); So this would be if (mmio) mmio->mmio_fn(phys_addr, data, len, is_write, mmio->ptr); no? Cyrill -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html