From ec3d41c4db4c21164332826ea8d812f94f2f6886 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 22 Oct 2007 11:03:36 +1000 Subject: Virtio interface This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The virtio drivers add buffers to virtio queues; as the buffers are consumed the driver "interrupt" callbacks are invoked. There is also a generic implementation of config space which drivers can query to get setup information from the host. Signed-off-by: Rusty Russell Cc: Dor Laor Cc: Arnd Bergmann --- drivers/virtio/config.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 drivers/virtio/config.c (limited to 'drivers/virtio/config.c') diff --git a/drivers/virtio/config.c b/drivers/virtio/config.c new file mode 100644 index 000000000000..983d482fba40 --- /dev/null +++ b/drivers/virtio/config.c @@ -0,0 +1,13 @@ +/* Configuration space parsing helpers for virtio. + * + * The configuration is [type][len][... len bytes ...] fields. + * + * Copyright 2007 Rusty Russell, IBM Corporation. + * GPL v2 or later. + */ +#include +#include +#include +#include +#include + -- cgit v1.2.3