Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY lguest: cleanup for map_switcher() lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET lguest: use set_pte/set_pmd uniformly for real page table entries lguest: move panic notifier registration to its expected place. virtio_blk: add support for cache flush virtio: add virtio IDs file virtio: get rid of redundant VIRTIO_ID_9P definition virtio: make add_buf return capacity remaining virtio_pci: minor MSI-X cleanups
This commit is contained in:
@@ -34,7 +34,7 @@ struct virtqueue {
|
||||
* out_num: the number of sg readable by other side
|
||||
* in_num: the number of sg which are writable (after readable ones)
|
||||
* data: the token identifying the buffer.
|
||||
* Returns 0 or an error.
|
||||
* Returns remaining capacity of queue (sg segments) or a negative error.
|
||||
* @kick: update after add_buf
|
||||
* vq: the struct virtqueue
|
||||
* After one or more add_buf calls, invoke this to kick the other side.
|
||||
|
@@ -4,8 +4,6 @@
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The ID for virtio console */
|
||||
#define VIRTIO_ID_9P 9
|
||||
/* Maximum number of virtio channels per partition (1 for now) */
|
||||
#define MAX_9P_CHAN 1
|
||||
|
||||
|
@@ -4,9 +4,6 @@
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The ID for virtio_balloon */
|
||||
#define VIRTIO_ID_BALLOON 5
|
||||
|
||||
/* The feature bitmap for virtio balloon */
|
||||
#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
|
||||
|
||||
|
@@ -5,9 +5,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The ID for virtio_block */
|
||||
#define VIRTIO_ID_BLOCK 2
|
||||
|
||||
/* Feature bits */
|
||||
#define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */
|
||||
#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
|
||||
@@ -17,6 +14,7 @@
|
||||
#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
|
||||
#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
|
||||
#define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */
|
||||
#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */
|
||||
|
||||
#define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */
|
||||
|
||||
@@ -38,6 +36,17 @@ struct virtio_blk_config {
|
||||
__u8 identify[VIRTIO_BLK_ID_BYTES];
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* Command types
|
||||
*
|
||||
* Usage is a bit tricky as some bits are used as flags and some are not.
|
||||
*
|
||||
* Rules:
|
||||
* VIRTIO_BLK_T_OUT may be combined with VIRTIO_BLK_T_SCSI_CMD or
|
||||
* VIRTIO_BLK_T_BARRIER. VIRTIO_BLK_T_FLUSH is a command of its own
|
||||
* and may not be combined with any of the other flags.
|
||||
*/
|
||||
|
||||
/* These two define direction. */
|
||||
#define VIRTIO_BLK_T_IN 0
|
||||
#define VIRTIO_BLK_T_OUT 1
|
||||
@@ -45,6 +54,9 @@ struct virtio_blk_config {
|
||||
/* This bit says it's a scsi command, not an actual read or write. */
|
||||
#define VIRTIO_BLK_T_SCSI_CMD 2
|
||||
|
||||
/* Cache flush command */
|
||||
#define VIRTIO_BLK_T_FLUSH 4
|
||||
|
||||
/* Barrier before this op. */
|
||||
#define VIRTIO_BLK_T_BARRIER 0x80000000
|
||||
|
||||
|
@@ -5,9 +5,6 @@
|
||||
/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
|
||||
* anyone can use the definitions to implement compatible drivers/servers. */
|
||||
|
||||
/* The ID for virtio console */
|
||||
#define VIRTIO_ID_CONSOLE 3
|
||||
|
||||
/* Feature bits */
|
||||
#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */
|
||||
|
||||
|
17
include/linux/virtio_ids.h
Normal file
17
include/linux/virtio_ids.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _LINUX_VIRTIO_IDS_H
|
||||
#define _LINUX_VIRTIO_IDS_H
|
||||
/*
|
||||
* Virtio IDs
|
||||
*
|
||||
* This header is BSD licensed so anyone can use the definitions to implement
|
||||
* compatible drivers/servers.
|
||||
*/
|
||||
|
||||
#define VIRTIO_ID_NET 1 /* virtio net */
|
||||
#define VIRTIO_ID_BLOCK 2 /* virtio block */
|
||||
#define VIRTIO_ID_CONSOLE 3 /* virtio console */
|
||||
#define VIRTIO_ID_RNG 4 /* virtio ring */
|
||||
#define VIRTIO_ID_BALLOON 5 /* virtio balloon */
|
||||
#define VIRTIO_ID_9P 9 /* 9p virtio console */
|
||||
|
||||
#endif /* _LINUX_VIRTIO_IDS_H */
|
@@ -6,9 +6,6 @@
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
/* The ID for virtio_net */
|
||||
#define VIRTIO_ID_NET 1
|
||||
|
||||
/* The feature bitmap for virtio net */
|
||||
#define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */
|
||||
#define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */
|
||||
|
@@ -4,7 +4,4 @@
|
||||
* compatible drivers/servers. */
|
||||
#include <linux/virtio_config.h>
|
||||
|
||||
/* The ID for virtio_rng */
|
||||
#define VIRTIO_ID_RNG 4
|
||||
|
||||
#endif /* _LINUX_VIRTIO_RNG_H */
|
||||
|
Reference in New Issue
Block a user