Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Xen 3.0 Virtualization Interface Guide
Prev Home Next

8.2.2 Block ring interface

The block interface is defined by the structures passed over the shared memory interface. These structures are either requests (from the frontend to the backend) or responses (from the backend to the frontend).

The request structure is defined as follows:

typedef struct blkif_request {
    uint8_t        operation;    /* BLKIF_OP_???                         */
    uint8_t        nr_segments;  /* number of segments                   */
    blkif_vdev_t   handle;       /* only for read/write requests         */
    uint64_t       id;           /* private guest value, echoed in resp  */
    blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
    struct blkif_request_segment {
        grant_ref_t gref;        /* reference to I/O buffer frame        */
        /* @first_sect: first sector in frame to transfer (inclusive).   */
        /* @last_sect: last sector in frame to transfer (inclusive).     */
        uint8_t     first_sect, last_sect;
} blkif_request_t;

The fields are as follows:

operation ID: one of the operations described above
number of segments for scatter / gather IO described by this request
identifier for a particular virtual device on this interface
this value is echoed in the response message for this IO; the guest may use it to identify the original request
start sector on the virtal device for this request
This array contains structures encoding scatter-gather IO to be performed:
The grant reference for the foreign I/O buffer page.
First sector to access within the buffer page (0 to 7).
Last sector to access within the buffer page (0 to 7).
Data will be transferred into frames at an offset determined by the value of first_sect.

Xen 3.0 Virtualization Interface Guide
Prev Home Next

  Published under the terms of the GNU General Public License Design by Interspire