[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 6/6] capabilities: convert attach debugger into a capability
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 Aug 2023 12:03:42 -0400
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691078626; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ae4dbcHbi3OyPMm8c1f1Dt7aSpjgiQa8dQIIotDjUCc=; b=kXK7aLvPRaxySO3cqlzk9ZwN6iU0phOaeJvVQUcW+waoSLl4h30NCYmKQoLyzRvPRnkBmzDzdJ0SMnvv9qmFayc0H6JmJ3dFOJfatYgnO05tu5YsCTisoe3b7VLVnmPWBFrmgTJ+Cb/MsGIvAGm/7hnGEchrCAN4rChMTMGi97s=
- Arc-seal: i=1; a=rsa-sha256; t=1691078626; cv=none; d=zohomail.com; s=zohoarc; b=DS13iNruZ74gob5JuEF9R9LJzhD6wYpKT7t2OgFNe/pQd3Yqr/3uXzF8//twWhKnAhKUVFMT0HGz+Rr9sGrszOeUqrkBh2Rr4pwRxcbcwALjkkyQ3D9aPuqzBkjA+FHD3jdXn/9WCUYY30pTN+DENQeY7rJtF4ro5zhfoesk0A8=
- Cc: Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Thu, 03 Aug 2023 16:04:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|