aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/iodev.h
diff options
context:
space:
mode:
authorLaurent Vivier <Laurent.Vivier@bull.net>2008-05-30 10:05:53 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:30 -0400
commit92760499d01ef91518119908eb9b8798b6c9bd3f (patch)
treea6bd80fbad82589eb5aa98f81edda4537bc1f625 /virt/kvm/iodev.h
parent131d82791b628d4aeafd94ddc74a9b68f3d15a83 (diff)
KVM: kvm_io_device: extend in_range() to manage len and write attribute
Modify member in_range() of structure kvm_io_device to pass length and the type of the I/O (write or read). This modification allows to use kvm_io_device with coalesced MMIO. Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'virt/kvm/iodev.h')
-rw-r--r--virt/kvm/iodev.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/virt/kvm/iodev.h b/virt/kvm/iodev.h
index c14e642027b2..55e8846ac3a6 100644
--- a/virt/kvm/iodev.h
+++ b/virt/kvm/iodev.h
@@ -27,7 +27,8 @@ struct kvm_io_device {
27 gpa_t addr, 27 gpa_t addr,
28 int len, 28 int len,
29 const void *val); 29 const void *val);
30 int (*in_range)(struct kvm_io_device *this, gpa_t addr); 30 int (*in_range)(struct kvm_io_device *this, gpa_t addr, int len,
31 int is_write);
31 void (*destructor)(struct kvm_io_device *this); 32 void (*destructor)(struct kvm_io_device *this);
32 33
33 void *private; 34 void *private;
@@ -49,9 +50,10 @@ static inline void kvm_iodevice_write(struct kvm_io_device *dev,
49 dev->write(dev, addr, len, val); 50 dev->write(dev, addr, len, val);
50} 51}
51 52
52static inline int kvm_iodevice_inrange(struct kvm_io_device *dev, gpa_t addr) 53static inline int kvm_iodevice_inrange(struct kvm_io_device *dev,
54 gpa_t addr, int len, int is_write)
53{ 55{
54 return dev->in_range(dev, addr); 56 return dev->in_range(dev, addr, len, is_write);
55} 57}
56 58
57static inline void kvm_iodevice_destructor(struct kvm_io_device *dev) 59static inline void kvm_iodevice_destructor(struct kvm_io_device *dev)