x64: Introduce the instruction RDRAND

Note that the size of the register used as an output determines
the size of the random data to be returned by the instruction.
For our goals, i.e., adding the RDRAND instruction as a source of
entropy into our CSPRNG, this variant is quite sufficient.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
x64: random: provide RDRAND as a source of entropy for CSPRNG

Add RDRAND as a conditional hardware source of entropy, i.e.,
it will only be registered into the CSPRNG when supported by
the underlying CPU.
A wrapper function was created to fit the CSPRNG interface
for registering sources of entropy, and also handle certain
caveats from the RDRAND instruction.
Implementation was based on the following Intel Manual:
Intel(r) Digital Random Number Generator (DRNG)

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mempool: make sure that alignof(max_align_t) >= 2 * sizeof(size_t)

The default alignment of objects allocated by glibc's malloc is no
less than 2 * sizeof(size_t). Make sure that alignof(max_align_t)
fulfils that requirement.

Cc: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>