Andrew Cooper [Fri, 22 May 2015 08:13:04 +0000 (10:13 +0200)]
x86/irq: limit the maximum number of domain PIRQs
c/s 7e73a6e "have architectures specify the number of PIRQs a hardware domain
gets" increased the default number of pirqs for dom0, as 256 was found to be
too low in some cases.
However, it didn't account for the upper bound presented by the domains EOI
bitmap, registered with the PHYSDEVOP_pirq_eoi_gmfn_v* hypercall.
On a server with 240 cpus, Xen was observed to be attempting to clear the EOI
bit for dom0's pirq 0xb40f, which hit a pagefault.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Huaitong Han [Fri, 22 May 2015 08:12:02 +0000 (10:12 +0200)]
x86/cpuidle: get accurate C0 value with xenpm tool
When checking the ACPI funciton of C-status, after 100 seconds sleep,
the sampling value of C0 status from the xenpm tool decreases.
Because C0=NOW()-C1-C2-C3-C4, when NOW() value is during idle time,
NOW() value is bigger than last C-status update time, and C0 value
is also bigger than ture value. if margin of the second error cannot
make up for margin of the first error, the value of C0 would decrease.
Signed-off-by: Huaitong Han <huaitong.han@intel.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich [Fri, 22 May 2015 08:10:28 +0000 (10:10 +0200)]
public: restrict xen_arch_domainconfig visibility
As an extension to 931f5777c7 ("public: clarify xen_arch_domainconfig
ABI statement") limit the respective definitions' visibility to
hypervisor and tools.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian Campbell [Thu, 21 May 2015 16:31:39 +0000 (17:31 +0100)]
docs: correct pod syntax
Olaf reports:
[ 146s] man/xl.pod.1 around line 1529: '=item' outside of any '=over'
[ 146s] man/xl.pod.1 around line 1531: You forgot a '=back' before '=head1'
[ 146s] POD document had syntax errors at /usr/bin/pod2text line 84.
[ 146s] Makefile:167: recipe for target 'txt/man/xl.1.txt' failed
[ 146s] make[1]: *** [txt/man/xl.1.txt] Error 255
Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:33:51 +0000 (15:33 +0000)]
tools: add configure --with-dumpdir=DIR option
The current base directory /var/xen/dump for domU dumps will be patched
to /var/lib/xen/dump by most distros to follow FHS.
This change does three things:
- change the default from /var/xen/dump to /var/lib/xen/dump
- provide a configure option to avoid patching the source.
- update docs to refer to the new default location
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- s,/var,LOCALSTATEDIR, in help test, ran autogen.sh ]
Ian Campbell [Wed, 20 May 2015 14:39:00 +0000 (15:39 +0100)]
libxl: assign a default ssidref (XSM label) to guests
We have now arranged for SECINITSID_DOMU and SECINITSID_DOMDM to be
defined (correspondng to system_u:system_r:domU_t and
system_u:system_r:dm_dom_t respectively in the default policy). Use
these as the default for the SSID of every (stub)domain.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> Cc: Wei.Liu2@citrix.com Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Ian Campbell [Wed, 20 May 2015 14:38:57 +0000 (15:38 +0100)]
xen: flask: Restrict generated header to xen + tools
This isn't strictly necessary but since it is going to be exposed via
tools/include in a later patch this will help prevent accidental
leakage beyond the tools.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Wei Liu [Mon, 18 May 2015 16:37:22 +0000 (17:37 +0100)]
docs: remove qemu-upstream_howto_use_it.markdown
QEMU upstream has been the default for several releases. The only
setting described in that document is no longer required.
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Keir Fraser <keir@xen.org> Cc: Tim Deegan <tim@xen.org> Cc: Anthony Perard <anthony.perard@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julien Grall [Fri, 15 May 2015 15:51:19 +0000 (16:51 +0100)]
xen/arm: Drop support of platform where GICH_LR_HW is not working correctly
Until recently, a maintenance IRQ was requested for any IRQ injected to
the guest on x-gene platform.
The commit 50dcb3de603927db2fd87ba09e29c817415aaa44 "xen: arm: X-Gene Storm
check GIC DIST address for EOI quirk" disable the quirk for boards using
the new firmware.
It is known that the quirk is fragile and cause performance regression.
Given that firmware is available for people having the board, I think
we can request the user to upgrade to the latest version.
Andrew Cooper [Mon, 18 May 2015 12:57:24 +0000 (13:57 +0100)]
tools: Fix wild memory allocations from c/s 250f0b4 and 85d78b4
These changesets cause the respective libxc functions to unconditonally
dereference their max_cpus/nodes parameters as part of initial memory
allocations. It will fail at obtaining the correct number of cpus/nodes from
Xen, as the guest handles will not be NULL.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
Julien Grall [Wed, 6 May 2015 18:56:13 +0000 (19:56 +0100)]
MAINTAINERS: Remove Frediano Ziglio from "HISILICON HIP04 Support"
His email address is bouncing from more than a month.
Signed-off-by: Julien Grall <julien.grall@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Keir Fraser <keir@xen.org> Cc: Jan Beulich <jbeulich@suse.com> Cc: Zoltan Kiss <zoltan.kiss@huawei.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Charles Arnold [Fri, 15 May 2015 17:06:04 +0000 (11:06 -0600)]
libxl: 'valid_devs' may be used uninitialized
Using gcc 4.8 to compile with -Werror.
xl_cmdimpl.c:5493:8: error: 'valid_devs' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (valid_devs == 0)
^
xl_cmdimpl.c:5455:9: note: 'valid_devs' was declared here
int valid_devs;
Signed-off-by: Charles Arnold <carnold@suse.com> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Fri, 15 May 2015 06:23:11 +0000 (06:23 +0000)]
docs: fix typo in xl.cfg:vfb=
Use singular for option, it refers to vfb= itself.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Jan Beulich [Wed, 22 Apr 2015 12:02:16 +0000 (13:02 +0100)]
libxl: fix "xl mem-set" regression from 0c029c4da2
Said commit ("libxl_set_memory_target: retain the same maxmem offset on
top of the current target") caused a regression for "xl mem-set"
against Dom0: While prior to creation of the first domain this works,
the first domain creation involving ballooning breaks. Due to "enforce"
not being set in the domain creation case, and due to Dom0's initial
->max_pages (in the hypervisor) being UINT_MAX, the calculation of
"memorykb" in the first "xl mem-set" adusting the target upwards
subsequent to domain creation and termination may cause an overflow,
resulting in Dom0's maximum getting to a very small value. This small
maximum will the make the subsequent setting of the PoD target fail.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian Jackson [Thu, 14 May 2015 12:41:26 +0000 (13:41 +0100)]
xl: Support (by ignoring) xl migrate --live
xm migrate would do non-live migration (effectively, save, transfer
and restore) by default, unless you specified --live.
xl migrate always does live migration. Honour (by ignoring) --live
for compatibility with old callers. Document this.
(This patch should be backported as far as possible.)
Reported-by: Matthew Vernon <mcv21@cam.ac.uk> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Matthew Vernon <mcv21@cam.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:55 +0000 (15:24 +0000)]
tools: replace private DOCDIR with automake docdir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl DOCDIR | xargs sed -i 's@DOCDIR@docdir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:54 +0000 (15:24 +0000)]
tools: replace private LIBDIR with automake libdir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl LIBDIR | xargs sed -i 's@LIBDIR@libdir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:53 +0000 (15:24 +0000)]
tools: replace private MANDIR with automake mandir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl MANDIR | xargs sed -i 's@MANDIR@mandir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:52 +0000 (15:24 +0000)]
tools: replace private INCLUDEDIR with automake includedir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl INCLUDEDIR | xargs sed -i 's@INCLUDEDIR@includedir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:51 +0000 (15:24 +0000)]
tools: replace private PREFIX with automake prefix
Reuse automake variable instead of inventing a private variable.
Only qemu-traditional expects PREFIX in environment, which is provided
by buildmakevars2shellvars.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:50 +0000 (15:24 +0000)]
tools: replace private BINDIR with automake bindir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl BINDIR | xargs sed -i 's@BINDIR@bindir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 11 May 2015 15:24:49 +0000 (15:24 +0000)]
tools: replace private SBINDIR with automake sbindir
Reuse automake variable instead of inventing a private variable.
The result of this command:
git grep -wnl SBINDIR | xargs sed -i 's@SBINDIR@sbindir@g'
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Mukesh Rathor <mukesh.rathor@oracle.com> Cc: Tim Deegan <tim@xen.org> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov> Cc: David Scott <dave.scott@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julien Grall [Fri, 8 May 2015 17:01:12 +0000 (18:01 +0100)]
xen/arm: gic-v3: Implement correctly the callback send_SGI
Currently, the GICv3 driver is only able to send an SGI when the cpumask
is provided. Although with the modes SGI_TARGET_OTHERS and SGI_TARGET_SELF,
no cpumask is provided. Any usage of those modes will crash the hypersivor.
Rename gicv3_send_sgi to gicv3_send_sgi_list and implement the
different modes:
- SGI_TARGET_OTHERS: Set the Interrupt Routing Mode (bit 40) to 1
(see Table 4 on Section 4.2.6 PRD03-GENC-010745 24.0)
- SGI_TARGET_SELF: Unlike GICv2, the GICv3 SGI registers don't
provide a specific field. So use gicv3_send_sgi_list and pass
the cpumask of the current CPU
- SGI_TARGET_LIST: Directly call gicv3_send_sgi_list with the given
cpumask
Also, use WRITE_SYSREG64 to write into ICC_SGI1R_EL1 the access is
64-bit on all the architectures.
Olaf Hering [Mon, 20 Apr 2015 13:40:32 +0000 (13:40 +0000)]
libxl: set DISPLAY and XAUTHORITY if sdl is enabled
With this change the following domU.cfg will show the VM window on the
local dom0 display, instead of the remote side (it via ssh -X login):
vnc=0
sdl=1
display=":0"
xauthority="/run/gdm/auth-for-olaf-nMXhOi/database"
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Olaf Hering [Mon, 20 Apr 2015 13:40:31 +0000 (13:40 +0000)]
libxl: pass environment to device model
Prepare device-model setup functions to pass also environment variables
to the spawned process. This is required for upcoming changes which will
set DISPLAY and XAUTHORITY for SDL.
Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Julien Grall [Wed, 13 May 2015 18:33:41 +0000 (19:33 +0100)]
xl: Add new option dtdev
The option "dtdev" will be used to passthrough a device described
in the device tree to a guest.
Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com>
Julien Grall [Wed, 13 May 2015 18:33:40 +0000 (19:33 +0100)]
libxl: Add support for Device Tree passthrough
On ARM, every non-PCI device are described in the device tree. Each of
them can be found via a path.
This patch introduces a very basic support, only the IOMMU will be set
up correctly. The user will have to:
- Describe the device in the partial device tree
- Map manually MMIO/IRQ
This is a first approach, that will allow to have a basic Device Tree
passthrough support in Xen. This could be improved later.
Furthermore add LIBXL_HAVE_DEVICETREE_PASSTHROUGH to indicate we
support Device Tree passthrough and partial device tree (introduced by a
previous patch).
Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com>
Julien Grall [Wed, 13 May 2015 18:33:39 +0000 (19:33 +0100)]
tools/libxl: arm: Use an higher value for the GIC phandle
The partial device tree may contains phandle. The Device Tree Compiler
tends to allocate the phandle from 1.
Reserve the ID 65000 for the GIC phandle. I think we can safely assume
that the partial device tree will never contain a such ID.
Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com>
Julien Grall [Wed, 13 May 2015 18:33:38 +0000 (19:33 +0100)]
tools/(lib)xl: Add partial device tree support for ARM
Allow the user to pass additional nodes to the guest device tree. For
this purpose, everything in the node /passthrough from the partial
device tree will be copied into the guest device tree.
The node /aliases will be also copied to allow the user to define
aliases which can be used by the guest kernel.
Note that:
* The interrupt-parent property will be added by the toolstack in
the root node
* The properties compatible, ranges, #address-cells and #size-cells
in /passthrough are mandatory.
The helpers provided by the libfdt don't perform all the necessary
security check on a given device tree. Therefore, only trusted device
tree should be used.
Note: The partial device tree code requires the presence of libfdt
functions which have been only correctly exported in libfdt 1.4.0 and
higher. All the major distributions but Debian Wheezy are using v1.4.0
or higher. It has been decided to disable partial device tree support on
OSes where libfdt doesn't meet the requirement.
Signed-off-by: Julien Grall <julien.grall@linaro.org> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
Julien Grall [Tue, 17 Mar 2015 17:58:14 +0000 (17:58 +0000)]
tools/libxl: Check if fdt_{first,next}_subnode are present in libfdt
The functions fdt_{first,next}_subnode may not be available because:
* It has been introduced in 2013 => Doesn't work on Wheezy
* The prototype exists but the functions are not exposed. Don't ask
why...
The later has been fixed recently in the dtc repo [1]
When the functions are not available, implement our own in order to use
them in a following patch.
Note that the _hidden attribute is placed in both the prototype and the
declaration because some version of libfdt expose the prototype but not
the declaration.
Signed-off-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
Andrew Cooper [Thu, 21 May 2015 06:56:01 +0000 (08:56 +0200)]
public: clarify xen_arch_domainconfig ABI statement
This structure is used by XEN_DOMCTL_createdomain, and is liable to be
modified going forwards. Explicitly state that it falls under the
XEN_DOMCTL_INTERFACE_VERSION.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Julien Grall <julien.grall@citrix.com> Reviewed-by: Don Slutz <dslutz@verizon.com>
Andrew Cooper [Wed, 20 May 2015 11:31:50 +0000 (13:31 +0200)]
x86/domctl: fix getpageframeinfo* handling
In tree, there is one single caller of XEN_DOMCTL_getpageframeinfo3
(xc_get_pfn_type_batch()), and no callers of the older variants.
getpageframeinfo3 and getpageframeinfo2 are compatible if the parameter
contents are considered to be unsigned long, and indeed, a compat guest
calling getpageframeinfo3 falls through into the getpageframeinfo2 handler.
However, getpageframeinfo3 and getpageframeinfo2 have different algorithms for
calculating the eventual frame type, which means that a toolstack will get
different answers depending on whether it is compat or not.
Rewrite getpageframeinfo3 such that the code block can handle both regular and
compat guests, and use the original getpageframeinfo3 algorithm for frame
time, which is more complete.
Remove getpageframeinfo2 and getpageframeinfo1, as they are unused and
obsolete.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
x86/pvh: use a custom IO bitmap for PVH hardware domains
Since a PVH hardware domain has access to the physical hardware create a
custom more permissive IO bitmap. The permissions set on the bitmap are
populated based on the contents of the ioports rangeset.
Len Brown [Wed, 20 May 2015 11:24:34 +0000 (13:24 +0200)]
mwait-idle: add support for the Airmont Core in the Cherrytrail and Braswell SOCs
Support C-states for the Airmont core in the Cherrytrail and Braswell
SOCs. The states are similar to those of Silvermont in Baytrail, except
both flavors of C6 states are faster.
Len Brown [Wed, 20 May 2015 11:23:49 +0000 (13:23 +0200)]
mwait-idle: update support for Silvermont Core in Baytrail SOC
On some Silvermont-Core/Baytrail-SOC systems,
C1E latency is higher than original specifications.
Although C1E is still enumerated in CPUID.MWAIT.EDX,
we delete the state from intel_idle to avoid latency impact.
Under some conditions, the latency of the C6N-BYT and C6S-BYT states
may exceed the specified values of 40 and 140 usec, respectively.
Increase those values to 300 and 500 usec; to assure
that the hardware does not violate constraints that may be set
by the Linux PM_QOS sub-system.
Also increase the C7-BYT target residency to 4.0 ms from 1.5 ms.
David Vrabel [Tue, 19 May 2015 13:49:22 +0000 (15:49 +0200)]
spinlock: fix build with older GCC
Older GCC versions such as 4.3 cannot have initializers for the
members of anonymous structures, so initialize .head_tail instead.
Use a SPINLOCK_TICKET_INC define so this initializer is near the
spinlock_tickets_t definition (in case the structure changes requiring
changes to the initializer).
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reported-and-tested-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich [Mon, 18 May 2015 10:11:31 +0000 (12:11 +0200)]
x86emul: also put_fpu() on error paths
fail_if() and generate_exception_if() could theoretically bypass the
normal flow reaching put_fpu(), and not invoking it would leave the
fpu_exception_callback pointer in place, allowing for the callback to
be called at an unexpected time. Luckily the two
generate_exception_if()-s that would actually trigger this are
currently commented out, so this is not (yet) a (security) issue.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xentrace: Implement cpu mask range parsing of human values (-c).
Instead of just using -c 0x<some hex value> we can
also use: -c <starting cpu>-<end cpu>, -c <cpu1>,<cpu2>, or a
combination of them, or 'all' for all cpus.
This new format can include just singular CPUs: -c <cpu1>,
or ranges without an start or end (and xentrace will figure out
the values), such as: -c -<cpu2> (which will include cpu0, cpu1,
and cpu2) or -c <cpu2>- (which will include cpu2 and up to MAX_CPUS).
That should make it easier to trace the right CPU if
using this along with 'xl vcpu-list'.
The code has been lifted from the Linux kernel, see file
lib/bitmap.c, function __bitmap_parselist.
To make the old behavior and the new function work, we check
to see if the arguments have '0x' in them. If they do
we use the old style parsing (limited to 32 CPUs). If that
does not exist we use the new parsing.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
x86: rework paging_log_dirty_op to work with hvm guests
When the caller of paging_log_dirty_op is a hvm guest Xen would choke when
trying to copy the dirty bitmap to the guest because the paging lock is
already held.
Fix this by independently mapping each page of the guest bitmap as needed
without the paging lock held.
x86/shadow: fix shadow_track_dirty_vram to work on hvm guests
Modify shadow_track_dirty_vram to use a local buffer and then flush to the
guest without the paging_lock held. This is modeled after
hap_track_dirty_vram.
introduce a helper to allocate non-contiguous memory
The allocator uses independent calls to alloc_domheap_pages in order to get
the desired amount of memory and then maps all the independent physical
addresses into a contiguous virtual address space.
David Vrabel [Fri, 15 May 2015 07:52:25 +0000 (09:52 +0200)]
x86,arm: remove asm/spinlock.h from all architectures
Now that all architecture use a common ticket lock implementation for
spinlocks, remove the architecture specific byte lock implementations.
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
David Vrabel [Fri, 15 May 2015 07:49:12 +0000 (09:49 +0200)]
use ticket locks for spin locks
Replace the byte locks with ticket locks. Ticket locks are: a) fair;
and b) peform better when contented since they spin without an atomic
operation.
The lock is split into two ticket values: head and tail. A locker
acquires a ticket by (atomically) increasing tail and using the
previous tail value. A CPU holds the lock if its ticket == head. The
lock is released by increasing head.
spin_lock_irq() and spin_lock_irqsave() now spin with irqs disabled
(previously, they would spin with irqs enabled if possible). This is
required to prevent deadlocks when the irq handler tries to take the
same lock with a higher ticket.
Architectures need only provide arch_fetch_and_add() and two barriers:
arch_lock_acquire_barrier() and arch_lock_release_barrier().
Signed-off-by: David Vrabel <david.vrabel@citrix.com> Reviewed-by: Tim Deegan <tim@xen.org> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Yang Hongyang [Thu, 14 May 2015 08:55:18 +0000 (16:55 +0800)]
libxc/restore: add checkpointed flag to the restore context
add checkpointed flag to the restore context.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:17 +0000 (16:55 +0800)]
libxc/restore: introduce setup() and cleanup() on restore
introduce setup() and cleanup() which subsume the
ctx->restore.ops.{setup,cleanup}() calls and also
do memory alloc/free.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:16 +0000 (16:55 +0800)]
libxc/restore: split read/handle qemu info
Split read/handle qemu info. The receiving of qemu info
should be done while we receive the migration stream,
handle_qemu will be called when the stream complete.
Otherwise, it will break Remus because read_record()
won't read qemu info and stream_complete will be called
at failover.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:15 +0000 (16:55 +0800)]
libxc/restore: introduce process_record()
Move record handle codes into a function process_record().
It will be used multiple times by Remus.
No functional change.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:14 +0000 (16:55 +0800)]
libxc/save: reuse send_dirty_pages() in send_all_pages()
introduce bitmap_set() to set the entire bitmap.
in send_all_pages(), set the entire bitmap and call send_dirty_pages().
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:13 +0000 (16:55 +0800)]
libxc/save: rename send_some_pages to send_dirty_pages
rename send_some_pages to send_dirty_pages, no functional change.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:12 +0000 (16:55 +0800)]
libxc/save: remove bitmap param from send_some_pages
In last patch we added dirty bitmap to the save context,
we no longer need to pass this param to send_some_pages.
We can get dirty bitmap from the save context.
'entries' should stay as it is a useful sanity check.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:11 +0000 (16:55 +0800)]
libxc/save: adjust the memory allocation for migration
Move the memory allocation before the concrete live/nolive save
in order to avoid the free/alloc memory loop when using Remus.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:10 +0000 (16:55 +0800)]
libxc/save: rename to_send to dirty_bitmap
rename to_send to dirty_bitmap.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:09 +0000 (16:55 +0800)]
libxc/save: introduce setup() and cleanup() on save
introduce setup() and cleanup() which subsume the
ctx->save.ops.{setup,cleanup}() calls.
The SHADOW_OP_OFF hypercall is also included in the cleanup().
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Yang Hongyang [Thu, 14 May 2015 08:55:08 +0000 (16:55 +0800)]
tools/libxc: add a check in xc_hypercall_buffer_free_pages macro
When we use a DECLARE_HYPERCALL_BUFFER_SHADOW it defines a user
pointer '_name' and a shadow xc_hypercall_buffer_t.
When calling xc_hypercall_buffer_free_pages(_xch, _name, _nr),
the complier will report '_name' unused error, because
xc_hypercall_buffer_free_pages() is a MACRO and '_name' is
transparently converted to the hypercall buffer. it confuses
the caller because xc_hypercall_buffer_free_pages() looks
like a function and takes '_name' as an arg.
Add an if check to let the compiler think we are actually
using the argument '_name'.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
[ ijc -- some rewording of the commit message ]
Yang Hongyang [Thu, 14 May 2015 08:55:07 +0000 (16:55 +0800)]
tools/libxc: unused attribute in DECLARE_HYPERCALL_BUFFER_SHADOW
There are cases where we only need to use the hypercall buffer data,
and do not use the xc_hypercall_buffer_t struct.
DECLARE_HYPERCALL_BUFFER_SHADOW defines a user pointer that can allow
us to access the hypercall buffer data but it also defines a
xc_hypercall_buffer_t that we don't use, the compiler will report arg
unused error.
Add __attribute__((unused)) before xc_hypercall_buffer_t to avoid
the compiler error.
Example cases:
In send_all_pages(), we only need to use the hypercall buffer data
which is a dirty bitmap, we set the dirty bitmap to all dirty and call
send_dirty_pages, we will not use the xc_hypercall_buffer_t and hypercall
to retrieve the dirty bitmap.
In send_some_pages(), we will also only need to use the dirty_bitmap.
the retrieve dirty bitmap hypercall are done by the caller.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Andrew Cooper [Thu, 14 May 2015 08:55:06 +0000 (16:55 +0800)]
libxc/migration: Pass checkpoint information into the save algorithm.
The old code checks the callbacks "postcopy & checkpoint", if the
callbacks exists, it will call them. However this is unreliable, so
add this flag to explicitly indicate a checkpointed stream in the new
code. This is backward compatible with the legacy migration just don't
know this flag and will ignore it.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Yang Hongyang <yanghy@cn.fujitsu.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
[ ijc -- added discussion of legacy compat ]
Andrew Cooper [Thu, 14 May 2015 08:55:05 +0000 (16:55 +0800)]
libxc/migration: Specification update for CHECKPOINT records
Checkpointed streams need to signal the end of a consistent view of VM state,
and the start of the libxl data.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Andrew Cooper [Thu, 14 May 2015 08:55:04 +0000 (16:55 +0800)]
libxc/save: Adjust stream-position callbacks for checkpointed streams
There are some records which should only be sent once in the stream, and not
repeated for each checkpoint. {start,end}_of_stream() become per-checkpoint,
and a new start_of_stream() is introduced.
There is no resulting change record order, but the X86_PV_INFO record is
identified as once per stream. Currently the X86_PV_P2M_FRAMES record is as
well, but this is because of an implementation bug and can move back to being
on an as-needed basis when fixed.
In addition, a few minor adjustments of comments and layout.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Yang Hongyang <yanghy@cn.fujitsu.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Andrew Cooper [Thu, 14 May 2015 08:55:03 +0000 (16:55 +0800)]
libxc/migration: Be rather stricter with illformed callers
The migration code itself should be able to validly assume all mandatory
callbacks are set up.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Yang Hongyang <yanghy@cn.fujitsu.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Boris Ostrovsky [Wed, 13 May 2015 17:37:35 +0000 (13:37 -0400)]
xenpm: Initialize cputopo pointer
Commit 250f0b43af1a ("libxl/libxc: Move libxl_get_cpu_topology()'s
hypercall buffer management to libxc") broke non-debug compilation:
on error path we may have uninitialized cputopo pointer.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reported-by: Olaf Hering <olaf@aepfle.de> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Jan Beulich [Wed, 13 May 2015 14:35:54 +0000 (16:35 +0200)]
IOMMU/x86: avoid pages without GFN in page table creation/updating
Handing INVALID_GFN to functions like hd->platform_ops->map_page()
just can't do any good, and the ioreq server code results in such pages
being on the list of ones owned by a guest.
While - as suggested by Tim - we should use get_gfn()/put_gfn() there
to eliminate races, we really can't due to holding the domain's page
alloc lock. Ultimately arch_iommu_populate_page_table() may need to be
switched to be GFN based. Here is what Tim said in this regard:
"Ideally this loop would be iterating over all gfns in the p2m rather
than over all owned MFNs. As long as needs_iommu gets set first,
such a loop could safely be paused and restarted without worrying
about concurrent updates. The code sould even stay in this file,
though exposing an iterator from the p2m code would be a lot more
efficient."
Original by Andrew Cooper <andrew.cooper3@citrix.com>, using further
suggestions from Tim Deegan <tim@xen.org>.
Reported-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it> Acked-by: Tim Deegan <tim@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Yang Zhang <yang.z.zhang@intel.com> Acked-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Boris Ostrovsky [Mon, 11 May 2015 16:31:28 +0000 (12:31 -0400)]
libxl/libxc: Move libxl_get_numainfo()'s hypercall buffer management to libxc
xc_numainfo() is not expected to be used on a hot path and therefore
hypercall buffer management can be pushed into libxc. This will simplify
life for callers.
Also update error logging macros.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Boris Ostrovsky [Mon, 11 May 2015 16:31:27 +0000 (12:31 -0400)]
libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc
xc_cputopoinfo() is not expected to be used on a hot path and therefore
hypercall buffer management can be pushed into libxc. This will simplify
life for callers.
Also update error reporting macros.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/iommu: arm: Use p2m_ipa_bits as stage2 input size
The Stage2 input-size must match what the CPU uses because
the SMMU and the CPU share page-tables.
Test that the SMMU supports the P2M IPA bit size, use it if
supported or bail out if not.
Reviewed-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Export p2m_ipa_bits holding the bit size of IPAs used in p2m tables.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@citrix.com>
xen/arm: Re-order iommu_setup to after setup_virt_paging
This is needed to allow the paging setup to probe for
IPA bit sizes to be used in p2m tables prior to iommu setup.
Acked-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This is because, for free CPUs, -EBUSY were being returned
when trying to tear them down, making cpu_down() unhappy.
It is certainly unpractical to forbid shutting down or
suspenging if there are unassigned CPUs, so this change
fixes the above by just avoiding returning -EBUSY for those
CPUs. If shutting off, that does not matter much anyway. If
suspending, we make sure that the CPUs remain unassigned
when resuming.
While there, take the chance to:
- fix the doc comment of cpupool_cpu_remove() (it was
wrong);
- improve comments in general around and in cpupool_cpu_remove()
and cpupool_cpu_add();
- add a couple of ASSERT()-s for checking consistency.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Julien Grall <julien.grall@citrix.com> Reviewed-by: Julien Grall <julien.grall@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Wei Liu [Sun, 10 May 2015 13:14:51 +0000 (14:14 +0100)]
pvgrub: initialise p2m_size
In 84083790 ("libxc: add p2m_size to xc_dom_image") a new field is
added. We should initialised this field in pvgrub as well, otherwise
xc_dom_build_image won't work properly.
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Andrew Cooper [Mon, 11 May 2015 08:42:35 +0000 (10:42 +0200)]
x86/hvm: permit HVM_PARAM_IDENT_PT to be set more than once
There is no conceptual problem with setting this parameter more than once.
Checkpointed migration streams will typically set it once per checkpoint to
the same value.
The parameter is only actually needed on early-generation VT-x which lacked
the unrestricted guest capability, although it could plausibly be used on
newer VT-x with unusual execution control settings. Short circuit the
expensive operations on non VT-x hardware.
The parameter itself must always be latched to avoid issues if the VM
eventually migrates to a host which needs to use the pagetable.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Paul Durrant [Mon, 11 May 2015 08:39:07 +0000 (10:39 +0200)]
x86/hvm: add store and console event channel params to white-list
My recent patch "use white-lists for HVM param guest accessibility checks"
(commit 30efda12d63ff536102ed8e580b4c09765683b44) introduced a regression
when saving and restoring Windows guests running Xen Project PV drivers.
The drivers reset the event channel ABI on resume. This has the effect of
closing the store and console local event channel ports created by the
toolstack. The drivers do not currently use the console port but they
do use the store port and thus, prior to reset, they sample the remote
domain and port and then re-bind the channel - yielding a new and possibly
different local port - after reset. They then store the new local port
value in HVM_PARAM_CONSOLE_EVTCHN. That operation now fails and may
lead to a crash, if using a debug build of the drivers, or a barely
functional connection to xentored if not.
This patch adds HVM_PARAM_STORE_EVTCHN and HVM_PARAM_CONSOLE_EVTCHN to
the guest-settable white-list since either of them can be invalidated
by an event channel ABI reset and thus the guest may indeed need to
write new values to them to make them valid again.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>