Prepare for the next release (0.1.1)

Bump the version number and start a new sectionin NEWS.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Add missing dist and include files to automake

Many files are missing both from the distribution tarball and from
the installation. This is an omission that made 0.1 release unusable.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Mark kdump_set_phys_base inline function

This function should be inline, not just static.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cleanup: Remove unused variables

Address the warnings emitted by -Wunused-variable.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Include <stdlib.h> from context.c

This header file contains the declaration of strtoull(), used in
vmcoreinfo_symbol().

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Use void pointers rather than unsigned char* for kdump_read*

Follow the example of read(2) and use void pointers to make life easier
for library users.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
xc_core_probe: fix check for xc_core hvm

Actually found by gcc -Wparentheses. Silly.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Silence a gcc warning about unhandled enum value

Well, the default is in fact to do nothing, but let's be more explicit
about how the default case is handled.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Fix return value of x86_64_init

Found by gcc -Wreturn-type. Silly omission.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Update NEWS with the cleanups

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Add late arch initialisation hook

The init() method is called as soon as the architecture is determined.
At that point, the context struct is only partially initialised, e.g.
the kernel release number may not be known, but some arch-specific
initialisation depends on that information.

Add a second initialisation hook for these cases.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Enable bz2 dist target

Unlike gzip, bzip2 is accepted by openSUSE, so let's enable that target
by default.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
.gitignore: Add distribution tarballs

The distribution tarballs should not be under version control.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
x86_64_init: Fix off-by-one in the non-canonical address

(1ULL<<VIRTUAL_ADDRESS_SHIFT) - 1 is the last valid address, so it should
not be included in the invalid range.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Introduce x86_64_data

Currently, only struct cpu_state chain is needed for x86_64, but if
more data is needed, the meaning of ctx->archdata must change. Create
a top-level structure that holds all other data.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cleanup: set up x86_64 noncanonical address region in a separate func

In general, this makes it easier to follow the meaning of the "magic"
constants. All macros are derived from the virtual number of bits
(no longer off by one), and the definitions are safe if kdump_addr_t
happens to be larger than 64 bits one day.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
x86_64: Use the new macro in setup of the temporary kernel text region

KDUMP_ADDR_MAX may be larger than VIRTADDR_MAX if kdump_addr_t happens
to be larger than 64 bits.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>