KVM: cleanup io_device code
We modernize the io_device code so that we use container_of() instead of dev->private, and move the vtable to a separate ops structure (theoretically allows better caching for multiple instances of the same ops structure) Signed-off-by: Gregory Haskins <ghaskins@novell.com> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
committed by
Avi Kivity
parent
787a660a4f
commit
d76685c4a0
@@ -2264,7 +2264,7 @@ static struct kvm_io_device *vcpu_find_pervcpu_dev(struct kvm_vcpu *vcpu,
|
||||
|
||||
if (vcpu->arch.apic) {
|
||||
dev = &vcpu->arch.apic->dev;
|
||||
if (dev->in_range(dev, addr, len, is_write))
|
||||
if (kvm_iodevice_in_range(dev, addr, len, is_write))
|
||||
return dev;
|
||||
}
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user