From 67864d35f17fa7e2b6719777ec0e6ba4a7298f43 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 20 Jun 2012 14:07:03 +0200 Subject: [PATCH] Structures must be dense packed, issue #248 Take care that utcb, hip, crd structure are dense packed by compiler. --- base-nova/include/nova/syscall-generic.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/base-nova/include/nova/syscall-generic.h b/base-nova/include/nova/syscall-generic.h index 95cbd68d6..4e4d541b0 100644 --- a/base-nova/include/nova/syscall-generic.h +++ b/base-nova/include/nova/syscall-generic.h @@ -35,8 +35,6 @@ #include -#define ALWAYS_INLINE __attribute__((always_inline)) - namespace Nova { enum { @@ -108,7 +106,7 @@ namespace Nova { bool has_feature_vmx() const { return feature_flags & (1 << 1); } bool has_feature_svm() const { return feature_flags & (1 << 2); } - }; + } __attribute__((packed)); class Descriptor @@ -136,7 +134,7 @@ namespace Nova { public: mword_t value() const { return _value; } - }; + } __attribute__((packed)); /** @@ -221,8 +219,8 @@ namespace Nova { mword_t base() const { return _query(); } mword_t order() const { return _query(); } - bool is_null() const { return (_value & TYPE_MASK) == NULL_CRD_TYPE; } - }; + bool is_null() const { return (_value & TYPE_MASK) == NULL_CRD_TYPE; } + } __attribute__((packed)); class Rights @@ -425,7 +423,7 @@ namespace Nova { } mword_t mtd_value() const { return static_cast(mtd).value(); } - }; + } __attribute__((packed)); /** * Size of event-specific portal window mapped at PD creation time