On 06/05/2012 08:19 PM, Gleb Natapov wrote:
> On Tue, Jun 05, 2012 at 07:07:39PM +0300, Avi Kivity wrote:
>> > +
>> > + count = (PAGE_SIZE - offset_in_page(linear_addr))/size;
>> > +
>> > + if (count == 0) /* 'in' crosses page boundry */
>> > + return EMULATE_FAIL;
>> > +
>> > + count = min(count, rcx);
>> > +
>> > + r = __kvm_fast_string_pio_in(vcpu, size, port, linear_addr, count);
>> > +
>> > + if (r != EMULATE_DO_MMIO)
>> > + return r;
>> > +
>> > + vcpu->arch.fast_string_pio_ctxt.linear_addr = linear_addr;
>> > + vcpu->arch.complete_userspace_io = complete_fast_string_pio;
>> > + return EMULATE_DO_MMIO;
>> > +}
>> > +EXPORT_SYMBOL_GPL(kvm_fast_string_pio_in);
>>
>> Perhaps a better way to do it is to move the code into the emulator,
>> which already handles all the checks and masks, and just avoid
>> x86_decode_insn()/x86_emulate_insn().
>>
> I do not see how it would be better. Emulator works on different data
> structures that should be prepared and the only functions that we can
> reuse (as far as I see) are register_address_increment() and ad_mask()
> anyway.
Also linearize(). Remember the hardware segment checks are only applied
to the first iteration.
--
error compiling committee.c: too many arguments to function
--
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
[KVM ARM]
[KVM ia64]
[KVM ppc]
[Spice Development]
[Libvirt]
[Libvirt Users]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]