Commit 2f8b9ee14eb439008e0c5131116ea6baa40dba50

Authored by nathan binkert
Committed by Avi Kivity
1 parent ede2ccc517

KVM: Make kvm header C++ friendly

Two things needed fixing: 1) g++ does not allow a named structure type
within an anonymous union and 2) Avoid name clash between two padding
fields within the same struct by giving them different names as is
done elsewhere in the header.

Signed-off-by: Nathan Binkert <nate@binkert.org>
Signed-off-by: Avi Kivity <avi@redhat.com>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -119,7 +119,7 @@
119 119 __u32 error_code;
120 120 } ex;
121 121 /* KVM_EXIT_IO */
122   - struct kvm_io {
  122 + struct {
123 123 #define KVM_EXIT_IO_IN 0
124 124 #define KVM_EXIT_IO_OUT 1
125 125 __u8 direction;
126 126  
... ... @@ -224,10 +224,10 @@
224 224 /* for KVM_GET_DIRTY_LOG */
225 225 struct kvm_dirty_log {
226 226 __u32 slot;
227   - __u32 padding;
  227 + __u32 padding1;
228 228 union {
229 229 void __user *dirty_bitmap; /* one bit per page */
230   - __u64 padding;
  230 + __u64 padding2;
231 231 };
232 232 };
233 233