functional cleanup for __attribute__((packed)) changes

This is to separate the functional changes from the noop consistency changes.

* Pack struct cper_mce_record rather than creating a structure named __packed
* Remove unreferenced struct xgt_desc
* Use two u16's rather than two u32 16-bit bitfields

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>

Also drop now pointless (and always having been bogus) pack pragmas.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
common: shuffle use of __attribute__((packed))

This introduced a formal define in compiler.h, and is otherwise manual
shuffling of __attribute__((packed)) statements to __packed at the head of the
structure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
x86: shuffle use of __attribute__((packed))

This is almost all manual shuffling of __attribute__((packed)) statements to
__packed at the head of the structure.

The only different change is in tboot.h, removing some now-redundant ifdefs.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
arm: shuffle use of __attribute__((packed))

This is all mechanical shuffling.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
x86_emulate: Shuffle use of __attribute__((packed))

Also include #defines for the test code to allow compilation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
x86/tboot: Use an integer_param for "tboot="

rather than using a string param and manually parsing it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
docs/vtpm: explain dom0 physical TPM access caveats

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
unlzma: fix build of stubdom unsafe decompressors

c/s b683d68c386 changed the packing attribute on struct lzma_header.  However,
this is 3rd library code used by stubdomains.

Revert the change to lzma_header alone to avoid needless divergence from its
source.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools: update config.{sub,guess}

Update to versions from Debian Wheezy's autotools-dev package (20120608.1)

Adds ARM aarch64 support.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen/arm: Introduce clean_and_invalidate_xen_dcache() macro

This macro is very similar to clean_xen_dcache(), but it performs
clean and invalidate dcache.

Also modify flush_page_to_ram() to call
clean_and_invalidate_xen_dcache_va_range() function.

Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arm: Clean and invalidate dcache for boot pagetables

We need to invalidate dcache too after zeroing boot pagetables
to avoid unpredictable behavior which may take place after
non-boot CPUs enable their caches.

So, replace clean_xen_dcache() macro by a clean_and_invalidate_xen_dcache()
for boot pagetables.

Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified

Otherwise we deference a NULL pointer.

I saw this while experimenting with libvirt on Xen on ARM, xl already checks
that the command line is non NULL and provides "" as a default.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Cc: george.dunlap@citrix.com>
xen/arm32: proc-v7.S: Rename v7_init and ACTLR_V7_SMP

The function v7_init and the define ACTLR_V7_SMP are Cortex A15/A7
specific.

To avoid misuse when new ARMv7 processors will be supported, create one
label per processor type and rename ACTLR_V7_SMP in ACTRL_CAXX_SMP

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arm32: head.S: Remove CA15 and CA7 specific includes

head.S only contains generic code. It should not include headers for a
specific processor.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arm32: Introduce lookup_processor_type

Looking for a specific proc_info structure is already implemented in assembly.
Implement lookup_processor_type to avoid duplicate code between C and
assembly.

This function searches the proc_info_list structure following the processor
ID. If the search fail, it will return NULL, otherwise a pointer to this
structure for the specific processor.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arm64: Implement lookup_processor_type as a dummy function

ARM64 implementation doesn't yet have specific code per processor.
This function will be used in a later patch.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian campbell <ian.campbell@citrix.com>
xen/arm: Remove processor specific setup in vcpu_initialise

This patch introduces the possibility to have specific processor callbacks
that can be called in various place.

Currently VCPU initialisation code contains processor specific setup (for
Cortex A7 and Cortex A15) for the ACTRL registers. It's possible to have
processor with a different layout for this register.

Move this setup in a specific callback for ARM v7 processor.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: marc.ceeeee@gmail.com
xen/arm: Remove asm-arm/processor-ca{15, 7}.h headers

Theses headers are not in the right directory and are not used anymore.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>