[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RESEND v10 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86
- To: Jane Malalane <Jane.Malalane@xxxxxxxxxx>
- From: Christian Lindig <christian.lindig@xxxxxxxxxx>
- Date: Wed, 29 Jun 2022 14:49:40 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=m5mzK4t9lf3CHP3TXYfn6EiZjrD8031eyiDfHP4IN0M=; b=Sa2JaTATnUotfu5kdfV4MJIJqSv5gxMNPriPcVN4GzSk+DQ1yJBkZQypj2T6PJV44rRX3IFAxx740UQgTzA9XolMinVORSp0nkR7A80xfPJahfBaSPJAfiT4veAL0an5QsL6IyKchAksUFgXceIc+9EJZTEoFUnJ6Dpro/N0QXmwBL8IBVVQBbljoKEyMhospdZ4vCCz6Q9TZtkcv4rWFhzkO2ur8G4esM7VenUu0j9VotmMP1+fBXiP+i9QMb+hDDVH7+YakOrB7o81HCzPgRXfC+FS5vbe/zyQZnOPQa37X9LnYv2z6hXZB78HGf+oPbwIObzyOZf4Fo7nEt6tkA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hN9y1M8uUR9U/z+d4enkkbF0WZVKHlJq3F6XBk9ajU5mgebF8dY8hPe3j0/jN+dkt4jwRrAXEFbZ7QP7PoZnudXYXxbSqTysKbRUYhEBt82rC+PZkzEyXc6rdELQqLNT4jp2zKsxFL2OHHgIjID6UJ73iOHzK55+sRky77B2iBwTHBtBG7pbQ/DnshT9LEfqBct729O6wcExqAztmNyNrw4DGrfBEPT21NeWBJshLZr6Hh4ru1cDqf1wBTf2faSwlutTIdDVYnzcg0O8hJLcsxS8xeZirPaaTHCAKD16C45AMoAh6DqK7u+pBy8vJfkE5j2gqVByhIw1WbytWD4nNg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- Delivery-date: Wed, 29 Jun 2022 14:50:01 +0000
- Ironport-data: A9a23:1+zVRKuv3m7HVmyAy3BIzj2DpefnVNZfMUV32f8akzHdYApBsoF/q tZmKTjSOPnbZWWne99zPYizpEMP75HcndNnSVQ5/H0yRCMW+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQywYbVvqYy2YLjW13X6 IuryyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi84D63Jv7VeECNmAi1ODaJe9KP8MX2W5Jn7I03uKxMAwt1IJWRvZMgy3LYyBmtDs /sFNDoKcxaPwfqsx662QfVt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U3wvFlPeK3Jy8PC9wnxThjR03kEYzMsQkjMJ8488UYBN46 DBPr5znL9DQ8cKZeZ2BfsHQ8GwFmvRKCi8e166MBDiDuUKKnjNo5n47PE84/yrYoUByN8olJ HIQDpjxBkPkoLVeLmzNbFwg2DwqT+GLEXQI+lllutEk6y5Qqb3OiueT11rm9e8opwkc7jmZ8 o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYi8AZUiaK8c/2rk6L3U58j6bHXK1md2qA
- Thread-topic: [PATCH RESEND v10 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86
+
physinfo
= caml_alloc_tuple(11);
Store_field(physinfo,
0, Val_int(c_physinfo.threads_per_core));
Store_field(physinfo,
1, Val_int(c_physinfo.cores_per_socket));
Store_field(physinfo,
2, Val_int(c_physinfo.nr_cpus));
@@
-749,6 +749,17 @@ CAMLprim value stub_xc_physinfo(value xch)
Store_field(physinfo,
8, cap_list);
Store_field(physinfo,
9, Val_int(c_physinfo.max_cpu_id + 1));
+#if
defined(__i386__) || defined(__x86_64__)
+
/*
+
*
arch_capabilities: physinfo_arch_cap_flag list;
+
*/
+
arch_cap_list
= c_bitmap_to_ocaml_list
+
/*
! physinfo_arch_cap_flag CAP_ none */
+
/*
! XEN_SYSCTL_PHYSCAP_ XEN_SYSCTL_PHYSCAP_X86_MAX max */
+
(c_physinfo.arch_capabilities);
+
Store_field(physinfo,
10, arch_cap_list);
+#endif
+
CAMLreturn(physinfo);
}
I this extending the tuple but only defining a value on x86? Does this not lead to undefined fields on other architectures?
type physinfo = {
threads_per_core : int;
cores_per_socket : int;
@@ -124,6 +128,7 @@ type physinfo = {
scrub_pages : nativeint;
capabilities : physinfo_cap_flag list;
max_nr_cpus : int; (** compile-time max possible number of nr_cpus *)
+ arch_capabilities : physinfo_arch_cap_flag list;
}
type version = { major : int; minor : int; extra : string
Here the record is extended but it looks to me like the new field is kept undefined on non x86 architectures. If the field still has a defined content, it would be good to explain why.
— C
|
|