Commit Graph
32211 Commits
Author SHA1 Message Date
Jan Beulich a307566bb5 Revert "convert XSM_ENABLE to Kconfig"
This reverts commit 2b2ab5d88b,
as osstest needs to be ready first.
2016-01-08 17:34:53 +01:00
Jan Beulich 828dee9026 Revert "fix missing XSM_ENABLE change"
This reverts commit 9754544a55,
as the one it fixes needs reverting.
2016-01-08 17:34:16 +01:00
Andrew Cooper ce95dc84e3 tools/libxc: Adjust error handling in map_p2m_list() to fix CentOS 7 build
The "goto err;" for malloc() error handling would cause the cleanup code
to use 'ptes' before it had been initialised, and causing a build
failure because of -Werror=maybe-uninitialised.

Use "goto err;" consistently for all error handling.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-08 15:16:22 +00:00
Haozhong Zhang 75904ac35f x86/time: use correct guest TSC frequency in tsc_get_info()
When the TSC mode of a HVM container is TSC_MODE_DEFAULT or
TSC_MODE_PVRDTSCP and no TSC emulation is used, the existing
tsc_get_info() uses the host TSC frequency (cpu_khz) as the guest TSC
frequency. However, tsc_set_info() may set the guest TSC frequency to a
value different than the host. In order to keep consistent to
tsc_set_info(), this patch makes tsc_get_info() use the value set by
tsc_set_info() as the guest TSC frequency.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2016-01-08 10:48:29 +01:00
Haozhong Zhang 0a449aa43d x86/time: use correct guest TSC frequency in tsc_set_info()
When TSC_MODE_PVRDTSCP is used for a HVM container and TSC scaling is
available, use the non-zero value of argument gtsc_khz of tsc_set_info()
as the guest TSC frequency rather than using the host TSC
frequency. Otherwise, TSC scaling will not be able get the correct ratio
between the host and guest TSC frequencies.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2016-01-08 10:48:10 +01:00
Doug Goldstein 9754544a55 fix missing XSM_ENABLE change
This is broken from "xen: convert XSM_ENABLE to Kconfig"
6d5293032f5fc1c65f7a73548afaa3caa8e0105a. This hunk was dropped when I
made my v2 for some reason.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2016-01-08 10:46:47 +01:00
Bob Moore 18eed42622 ACPICA: ACPI 6.0: Add support for STAO table
Link: https://github.com/acpica/acpica/commit/532bf402
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit 37e12657f8922ebc62f696494c56c81db509053e]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:35:27 +01:00
Hanjun Guo 93de2b9992 ACPICA: Headers: Add GTDT flag definitions for the timer subtable
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit 34ea065e5e607dcbb249046c42a491f8b24ad849]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
2016-01-07 17:35:08 +01:00
Tomasz Nowicki 52c18917db ACPICA/ARM: ACPI 5.1: Update for GTDT table changes
New fields and new subtables. Tomasz Nowicki.

Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit 54ea4247d389059674aaacad7af224459b135fb9]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:34:50 +01:00
Graeme Gregory d829211592 ACPICA/ARM: ACPI 5.1: Update for FADT changes
Adds ARM flags and FADT minor revision. Graeme Gregory.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit 9eb1105babb8948c402ff785f5b43e35f79c0a0c]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:34:32 +01:00
Hanjun Guo 4cb2702678 ACPICA: ACPI 6.0: Add values for MADT GIC version field
ACPICA commit 4b100dc43e8baee8c8b4891b23bc7ad03eba6a28

Support for the new version field in the generic distributor
subtable. Hanjun Guo <hanjun.guo@linaro.org>

Link: https://github.com/acpica/acpica/commit/4b100dc4
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit a8bd0f07eb594df51845d33f272fb1952fec1a6f]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:34:13 +01:00
Bob Moore 9931ec37b0 ACPICA: ACPI 6.0: Add changes for MADT table
ACPICA commit 02cbb41232bccf7a91967140cab95d5f48291f21

New subtable type. Some additions to existing subtables.

Link: https://github.com/acpica/acpica/commit/02cbb412
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit 0cff8dc0099f6d4f7431181918b37a472bcd1bbb]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:33:55 +01:00
Tomasz Nowicki 5c3abb9a16 ACPICA/ARM: ACPI 5.1: Update for MADT changes
New subtables and changes to other subtables. Tomasz Nowicki.

Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[Linux commit d0c383e48d1b6cdc39cf9cc2f082bbb6f3c28b89]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-07 17:33:31 +01:00
Bob Moore b415b3a0f2 ACPI 5.0: Add new/changed tables to headers
Adds new file, actbl3.h

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
[Linux commit c5bd6537329e66a8b36234f19a36d94b72d07394]
[only port changes of Generic Interrupt and Generic Distributor, other
changes already exist]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
2016-01-07 17:33:09 +01:00
Paul Durrant 03809ae77d public/io/netif.h: document transmit and receive wire formats separately
Currently there is no documented wire format for guest receive-side
packets but the location of the 'wire format' comment block suggests
it is the same as transmit-side. This is almost true but there is a
subtle difference in the use of the 'size' field for the first fragment.

For clarity this patch creates separate comment blocks for receive
and transmit side packet wire formats, tries to be more clear about the
distinction between 'fragments' and 'extras', and documents the subtlety
concerning the size field of the first fragment.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
2016-01-07 15:28:33 +01:00
Joshua Otto 9c419ee77f credit: remove pointless local variable initialization
Coverity CID 1343301

No functional changes.

Signed-off-by: Joshua Otto <jtotto@uwaterloo.ca>
2016-01-07 15:28:08 +01:00
Doug Goldstein 373c3cf6dd remove dups in x86 and x86_64 variables
Currently the Xen build uses x86 and x86_64 variables as well as
CONFIG_X86 and CONFIG_X86_64. This just removes the duplication. The
CONFIG_ variables are now managed by Kconfig but existed previously so
this duplication existed prior to the Kconfig migration.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Feng Wu <feng.wu@intel.com>

$(CONFIG_X86_64) -> y in x86 makefiles.
$(CONFIG_X86_64) -> $(CONFIG_X86) in non-x86 makefiles.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2016-01-07 15:27:43 +01:00
Boris Ostrovsky fb424bf6b5 x86/VPMU: don't allow any non-zero writes to MSR_IA32_PEBS_ENABLE
Calculation reserved bits for MSR_IA32_PEBS_ENABLE is model-dependent
and since we don't support PEBS anyway we shouldn't allow any writes to
it (but let's still permit guests wishing to disable PEBS).

We should also report PEBS as unsupported to HVM, just like we do on PV.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2016-01-07 15:27:16 +01:00
Boris Ostrovsky 31af0d7675 x86/VPMU: check more carefully which bits are allowed to be written to MSRs
Current Intel VPMU emulation needs to perform more checks when writing
PMU MSRs on guest's behalf:
* MSR_CORE_PERF_GLOBAL_CTRL is not checked at all
* MSR_CORE_PERF_FIXED_CTR_CTRL has more reserved bits in PMU version 2
* MSR_CORE_PERF_GLOBAL_OVF_CTRL's bit 61 is allowed on versions greater
* than 2.

We can also use precomputed mask in core2_vpmu_do_interrupt().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2016-01-07 15:26:37 +01:00
Doug Goldstein 2b2ab5d88b convert XSM_ENABLE to Kconfig
Converts the existing XSM_ENABLE flag from Config.mk to CONFIG_XSM
within Kconfig. This also re-adds the dependency of CONFIG_FLASK on
CONFIG_XSM.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2016-01-07 15:25:58 +01:00
Doug Goldstein b36bf23027 convert FLASK_ENABLE to Kconfig
Converts the Config.mk option of FLASK_ENABLE into a Kconfig option for
the hypervisor called CONFIG_FLASK. This commit knowingly breaks the
dependent relationship on XSM_ENABLE which is addressed when XSM_ENABLE
is converted to Kconfig.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2016-01-07 15:18:45 +01:00
Jan Beulich c68b6fa2b6 x86: misc printk() adjustments
- a missing newline
- missing log levels (in Dom0-only messages)
- one dprintk() -> printk() conversion

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2016-01-07 15:15:01 +01:00
Stefano Stabellini 68778eeaa3 xen/arm: ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN
Injecting a fault to the guest just because it is writing to one of the
GICD_ICACTIVER registers, which are part of the GICv2 and GICv3 specs,
is harsh. Additionally it causes recent linux kernels to fail to boot on
Xen.

Ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN instead, to solve
the boot issue and for backportability. However implementing the
registers properly might a better long term solution.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-07 12:53:43 +00:00
Juergen Gross 6884e2b727 tools: add distclean target to libs/toollog Makefile
The new logging library Makefile doesn't support the distclean target.
Add it.

Also remove all created shared library versions via the clean target.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-07 12:52:03 +00:00
Juergen Gross 5178da0a24 stubdom: remove mini-os when doing make distclean
make distclean does not remove mini-os. Do so when cleaning stubdom.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-07 12:51:41 +00:00
Boris Ostrovsky 8345512feb libxc: Don't write terminating NULL character to command string
When copying boot command string for HVMlite guests we explicitly write
'\0' at MAX_GUEST_CMDLINE offset. Unless the string is close to
MAX_GUEST_CMDLINE in length this write will end up in the wrong place,
beyond the end of the mapped range.

We don't need to limit the size of command string to some arbitrary
number. Any size that can be successfully allocated and mapped is valid
and so the string is guaranteed to be NULL-terminated (since we use
strlen, which needs terminating '\0', to calculate allocation size).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-01-07 12:51:06 +00:00
Juergen Gross dc6d609371 libxc: set flag for support of linear p2m list in domain builder
Set the SIF_VIRT_P2M_4TOOLS flag for pv-domUs in the domain builder
to indicate the Xen tools have full support for the virtual mapped
linear p2m list.

This will enable pv-domUs to drop support of the 3 level p2m tree
and use the linear list only. Without setting this flag some kernels
might limit themselves to 512 GB memory size in order not to break
migration.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-07 12:49:34 +00:00
Juergen Gross 8429374f44 libxc: stop migration in case of p2m list structural changes
With support of the virtual mapped linear p2m list for migration it is
now possible to detect structural changes of the p2m list which before
would either lead to a crashing or otherwise wrong behaving domU.

A guest supporting the linear p2m list will increment the
p2m_generation counter located in the shared info page before and after
each modification of a mapping related to the p2m list. A change of
that counter can be detected by the tools and reacted upon.

As such a change should occur only very rarely once the domU is up the
most simple reaction is to cancel migration in such an event.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2016-01-07 12:49:34 +00:00
Juergen Gross 7bf74582b3 libxc: support of linear p2m list for migration of pv-domains
In order to be able to migrate pv-domains with more than 512 GB of RAM
the p2m information can be specified by the guest kernel via a virtual
mapped linear p2m list instead of a 3 level tree.

Add support for this new p2m format in libxc.

As the sanity checking of the virtual p2m address needs defines for the
xen regions use those defines when doing page table checks as well.
There were two harmless off by one errors in normalise_pagetable()
being fixed by using those defines (xen_last set to 512 instead of
511), the other one is fixed directly.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
2016-01-07 12:49:33 +00:00
Juergen Gross c2474dfe75 libxc: split mapping p2m leaves into a separate function
In order to prepare using the virtual mapped linear p2m list for
migration split mapping of the p2m leaf pages into a separate function.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-01-07 12:49:33 +00:00
Julien Grall ce0fac22e7 xen/arm: vtimer: Introduce vtimer_emulate_sysreg{32, 64}
Factorize the code to emulate a a 32-bit/64-bit sysreg in specific
helpers.

While this is currently not necessary, it will be helpful in a following
patch to handle properly some registers.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-05 11:49:40 +00:00
Julien Grall 1f38c6603c xen/arm64: Document the register mapping aarch64 <-> aarch32
The mapping between aarch64 and aarch32 has not been chosen in random.
It's based on D1.20.1 in ARM DDI 0487A.d.

The section is not obvious to find in the spec, so make it clear for the
anyone else.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-05 11:49:39 +00:00
Julien Grall efeedfa0ee xen/arm: io: handle_read: Use a local variable to store dabt
Rather than getting dabt every time through info->dabt, introduce a
local variable and use it.

Also fix a coding style error in the if condition.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-05 11:49:39 +00:00
Julien Grall a6037e6593 xen/arm: vgic: Clarify some comments after 5d495f4
Ian pointed out that the definition of "offset" and "appropriate
boundary" in the comments added by "xen/arm: vgic: Optimize the way to
store the target vCPU in the rank" were not cleared.

Clarify them by explicitly mentionning the offset is in byte and the
appropriate boundary is ITARGET<n>/IROUTER<n>

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-05 11:48:52 +00:00
Ian Campbell 5d3dc86715 tools: Refactor "xentoollog" into its own library
In attempting to disaggregate libxenctrl I found that many of the
pieces were going to want access to this library, so split it out (as
it probably should always have been).

Various build adjustments are needed. In particular things which use
xtl_* themselves now need to explicity link against the library.

This has a nice side effect which is that users of libxl no longer
need to link against libxenctrl just to create a logger, which was
counter to the principal that applications using libxl shouldn't be
required to look behind the curtain. This means that xl no longer
links against libxenctrl.

The new library uses a version script to ensure that only expected
symbols are exported and to version them such that ABI guarantees can
be kept in the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ ijc -- dropped QEMU_TRADITIONAL_REVISION update, this had since
         progressed to 569eac99e8dd which is after 9fad9ed28583, the
         commit needed here. ]
2016-01-05 11:45:26 +00:00
Ian Campbell b48aae50a8 stubdom: recurse into tools/include in mk-headers-$(XEN_TARGET_ARCH) rule
... rather than in the libxc rule.

This puts all the header dependencies in one place and will allow us
to avoid races when more libraries which need these headers are
introduced. I observed issues with the xen-foreign/tmp.size file
getting deleted in parallel with another process trying to use it.

The mini-os links are already created in the
mk-headers-$(XEN_TARGET_ARCH) target so the other places which do so
are redundant, in the case of polarssl and vtpmmgr indirectly through
their eventual dependency on newlib which in turn depends on
mk-headers-$(XEN_TARGET_ARCH).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: samuel.thibault@ens-lyon.org
2016-01-05 11:33:32 +00:00
Ian Campbell de858271c1 tools: allow configure time choice of libexec subdirectory.
Currently we hardcode various paths such as $libexec/xen/{bin,boot},
however some downstreams (notably Debian) would like instead to
install things into $libexec/xen-X.Y/{bin,boot} as part of allowing
multiple versions of the tools packages to be installed.

Since this currently involves patching configure its a bit fiddly,
provide a configure option for the leaf dir instead, name it
--with-libexec-leaf-dir similar to the existing
--with-sysconfig-leaf-dir.

Rather than have the determination of the full path in both configure
and config/Paths.mk.in move it into configure only. Also for
consistency move the other LIBEXEC_* to configure, even though they
are only substituted into Paths.mk.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: 805508@bugs.debian.org
[ ijc -- removed stray ` ]
2016-01-05 11:32:21 +00:00
Andrew Cooper 0747bc8b4d x86/vmx: Fix injection of #DB traps following XSA-156
Most #DB exceptions are traps rather than faults, meaning that the instruction
pointer in the exception frame points after the instruction rather than at it.

However, VMX intercepts all have fault semantics, even when intercepting a
trap.  Re-injecting an intercepted trap as a fault causes an infinite loop in
the guest, by re-executing the same trapping instruction repeatedly.  This
breaks debugging inside the guest.

Introduce a helper which copies VM_EXIT_INTR_INTO to VM_ENTRY_INTR_INFO, and
use it to mirror the intercepted interrupt back to the guest.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2016-01-05 11:28:56 +00:00
Ian Jackson dcdb658877 libxl: Fix doc comment ref to DOMAIN_DEATH
The doc comment for libxl_evdisable_domain_death mistakenly referred
to DOMAIN_DESTROY but the event type name is actually DOMAIN_DEATH.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2016-01-04 17:41:35 +00:00
Ian Jackson 3110c30a1b QEMU_TAG update 2016-01-04 15:35:25 +00:00
Jan Beulich 8e4d18e113 IOMMU: unhide messages useful for diagnostics
Undue use of dprintk() lead to many messages useful in diagnosing
issues in the field now being hidden in non-debug (i.e. production)
builds. Re-surface them.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2015-12-22 10:12:14 +01:00
Jan Beulich 009298d7ba VT-d: unhide messages needed for diagnosing firmware issues
Undue use of dprintk() lead to many messages useful in diagnosing
issues in the field now being hidden in non-debug (i.e. production)
builds. Re-surface them, namely when init-time only and/or already
guarded by iommu_{verbose,debug} conditionals. Switch from using
iommu_verbose to iommu_debug in a couple of runtime cases.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Feng Wu <feng.wu@intel.com>
2015-12-22 10:11:44 +01:00
Andrew Cooper 0d82868e1f x86/mmuext: unify okay/rc error handling in do_mmuext_op()
c/s 506db90 "x86/HVM: merge HVM and PVH hypercall tables" introduced a path
whereby 'okay' was used uninitialised, with broke compilation on CentOS 7.

Splitting the error handling like this is fragile and unnecessary.  Drop the
okay variable entirely and just use rc directly, substituting rc = -EINVAL/0
for okay = 0/1.

In addition, two error messages are updated to print rc, and some stray
whitespace is dropped.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Make setting of rc happen consistently after MEM_LOG(), if that is being
used.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2015-12-22 10:10:44 +01:00
Alex Xu bf925a9f12 get-fields.sh: use printf for POSIX compat
xen/tools/get-fields.sh used echo -n which is not POSIX compatible and
breaks building with dash (shell). Change it to use printf %s which is
usable everywhere.

Signed-off-by: Alex Xu <alex_y_xu@yahoo.ca>
2015-12-21 17:11:17 +01:00
Jan Beulich 68136245ec arm: add missing newlines to printk()s
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2015-12-21 17:10:09 +01:00
Huaitong Han 673807ab5c x86/hvm: add pkeys support when setting CR4
Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-12-21 17:09:36 +01:00
Huaitong Han 28cf749348 x86/hvm: a flag to enable Memory Protection Keys
Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-12-21 17:09:09 +01:00
Yu Zhang e2b84f09ec x86/HVM: remove identical relationship between ioreq type and rangeset type
This patch uses HVMOP_IO_RANGE_XXX values rather than the raw ioreq
type to select the ioreq server, therefore the identical relationship
between ioreq type and rangeset type is no longer necessary.

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Shuai Ruan <shuai.ruan@linux.intel.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
2015-12-21 17:07:55 +01:00
Boris Ostrovsky 33c19df9a5 x86/PCI: intercept accesses to RO MMIO from dom0s in HVM containers
Commit 9256f66c16 ("x86/PCI: intercept all PV Dom0 MMCFG writes")
added intercepts for writes to RO MMCFG space from PV dom0.

Similar functionality, including access to RO non-MMCFG addresses, is
needed by dom0s in HVM containers (such as PVH and, in the future,
HVMlite).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-12-21 14:05:02 +01:00
Malcolm Crossley 5c1048565b x86: make debug output consistent in hvm_set_callback_via
The unconditional printks in the switch statement of the
hvm_set_callback_via function results in Xen log spam in non debug
versions of Xen. The printks are for debug output only so conditionally
compile the entire switch statement on debug versions of Xen only.

This is XSA-169.

Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-12-21 13:40:48 +01:00