Hollis Blanchard wrote:
> On Tue, 2007-10-30 at 18:44 +0100, Carsten Otte wrote:
>
>> -/*
>> - * Only apic need an MMIO device hook, so shortcut now..
>> - */
>> -static struct kvm_io_device *vcpu_find_pervcpu_dev(struct kvm_vcpu *vcpu,
>> - gpa_t addr)
>> -{
>> - struct kvm_io_device *dev;
>> -
>> - if (vcpu->apic) {
>> - dev = &vcpu->apic->dev;
>> - if (dev->in_range(dev, addr))
>> - return dev;
>> - }
>> - return NULL;
>> -}
>> -
>> -static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu,
>> - gpa_t addr)
>> -{
>> - struct kvm_io_device *dev;
>> -
>> - dev = vcpu_find_pervcpu_dev(vcpu, addr);
>> - if (dev == NULL)
>> - dev = kvm_io_bus_find_dev(&vcpu->kvm->mmio_bus, addr);
>> - return dev;
>> -}
>> -
>> static struct kvm_io_device *vcpu_find_pio_dev(struct kvm_vcpu *vcpu,
>> gpa_t addr)
>> {
>> return kvm_io_bus_find_dev(&vcpu->kvm->pio_bus, addr);
>> }
>>
>
> These are APIC-specific for now, but as the "shortcut" comment implies
> they should be generalized in the future, and I expect they will be
> useful for PowerPC.
>
>
For x86 there are two kinds of mmio devices: one is the expected
system-wide mmio, and the other is mmio that depends not only on the
address, but also on which cpu originated the request. This type is
only needed for the local apic.
Is the second type also useful for ppc?
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel