#ifndef _VIRTIO_PCI_H
#define _VIRTIO_PCI_H
+#include "ioport.h" // inl
+
/* A 32-bit r/o bitmask of the features supported by the host */
#define VIRTIO_PCI_HOST_FEATURES 0
outb(status, ioaddr + VIRTIO_PCI_STATUS);
}
+static inline u8 vp_get_isr(unsigned int ioaddr)
+{
+ return inb(ioaddr + VIRTIO_PCI_ISR);
+}
static inline void vp_reset(unsigned int ioaddr)
{
outl(0, ioaddr + VIRTIO_PCI_QUEUE_PFN);
}
+struct vring_virtqueue;
+u16 vp_init_simple(u16 bdf);
int vp_find_vq(unsigned int ioaddr, int queue_index,
- struct vring_virtqueue *vq);
+ struct vring_virtqueue **p_vq);
#endif /* _VIRTIO_PCI_H_ */