]> xenbits.xensource.com Git - people/liuw/xen.git/log
people/liuw/xen.git
6 years agox86/mm: introduce some local variables to map_pages_to_xen xen-pt-allocation-0.1
Wei Liu [Mon, 28 Jan 2019 17:36:46 +0000 (17:36 +0000)]
x86/mm: introduce some local variables to map_pages_to_xen

There are instances in that function where we want to operate on a
temporary mapping of a page table. Introduce some local variables to
distinguish from the function-wide pl{1,2}e.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agoxxx
Wei Liu [Wed, 23 Jan 2019 17:46:56 +0000 (17:46 +0000)]
xxx

6 years agoxxx
Wei Liu [Wed, 23 Jan 2019 17:42:56 +0000 (17:42 +0000)]
xxx

6 years agox86/mm: rewrite virt_to_xen_l3e
Wei Liu [Wed, 23 Jan 2019 16:14:02 +0000 (16:14 +0000)]
x86/mm: rewrite virt_to_xen_l3e

Rewrite that function with the new APIs. Modify its callers to unmap
the pointer when done.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
map_l3t_from_l4e can't be used yet

6 years agox86/mm: modify_xen_mappings should have one single exit path
Wei Liu [Wed, 23 Jan 2019 17:27:40 +0000 (17:27 +0000)]
x86/mm: modify_xen_mappings should have one single exit path

We will soon need to clean up stuff in the exit path. Make sure there
is only on such path.

While at it, pull pl3e declaration along side others.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86/mm: map_pages_to_xen should have one single exit path
Wei Liu [Wed, 23 Jan 2019 17:23:41 +0000 (17:23 +0000)]
x86/mm: map_pages_to_xen should have one single exit path

We will soon need to do clean up in the exit path. Make sure there is
only one exit path.

While at it, pull declarations of pl3e and ol3e along side others.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86: introduce a new set of APIs to manage Xen page tables
Wei Liu [Wed, 23 Jan 2019 15:33:07 +0000 (15:33 +0000)]
x86: introduce a new set of APIs to manage Xen page tables

We are going to switch to using domheap page for page tables.
A new set of APIs is introduced to allocate, map, unmap and free pages
for page tables.

The allocation and deallocation work on mfn_t but not page_info,
because they are required to work even before frame table is set up.

Implement the old functions with the new ones. We will rewrite, patch
by patch, other mm functions that manipulate page tables to use the
new APIs.

Note these new APIs still use xenheap page underneath and no actual
map and unmap is done so that we don't break xen half way. They will
be switched to use domheap and dynamic mappings.

No functional change intended in this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86: move some xen mm function declarations
Wei Liu [Wed, 23 Jan 2019 15:17:41 +0000 (15:17 +0000)]
x86: move some xen mm function declarations

They were put into page.h but mm.h is more appropriate.

The real reason is that I will be adding some new functions which
takes mfn_t. It turns out it is a bit difficult to do in page.h.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86/mm: defer clearing page in virt_to_xen_lXe
Wei Liu [Tue, 22 Jan 2019 16:42:48 +0000 (16:42 +0000)]
x86/mm: defer clearing page in virt_to_xen_lXe

Defer the call to clear_page to the point when we're sure the page is
going to become a page table.

This is a minor optimisation. No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agodocs: Fix all links to Xen man pages in html
Anthony PERARD [Wed, 16 Jan 2019 16:16:56 +0000 (16:16 +0000)]
docs: Fix all links to Xen man pages in html

Second try, this time also works for all links to xen-vbd-interface(7).

We don't try anymore to have pod2html generate relative links, instead
we do it ourself.

First, we modify all links to man pages to have what looks like an
absolute URL and pod2html will just write it in the html output.
Absolute URL in POD are in the form L<text|scheme:...> so let's just use
a scheme that isn't real, but easy to find in the resulting html output:
"relative:".

Then we fix the output and remove all the bogus scheme "relative" and
can end up with nice relative links.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agoman: Highlight reference in xl-disk-configuration(5)
Anthony PERARD [Wed, 16 Jan 2019 16:16:57 +0000 (16:16 +0000)]
man: Highlight reference in xl-disk-configuration(5)

Provide a better way to see the link to a different manpage, with simple
words.

Suggested-by: Ian Jackson <ian.jackson@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agox86/dom0: Improve dom0= useability
Andrew Cooper [Fri, 7 Dec 2018 13:43:27 +0000 (13:43 +0000)]
x86/dom0: Improve dom0= useability

Having a pvh boolean isn't ideal.  If we gain a 3rd virtulsation mode,
what does `dom0=no-pvh` mean?

Change the syntax to be "dom0 = pv | pvh" which offers an option to more
obviously select PV mode.  Hide both options behind the relevent
CONFIG_* settings, and default to PVH mode when CONFIG_PV is compiled
out.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agodocs: Improve documentation and parsing for pci=
Andrew Cooper [Thu, 27 Dec 2018 18:40:19 +0000 (18:40 +0000)]
docs: Improve documentation and parsing for pci=

Alter parse_pci_param() to use parse_boolean(), so the sub options
behave like other Xen booleans.

Update the command line documentation for consistency.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agodocs: Improve documentation and parsing for iommu=
Andrew Cooper [Thu, 27 Dec 2018 18:40:19 +0000 (18:40 +0000)]
docs: Improve documentation and parsing for iommu=

Update parse_iommu_param() to uniformly use parse_boolean(), so the sub
booleans behave like other Xen boolean options.  Reposition the
custom_param() to avoid a forward declaration of parse_iommu_param().

Rewrite the command line documentation almost from scratch, including
far more detail.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agodocs: Improve documentation for dom0= and dom0-iommu=
Andrew Cooper [Fri, 7 Dec 2018 13:43:27 +0000 (13:43 +0000)]
docs: Improve documentation for dom0= and dom0-iommu=

Update to the latest metadata style, and discuss the options more
completely where appropriate.

Drop the redundant comment beside parse_dom0_param() - it is already out
of sync with the main documentation.  Also drop the individual
documentation for deprecated options which refer to their newer
versions, for the same reason.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agomaintainers: always use hard tabs
Roger Pau Monné [Mon, 21 Jan 2019 11:14:29 +0000 (12:14 +0100)]
maintainers: always use hard tabs

As that seems to be the prevailing style.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
6 years agox86/vm_event: block interrupt injection for sync vm_events
Razvan Cojocaru [Mon, 21 Jan 2019 11:13:22 +0000 (12:13 +0100)]
x86/vm_event: block interrupt injection for sync vm_events

Block interrupts (in vmx_intr_assist()) for the duration of
processing a sync vm_event (similarly to the strategy
currently used for single-stepping). Otherwise, attempting
to emulate an instruction when requested by a vm_event
reply may legitimately need to call e.g.
hvm_inject_page_fault(), which then overwrites the active
interrupt in the VMCS.

The sync vm_event handling path on x86/VMX is (roughly):
monitor_traps() -> process vm_event -> vmx_intr_assist()
(possibly writing VM_ENTRY_INTR_INFO) ->
hvm_vm_event_do_resume() -> hvm_emulate_one_vm_event()
(possibly overwriting the VM_ENTRY_INTR_INFO value).

This patch may also be helpful for the future removal
of may_defer in hvm_set_cr{0,3,4} and hvm_set_msr().

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agolibxl: fix error message for unsharing namespaces
Wei Liu [Fri, 18 Jan 2019 12:47:45 +0000 (12:47 +0000)]
libxl: fix error message for unsharing namespaces

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agolibxl: fix build (missing CLONE_NEWIPC) on astonishingly old systems
Ian Jackson [Mon, 14 Jan 2019 14:59:37 +0000 (14:59 +0000)]
libxl: fix build (missing CLONE_NEWIPC) on astonishingly old systems

CLONE_NEWIPC was introduced in Linux 2.6.19, on the 29th of November
2006, which was 12 years, 1 month, and 14 days ago.

Nevertheless apparently some people are trying to build Xen on systems
whose kernel headers are that old.  Placate these people by providing
a fallback #define for CLONE_NEWIPC.

The actual binary value will of course remain constant, because of the
kernel API promise, so this is and will be correct on all platforms
where the CLONE_NEWIPC is supported.  (Even if for some reason we miss
the right #includes.)

Of course at runtime this value will not work on older kernels.  It
will be rejected as unknown by anything except some pre-2.6.18
kernels.  On those kernels we do not want to support dm_restrict, and
an attempt to use it will fail.  It is OK for the failure to be a
messy EINVAL syscall failure.  (The IPC namespace unshare is necessary
to avoid a suborned deprivileged qemu from causing trouble with shm,
sem, etc.)

On the very old kernels, the feature is totally out of scope.
(We are only interested, here, in making the build work, to avoid
blocking people who aren't using this feature.)

CC: Wei Liu <wei.liu2@citrix.com>
CC: Juergen Gross <jgross@suse.com>
CC: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agoRevert "libxl: fix build on rather old systems"
Ian Jackson [Mon, 14 Jan 2019 14:59:36 +0000 (14:59 +0000)]
Revert "libxl: fix build on rather old systems"

This reverts commit 1bce5f9baf0f4a4e50722f32b44afe4fdefc6b35.

This situation should be handled by disabling the dm restrict
feature, not silently falling back to lower protection.

Also this #ifdeffery is bad style.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agodocs/features/qemu-deprivilege.pandoc: No support with Linux <2.6.18
Ian Jackson [Mon, 14 Jan 2019 14:59:35 +0000 (14:59 +0000)]
docs/features/qemu-deprivilege.pandoc: No support with Linux <2.6.18

Some early kernels are known not to reject unknown flags to
unshare().  There may be other problems.

CC: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agoMerge tag '4.12.0-rc1' into staging
Ian Jackson [Wed, 16 Jan 2019 16:29:22 +0000 (16:29 +0000)]
Merge tag '4.12.0-rc1' into staging

Xen 4.12.0-rc1

6 years agoPrep for 4.12-rc1: Change external trees to refer to rc1 tags
Ian Jackson [Wed, 16 Jan 2019 16:13:49 +0000 (16:13 +0000)]
Prep for 4.12-rc1: Change external trees to refer to rc1 tags

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoPrep for 4.12-rc1: Change versions from -unstable to -rc
Ian Jackson [Wed, 16 Jan 2019 16:13:21 +0000 (16:13 +0000)]
Prep for 4.12-rc1: Change versions from -unstable to -rc

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agotools: only call git when necessary in OVMF Makefile
Wei Liu [Tue, 15 Jan 2019 11:09:40 +0000 (11:09 +0000)]
tools: only call git when necessary in OVMF Makefile

Users may choose to export a snapshot of OVMF and build it
with xen.git supplied ovmf-makefile. In that case we don't
need to call `git submodule`.

Fixes b16281870e.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agodocs: Fix links in html generation of man pages
Anthony PERARD [Tue, 15 Jan 2019 15:48:37 +0000 (15:48 +0000)]
docs: Fix links in html generation of man pages

Currently, all links to other man pages are sent to
http://man.he.net/man$mansection/$manpage, but that site doesn't have
Xen man pages, so all links to other Xen man pages are broken.

In order to fix that, this is going to be a bit complex.

First, we need to teach pod2html on where other .pod files can be found,
otherwise it isn't going make any links to our pages. This is done with
--podpath.

Second, pod2html doesn't actually understand our format
"$manpage.$mansection.pod". But instead of teaching it (which is
probably impossible) we are going to modify our .pod files in order to
tell pod2html which file to look for. This is done with the sed command
by transforming for example: "L<xl.conf(5)>" to "L<xl.conf(5)|xl.conf.5>".

Last but not least, in order to have relative links to the other
generated man page, we are going against the rules, we are going to use
"--htmlroot=." so that pod2html doesn't prepand "/" to all "relative"
links. We are also going to `cd` into the "man" dir and set podpath to
"." so that pod2html is going to generate relative links to other pod
file in the form "./$man" insteadof "man/$man" or "../$man" with other
compination of options. The result of --podpath + --podroot can be check
in pod2html's cache file "pod2html.tmp".

All of this is going to generate links in the form "./$html_manpage".

But all of this doesn't work for xen-vbd-interface(7), because it's not
a pod file... maybe we could generate pod2html's cache (pod2html.tmp)
file to add en entry.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agoman: Fix links in xl(1)
Anthony PERARD [Tue, 15 Jan 2019 15:48:36 +0000 (15:48 +0000)]
man: Fix links in xl(1)

All links to other manpages should contain the man section number.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agoxen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct
Andrew Cooper [Fri, 7 Dec 2018 13:43:27 +0000 (13:43 +0000)]
xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct

When the command line parsing was updated to use const strings and no longer
tokenise with NUL characters, string matches could no longer be made with
strcmp().

Unfortunately, the replacement was buggy.  strncmp(s, "opt", ss - s) matches
"o", "op" and "opt" on the command line, as ss - s may be shorter than the
passed literal.  Furthermore, parse_bool() is affected by this, so substrings
such as "d", "e" and "o" are considered valid, with the latter being ambiguous
between "on" and "off".

Introduce a new strcmp-like function for the task, which looks for exact
string matches, but declares success when the NUL of the literal matches a
comma, colon or semicolon in the command line fragment.

No change to the intended parsing functionality, but fixes cases where a
partial string on the command line will inadvertently trigger options.

A few areas were more than just a trivial change:

 * parse_irq_vector_map_param() gained some style corrections.
 * parse_vpmu_params() was rewritten to use the normal list-of-options form,
   rather than just fixing up parse_vpmu_param() and leaving the parsing being
   hard to follow.
 * Instead of making the trivial fix of adding an explicit length check in
   parse_bool(), use the length to select which token to we search for, which
   is more efficient than the previous linear search over all possible tokens.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agolibxl: get_reaper_lock_and_uid: Document fd handling
Ian Jackson [Wed, 2 Jan 2019 11:59:46 +0000 (11:59 +0000)]
libxl: get_reaper_lock_and_uid: Document fd handling

Coverity understandably complains that get_reaper_lock_and_uid leaks
the fd and hence open-file.  But this is intentional: the lock becomes
owned by the child process as a whole, which is entirely the property
of libxl.

(The coding style here in this subprocess is a bit anomalous but it's
probably not worth it to convert get_reaper_lock_and_uid to `goto out'
style and have it explicitly return the fd number.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
6 years agolibxl: fix build on rather old systems
Jan Beulich [Fri, 11 Jan 2019 10:09:35 +0000 (03:09 -0700)]
libxl: fix build on rather old systems

CLONE_NEWIPC has been introduced in Linux 2.6.19 only (and into glibc
at around that time as well). Cope with it being undefined as well as
with the underlying kernel not knowing of it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agolibxl: Add comments to libxl__json_*get* functions
Anthony PERARD [Thu, 3 Jan 2019 18:24:56 +0000 (18:24 +0000)]
libxl: Add comments to libxl__json_*get* functions

This comments that libxl__json_object_get_* and libxl__json_*_get
functions accept the libxl__json_object parameter to be NULL.

libxl__json_object_to_json also works with NULL.

This also move libxl__json_object_alloc declaration closer to similar
functions, and closer to libxl__json_object_free.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_json: Remove libxl__json_object_append_to from header
Anthony PERARD [Fri, 4 Jan 2019 13:53:21 +0000 (13:53 +0000)]
libxl_json: Remove libxl__json_object_append_to from header

It isn't possible to use libxl__json_object_append_to() outside of
libxl_json.c as there is no way to allocate a struct libxl__yajl_ctx.
So also remove libxl__yajl_ctx typedef from the internal header.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Remove unused arg from libxl__sendmsg_fds
Anthony PERARD [Wed, 2 Jan 2019 15:55:44 +0000 (16:55 +0100)]
libxl: Remove unused arg from libxl__sendmsg_fds

Now that `datalen' needs to be 1, we can remove it. Also change `data'
parameter to be a singe byte.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Re-implement domain_suspend_device_model using libxl__ev_qmp
Anthony PERARD [Wed, 25 Jul 2018 15:16:32 +0000 (16:16 +0100)]
libxl: Re-implement domain_suspend_device_model using libxl__ev_qmp

The re-implementation is done because we want to be able to send the
file description that QEMU can use to save its state. When QEMU is
restricted, it would not be able to write to a path.

This replace both libxl__qmp_stop() and libxl__qmp_save().

qmp_qemu_check_version() was only used by libxl__qmp_save(), so it is
replace by a version using libxl__ev_qmp instead.

Coding style fixed in libxl__domain_suspend_device_model() for the
return value.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Change libxl__domain_suspend_device_model() to be async
Anthony PERARD [Wed, 25 Jul 2018 15:03:09 +0000 (16:03 +0100)]
libxl: Change libxl__domain_suspend_device_model() to be async

This create an extra step for the two call sites of the function.

libxl__domain_suspend_device_model() in this patch gets an extra error
variable (there is ret and rc), but ret goes away in the next patch.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
libxl_domain_soft_reset() haven't been tested, as it doesn't appear to
possible to call the function from xl.

6 years agolibxl_qmp: Store advertised QEMU version in libxl__ev_qmp
Anthony PERARD [Tue, 24 Jul 2018 17:26:33 +0000 (18:26 +0100)]
libxl_qmp: Store advertised QEMU version in libxl__ev_qmp

This will be used in a later patch.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: QEMU startup sync based on QMP
Anthony PERARD [Thu, 31 May 2018 13:45:12 +0000 (14:45 +0100)]
libxl: QEMU startup sync based on QMP

This is only activated when dm_restrict=1, as explained in a previous
patch "libxl_dm: Pre-open QMP socket for QEMU"

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Add dmss_init/dispose for libxl__dm_spawn_state
Anthony PERARD [Thu, 22 Nov 2018 12:09:37 +0000 (12:09 +0000)]
libxl: Add dmss_init/dispose for libxl__dm_spawn_state

These two functions, dmss_init and dmss_dispose, need to be called to
initialise the private parts of a libxl__dm_spawn_state (dmss) as well
as dispose of them before giving back control to a caller.

There are 3 functions that can start using a dmss, the classic
libxl__spawn_local_dm, the one for stubdom libxl__spawn_stub_dm and
libxl__spawn_qdisk_backend. But there are only 2 exit path as
libxl__spawn_qdisk_backend is using libxl__spawn_local_dm functions.

These two new functions are empty but will be used shortly.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_dm: Pre-open QMP socket for QEMU
Anthony PERARD [Thu, 31 May 2018 13:43:20 +0000 (14:43 +0100)]
libxl_dm: Pre-open QMP socket for QEMU

This patch moves the creation of the QMP unix socket from QEMU to libxl.
But libxl doesn't rely on this yet.

When starting QEMU with dm_restrict=1, pre-open the QMP socket before
exec QEMU. That socket will be useful to find out if QEMU is ready, and
pre-opening it means that libxl can connect to it without waiting for
QEMU to create it.

The pre-opening is conditional, based on the use of dm_restrict
because it is using a new command line option of QEMU, and dm_restrict
support in QEMU is newer.

-chardev socket,fd=X is available with QEMU 2.12, since commit:
> char: allow passing pre-opened socket file descriptor at startup
0935700f8544033ebbd41e1f13cd528f8a58d24d

dm_restrict is available in QEMU 3.0.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Add init/dispose of for libxl__domain_build_state
Anthony PERARD [Thu, 22 Nov 2018 18:10:45 +0000 (18:10 +0000)]
libxl: Add init/dispose of for libxl__domain_build_state

These two new functions libxl__domain_build_state_{init,dispose} should
be called every time a new libxl__domain_build_state comes to existance.

There seems to be two of them, one with the domain creation machinery,
and one in the stub_dm_spawn.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_exec: Add libxl__spawn_initiate_failure
Anthony PERARD [Thu, 26 Jul 2018 16:12:52 +0000 (17:12 +0100)]
libxl_exec: Add libxl__spawn_initiate_failure

This function can be used by user of libxl__spawn_* when they setup a
notification other than xenstore. The parent can already report success
via libxl__spawn_initiate_detach(), this new function can be used for
failure instead of waiting for the timeout.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_qmp: Implementation of libxl__ev_qmp_*
Anthony PERARD [Thu, 8 Nov 2018 17:38:19 +0000 (17:38 +0000)]
libxl_qmp: Implementation of libxl__ev_qmp_*

This patch implement the API libxl__ev_qmp documented in the previous
patch, "libxl: Design of an async API to issue QMP commands to QEMU".

Since this API is to interact with QEMU via the QMP protocol, it also
implement a QMP client. The specification for the QEMU Machine Protocol
(QMP) can be found in the QEMU repository at:
https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/interop/qmp-spec.txt

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: fix build ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agolibxl: Design of an async API to issue QMP commands to QEMU
Anthony PERARD [Tue, 3 Jul 2018 09:29:17 +0000 (10:29 +0100)]
libxl: Design of an async API to issue QMP commands to QEMU

All the functions will be implemented in later patches.

This patch includes the API that libxl can use to send QMP commands to
QEMU.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: fix build ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agolibxl: Add wrapper around libxl__json_object_to_json JSON
Anthony PERARD [Thu, 22 Nov 2018 18:38:39 +0000 (18:38 +0000)]
libxl: Add wrapper around libxl__json_object_to_json JSON

That wrapper is going to be used to safely log a json_object, as
libxl__json_object_to_json return NULL on error. In the error case,
JSON() will return an invalid json string.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_qmp: Change qmp_qemu_check_version to compare version
Anthony PERARD [Fri, 9 Nov 2018 17:45:54 +0000 (17:45 +0000)]
libxl_qmp: Change qmp_qemu_check_version to compare version

This patch makes the function simpler to read. It also add the ability
for a caller to tell if QEMU is newer or have the exact version.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl_qmp: Separate QMP message generation from qmp_send_prepare
Anthony PERARD [Fri, 25 May 2018 16:00:28 +0000 (17:00 +0100)]
libxl_qmp: Separate QMP message generation from qmp_send_prepare

.. to be able to re-use qmp_prepare_cmd with libxl__ev_qmp.

This patch also add the QMP end of command '\r\n' into the generated
string as every caller will needs this.

There should be no functional change.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Enhance libxl__sendmsg_fds to deal with EINTR and EWOULDBLOCK
Anthony PERARD [Wed, 31 Oct 2018 16:31:49 +0000 (16:31 +0000)]
libxl: Enhance libxl__sendmsg_fds to deal with EINTR and EWOULDBLOCK

This patch change the behavior of libxl__sendmsg_fds to retry sendmsg on
EINTR error and return an error on short writes.

This patch allow a caller of libxl__sendmsg_fds to deal with EWOULDBLOCK
and short writes. The function now requires to send only 1 byte of data
so that when dealing with non-blocking fds a EWOULDBLOCK error would
mean that the fds haven't been sent yet. Current caller already send
only 1 byte.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: fix build ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agotmem: default to off
Jan Beulich [Fri, 11 Jan 2019 11:30:29 +0000 (12:30 +0100)]
tmem: default to off

As a short term alternative to deleting the code, default its building
to off (overridable in EXPERT mode only). Additionally make sure other
related baggage (LZO code) won't be carried when the option is off (with
TMEM scheduled to be deleted anyway, I didn't want to introduce a
separate Kconfig option to control the LZO compression code, and hence
CONFIG_TMEM is used directly there). Similarly I couldn't be bothered to
add actual content to the command line option doc for the two affected
options.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agox86/p2m: fix p2m_finish_type_change()
Razvan Cojocaru [Fri, 11 Jan 2019 11:28:49 +0000 (12:28 +0100)]
x86/p2m: fix p2m_finish_type_change()

finish_type_change() returns a negative int on error, but the
current code checks if ( !rc ). We also need to treat
finish_type_change()'s return codes cumulatively in the
success case (don't overwrite a 1 returned while processing
the hostp2m if processing an altp2m returns 0).

The breakage was introduced by commit 0fb4b58c8b
("x86/altp2m: fix display frozen when switching to a new view
early").

Properly indent the out: label while at it.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
6 years agosched/credit2: remove stale comment
Juergen Gross [Wed, 9 Jan 2019 14:46:05 +0000 (15:46 +0100)]
sched/credit2: remove stale comment

With being the default scheduler now the comment in sched_credit2
stating it being experimental should be removed.

While at it remove the "TODO" comments already addressed.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
6 years agomm/page_alloc: fix MEMF_no_dma allocations for single NUMA
Sergey Dyasli [Wed, 9 Jan 2019 14:45:14 +0000 (15:45 +0100)]
mm/page_alloc: fix MEMF_no_dma allocations for single NUMA

Currently dma_bitsize is zero by default on single NUMA node machines.
This makes all alloc_domheap_pages() calls with MEMF_no_dma return NULL.

There is only 1 user of MEMF_no_dma: dom0_memflags, which are used
during memory allocation for Dom0. Failing allocation with default
dom0_memflags is especially severe for the PV Dom0 case: it makes
alloc_chunk() to use suboptimal 2MB allocation algorithm with a search
for higher memory addresses.

This can lead to the NMI watchdog timeout during PV Dom0 construction
on some machines, which can be worked around by specifying "dma_bits"
in Xen's cmdline manually.

Fix the issue by ignoring MEMF_no_dma in cases when dma_bitsize is zero,
which means there is no DMA zone. This shouldn't cause any issues for
Dom0 because alloc_heap_pages() will first use higher memory addresses
for satisfying memory allocation requests.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
6 years agotools/firmware: update OVMF Makefile
Wei Liu [Wed, 28 Nov 2018 17:43:33 +0000 (17:43 +0000)]
tools/firmware: update OVMF Makefile

OVMF has become dependent on OpenSSL, which is included as a
submodule.  Initialise submodules before building.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
6 years agodocs: Fix output of man/xen-vbd-interface
Anthony PERARD [Wed, 9 Jan 2019 11:07:30 +0000 (11:07 +0000)]
docs: Fix output of man/xen-vbd-interface

In pandoc's markdown, a code block needs at least 4 spaces to be
recognize as such. This patch fix the rendering of description of the
encoding in the VBD interface so that [1] can be readable.

[1] https://xenbits.xen.org/docs/unstable/man/xen-vbd-interface.7.html

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: rebase on top of staging ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
6 years agoxen/iommu: fix dev assignment on ARM after 91d4eca7
Stefano Stabellini [Tue, 8 Jan 2019 18:47:19 +0000 (10:47 -0800)]
xen/iommu: fix dev assignment on ARM after 91d4eca7

Fix device assignment on ARM after 91d4eca7 "mm / iommu: split
need_iommu() into has_iommu_pt() and need_iommu_pt_sync()".

arch_iommu_populate_page_table returns -ENOSYS which causes
iommu_construct to return early, although it is not an error.

hd->status needs to be set to IOMMU_STATUS_initializing before calling
iommu_use_hap_pt, otherwise iommu_use_hap_pt will return the wrong
value.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
6 years agox86/dom0: add verbose mode and print memory allocation stats
Roger Pau Monné [Tue, 8 Jan 2019 09:08:48 +0000 (10:08 +0100)]
x86/dom0: add verbose mode and print memory allocation stats

Add a verbose option to the dom0 command line, so that dom0 builder
can print extra debug information when required.

Use this new verbose mode to print statistics about memory allocations
when populating dom0 p2m.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
6 years agox86/shim: only mark special pages as RAM in pvshim mode
Roger Pau Monné [Tue, 8 Jan 2019 09:03:45 +0000 (10:03 +0100)]
x86/shim: only mark special pages as RAM in pvshim mode

When running Xen as a guest it's not necessary to mark such pages as
RAM because they won't be assigned to the initial domain memory map.

While there move the functions to the PV shim specific file and rename
them accordingly.

No functional change expected.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/mm/p2m: stop checking for IOMMU shared page tables in mmio_order()
Paul Durrant [Mon, 17 Dec 2018 09:22:59 +0000 (09:22 +0000)]
x86/mm/p2m: stop checking for IOMMU shared page tables in mmio_order()

Now that the iommu_map() and iommu_unmap() operations take an order
parameter and elide flushing there's no strong reason why modifying MMIO
ranges in the p2m should be restricted to a 4k granularity simply because
the IOMMU is enabled but shared page tables are not in operation.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
6 years agoiommu: elide flushing for higher order map/unmap operations
Paul Durrant [Mon, 17 Dec 2018 09:22:58 +0000 (09:22 +0000)]
iommu: elide flushing for higher order map/unmap operations

This patch removes any implicit flushing that occurs in the implementation
of map and unmap operations and adds new iommu_map/unmap() wrapper
functions. To maintain semantics of the iommu_legacy_map/unmap() wrapper
functions, these are modified to call the new wrapper functions and then
perform an explicit flush operation.

Because VT-d currently performs two different types of flush dependent upon
whether a PTE is being modified versus merely added (i.e. replacing a non-
present PTE) 'iommu flush flags' are defined by this patch and the
iommu_ops map_page() and unmap_page() methods are modified to OR the type
of flush necessary for the PTE that has been populated or depopulated into
an accumulated flags value. The accumulated value can then be passed into
the explicit flush operation.

The ARM SMMU implementations of map_page() and unmap_page() currently
perform no implicit flushing and therefore the modified methods do not
adjust the flush flags.

NOTE: The per-cpu 'iommu_dont_flush_iotlb' is respected by the
      iommu_legacy_map/unmap() wrapper functions and therefore this now
      applies to all IOMMU implementations rather than just VT-d.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Brian Woods <brian.woods@amd.com>
6 years agoiommu: rename wrapper functions
Paul Durrant [Mon, 17 Dec 2018 09:22:57 +0000 (09:22 +0000)]
iommu: rename wrapper functions

A subsequent patch will add semantically different versions of
iommu_map/unmap() so, in advance of that change, this patch renames the
existing functions to iommu_legacy_map/unmap() and modifies all call-sites.
It also adjusts a comment that refers to iommu_map_page(), which was re-
named by a previous patch.

This patch is purely cosmetic. No functional change.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
6 years agoamd-iommu: add flush iommu_ops
Paul Durrant [Mon, 17 Dec 2018 09:22:56 +0000 (09:22 +0000)]
amd-iommu: add flush iommu_ops

The iommu_ops structure contains two methods for flushing: 'iotlb_flush' and
'iotlb_flush_all'. This patch adds implementations of these for AMD IOMMUs.

The iotlb_flush method takes a base DFN and a (4k) page count, but the
flush needs to be done by page order (i.e. 0, 9 or 18). Because a flush
operation is fairly expensive to perform, the code calculates the minimum
order single flush that will cover the specified page range rather than
performing multiple flushes.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Brian Woods <brian.woods@amd.com>
6 years agodocs: Fix ./configure following c/s d661611
Andrew Cooper [Wed, 2 Jan 2019 18:52:17 +0000 (18:52 +0000)]
docs: Fix ./configure following c/s d661611

The misc/xen-command-line.markdown reference in configure.ac should have been
updated in the same changeset.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agodocs: Remove Markdown from configure.ac and the build instructions
Andrew Cooper [Wed, 2 Jan 2019 10:26:51 +0000 (10:26 +0000)]
docs: Remove Markdown from configure.ac and the build instructions

Now that all use of markdown as been replaced with pandoc, drop it from
configure.ac and from the docs/ Makefile.

Instead of just deleting the markdown reference from README, adjust the line
to mention the other optional packages required for documentation.

Drop markdown from travis, but leave it in the docker containers as they get
used for stable branches as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodocs/man: Fix/simplify generation of manpages
Andrew Cooper [Wed, 2 Jan 2019 10:26:49 +0000 (10:26 +0000)]
docs/man: Fix/simplify generation of manpages

The original intent of this patch was to rename xen-vbd-interface.markdown.7
to xen-vbd-interface.pandoc.7 to remove the final markdown file from the docs/
tree.

The DOC_MANx lists are broken.  They contain MANxSRC-y twice, the first half
with a partial %.pod substituation, and the second half with a partial
%.markdown substitution.  This is also the root cause behind the filtering
activity in the uninstall-man$(i)-pages rule.

Furthermore, the logic for generating the manpage targets is unnecesserily
repetative, owing to the layout of source files in the man/ directory.

Therefore, tackle the problem by renaming all of our manpage source files from
"$FORMAT.$SECTION" to "$SECTION.$FORMAT".  For the two xl.cfg.5 and xl.1 which
are preprocessed by autoconf to contain path information, this requires
updating configure.ac and .gitignore.  The markdown to pandoc conversion is
performed as well, as it is also a straight rename.

An ancillary benefit of this renaming is that text editors stand a chance of
being able to work out the correct mode to use.

As for the makefile:

1) Break the MAN_SECTIONS list out of the GENERATE_MANPAGE_RULES loop, as we
   are going to use it a second time.
2) Do away with the individaul MANxSRC-y variables.  Use a single list,
   derived from all *.pod and *.pandoc files, with their format suffixes
   removed.
3) Use a $(foreach ...) to generate the DOC_MANx lists, filling them with the
   correct content.
4) The DOC_HTML and DOC_TXT can now include all manpages with a single
   substitution, as they don't need to separate the manpages by
   section-numbered-directory.
5) Fix up the filenames in the manpage metarule to match the renaming.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodocs/markdown: Switch to using pandoc, and fix underscore escaping
Andrew Cooper [Wed, 2 Jan 2019 10:26:47 +0000 (10:26 +0000)]
docs/markdown: Switch to using pandoc, and fix underscore escaping

c/s a3a99df44 "docs/cmdline: Rewrite the cpuid_mask_* section" completely
forgot about how markdown gets rendered to HTML (as opposed to PDF), because
we use different translators depending on the destination format.

markdown and pandoc are very similar markup languages, but a couple of details
about pandoc cause it to have far more user-friendly inline markup.

Switch all markdown documents to be pandoc (so we are using a single
translator, and therefore a single flavour of markdown), which fixes the
rendered docs on xenbits.xen.org/docs.

While changing the format, fix the remainder of the escaped underscores in the
same mannor as the previous patch.  The two problem cases here are __LINE__
and __FILE__ where the first underscore still needs escaping.

In addition, dmop.markdown and dom0less.markdown didn't used to get processed,
as only .markdown files in the misc/ directory got considered.
dom0less.pandoc gets picked up automatically now, due to being in the
features/ directory, but designs/ needs adding to the pandoc directory list
for dmop.pandoc to get processed.

While edting in appropriate areas, take the opportunity to fix some markup to
the surrounding style, and drop trailing whitespace.

No change in content - only formatting.  This results in the text being easier
to read and grep.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodocs/pandoc: Don't escape underscores in the middle of text
Andrew Cooper [Wed, 2 Jan 2019 10:26:45 +0000 (10:26 +0000)]
docs/pandoc: Don't escape underscores in the middle of text

Pandoc deliberately (and contrary to markdown) doesn't treat underscores in
the middle of normal text as emphasis markers, as this is almost always the
unhelpful interpretation.

For text which is emphasised using _, an underscore in the middle is
interpreted, but the emphasis marker can be switched to * instead.

One problem case is where we use {} globbing with identifier names, as it
counts as a word break.  Therefore, we do need to retain the escaped
underscore immediately following a closing brace.

No change in content - only formatting.  This results in the text being easier
to read and grep.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agox86/mm-locks: apply a bias to lock levels for control domain
Roger Pau Monne [Fri, 21 Dec 2018 09:41:05 +0000 (10:41 +0100)]
x86/mm-locks: apply a bias to lock levels for control domain

paging_log_dirty_op function takes mm locks from a subject domain and
then attempts to perform copy to operations against the caller domain
in order to copy the result of the hypercall into the caller provided
buffer.

This works fine when the caller is a non-paging domain, but triggers a
lock order panic when the caller is a paging domain due to the fact
that at the point where the copy to operation is performed the subject
domain paging lock is locked, and the copy operation requires
locking the caller p2m lock which has a lower level.

Fix this limitation by adding a bias to the level of control domain mm
locks, so that the lower control domain mm lock always has a level
greater than the higher unprivileged domain lock level. This allows
locking the subject domain mm locks and then locking the control
domain mm locks, while keeping the same lock ordering and the changes
mostly confined to mm-locks.h.

Note that so far only this flow (locking a subject domain locks and
then the control domain ones) has been identified, but not all
possible code paths have been inspected. Hence this solution attempts
to be a non-intrusive fix for the problem at hand, without discarding
further changes in the future if other valid code paths are found that
require more complex lock level ordering.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
6 years agolibxc/altp2m: clean up TABs
Razvan Cojocaru [Wed, 2 Jan 2019 12:42:25 +0000 (14:42 +0200)]
libxc/altp2m: clean up TABs

Replace all the TABs with spaces.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agoCONTRIBUTING: Clarifications on how to handle license deviations
Lars Kurth [Mon, 10 Dec 2018 19:33:09 +0000 (11:33 -0800)]
CONTRIBUTING: Clarifications on how to handle license deviations

This patch makes a few clarifications which were discussed on
IRC recently.

Specifically:
- Highlight the principle that license deviations
  should be brought to the attention of maintainers
- Add a requirement for GPLv2 compatibility
- Restructure the document to highlight use-cases for
  "New components" and "Importing code" clearer
- Add conventions and instructions for "New files"

Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
6 years agolibxl_create: Re-order callbacks of initiate_domain_create
Anthony PERARD [Wed, 12 Dec 2018 14:53:46 +0000 (14:53 +0000)]
libxl_create: Re-order callbacks of initiate_domain_create

Callbacks should be in the order that there are going to be executed.
This patch fixes the initiate_domain_create callbacks, and also
reorders the callbacks prototypes. That way, it's easier to follow the
flow.

This patch:
- move libxl__colo_restore_setup_done after domcreate_bootloader_done.
- move domcreate_attach_devices after domcreate_devmodel_started.

No functional change.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86/altp2m: add altp2m_vcpu_disable_notify
Razvan Cojocaru [Tue, 18 Dec 2018 15:11:44 +0000 (17:11 +0200)]
x86/altp2m: add altp2m_vcpu_disable_notify

Allow altp2m users to disable #VE/VMFUNC alone. Currently it is
only possible to disable this functionality when we disable altp2m
completely; #VE/VMFUNC can only be enabled once per altp2m session.

In addition to making things complete, disabling #VE is also a
workaround for CFW116 ("When Virtualization Exceptions are Enabled,
EPT Violations May Generate Erroneous Virtualization Exceptions")
on Xeon E-2100 CPUs.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
6 years agox86/emul: Make POPF emulation easier to follow
Andrew Cooper [Mon, 3 Dec 2018 18:11:40 +0000 (18:11 +0000)]
x86/emul: Make POPF emulation easier to follow

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
6 years agox86/dom0: take alignment into account when populating p2m in PVH mode
Roger Pau Monne [Fri, 28 Dec 2018 11:18:56 +0000 (12:18 +0100)]
x86/dom0: take alignment into account when populating p2m in PVH mode

Current code that allocates memory and populates the p2m for PVH Dom0
doesn't take the address alignment into account, this can lead to high
order allocations that start on a non-aligned address to be broken
down into lower order entries on the p2m page tables.

Fix this by taking into account the p2m page sizes and alignment
requirements when allocating the memory and populating the p2m.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/dom0: propagate guest_physmap_add_page error code
Roger Pau Monne [Thu, 27 Dec 2018 15:26:37 +0000 (16:26 +0100)]
x86/dom0: propagate guest_physmap_add_page error code

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/dom0: add missing flag to printf format for PVH
Roger Pau Monne [Thu, 27 Dec 2018 15:26:36 +0000 (16:26 +0100)]
x86/dom0: add missing flag to printf format for PVH

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/dom0: allow stealing RAM from a region that starts in the low 1MB
Roger Pau Monne [Thu, 27 Dec 2018 15:26:35 +0000 (16:26 +0100)]
x86/dom0: allow stealing RAM from a region that starts in the low 1MB

As long as the memory stolen is always above 1MB. This allows the PVH
Dom0 builder to be used on a memory map that only has a single RAM
region starting at 0.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/dom0: fix wording of PVH Dom0 error message
Roger Pau Monne [Thu, 27 Dec 2018 15:26:34 +0000 (16:26 +0100)]
x86/dom0: fix wording of PVH Dom0 error message

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
6 years agox86/vtx: Improvements to ept= command line handling
Andrew Cooper [Thu, 20 Dec 2018 15:08:50 +0000 (15:08 +0000)]
x86/vtx: Improvements to ept= command line handling

Switch parse_ept_param() to use the parse_boolean() infrastructure for more
consistency with related command line parameters.  Rename opt_pml_enabled to
opt_ept_pml for consistency with opt_ept_ad, and switch it to being bool

Drop the leading comment for parse_ept_param().  It is stale, and just repeats
the command line documentation.

For the command line documentation, rewrite it largely from scratch, updating
to the latest metadata style.  Document A/D first, including a note about
AVR41, and modify PML to note its dependency on A/D.

No practical changes to behaviour.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
6 years agop2m: change_type_range: Only invalidate mapped gfns
Razvan Cojocaru [Sat, 22 Dec 2018 09:43:52 +0000 (09:43 +0000)]
p2m: change_type_range: Only invalidate mapped gfns

change_type_range() invalidates gfn ranges to lazily change the type
of a range of gfns, and also modifies the logdirty rangesets of that
p2m. At the moment, it clips both down by the hostp2m.

While this will result in correct behavior, it's not entirely efficient,
since invalidated entries outside that range will, on fault, simply be
modified back to "empty" before faulting normally again.

Separate out the calculation of the two ranges. Keep using the
hostp2m's max_mapped_pfn to clip the logdirty ranges, but use the
current p2m's max_mapped_pfn to further clip the invalidation range
for alternate p2ms.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
6 years agop2m: Always use hostp2m when clipping rangesets
Razvan Cojocaru [Sat, 22 Dec 2018 09:43:52 +0000 (09:43 +0000)]
p2m: Always use hostp2m when clipping rangesets

The logdirty rangesets of the altp2ms need to be kept in sync with the
hostp2m. This means when iterating through the altp2ms, we need to
use the host p2m to clip the rangeset, not the indiviual altp2m's
value.

This change also:

- Documents that the end is non-inclusive

- Calculates an "inclusive" value for the end once, rather than
  open-coding the modification, and (worse) back-modifying updates so
  that the calculation ends up correct

- Clarifies the logic deciding whether to call
  change_entry_type_global() or change_entry_type_range()

- Handles the case where start >= hostp2m->max_mapped_pfn

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
6 years agox86/altp2m: fix display frozen when switching to a new view early
Razvan Cojocaru [Sat, 22 Dec 2018 09:43:51 +0000 (09:43 +0000)]
x86/altp2m: fix display frozen when switching to a new view early

When an new altp2m view is created very early on guest boot, the
display will freeze (although the guest will run normally). This
may also happen on resizing the display. The reason is the way
Xen currently (mis)handles logdirty VGA: it intentionally
misconfigures VGA pages so that they will fault.

The problem is that it only does this in the host p2m. Once we
switch to a new altp2m, the misconfigured entries will no longer
fault, so the display will not be updated.

This patch:
* updates ept_handle_misconfig() to use the active altp2m instead
  of the hostp2m;
* modifies p2m_change_entry_type_global(),
  p2m_memory_type_changed(), p2m_change_type_range() and
  p2m_finish_type_change() to propagate their changes to all
  valid altp2ms.

With the introduction of altp2m fields in p2m_memory_type_changed()
the whole function has been put under CONFIG_HVM.

Suggested-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
6 years agox86/p2m: refactor p2m_reset_altp2m()
Razvan Cojocaru [Sat, 22 Dec 2018 09:43:50 +0000 (09:43 +0000)]
x86/p2m: refactor p2m_reset_altp2m()

Refactor p2m_reset_altp2m() so that it can be used to remove
redundant codepaths, fixing the locking while we're at it.

The previous code now replaced by p2m_reset_altp2m(d, i,
ALTP2M_DEACTIVATE) calls did not set p2m->min_remapped_gfn
and p2m->max_remapped_gfn because in those cases the altp2m
idx was disabled; so before getting used again,
p2m_init_altp2m_ept() would get called, which resets them.
Always setting them in p2m_reset_altp2m(), while redundant,
is preferable to an extra conditional.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
6 years agox86/p2m: allocate logdirty_ranges for altp2ms
Razvan Cojocaru [Sat, 22 Dec 2018 09:43:49 +0000 (09:43 +0000)]
x86/p2m: allocate logdirty_ranges for altp2ms

For now, only do allocation/deallocation; keeping them in sync
will be done in subsequent patches.

Logdirty synchronization will only be done for active altp2ms;
so allocate logdirty rangesets (copying the host logdirty
rangeset) when an altp2m is activated, and free it when
deactivated.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
6 years agolibxl/dm_depriv: Fix non-debug build
George Dunlap [Sat, 22 Dec 2018 08:59:48 +0000 (08:59 +0000)]
libxl/dm_depriv: Fix non-debug build

Apparently older versions of gcc, when building with debug=n, the
uninitialized variable logic gets confused.  Distros on which a
non-debug build will fail include:
- Centos 7
- Debian Jessie
- Ubuntu Trusty

It seems to be one particular path confusing the logic; so just set it
on that path to keep the compiler happy, while still catching other
potential paths where it might be unset.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
6 years agolibxl/dm_depriv: Fix build
George Dunlap [Fri, 21 Dec 2018 19:35:04 +0000 (19:35 +0000)]
libxl/dm_depriv: Fix build

Build tests noticed a path where we weren't setting rc.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
6 years agodm_depriv: Mark `UID cleanup` as completed
George Dunlap [Fri, 21 Dec 2018 15:41:11 +0000 (15:41 +0000)]
dm_depriv: Mark `UID cleanup` as completed

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Introduce specific username to be used as a reaper
George Dunlap [Fri, 21 Dec 2018 15:41:11 +0000 (15:41 +0000)]
libxl: Introduce specific username to be used as a reaper

Untrusted device models must be killed by uid rather than by pid for
safety.  To do this reliably, we need another uid, not used for any
other purpose, from which to make the kill system call.

When using xen-qemuuser-range-base, we can repurpose
xen-qemuuser-range-base itself as a UID from which to kill other
devicemodel uids (since domain ID 0 should never have a device model
associated with it).

However, we'd like people to be able to use the device_model_user
feature without also defining xen-qemuuser-range-base (which requires
the ability to 'reserve' 32k+ user IDs).

To that end, introduce the xen-qemuuser-reaper id.  When killing by
UID, first look for and use that ID if available; then fall back to
xen-qemuuser-range-base.

Document the new call in docs/features/qemu-deprivilege.pandoc.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Kill QEMU with "reaper" ruid
George Dunlap [Fri, 21 Dec 2018 15:41:10 +0000 (15:41 +0000)]
libxl: Kill QEMU with "reaper" ruid

Using kill(-1) to killing an untrusted dm process with the real uid
equal to the dm_uid isn't guaranteed to succeed: the process in
question may be able to kill the reaper process after the setresuid()
and before the kill().

Instead, set the real uid to the QEMU user for domain 0
(QEMU_USER_RANGE_BASE + 0).  The reaper process will still be able to
kill the dm process, but not vice versa.

This, in turn, requires locking to make sure that only one reaper
process is using that uid at a time; otherwise one reaper process may
kill the other reaper process.

Create a lockfile in RUNDIR/dm-reaper-lock, and grab the lock before
executing kill.

In the event that we can't get the lock for some reason, go ahead with
the kill using dm_uid for both real and effective UIDs.  This isn't
guaranteed to work, but it's no worse than not trying to kill the
process at all.

NB that this effectively requires admins using device_model_user to
also define xen_qemuuser_range_base; this will be addressed in
subsequent patches.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Kill QEMU by uid when possible
George Dunlap [Fri, 21 Dec 2018 15:41:09 +0000 (15:41 +0000)]
libxl: Kill QEMU by uid when possible

The privcmd fd that a dm_restrict'ed QEMU has gives it permission to
one specific domain ID.  This domain ID will probably eventually be
used again.  It is therefore necessary to make absolutely sure that a
rogue QEMU process cannot hang around after its domain has exited.

Killing QEMU by pid is insufficient in this situation, because QEMU
may be able to fork() to escape killing.  It is surprisingly tricky to
kill a process which can call fork() without races; the only reliable
way is to use kill(-1) to kill all processes with a given uid.

We can use this method only when we're sure that there's only one QEMU
instance per uid.  Add a dm_uid into the domain_build_state struct,
and set it in libxl__domain_get_device_model_uid() when it's safe to
kill by UID.  Store this in xenstore next to device-model-pid.

On domain destroy, check to see if device-model-uid is present in
xenstore.  If so, fork off a reaper process, setuid to that uid, and
do kill(-9) to kill all uids of that type.  Otherwise, carry on
destroying by pid.

While we're here, make libxl__destroy_device_model() consistently:
 1. Return an error when anything fails
 2. But continue to do as much clean-up as possible

NOTE that this is not yet completely safe: with ruid == dm_uid, the
device model may be able to kill(-9) the 'reaper' process before the
reaper process can kill it.  Further patches will address this.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Make killing of device model asynchronous
George Dunlap [Fri, 21 Dec 2018 15:41:08 +0000 (15:41 +0000)]
libxl: Make killing of device model asynchronous

Or at least, give it an asynchronous interface so that we can make it
actually asynchronous in subsequent patches.

Create state structures and callback function signatures.  Add the
state structure to libxl__destroy_domid_state.  Break
libxl__destroy_domid down into two functions.

No functional change intended.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Move qmp cleanup into devicemodel destroy function
George Dunlap [Fri, 21 Dec 2018 15:41:08 +0000 (15:41 +0000)]
libxl: Move qmp cleanup into devicemodel destroy function

Removing the qmp connection is logically part of the device model
destruction; having the caller destroy it is a mild layering
violation.

Move libxl__qmp_cleanup() into libxl__destroy_device_model().  This
will make it easier when we make devicemodel destruction asynchronous.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Do root checks once in libxl__domain_get_device_model_uid
George Dunlap [Fri, 21 Dec 2018 15:41:07 +0000 (15:41 +0000)]
libxl: Do root checks once in libxl__domain_get_device_model_uid

At the moment, we check for equivalence to literal "root" before
deciding whether to add the `runas` command-line option to QEMU.  This
is unsatisfactory for several reasons.

First, just because the string doesn't match "root" doesn't mean the
final uid won't end up being zero; in particular, the range_base
calculations may end up producing "0:NNN", which would be root in any
case.

Secondly, it's almost certainly a configuration error if the resulting
uid ends up to be zero; rather than silently do what was specified but
probably not intended, throw an error.

To fix this, check for root once in
libxl__domain_get_device_model_uid.  If the result is root, return an
error; if appropriate, set `runas`.

After that, assume that the presence of state->dm_runas implies that a
`runas` argument should be constructed.

One side effect of this is to check whether device_model_user exists
before passing it to qemu, resulting in better error reporting.

While we're here:
- Refactor the function to use the "goto out" idiom
- Use 'rc' rather than 'ret', in line with CODING_STYLE

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agodm_depriv: Describe expected usage of device_model_user parameter
George Dunlap [Fri, 21 Dec 2018 15:41:06 +0000 (15:41 +0000)]
dm_depriv: Describe expected usage of device_model_user parameter

A number of subsequent patches rely on as-yet undefined behavior for
what the `device_model_user` parameter does.  Rather than implement it
incorrectly (or randomly), or remove the feature, describe an expected
usage for the feature.  Further patches will make decisions based on
this expected usage.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Clean up userlookup_helper_getpw* helper
George Dunlap [Fri, 21 Dec 2018 15:41:06 +0000 (15:41 +0000)]
libxl: Clean up userlookup_helper_getpw* helper

Bring conventions more in line with libxl__xs_read_checked():
- If found, return 0 and set pointer to non-NULL
- If not found, return 0 and set pointer to NULL
- On error, return libxl-style error number.

Update documentation to match.

Use CODING_STYLE compliant `r` rather than `ret`.

On error, log the error code before returning instead of discarding
it.

Now that it only returns 0 or errno, update caller error checks to be
`if (ret)` rather than `if (ret < 0)`.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)
George Dunlap [Fri, 21 Dec 2018 15:41:05 +0000 (15:41 +0000)]
libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)

QEMU_USER_BASE allows a user to specify the UID to use when running
the devicemodel for a specific domain number.  Unfortunately, this is
not really practical: It requires nearly 32,000 entries in
/etc/passwd.  QEMU_USER_RANGE_BASE is much more practical.

Remove support for QEMU_USER_BASE.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agolibxl: Move dm user determination logic into a helper function
George Dunlap [Fri, 21 Dec 2018 15:41:04 +0000 (15:41 +0000)]
libxl: Move dm user determination logic into a helper function

To reliably kill an untrusted devicemodel, we need to know not only
its pid, but its uid.  In preparation for this, move the userid
determination logic into a helper function.

Create a new field, `dm_runas`, in libxl__domain_build_state to store
the value during domain creation.

This change also removes unnecessary duplication of the argument
construction code.

While here, clean up some minor CODING_STYLE infractions (space
between * and variable name).

No functional change intended.

While here, delete some trailing whitespace.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agoxenalyze: Build for Both ARM and x86 Platforms
Benjamin Sanda [Fri, 21 Dec 2018 16:26:49 +0000 (16:26 +0000)]
xenalyze: Build for Both ARM and x86 Platforms

Modified to provide building of the xenalyze binary for both ARM and
x86 platforms. The xenalyze binary is now built as part of the BIN
list for both platforms.

Signed-off-by: Benjamin Sanda <ben.sanda@dornerworks.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
6 years agoxen/arm: Initialize trace buffer
Benjamin Sanda [Fri, 21 Dec 2018 16:26:48 +0000 (16:26 +0000)]
xen/arm: Initialize trace buffer

Now that we allow a privileged domain to map tracing buffer, initialize
them so a user can effectively trace Xen.

Signed-off-by: Benjamin Sanda <ben.sanda@dornerworks.com>
[julien: rework commit message]
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
6 years agoxen/arm: Allow a privileged domain to map foreign page from DOMID_XEN
Julien Grall [Fri, 21 Dec 2018 16:26:47 +0000 (16:26 +0000)]
xen/arm: Allow a privileged domain to map foreign page from DOMID_XEN

For auto-translated domain, the only way to map a page to itself is the
using the foreign map API. The current code does not allow mapping page from
special page (such as DOMID_XEN).

As xentrace buffers are shared using DOMID_XEN, it is not possible to use
tracing for Arm.

This could be solved by using the helper get_pg_owner(). This helper will
be able to get a reference on DOMID_XEN and therefore allow mapping for
privileged domain.

This patch replace the call to rcu_lock_domain_by_any_id() with
get_pg_owner(). For consistency, all the call to rcu_unlock_domain are
replaced by put_pg_owner().

Signed-off-by: Julien grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
6 years agoxen/arm: Make get_page_from_gfn working with DOMID_XEN
Julien Grall [Fri, 21 Dec 2018 16:26:46 +0000 (16:26 +0000)]
xen/arm: Make get_page_from_gfn working with DOMID_XEN

DOMID_XEN is used to share pages beloging to the hypervisor
(e.g trace buffers). Unlike other domains, DOMID_XEN is a non-auto
translated domain and therefore does not have a P2M.

This patch adds a special case for DOMID_XEN in get_page_from_gfn. We
may want to provide "non-auto translated helpers" in the future if we
see more case.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
6 years agoxen/arm: Add support for read-only foreign mappings
Julien Grall [Fri, 21 Dec 2018 16:26:45 +0000 (16:26 +0000)]
xen/arm: Add support for read-only foreign mappings

Currently, foreign mappings can only be read-write. A follow-up patch will
extend foreign mapping for Xen backend memory (via XEN_DOMID), some of
that memory should only be read accessible for the mapping domain.

Introduce a new p2m_type to cater read-only foreign mappings. For now,
the decision between the two foreign mapping type is based on the type
of the guest page mapped.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>