mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
linux-headers: update
This updates linux-headers against master 4.1-rc1 (commit b787f68c36d49bb1d9236f403813641efa74a031). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
217a4acb21
commit
7a52ce8a16
10 changed files with 291 additions and 66 deletions
|
@ -25,6 +25,7 @@
|
|||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE. */
|
||||
#include "standard-headers/linux/types.h"
|
||||
#include "standard-headers/linux/virtio_ids.h"
|
||||
#include "standard-headers/linux/virtio_config.h"
|
||||
|
||||
|
@ -51,9 +52,32 @@ struct virtio_balloon_config {
|
|||
#define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
|
||||
#define VIRTIO_BALLOON_S_NR 6
|
||||
|
||||
/*
|
||||
* Memory statistics structure.
|
||||
* Driver fills an array of these structures and passes to device.
|
||||
*
|
||||
* NOTE: fields are laid out in a way that would make compiler add padding
|
||||
* between and after fields, so we have to use compiler-specific attributes to
|
||||
* pack it, to disable this padding. This also often causes compiler to
|
||||
* generate suboptimal code.
|
||||
*
|
||||
* We maintain this statistics structure format for backwards compatibility,
|
||||
* but don't follow this example.
|
||||
*
|
||||
* If implementing a similar structure, do something like the below instead:
|
||||
* struct virtio_balloon_stat {
|
||||
* __virtio16 tag;
|
||||
* uint8_t reserved[6];
|
||||
* __virtio64 val;
|
||||
* };
|
||||
*
|
||||
* In 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 {
|
||||
uint16_t tag;
|
||||
uint64_t val;
|
||||
__virtio16 tag;
|
||||
__virtio64 val;
|
||||
} QEMU_PACKED;
|
||||
|
||||
#endif /* _LINUX_VIRTIO_BALLOON_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue