I am investigating how PIO is emulated in KVM and QEMU. when a PIO is encountered, it seems to me that its pio data is copied to vcpu->arch.pio_data and a fixed offset is assigned to vcpu->run->io.data_offset. static int emulator_pio_out_emulated(int size, unsigned short port, { ... memcpy(vcpu->arch.pio_data, val, size * count); ... vcpu->run->io.data_offset = KVM_PIO_PAGE_OFFSET * PAGE_SIZE; } later in QEMU, it retrieves data from (uint8_t *)run + run->io.data_offset, how can we be sure than the memory the pio data is copied to "vcpu->arch.pio_data" is where the (uint8_t *)run + run->io.data_offset is pointing to ? Also, it seems that there is something called fast pio in which kvm does not return to qemu. in what case does it happen ? Thanks Xin -- 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