search for: _linux_virtio_balloon_h

Displaying 20 results from an estimated 106 matches for "_linux_virtio_balloon_h".

2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...entry */ + { 0x1AF4, 0x1003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Balloon */ { 0 }, }; Index: linux-2.6-nv/include/linux/virtio_balloon.h =================================================================== --- /dev/null +++ linux-2.6-nv/include/linux/virtio_balloon.h @@ -0,0 +1,20 @@ +#ifndef _LINUX_VIRTIO_BALLOON_H +#define _LINUX_VIRTIO_BALLOON_H +#include <linux/virtio_config.h> + +#define VIRTIO_ID_BALLOON 3 + +#define CMD_BALLOON_INFLATE 0x1 +#define CMD_BALLOON_DEFLATE 0x2 + +struct virtio_balloon_hdr { + uint8_t cmd; + uint8_t status; +}; + +struct virtio_balloon_config +{ + uint32_t target_nrpage...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...entry */ + { 0x1AF4, 0x1003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Balloon */ { 0 }, }; Index: linux-2.6-nv/include/linux/virtio_balloon.h =================================================================== --- /dev/null +++ linux-2.6-nv/include/linux/virtio_balloon.h @@ -0,0 +1,20 @@ +#ifndef _LINUX_VIRTIO_BALLOON_H +#define _LINUX_VIRTIO_BALLOON_H +#include <linux/virtio_config.h> + +#define VIRTIO_ID_BALLOON 3 + +#define CMD_BALLOON_INFLATE 0x1 +#define CMD_BALLOON_DEFLATE 0x2 + +struct virtio_balloon_hdr { + uint8_t cmd; + uint8_t status; +}; + +struct virtio_balloon_config +{ + uint32_t target_nrpage...
2016 Oct 21
0
[RESEND PATCH v3 kernel 2/7] virtio-balloon: define new feature bit and page bitmap head
...+ /* flag used to identify different status */ + __virtio16 flag; + /* Reserved */ + __virtio16 reserved; + /* ID of the request */ + __virtio64 req_id; + /* The pfn of 0 bit in the bitmap */ + __virtio64 start_pfn; + /* The length of the bitmap, in bytes */ + __virtio64 bmap_len; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.8.3.1
2016 Oct 21
0
[RESEND PATCH v3 kernel 6/7] virtio-balloon: define feature bit and head for misc virt queue
...ata for a request */ + BALLOON_FLAG_CONT, + /* No more data for a request */ + BALLOON_FLAG_DONE, +}; + +struct balloon_req_hdr { + /* Used to distinguish different request */ + __virtio16 cmd; + /* Reserved */ + __virtio16 reserved[3]; + /* Request parameter */ + __virtio64 param; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.8.3.1
2016 Dec 21
0
[PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...virtio_balloon_resp_hdr { + __le64 cmd : 8; /* Distinguish different requests type */ + __le64 flag: 8; /* Mark status for a specific request type */ + __le64 id : 16; /* Distinguish requests of a specific type */ + __le64 data_len: 32; /* Length of the following data, in bytes */ +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.9.1
2017 Mar 03
0
[PATCH v7 kernel 2/5] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...up. */ __u32 num_pages; @@ -82,4 +86,12 @@ struct virtio_balloon_stat { __virtio64 val; } __attribute__((packed)); +/* Response header structure */ +struct virtio_balloon_resp_hdr { + u8 cmd; + u8 flag; + __le16 id; /* cmd id */ + __le32 data_len; /* Payload len in bytes */ +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 2.7.4
2017 Mar 03
0
[PATCH v7 kernel 4/5] virtio-balloon: define flags and head for host request vq
...re data for a request */ + BALLOON_FLAG_CONT, + /* No more data for a request */ + BALLOON_FLAG_DONE, +}; + +struct virtio_balloon_req_hdr { + /* Used to distinguish different requests */ + __le16 cmd; + /* Reserved */ + __le16 reserved[3]; + /* Request parameter */ + __le64 param; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 2.7.4
2017 Mar 08
1
[PATCH v7 kernel 2/5] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...balloon_stat { > __virtio64 val; > } __attribute__((packed)); > > +/* Response header structure */ > +struct virtio_balloon_resp_hdr { > + u8 cmd; > + u8 flag; > + __le16 id; /* cmd id */ > + __le32 data_len; /* Payload len in bytes */ > +}; > + > #endif /* _LINUX_VIRTIO_BALLOON_H */ > -- > 2.7.4
2017 Mar 08
1
[PATCH v7 kernel 2/5] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...balloon_stat { > __virtio64 val; > } __attribute__((packed)); > > +/* Response header structure */ > +struct virtio_balloon_resp_hdr { > + u8 cmd; > + u8 flag; > + __le16 id; /* cmd id */ > + __le32 data_len; /* Payload len in bytes */ > +}; > + > #endif /* _LINUX_VIRTIO_BALLOON_H */ > -- > 2.7.4
2013 Apr 01
1
[PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
...f61 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -52,8 +52,8 @@ struct virtio_balloon_config #define VIRTIO_BALLOON_S_NR 6 struct virtio_balloon_stat { - u16 tag; - u64 val; + __u16 tag; + __u64 val; } __attribute__((packed)); #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.7.11.7
2013 Apr 01
1
[PATCH 3/8] virtio: do not export "u16" and "u64" to userspace
...f61 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -52,8 +52,8 @@ struct virtio_balloon_config #define VIRTIO_BALLOON_S_NR 6 struct virtio_balloon_stat { - u16 tag; - u64 val; + __u16 tag; + __u64 val; } __attribute__((packed)); #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.7.11.7
2015 Mar 30
0
[PATCH 1/6] virtio_balloon: transitional interface
...4b0488f..5d83902 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -56,4 +56,10 @@ struct virtio_balloon_stat { __u64 val; } __attribute__((packed)); +struct virtio_balloon_stat_modern { + __u8 reserved[6]; + __u16 tag; + __u64 val; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 6a356e3..68e937f 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -77,7 +77,7 @@ struct virtio_balloon { /* Memory statistics */ int need_stats_update; - struct virtio_...
2015 Mar 30
0
[PATCH 1/6] virtio_balloon: transitional interface
...4b0488f..5d83902 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -56,4 +56,10 @@ struct virtio_balloon_stat { __u64 val; } __attribute__((packed)); +struct virtio_balloon_stat_modern { + __u8 reserved[6]; + __u16 tag; + __u64 val; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 6a356e3..68e937f 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -77,7 +77,7 @@ struct virtio_balloon { /* Memory statistics */ int need_stats_update; - struct virtio_...
2015 Mar 30
10
[PATCH 0/6] virtio_balloon: virtio 1 support
Virtio 1.0 doesn't include a modern balloon device. At some point we'll likely define an incompatible interface with a different ID. But for now, it's not a big change to support a transitional balloon device: this has the advantage of supporting existing drivers, transparently. The only issue is with the stats buffer, which has misaligned fields. Seems easy to fix by prepending a 6
2015 Mar 30
10
[PATCH 0/6] virtio_balloon: virtio 1 support
Virtio 1.0 doesn't include a modern balloon device. At some point we'll likely define an incompatible interface with a different ID. But for now, it's not a big change to support a transitional balloon device: this has the advantage of supporting existing drivers, transparently. The only issue is with the stats buffer, which has misaligned fields. Seems easy to fix by prepending a 6
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
On Tue, 14 Apr 2015 11:21:11 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h > index f81b220..164e0c2 100644 > --- a/include/uapi/linux/virtio_balloon.h > +++ b/include/uapi/linux/virtio_balloon.h > @@ -52,15 +52,31 @@ struct virtio_balloon_config { > #define
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
On Tue, 14 Apr 2015 11:21:11 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h > index f81b220..164e0c2 100644 > --- a/include/uapi/linux/virtio_balloon.h > +++ b/include/uapi/linux/virtio_balloon.h > @@ -52,15 +52,31 @@ struct virtio_balloon_config { > #define
2015 Apr 15
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...other words, add explicit reserved fields to align field and + * structure boundaries at field size, avoiding compiler padding + * without the packed attribute. + */ struct virtio_balloon_stat { - __u16 tag; - __u64 val; + __virtio16 tag; + __virtio64 val; } __attribute__((packed)); #endif /* _LINUX_VIRTIO_BALLOON_H */
2015 Apr 15
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...other words, add explicit reserved fields to align field and + * structure boundaries at field size, avoiding compiler padding + * without the packed attribute. + */ struct virtio_balloon_stat { - __u16 tag; - __u64 val; + __virtio16 tag; + __virtio64 val; } __attribute__((packed)); #endif /* _LINUX_VIRTIO_BALLOON_H */
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...> +struct virtio_balloon_ctrlq_cmd { > + __virtio32 class; > + __virtio32 cmd; > +}; > + > +/* Ctrlq commands related to VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE */ > +#define VIRTIO_BALLOON_FREE_PAGE_F_STOP 0 > +#define VIRTIO_BALLOON_FREE_PAGE_F_START 1 > + > #endif /* _LINUX_VIRTIO_BALLOON_H */ The stop command does not appear to be thought through. Let's assume e.g. you started migration. You ask guest for free pages. Then you cancel it. There are a bunch of pages in free vq and you are getting more. You now want to start migration again. What to do? A bunch of vq flushing an...