From: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx> Sent: Monday, December 30, 2024 10:10 AM[...]
These bit field definitions don't look right. We want to "fill up"
the field size, so that we're explicit about each bit, and not leave
it to the compiler to add padding (which __packed tells the
compiler not to do). So in aggregate, the "u64" bit fields should
account for all 64 bits, but here you account for only 32 bits.
There are two ways to fix this:
u32 interruption_pending : 1;
u32 interruption_type: 1;
u32 reserved : 30;
u32 error_code;
Or
u64 interruption_pending : 1;
u64 interruption_type: 1;
u64 reserved : 30;
u64 error_code : 32;
Nuno -- your thoughts?
Michael
+
+/*
+ * NOTE: Linux helper struct - NOT from Hyper-V code.
+ * DECLARE_FLEX_ARRAY() needs to be wrapped into
+ * a structure and have at least one more member besides
+ * DECLARE_FLEX_ARRAY.
+ */
+struct hv_output_get_vp_registers {
+ struct {
+ DECLARE_FLEX_ARRAY(union hv_register_value, values);
+ struct {} values_end;
+ };
};
#if defined(CONFIG_ARM64)
--
2.34.1