[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio] [OASIS Issue Tracker] Created: (VIRTIO-36) balloon: align val in virtio_balloon_stat
OASIS Issues Tracker <workgroup_mailer@lists.oasis-open.org> writes:
> balloon: align val in virtio_balloon_stat
> -----------------------------------------
>
> Key: VIRTIO-36
> URL: http://tools.oasis-open.org/issues/browse/VIRTIO-36
> Project: OASIS Virtual I/O Device (VIRTIO) TC
> Issue Type: Improvement
> Reporter: Michael Tsirkin
>
>
> we have:
> struct virtio_balloon_stat {
> #define VIRTIO_BALLOON_S_SWAP_IN 0
> #define VIRTIO_BALLOON_S_SWAP_OUT 1
> #define VIRTIO_BALLOON_S_MAJFLT 2
> #define VIRTIO_BALLOON_S_MINFLT 3
> #define VIRTIO_BALLOON_S_MEMFREE 4
> #define VIRTIO_BALLOON_S_MEMTOT 5
> u16 tag;
> u64 val;
> } __attribute__((packed));
>
> val is 8 bytes but aligned at a 2 byte boundary.
> this is ugly and unusual, and requires implementations
> to use packed structures for access, which is error-prone.
Yeah, I think we fix this by creating a new, clean virtio-balloon
device. See VIRTIO-28: Implement new balloon device (ID 13)
Cheers,
Rusty.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]