All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: ian.jackson@eu.citrix.com
Subject: [PATCH 00 of 27 V4] libxl: improved handling for default values in API
Date: Thu, 1 Mar 2012 10:50:09 +0000	[thread overview]
Message-ID: <patchbomb.1330599009@cosworth.uk.xensource.com> (raw)

Introduce a mechanism for users of libxl to explicitly say "pick the
default for me".

To do this each field has a distinguished "init_val" and each struct
has a "_setdefault" method which sets (idempotently) the defaults for
fields which have not been set to an explicit value.

Previously I went through some contortions (with "timer_mode" in
particular but also with *_memkb fields) to try and arrange that this
distinguished value was the all zeroes bit pattern.

Instead of that pain this time I have arranged that the IDL supports
the specification the distinguished val for each type/field and we
autogenerate an _init function for each data type based on that.

I have not updated the git branch I provided last time because iwj's
tree does not yet include the additional bios field in the IDL. The
generated code hasn't changed apart from that so I've left V3 at:

The following changes since commit e4296962b0e5d913929164b913f47fe288ab783e:

  tools/hotplug: remove 4 from default runlevel in xencommons (2012-02-20 18:58:07 +0000)

are available in the git repository at:
  git://xenbits.xen.org/people/ianc/xen-unstable.git for-ianj/libxl

Changes since last time:

* Rebase to latest head. Main change is the addition of the bios
  field in build info. Additional patch "libxl: Select BIOS using
  libxl_domain_build_info_setdefaults" relates to this

Changes since last time:

* Added two unrelated patches to remove Xen public headers from
  libxl's API to the head of the queue
* Produce _dispose and _init for all Aggregate types.
* Be more assertive about why we should drop the 8M slack on PV.
* Happens to fix stubdomains, broken by 24612:54000bca7a6a due to not
  setting the CPU affinity for the stub domain.

Changes since the time before:

* I have posted large parts of the previous series as
  * libxl: drop device_model_info
  * libxl: API updates + xl: JSON
  These have been committed thereby reducing the size of this series.
* _init function support as described above
* Dropped final patch to actually select stubdoms when possible --
  this needs more investigation/sanity checking.

This series has been lightly tested with PV domains (with and without
PVFB) and HVM domains (with and without stubdom).

             reply	other threads:[~2012-03-01 10:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 10:50 Ian Campbell [this message]
2012-03-01 10:50 ` [PATCH 01 of 27 V4] libxl: remove sysctl.h from public interface Ian Campbell
2012-03-01 10:50 ` [PATCH 02 of 27 V4] libxl: Remove xen/sched.h " Ian Campbell
2012-03-01 10:50 ` [PATCH 03 of 27 V4] libxl: allow specification of testidl random seed Ian Campbell
2012-03-01 10:50 ` [PATCH 04 of 27 V4] libxl: generate a _dispose function for all Aggregate types Ian Campbell
2012-03-01 10:50 ` [PATCH 05 of 27 V4] libxl: Document _init/_dispose/_setdefault functions Ian Campbell
2012-03-01 10:50 ` [PATCH 06 of 27 V4] libxl: provide _init and _setdefault for libxl_domain_create_info Ian Campbell
2012-03-01 10:50 ` [PATCH 07 of 27 V4] libxl: provide _init and _setdefault for libxl_domain_build_info Ian Campbell
2012-03-01 10:50 ` [PATCH 08 of 27 V4] libxl: use an explicit LIBXL_TIMER_MODE_DEFAULT value Ian Campbell
2012-03-01 10:50 ` [PATCH 09 of 27 V4] libxl: drop 8M slack for PV guests Ian Campbell
2012-03-01 10:50 ` [PATCH 10 of 27 V4] libxl: introduce a descriminating default value for memkb fields Ian Campbell
2012-03-01 10:50 ` [PATCH 11 of 27 V4] libxl: disk: use _init/_setdefault Ian Campbell
2012-03-01 10:50 ` [PATCH 12 of 27 V4] libxl: nic: " Ian Campbell
2012-03-01 10:50 ` [PATCH 13 of 27 V4] libxl: vfb/vkb: " Ian Campbell
2012-03-01 10:50 ` [PATCH 14 of 27 V4] libxl: make libxl_device_console internal Ian Campbell
2012-03-01 10:50 ` [PATCH 15 of 27 V4] libxl: pci: use _init/_setdefault Ian Campbell
2012-03-01 10:50 ` [PATCH 16 of 27 V4] libxl: add new "defbool" built in type Ian Campbell
2012-03-01 10:50 ` [PATCH 17 of 27 V4] libxl: make boolean members of libxl_domain_create_info into libxl_defbool Ian Campbell
2012-03-01 10:50 ` [PATCH 18 of 27 V4] libxl: make boolean members of libxl_domain_build_info " Ian Campbell
2012-03-01 10:50 ` [PATCH 19 of 27 V4] libxl: switch generation id control to libxl_defbool Ian Campbell
2012-03-01 10:50 ` [PATCH 20 of 27 V4] libxl: use defbool for graphics related options Ian Campbell
2012-03-01 10:50 ` [PATCH 21 of 27 V4] libxl: Select BIOS using libxl_domain_build_info_setdefaults Ian Campbell
2012-03-01 11:45   ` Attilio Rao
2012-03-01 10:50 ` [PATCH 22 of 27 V4] libxl: do not explicitly initialise members of build info to zero Ian Campbell
2012-03-01 10:50 ` [PATCH 23 of 27 V4] libxl: switch device model selection over to libxl_defbool Ian Campbell
2012-03-01 10:50 ` [PATCH 24 of 27 V4] libxl: add libxl_domain_build_info_init_type Ian Campbell
2012-03-01 10:50 ` [PATCH 25 of 27 V4] libxl: Make IDL KeyedUnion keyvar an idl.Field Ian Campbell
2012-03-01 10:50 ` [PATCH 26 of 27 V4] libxl: idl: generate KeyedUnion key member as part of the KeyedUnion Ian Campbell
2012-03-01 10:50 ` [PATCH 27 of 27 V4] libxl: autogenerate libxl_FOO_init and libxl_FOO_init_FIELD Ian Campbell
2012-03-01 12:53 ` [PATCH 00 of 27 V4] libxl: improved handling for default values in API Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patchbomb.1330599009@cosworth.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.