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

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding


  • To: Edwin Torok <edvin.torok@xxxxxxxxxx>
  • From: Christian Lindig <christian.lindig@xxxxxxxxxx>
  • Date: Thu, 1 Dec 2022 13:57:43 +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=RV+JNU/gHzSJQQ+0iMhkngH7g2i4uOA0QTyuuV6BWzs=; b=h54ZLyv6HeYIRM6ASaX6JYmMVWNuBxb7ztrKRiule56X/LRlwMYjJACelXKFEZBj33UebUH5p85GXz9dazPzAosAX/lIe5y/5o51X0l44hkwc642dJlw5X1Hd3gsWNrguJM5vKBUO4b/zYynSM8bDTlw/JYMFEKOK6JB1EqTFLRTmock4IMFpKhhwHkNf2XS4iVF+mVA2MWZCQ6q8qjDF5kru5m7RzifO33Lv8MNvirAzeXXohkgW447Z964S5a+BBlYq3nlwmesHO5L2jywZIYgopllHojcRQuO+QH7EslABOnvbTfHcQjhRbAdJt0RhFCPU0cc35/EstKOqAxiOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SBAW0UWiYBPGkkjJVMo+lfBc9jA4LSLLFjDxNArSFkXFoZBS7B86Wkl8Rn6wBD1LJ9itQCc/zdqNkYNN2JDgfOVz5OF1bs75npJXwu4PYw1jL6zjS6PLUx20mBgB2L6SK5CvNER7864YqvWUo89ZPVXv1NPjiHvTdNd2r/SpgKPStJ7z7bw14KdN9jqDOSbsQfXLS6gTLpi631VZD09e7Mg/PiWi5XxBof/v2rRgw1NAMhCC2KdZ3f4wRxhJzlqRnqL6IsQmepgPAIdWogQUcYsKp91bL75c8wcKDisvyMZg8xHuNWWRvyQccWRYUf93CR3CzXITumFDOAsQ1ubNpQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 01 Dec 2022 13:57:58 +0000
  • Ironport-data: A9a23:D6GliKD6d1zUnBVW/wviw5YqxClBgxIJ4kV8jS/XYbTApDpzgWZUy zNNXDqDOPnZYzOjKN1wPI21pxwC65PQy983QQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtcpvlDs15K6o4WlA5wRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIwxt5sUUte/ 60kOikfaDHS2sK8kKicc7w57igjBJGD0II3nFhFlGicIdN4BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI+uxuvTm7IA9ZidABNPLeesaLXtlUl0Deo mPA82X2KhobKMae2XyO9XfEaurnzX2jBdxDRe3QGvhCnFae3U4DCAIqU16ZuP3n2mibUP9cA hlBksYphe1onKCxdfHtUhv9rHOasxo0X9tLD/Z8+AyL0rDT4QuSGi4DVDEpQNAvqsIeXzEh0 V6N2dTzClRHr7m9WX+bsLCOoluP1TM9KGYDYWoISFUD6ty6+YUr1EuRH5BkDbK/icDzFXfo2 TeWoSMihrIVy8kWy6G8+lOBiDWpznTUcjMICszsdjrNxmtEiESNPuRENXCzAS58Ebuk
  • Ironport-hdrordr: A9a23:jJN0MaBaAE/1whPlHem755DYdb4zR+YMi2TDsHoQdfU1SK2lfq WV954mPHDP+VQssQ4b6LW90cW7LE80lqQa3WByB8bAYOCOggLBEGgI1+TfKlPbdxEW/9QtsZ tdTw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZBOHXzyNRueXKzkCvv/VJ69wZtK5Y7MWAgAAhHACAAAIeAA==
  • Thread-topic: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding


> On 1 Dec 2022, at 13:50, Edwin Torok <edvin.torok@xxxxxxxxxx> wrote:
> 
> Should we instead switch to using ctypes to generate these constants?

I would not advocate this. Ctypes is the kind of meta programming that is great 
when it works but hell if it does not and it adds more dependencies. 

I just had a discussion with Andrew about other tricks how to bring C constants 
to the ML side in order to decouple them. I’m using it in my Polly library - it 
might not be the solution for Xen but worth knowing.

https://github.com/lindig/polly/blob/master/lib/polly_stubs.c#L23-L39

— C

 


Rackspace

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