On 8/3/23 11:59, Jan Beulich wrote:
On 03.08.2023 17:52, Daniel P. Smith wrote:
On 8/1/23 21:06, Stefano Stabellini wrote:
On Tue, 1 Aug 2023, Daniel P. Smith wrote:
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -474,9 +474,8 @@ struct domain
       uint8_t          role;
   #define CAP_CONSOLE_IO         (1U<<0)
   #define CAP_DISABLE_CPU_FAULT  (1U<<1)
-    uint8_t          capabilities;
-    /* Is this guest being debugged by dom0? */
-    bool             debugger_attached;
+#define CAP_DEBUGGER_ATTACH    (1U<<2)
+    uint16_t         capabilities;

No need to switch to uint16_t just yet?

I know space is tight in struct domain, wanted to reclaim the freed
space into capabilities (or roles). One thing I was considering if
enough space could be found is instead replace it all with a pointer to
a new struct that held these values. It would allow using heap space and
future growth of the structure. As of this patch, it is consuming 5
bytes and would need to find an additional 3 bytes. Is there a
willingness to entertain such an approach?

Usually we do such conversion when data belonging to a subsystem (for lack
of a better term) grows big enough, not right away when eventual data size
isn't even known yet.

Right and if there is a desire to instead follow the suggestion in my reply to Stefano on patch 4, that approach could be sizeable. Larger than 40 bits/flags, that I am less confident about.

v/r,
dps

Reply via email to