]> xenbits.xensource.com Git - xen.git/log
xen.git
8 years agox86emul: simplify FPU source operand handling
Jan Beulich [Fri, 9 Dec 2016 11:02:45 +0000 (12:02 +0100)]
x86emul: simplify FPU source operand handling

Consistently use ea instead of src for passing the memory address to
->read(). This eliminates the need to copy ea to src, resulting in a
couple of hundred bytes smaller binary size.

In addition for opcode DE we can leverage SrcMem16 to eliminate a call
of the ->read() hook. At the same time drop the stray Mov attributes
from D8, DA, DC, and DE: They're meaningful for memory writes only.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86emul: extend / amend supported FPU opcodes
Jan Beulich [Fri, 9 Dec 2016 11:02:12 +0000 (12:02 +0100)]
x86emul: extend / amend supported FPU opcodes

First of all there are a number of secondary encodings both Intel and
AMD support, but which aren't formally documented. See e.g.
www.sandpile.org/x86/opc_fpu.htm for inofficial documentation.

Next there are a few more no-ops - instructions which served a purpose
only on 8087 or 287.

Further switch from fail_if() to raising of #UD in a couple of places
(as the decoding of FPU opcodes should now be complete except where
explicitly marked as todo).

Also adjust a few comments.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agoRevert "libelf: treat phdr and shdr similarly"
Jan Beulich [Thu, 8 Dec 2016 15:41:12 +0000 (16:41 +0100)]
Revert "libelf: treat phdr and shdr similarly"

This reverts commit a01b6d464f05dadf28bfd38612283bd1848f1350
as needing further adjustment (namely to properly avoid a
divide by zero issue spotted by Coverity and reported by
Andrew).

8 years agox86emul: simplify {,i}{mul,div} fix
Jan Beulich [Thu, 8 Dec 2016 11:22:33 +0000 (12:22 +0100)]
x86emul: simplify {,i}{mul,div} fix

Commit 75066cd4ea ("x86emul: fix {,i}mul and {,i}div") can be had with
less code: Simply do the destination register override depending on
DstEax being in effect (the four other ModRM.reg encoded operations of
these two opcodes all use DstMem).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86emul: drop stray NULL check
Jan Beulich [Thu, 8 Dec 2016 11:21:56 +0000 (12:21 +0100)]
x86emul: drop stray NULL check

->read is required to be non-NULL, and is not being checked anywhere else.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86emul: drop dead code from SYSENTER handling
Jan Beulich [Thu, 8 Dec 2016 11:20:59 +0000 (12:20 +0100)]
x86emul: drop dead code from SYSENTER handling

There's no point reading CS - all of the fields get set from scratch
right afterwards. Also correct a wrong comment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agoxen/arm: vgic-v3: Allow AArch32 guest booting with GICv3
Julien Grall [Wed, 7 Dec 2016 12:33:53 +0000 (12:33 +0000)]
xen/arm: vgic-v3: Allow AArch32 guest booting with GICv3

AArch32 guest will use co-processor registers to access the GICv3 (see
8.5 in IHI 0069C). Some of the registers have to be trapped and emulated
(e.g ICC_SGI1R), this is the purpose of this patch.

The rest of the emulation already supports access required for AArch32
so nothing has to be changed there.

Note this is only enabling 32-bit guest using GICv3 on Xen ARM64. Further
work would be required to compile GICv3 and vGICv3 for Xen ARM32.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic-v3: Move the emulation of ICC_SGI1R_EL1 in a separate helper
Julien Grall [Wed, 7 Dec 2016 12:33:52 +0000 (12:33 +0000)]
xen/arm: vgic-v3: Move the emulation of ICC_SGI1R_EL1 in a separate helper

The emulation of the co-processor register ICC_SGI1R is the same as the
system register ICC_SGI1R_EL1. So move the emulation outside and use the
newly introduced helper vreg_emulate_sysreg64 to abstract the access.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic: Rename emulate_sysreg callback to emulate_reg
Julien Grall [Wed, 7 Dec 2016 12:33:51 +0000 (12:33 +0000)]
xen/arm: vgic: Rename emulate_sysreg callback to emulate_reg

We will want to emulate co-processor registers access in a follow-up
patch.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vreg: Introduce vreg_emulate_cp{32,64}
Julien Grall [Wed, 7 Dec 2016 12:33:50 +0000 (12:33 +0000)]
xen/arm: vreg: Introduce vreg_emulate_cp{32,64}

Factorize the code to emulate 32-bit and 64-bit access to a co-processor
in specific helpers.

The new helpers will be used in different components to simplify the
emulation.

Finally, the prototypes for the callbacks to emulate 32-bit and 64-bit
co-processor access are the same as the sysreg one. Rather than
introducing new ones, repurpose the existent prototypes.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vtimer: Move emulate_sysreg* callback in a separate header
Julien Grall [Wed, 7 Dec 2016 12:33:49 +0000 (12:33 +0000)]
xen/arm: vtimer: Move emulate_sysreg* callback in a separate header

The core emulation of sysreg (reading/writing registers) is not specific
to the virtual timer. Move the helpers in a new header vreg.h.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic-v3: Build vgic-v3.c when CONFIG_HAS_GICV3 is enabled.
Julien Grall [Wed, 7 Dec 2016 12:33:48 +0000 (12:33 +0000)]
xen/arm: vgic-v3: Build vgic-v3.c when CONFIG_HAS_GICV3 is enabled.

The vGICv3 depends whether Xen has a host driver for GICv3, not on the
architecture (AArch64 vs AArch32).

Note CONFIG_HAS_GICV3 is enabled only when for ARM64 build, so there is
no functional change.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic: Clean-up the sysreg emulation
Julien Grall [Wed, 7 Dec 2016 12:33:47 +0000 (12:33 +0000)]
xen/arm: vgic: Clean-up the sysreg emulation

Couple of clean-up for the vgic sysreg emulation:
    - Reference the public documentation rather than a non-public one
    - Let the vgic emulation decides whether a register needs to be
    emulated
    - Drop unnecessary debug printk. They don't bring much information
    and can be misleading (vGICv2 does not support those registers)

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic: Switch emulate_sysreg return from int to bool
Julien Grall [Wed, 7 Dec 2016 12:33:46 +0000 (12:33 +0000)]
xen/arm: vgic: Switch emulate_sysreg return from int to bool

emulate_sysreg callback can only return 2 values: 0 or 1. Use bool
instead to make clear only two possible values exist.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic: Switch vgic_to_sgi return from int to bool and progate up to...
Julien Grall [Wed, 7 Dec 2016 12:33:45 +0000 (12:33 +0000)]
xen/arm: vgic: Switch vgic_to_sgi return from int to bool and progate up to...

vgic_v{2,3}_to_sgi.

vgic_*to_sgi functions can only return 2 values: 0 or 1. Use bool instead
to make clear only two possible values exist.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vgic: Switch from bool_t to bool
Julien Grall [Wed, 7 Dec 2016 12:33:44 +0000 (12:33 +0000)]
xen/arm: vgic: Switch from bool_t to bool

Since commit 9202342 "xen/build: Use C99 booleans", bool_t is an alias
to bool. Going forward, therer is a preference to use bool rather than
bool_t. Also replace 0 and 1 by false and true when relevant.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: traps: Switch from bool_t to bool
Julien Grall [Wed, 7 Dec 2016 12:33:43 +0000 (12:33 +0000)]
xen/arm: traps: Switch from bool_t to bool

Since commit 9202342 "xen/build: Use C99 booleans", bool_t is an alias
to bool. Going forward, there is a preference to use bool rather than
bool_t. Also replace 0 and 1 by true and false when relevant.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vtimer: Switch the read variable in the emulation from int to bool
Julien Grall [Wed, 7 Dec 2016 12:33:42 +0000 (12:33 +0000)]
xen/arm: vtimer: Switch the read variable in the emulation from int to bool

The read variable can only take two values: 1 => read, 0 => write. Use
bool instead to make clear the variable can only take 2 values.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: vtimer: Switch the emulation functions return from int to bool
Julien Grall [Wed, 7 Dec 2016 12:33:41 +0000 (12:33 +0000)]
xen/arm: vtimer: Switch the emulation functions return from int to bool

The emulation functions are always returning 0 or 1. Use bool instead to
make clear only two possible values exist.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: fix smpboot barriers
Stefano Stabellini [Wed, 7 Dec 2016 19:13:05 +0000 (11:13 -0800)]
xen/arm: fix smpboot barriers

Remove useless smp_wmb() barrier after cpumask_set_cpu(cpuid,
&cpu_online_map), which is not synchronizing against anything.

Keep the other smp_wmb(), before the cpumask_set_cpu call, to ensure
that all writes before setting the cpu online are visible to other cpus.
For that to work properly, we need a corresponding smp_rmb() barrier,
after reading the online cpumask from other processors, which is
currently missing. Add it.

See: http://marc.info/?l=xen-devel&m=148093236307211

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
8 years agoQEMU_TAG update
Ian Jackson [Wed, 7 Dec 2016 16:52:23 +0000 (16:52 +0000)]
QEMU_TAG update

8 years agomisc/release-checklist: Import from xenbits:~xen/release-checklist
Ian Jackson [Mon, 5 Dec 2016 12:28:33 +0000 (12:28 +0000)]
misc/release-checklist: Import from xenbits:~xen/release-checklist

This checklist is what we use when releasing, branching, and making
tarballs.  Right I want to commit an exact copy of the live copy kept
on xenbits outside version control.  I am fed up of maintaining this
outside version control, and probably xen.git is the best place to put
it.

I have reviewed the contents and while it contains much that might be
considered embarrassing, it doesn't contain any secrets :-).

I suggest that:

 * This file should live in misc/ rather than docs/ on the grounds
   that no-one else is likely to ever want it.

 * We maintain the copy in xen.git#staging as the master copy for all
   branches.  When things change they are more often changes to
   infrastructure organisation and so on.  So the file will continue
   to contain explicit treatment for old Xen branches.

 * We will not retain information about branches which are out of
   security support.  (So some of what is there can be deleted at our
   leisure.)

 * This file will be maintained by the release technicians (currently
   mostly that means me, although others have done some parts of the
   task) and commits will be made by release technicians without
   further review or acks.

Please argue about the filename :-).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
8 years agolibacpi: don't announce a 8042 controller in the FADT for PVHv2 guests
Roger Pau Monné [Wed, 7 Dec 2016 16:13:59 +0000 (17:13 +0100)]
libacpi: don't announce a 8042 controller in the FADT for PVHv2 guests

There's no such controler available for PVHv2 guests.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agolibacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests
Roger Pau Monné [Wed, 7 Dec 2016 16:10:37 +0000 (17:10 +0100)]
libacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests

PVHv2 guests don't have any VGA card, and as so it must be notified in the FADT.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agolibacpi: add _FADT_ to the FADT boot flags definitions
Roger Pau Monné [Wed, 7 Dec 2016 16:07:09 +0000 (17:07 +0100)]
libacpi: add _FADT_ to the FADT boot flags definitions

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86emul: correct and extend IDT entry checks
Jan Beulich [Wed, 7 Dec 2016 14:39:03 +0000 (15:39 +0100)]
x86emul: correct and extend IDT entry checks

In order to pre-determine whether a fault will occur upon software
interrupt injection, it is not sufficient to just check P and DPL. Do
at least all the checks on the IDT entry itself, and in particular do
the #NP check last. The checks for the new CS (and perhaps SS) are left
out for now, though.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citirix.com>
8 years agox86emul: don't assume a memory operand
Jan Beulich [Wed, 7 Dec 2016 13:39:08 +0000 (14:39 +0100)]
x86emul: don't assume a memory operand

Especially for x86_insn_operand_ea() to return dependable segment
information even when the caller didn't consider applicability, we
shouldn't have ea.type start out as OP_MEM. Make it OP_NONE instead,
and set it to OP_MEM when we actually encounter memory like operands.

This requires to eliminate the XSA-123 fix, which has been no longer
necessary since the elimination of the union in commit dd766684e7. That
in turn allows restricting the scope of override_seg to x86_decode().
At this occasion also make it have a proper type, instead of plain int.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86: properly calculate xen ELF end of image address
Daniel Kiper [Wed, 7 Dec 2016 13:37:34 +0000 (14:37 +0100)]
x86: properly calculate xen ELF end of image address

This patch is prereq for "efi: build xen.gz with EFI code" patch which adds,
among others, xen/arch/x86/efi/relocs-dummy.S to xen.gz output. Below there
is a description why it is needed.

Currently xen ELF end of image address is calculated using first line from
"nm -nr xen/xen-syms" output. However, potentially it may contain symbol
address not related to the end of image in any way. It can happen if a symbol
is introduced with address larger than _end symbol address. Such situation
encountered when I linked xen ELF binary with xen/arch/x86/efi/relocs-dummy.S.
Then first line from "nm -nr xen/xen-syms" contained "ffff82d0c0000000 A ALT_START"
and xen ELF image memory size was silently set to 1023 MiB. This issue happened
because there is no check which symbol address is used to calculate end of
image address. So, let's fix it and take ELF end of image address by reading
__2M_rwdata_end symbol address from nm output. This way xen ELF image build
process is not prone to changes in order of nm output.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
8 years agox86: allow EFI reboot method neither on non-EFI platforms...
Daniel Kiper [Wed, 7 Dec 2016 13:37:11 +0000 (14:37 +0100)]
x86: allow EFI reboot method neither on non-EFI platforms...

... nor EFI platforms with runtime services enabled.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
8 years agoefi: create efi_enabled()
Daniel Kiper [Wed, 7 Dec 2016 13:36:11 +0000 (14:36 +0100)]
efi: create efi_enabled()

First of all we need to differentiate between legacy BIOS
and EFI platforms during runtime, not during build, because
one image will have legacy and EFI code and can be executed
on both platforms. Additionally, we need more fine grained
knowledge about EFI environment and check for EFI platform
and EFI loader separately to properly support multiboot2
protocol. In general Xen loaded by this protocol uses memory
mappings and loaded modules in similar way to Xen loaded by
multiboot (v1) protocol. Hence, create efi_enabled() which
checks available features in efi_flags. This patch defines
EFI_BOOT, EFI_LOADER and EFI_RS features. EFI_BOOT is equal
to old efi_enabled == 1. EFI_RS ease control on runtime
services usage. EFI_LOADER tells that Xen was loaded
directly from EFI as PE executable.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86: add a way to obtain the needed number of memory map entries
Juergen Gross [Wed, 7 Dec 2016 13:03:08 +0000 (14:03 +0100)]
x86: add a way to obtain the needed number of memory map entries

Today there is no way for a domain to obtain the number of entries of
the machine memory map returned by XENMEM_machine_memory_map hypercall.

Modify the interface to return just the needed number of map entries
in case the buffer was specified as NULL.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86emul/test: add a private header
Jan Beulich [Wed, 7 Dec 2016 12:56:43 +0000 (13:56 +0100)]
x86emul/test: add a private header

This is to avoid having to duplicate auxiliary definitions in both
source files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86emul: correct PUSHF/POPF
Jan Beulich [Wed, 7 Dec 2016 12:55:42 +0000 (13:55 +0100)]
x86emul: correct PUSHF/POPF

Both need to raise #GP(0) when in VM86 mode with IOPL < 3.

Additionally PUSHF is documented to clear VM and RF from the value
placed onto the stack.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86/HVM: drop __hvm_clear()
Jan Beulich [Wed, 7 Dec 2016 12:55:14 +0000 (13:55 +0100)]
x86/HVM: drop __hvm_clear()

Rather than almost entirely duplicating __hvm_copy(), have __hvm_copy()
clear guest memory if the source pointer is NULL.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86/HVM: drop hvm_emulate_one_no_write()
Jan Beulich [Wed, 7 Dec 2016 12:54:41 +0000 (13:54 +0100)]
x86/HVM: drop hvm_emulate_one_no_write()

It was pointlessly non-static, and being static and a simple wrapper it
can as well be folded into its single caller.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agolibelf: treat phdr and shdr similarly
Jan Beulich [Wed, 7 Dec 2016 12:53:50 +0000 (13:53 +0100)]
libelf: treat phdr and shdr similarly

Just like elf_shdr_count(), elf_phdr_count() better bounds checks the
value.

Add table entry size checks to elf_init().

Also both program and section headers are optional, and hence their
checking better is done conditionally only when any such headers are
present.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
8 years agolibelf: type adjustments
Jan Beulich [Wed, 7 Dec 2016 12:53:28 +0000 (13:53 +0100)]
libelf: type adjustments

Don't needlessly use uint64_t when unsigned suffices.

Also don't open code elf_phdr_count() and replace a redundant call to
elf_shdr_count().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
8 years agolibelf: use UINT_MAX
Jan Beulich [Wed, 7 Dec 2016 12:52:59 +0000 (13:52 +0100)]
libelf: use UINT_MAX

While Xen indeed doesn't have limits.h, it still does have UINT_MAX, so
we should avoid open coding it (and perhaps - even if unlikely -
getting it wrong).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
8 years agolibelf: section index 0 is special
Jan Beulich [Wed, 7 Dec 2016 12:52:35 +0000 (13:52 +0100)]
libelf: section index 0 is special

When iterating over sections, table entry zero needs to be ignored.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
8 years agox86/memshr: add static
Jan Beulich [Wed, 7 Dec 2016 12:52:00 +0000 (13:52 +0100)]
x86/memshr: add static

And with that drop mem_sharing_ prefixes as no longer meaningful. Once
again convert GFN function argument types at once.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
8 years agox86: make more use of wr{f,g}sbase()
Jan Beulich [Wed, 7 Dec 2016 12:50:22 +0000 (13:50 +0100)]
x86: make more use of wr{f,g}sbase()

With suitable canonical address checks added these can also be used in
do_set_segment_base().

Also with a canonical address check now in place, there's no need for
priv_op_write_msr() to use wrmsr_safe() anymore.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agox86/HVM: prefer structure assignment for seg reg copying
Jan Beulich [Wed, 7 Dec 2016 12:49:08 +0000 (13:49 +0100)]
x86/HVM: prefer structure assignment for seg reg copying

This makes things type safe.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
8 years agolibxl: invert xc and domain model resume calls in xc_domain_resume()
Cédric Bosdonnat [Mon, 28 Nov 2016 13:53:57 +0000 (14:53 +0100)]
libxl: invert xc and domain model resume calls in xc_domain_resume()

Resume is sometimes silently failing for HVM guests. Getting the
xc_domain_resume() and libxl__domain_resume_device_model() in the
reverse order than what is in the suspend code fixes the problem.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: rebase it on top of staging ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxen/common: Replace incorrect mandatory barriers with SMP barriers
Andrew Cooper [Wed, 5 Oct 2016 11:42:15 +0000 (12:42 +0100)]
xen/common: Replace incorrect mandatory barriers with SMP barriers

Mandatory barriers are only for use with reduced-cacheability MMIO mappings.

All of these uses are just to deal with shared memory between multiple
processors, so use the smp_*() which are the correct barriers for the purpose.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: Fix macro for ARM Jazelle CPU feature identification
Artem Mygaiev [Tue, 6 Dec 2016 14:16:45 +0000 (16:16 +0200)]
xen/arm: Fix macro for ARM Jazelle CPU feature identification

Fix macro for ARM Jazelle CPU feature identification: value of 0 indicates
that CPU does not support ARM Jazelle (ID_PFR0[11:8])

Coverity-ID: 1381849

Signed-off-by: Artem Mygaiev <artem_mygaiev@epam.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
8 years agoxen/arm: traps: Emulate ICC_SRE_EL1 as RAZ/WI
Julien Grall [Mon, 5 Dec 2016 17:43:23 +0000 (17:43 +0000)]
xen/arm: traps: Emulate ICC_SRE_EL1 as RAZ/WI

Recent Linux kernel (4.4 and onwards [1]) is checking whether it is possible
to enable sysreg access (ICC_SRE_EL1.SRE) when the ID register
(ID_AA64PRF0_EL1.GIC) is reporting the presence of the sysreg interface.

When the guest has been configured to use GICv2, the hypervisor will
disable sysreg access for this vm (via ICC_SRE_EL2.Enable) and therefore
access to system register such as ICC_SRE_EL1 are trapped in EL2.

However, ICC_SRE_EL1 is not emulated by the hypervisor. This means that
Linux will crash as soon as it is trying to access ICC_SRE_EL1.

To solve this problem, Xen can implement ICC_SRE_EL1 as read-as-zero
write-ignore. The emulation will only be used when sysreg are disabled
for EL1.

[1]  963fcd409 "arm64: cpufeatures: Check ICC_EL1_SRE.SRE before
enabling ARM64_HAS_SYSREG_GIC_CPUIF"

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: Fix misplaced parentheses for PSCI version check
Artem Mygaiev [Wed, 30 Nov 2016 13:53:11 +0000 (15:53 +0200)]
xen/arm: Fix misplaced parentheses for PSCI version check

Fix misplaced parentheses for PSCI version check

Signed-off-by: Artem Mygaiev <artem_mygaiev@epam.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoarm/irq: Reorder check when the IRQ is already used by someone
Oleksandr Tyshchenko [Fri, 2 Dec 2016 16:38:16 +0000 (18:38 +0200)]
arm/irq: Reorder check when the IRQ is already used by someone

Call irq_get_domain for the IRQ we are interested in
only after making sure that it is the guest IRQ to avoid
ASSERT(test_bit(_IRQ_GUEST, &desc->status)) triggering.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoRevert "xen/arm: do not relocate Xen outside of visible RAM"
Sameer Goel [Tue, 25 Oct 2016 16:40:28 +0000 (10:40 -0600)]
Revert "xen/arm: do not relocate Xen outside of visible RAM"

This reverts commit db92b1ac55cd5e193ae22b0b6f01fb47bc9e5d2f.

The restriction on non contiguous memory was resolved by commit
2d02b05c77fc5e7c76bf6f112db84bbaa44fdcb5:
"xen: arm: improve handling of system with non-contiguous RAM regions"

So, reverting this change,to enable Xen image placement at the end of the
useable system RAM.

Signed-off-by: Sameer Goel <sgoel@codeaurora.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agoxen/arm: domain_build: allocate lowmem for dom0 as much as possible
Peng Fan [Fri, 23 Sep 2016 02:55:34 +0000 (10:55 +0800)]
xen/arm: domain_build: allocate lowmem for dom0 as much as possible

On AArch64 SoCs, some IPs may only have the capability to access
32 bits address space. The physical memory assigned for Dom0 maybe
not in 4GB address space, then the IPs will not work properly.
So need to allocate memory under 4GB for Dom0.

There is no restriction that how much lowmem needs to be allocated for
Dom0 ,so allocate lowmem as much as possible for Dom0.

This patch does not affect 32-bit domain, because Variable "lowmem" is
set to true at the beginning. If failed to allocate bank0 under 4GB,
need to panic for 32-bit domain, because 32-bit domain requires bank0
be allocated under 4GB.

For 64-bit domain, set "lowmem" to false, and continue allocating
memory from above 4GB.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
8 years agoDon't clear HCR_VM bit when updating VTTBR.
Jun Sun [Mon, 10 Oct 2016 19:27:56 +0000 (12:27 -0700)]
Don't clear HCR_VM bit when updating VTTBR.

Currently function p2m_restore_state() would clear HCR_VM bit, i.e.,
disabling stage2 translation, before updating VTTBR register. After
some research and talking to ARM support, I got confirmed that this is not
necessary. We are currently working on a new platform that would need this
to be removed.

The patch is tested on FVP foundation model.

Signed-off-by: Jun Sun <jsun@junsun.net>
Acked-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
8 years agotools/xenstore: avoid unterminated string in xs_directory_part()
Juergen Gross [Tue, 6 Dec 2016 06:41:54 +0000 (07:41 +0100)]
tools/xenstore: avoid unterminated string in xs_directory_part()

Commit d4016288ab1f ("xenstore: support XS_DIRECTORY_PART in
libxenstore") introduced a theoretical bug: the generation count of
the read node is transferred via strncpy without forcing a NUL byte
at the end. Correct this.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxen: convert lto to Kconfig option
Wei Liu [Mon, 5 Dec 2016 14:39:55 +0000 (14:39 +0000)]
xen: convert lto to Kconfig option

Introduce CONFIG_LTO in Kconfig. Since this is the last option to be
converted to Kconfig, delete the preceding comment in Rules.mk as well.

Make it depend on BROKEN because it doesn't work at the moment.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
8 years agoTravis-ci: specify KCONFIG_ALLCONFIG for randconfig
Wei Liu [Mon, 5 Dec 2016 16:45:36 +0000 (16:45 +0000)]
Travis-ci: specify KCONFIG_ALLCONFIG for randconfig

The file provided contains symbols that must be set to certain values.
This then prevents random build breakage in travis due to
known-incompatible symbol selections.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
8 years agoKconfig: introduce allrandom.config
Wei Liu [Mon, 5 Dec 2016 16:45:35 +0000 (16:45 +0000)]
Kconfig: introduce allrandom.config

This would be used to force selection of certain items in randconfig.

We need this to force gcov format to be autodetected in randconfig
target, which would avoid generating known-incompatible combinations.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
8 years agox86/emul: Drop the last remaining uses of bool_t
Andrew Cooper [Wed, 2 Nov 2016 15:50:23 +0000 (15:50 +0000)]
x86/emul: Drop the last remaining uses of bool_t

And drop the compatibility typedef from the userspace harness

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86/hvm: Assert some expectations in hvm_inject_event()
Andrew Cooper [Fri, 2 Dec 2016 13:18:38 +0000 (13:18 +0000)]
x86/hvm: Assert some expectations in hvm_inject_event()

Check that event->error_code is appropriate for the type/vector combination.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86/emul: Debugging improvements to the test harness
Andrew Cooper [Tue, 25 Oct 2016 18:41:01 +0000 (19:41 +0100)]
x86/emul: Debugging improvements to the test harness

Disable stdout buffering, so logging gets out even if the harness crashes.
Add a verbose option (compile time disabled) which dumps all read/write calls
the harness makes

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agox86/shadow: Drop stale adjustment in the PAE second-half search
Andrew Cooper [Fri, 2 Dec 2016 18:23:02 +0000 (18:23 +0000)]
x86/shadow: Drop stale adjustment in the PAE second-half search

This shouldn't have been present in c/s 29a57c992 "x86/emul: Rework emulator
event injection".  It was a leftover from a previous version of the series.

This conditional has no effect on the behaviour following it, as both
X86EMUL_EXCEPTION and X86EMUL_UNHANDLEABLE fall into the same "return back to
guest" path.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
8 years agox86/pagewalk: Improve print_gw()
Andrew Cooper [Tue, 24 May 2016 10:56:58 +0000 (11:56 +0100)]
x86/pagewalk: Improve print_gw()

print_gw() has no callers, meaning that it only gets used as part of manual
debugging.  As such, the FILE/LINE references are of no practical use, and
voluminous in the log.  Additionally, the function becoming empty in a
non-debug build is unhelpful.  Switch from gdprintk() to gprintk().

Print the entry and mfn for a specific level on the same line.  This halves
the number of lines printed overall.  There needs to be a small adjustment to
the #ifdef'ary to maintain the proper l3e behaviour for 3-level paging, where
there is no l3mfn to print.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
8 years agox86/time: Move cpuid_time_leaf() handling into cpuid_hypervisor_leaves()
Andrew Cooper [Sun, 2 Oct 2016 16:28:11 +0000 (17:28 +0100)]
x86/time: Move cpuid_time_leaf() handling into cpuid_hypervisor_leaves()

This reduces the net complexity of CPUID handling by having all adjustments in
at the same place.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agoxen/x86: Add a helper to calculate family/model/stepping information
Andrew Cooper [Thu, 1 Sep 2016 09:38:27 +0000 (10:38 +0100)]
xen/x86: Add a helper to calculate family/model/stepping information

And replace the existing opencoded calculations.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
8 years agogdbstub: remove duplicated inclusion of init.h
Wei Liu [Mon, 5 Dec 2016 13:49:44 +0000 (13:49 +0000)]
gdbstub: remove duplicated inclusion of init.h

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agogcov: explicitly include xen/init.h
Wei Liu [Mon, 5 Dec 2016 13:49:14 +0000 (13:49 +0000)]
gcov: explicitly include xen/init.h

Travis discovered arm32 gcov code failed to build because __init was not
defined.

Include init.h explicitly to fix the issue.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
8 years agoRun autogen.sh for 4.9
Wei Liu [Mon, 5 Dec 2016 12:08:08 +0000 (12:08 +0000)]
Run autogen.sh for 4.9

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: handle memory allocation failures in xenstored
Juergen Gross [Mon, 5 Dec 2016 07:48:53 +0000 (08:48 +0100)]
xenstore: handle memory allocation failures in xenstored

Check for failures when allocating new memory in xenstored.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: add small default data buffer to internal struct
Juergen Gross [Mon, 5 Dec 2016 07:48:52 +0000 (08:48 +0100)]
xenstore: add small default data buffer to internal struct

Instead of always allocating a data buffer for incoming or outgoing
xenstore wire data add a small buffer to the buffered_data structure
of xenstored. This has the advantage that especially sending simple
response messages like errors or "OK" will no longer need allocating
a data buffer. This requires adding a memory context where the
allocated buffer was used for that purpose.

In order to avoid allocating a new buffered_data structure for each
response reuse the structure of the original request. This in turn
will avoid any new memory allocations for sending e.g. an ENOMEM
response making it possible to send it at all. To do this the
allocation of the buffered_data structure for the incoming request
must be done when a new request is recognized instead of doing it
when accepting a new connect.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: add helper functions for wire argument parsing
Juergen Gross [Mon, 5 Dec 2016 07:48:51 +0000 (08:48 +0100)]
xenstore: add helper functions for wire argument parsing

The xenstore wire command argument parsing of the different commands
is repeating some patterns multiple times. Add some helper functions
to avoid the duplicated code.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: make functions static
Juergen Gross [Mon, 5 Dec 2016 07:48:50 +0000 (08:48 +0100)]
xenstore: make functions static

Move functions used in only one source to the file where they are used
and make them static.

Remove some prototypes from headers which are no longer in use.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: let command functions return error or success
Juergen Gross [Mon, 5 Dec 2016 07:48:49 +0000 (08:48 +0100)]
xenstore: let command functions return error or success

Add a return value to all wire command functions of xenstored. If such
a function returns an error send the error message in
process_message().

Only code refactoring, no change in behavior expected.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: use array for xenstore wire command handling
Juergen Gross [Mon, 5 Dec 2016 07:48:48 +0000 (08:48 +0100)]
xenstore: use array for xenstore wire command handling

Instead of switch() statements for selecting wire command actions use
an array for this purpose.

While doing this add the XS_RESTRICT type for diagnostic prints and
correct the printed string for XS_IS_DOMAIN_INTRODUCED.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: support XS_DIRECTORY_PART in libxenstore
Juergen Gross [Mon, 5 Dec 2016 07:48:47 +0000 (08:48 +0100)]
xenstore: support XS_DIRECTORY_PART in libxenstore

This will enable all users of libxenstore to handle xenstore nodes
with a huge amount of children.

In order to not depend completely on the XS_DIRECTORY_PART
functionality use it only in case of E2BIG returned by XS_DIRECTORY.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: add support for reading directory with many children
Juergen Gross [Mon, 5 Dec 2016 07:48:46 +0000 (08:48 +0100)]
xenstore: add support for reading directory with many children

As the payload size for one xenstore wire command is limited to 4096
bytes it is impossible to read the children names of a node with a
large number of children (e.g. /local/domain in case of a host with
more than about 2000 domains). This effectively limits the maximum
number of domains a host can support.

In order to support such long directory outputs add a new wire command
XS_DIRECTORY_PART which will return only some entries in each call and
can be called in a loop to get all entries.

Input data are the path of the node and the byte offset into the child
list where returned data should start.

Output is the generation count of the node (which will change each time
the node is being modified) and a list of child names starting with
the specified index. The end of the list is indicated by an empty
child name. It is the responsibility of the caller to check for data
consistency by comparing the generation counts of all returned data
sets to be the same for one node.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: add per-node generation counter
Juergen Gross [Mon, 5 Dec 2016 07:48:45 +0000 (08:48 +0100)]
xenstore: add per-node generation counter

In order to be able to support reading the list of a node's children in
multiple chunks (needed for list sizes > 4096 bytes) without having to
allocate a temporary buffer we need some kind of generation counter for
each node. This will help to recognize a node has changed between
reading two chunks.

As removing a node and reintroducing it must result in different
generation counts each generation value has to be globally unique. This
can be ensured only by using a global 64 bit counter.

For handling of transactions there is already such a counter available,
it just has to be expanded to 64 bits and must be stored in each
modified node.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: use common tdb record header in xenstore
Juergen Gross [Mon, 5 Dec 2016 07:48:44 +0000 (08:48 +0100)]
xenstore: use common tdb record header in xenstore

The layout of the tdb record of xenstored is defined at multiple
places: read_node(), write_node() and in xs_tdb_dump.c

Use a common structure instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: call add_change_node() directly when writing node
Juergen Gross [Mon, 5 Dec 2016 07:48:43 +0000 (08:48 +0100)]
xenstore: call add_change_node() directly when writing node

Instead of calling add_change_node() at places where write_node() is
called, do that inside write_node().

Note that there is one case where add_change_node() is called now when
a later failure will prohibit the changed node to be written: in case
of a write_node failing due to an error in tdb_store(). As the only
visible change of behavior is a stale event fired for the node, while
the failing tdb_store() signals a corrupted xenstore database, the
stale event will be the least problem of this case.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agoxenstore: modify add_change_node() parameter types
Juergen Gross [Mon, 5 Dec 2016 07:48:42 +0000 (08:48 +0100)]
xenstore: modify add_change_node() parameter types

In order to prepare adding a generation count to each node modify
add_change_node() to take the connection pointer and a node pointer
instead of the transaction pointer and node name as parameters. This
requires moving the call of add_change_node() from do_rm() to
delete_node_single().

While at it correct the comment for the prototype: there is no
longjmp() involved.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_xshelp.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:41 +0000 (16:08 +0100)]
libxl/libxl_xshelp.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_x86.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:40 +0000 (16:08 +0100)]
libxl/libxl_x86.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_vtpm.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:39 +0000 (16:08 +0100)]
libxl/libxl_vtpm.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_vnuma.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:38 +0000 (16:08 +0100)]
libxl/libxl_vnuma.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_stream_write.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:37 +0000 (16:08 +0100)]
libxl/libxl_stream_write.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_save_callout.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:36 +0000 (16:08 +0100)]
libxl/libxl_save_callout.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_remus.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:35 +0000 (16:08 +0100)]
libxl/libxl_remus.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_qmp.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:34 +0000 (16:08 +0100)]
libxl/libxl_qmp.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_pvusb.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:33 +0000 (16:08 +0100)]
libxl/libxl_pvusb.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_psr.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:32 +0000 (16:08 +0100)]
libxl/libxl_psr.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_pci.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:31 +0000 (16:08 +0100)]
libxl/libxl_pci.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_no_colo.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:30 +0000 (16:08 +0100)]
libxl/libxl_no_colo.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_nic.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:29 +0000 (16:08 +0100)]
libxl/libxl_nic.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_netbuffer.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:28 +0000 (16:08 +0100)]
libxl/libxl_netbuffer.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_netbsd.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:27 +0000 (16:08 +0100)]
libxl/libxl_netbsd.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_linux.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:26 +0000 (16:08 +0100)]
libxl/libxl_linux.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_internal.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:25 +0000 (16:08 +0100)]
libxl/libxl_internal.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_freebsd.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:24 +0000 (16:08 +0100)]
libxl/libxl_freebsd.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_dom_suspend.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:23 +0000 (16:08 +0100)]
libxl/libxl_dom_suspend.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_dom_save.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:22 +0000 (16:08 +0100)]
libxl/libxl_dom_save.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_dm.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:21 +0000 (16:08 +0100)]
libxl/libxl_dm.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_device.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:20 +0000 (16:08 +0100)]
libxl/libxl_device.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
8 years agolibxl/libxl_create.c: used LOG*D functions
Cedric Bosdonnat [Fri, 2 Dec 2016 15:08:19 +0000 (16:08 +0100)]
libxl/libxl_create.c: used LOG*D functions

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>