[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC 6/6] capabilities: convert attach debugger into a capability


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 3 Aug 2023 17:59:14 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6SrfcUFGcRPjielCLtr1T77oANmGnKGvI417IekLEVQ=; b=LuGGLSxbz9XdIO4zE6JRKCiCWekL2BYNpjhzJ8Fw3+RLBI6hjlewFuHE8ChN5Ty51FC81nDDZszz8XtB67CjieqT5/hEXOcyToUOCSeOTBE6cYDx4TKz944zaLbY3E/uzhlRGKb+hvm7knljluDkao+kcFLrHMHIiZdYWgTAD/bGMjuQ8mCS0AT7ofYDmOGYExvGUP6s7xl/4ZrS6IkzqE/cNX5prxcmnCQVTZA71GEg27BeBWyM7Jum9KTj4IFrElwrAEcdVLFSR+i1eIyTWMY15qMGtaiaF7StCpuP4lDLAjlmB00stF59JowLTCnbPGt0w6yYz6HB+QFGRxyO0Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmgmtKrxcuRr/PnScp+m7TsSiaCCjl7U/jIbx2ZwtN7svkQQK0Whs0KPJ88VZMbfKo/YKTzVQ349epPBbKXX45FdaQaqvqgCZdTek7vuBOPSx1ms/2EkxbZhr3Ju/mvksn9nKQrSMmK02sCpNffETfZYgdy7WIGoPondbLOcgCu6JXD14Kg4CDXdkI2oSpk62Br3s3yoXCwQZw0quWwHQAwKorVPfmrk6X4aH/knYhgdb8tkBCBDM9xkcKHZObVGVb+ISOiyKqdwAGWb599Waezs0oz5Bv+UFaQ7A+6J8PfALo2BOzuLyYAbd074PnGPH9foJKsfS6KAhBV5w9WqZA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • 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 15:59:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.