Commit Graph
38887 Commits
Author SHA1 Message Date
Jan Beulich f68f35fd20 x86emul/fuzz: adjust canonicalization in sanitize_input()
Drop it entirely for %rbp - this register is not special purpose enough
to warrant such special treatment. Add a comment to clarify the purpose
of the canonicalization of %rip and %rsp.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-04-01 11:12:16 +02:00
Jan Beulich 7881bf4882 x86/paging: paging_set_allocation() is init-only
This is needed for Dom0 creation only, therefore it gets additionally
framed by an #ifdef.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
2019-04-01 11:09:43 +02:00
Andrew Cooper 12381e20b5 xen/timers: Document and improve the representation of the timer heap metadata
The {GET,SET}_HEAP_{SIZE,LIMIT}() macros implement some completely
undocumented pointer misuse to store the size and limit information.  In
practice, heap[0] is never a timer pointer, and used to stash the metadata
instead.

Extend the HEAP OPERATIONS comment to include this detail.  Introduce a
structure representing the heap metadata, and a static inline function to
perfom the type punning.

Replace all of the above macros with an equivelent expression involving the
heap_metadata() helper.  Note that I deliberately haven't rearranged the
surrounding code - this allows the correctness of the transformation to be
checked by confirming that the compiled binary is identical.

This also removes two cases of a macro argument with side effects, which only
worked correctly because the arguments were only evaluated once.

Finally, fix up the type of dummy_heap.  The old code functioned correctly,
but only by virtue of confusing a discrete object and a single-entry array.
Change its type to match the intended semantics, and drop the redundant
initialisation in timer_init().

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-29 18:28:21 +00:00
Juergen Gross 753ba43d6d xen/sched: fix credit2 smt idle handling
Credit2's smt_idle_mask_set() and smt_idle_mask_clear() are used to
identify idle cores where vcpus can be moved to. A core is thought to
be idle when all siblings are known to have the idle vcpu running on
them.

Unfortunately the information of a vcpu running on a cpu is per
runqueue. So in case not all siblings are in the same runqueue a core
will never be regarded to be idle, as the sibling not in the runqueue
is never known to run the idle vcpu.

Use a credit2 specific cpumask of siblings with only those cpus
being marked which are in the same runqueue as the cpu in question.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
2019-03-29 18:28:21 +00:00
Andrew Cooper e88afede8c libx86: Recalculate synthesised cpuid_policy fields when appropriate
When filling a policy, either from CPUID or an incomming leaf stream,
recalculate the synthesised vendor value.  All callers are expected to want
this behaviour.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-27 14:45:47 +00:00
Andrew Cooper 1c2c9f85dd tools/libxc: Use x86_cpuid_lookup_vendor() rather than opencoding the logic
This doesn't address any of the assumptions that "anything which isn't AMD is
Intel".  This logic is expected to be replaced wholesale with libx86 in the
longterm.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-27 14:45:47 +00:00
Andrew Cooper 00b4f4d0fb x86/cpuid: Drop get_cpu_vendor() completely
get_cpu_vendor() tries to do a number of things, and ends up doing none of
them well.

For calculating the vendor itself, use x86_cpuid_lookup_vendor() which is
implemented in a far more efficient manner than looping over cpu_devs[].

For setting up this_cpu, set it up once on the BSP only, rather than
latest-takes-precident across the APs.  Such a system is probably not going to
boot, but this feels like a less dangerous course of action.  Adjust the
printed errors to be more clear in the mismatch case.

This removes the only user of cpu_dev->c_ident[], so drop that field as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-27 14:45:47 +00:00
Andrew Cooper e72309ffbe libx86: Introduce x86_cpuid_lookup_vendor()
Also introduce constants for the vendor strings in CPUID leaf 0.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-27 14:45:47 +00:00
Andrew Cooper 8eed571409 CI: Add a CentOS 6 container and build jobs
CentOS 6 is probably the most frequently broken build, so adding it to CI
would be a very good move.

One problem is that CentOS 6 comes with Python 2.6, and Qemu requires 2.7.
There appear to be no sensible ways to get Python 2.7 into a CentOS 6
environments, so modify the build script to skip the Qemu upstream build
instead.  Additionally, SeaBIOS requires GCC 4.6 or later, so skip it as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-26 15:36:19 +00:00
Andrew Cooper 1316369dca CI: Fix indentation in containerize script
The script is mostly indented with spaces, but there are three tabs.  Fix them
up to be consistent.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-25 11:34:48 +00:00
Andrew Cooper cb70a26f78 docs/admin-guide: Boot time microcode loading
Recent discussion on xen-devel has demonstrated that Xen existing microcode
loading support isn't adequately documented.  Take the opportunity to address
this, and start some end-user focused documentation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-22 13:48:02 +00:00
Andrew Cooper c16d22fce8 docs/rst: Use pandoc to render ReStructuredText
Sphinx uses ReStructuredText as its markup format.  Although missing the
project wide integration, individual *.rst files can be rendered by pandoc to
suppliement our existing ad-hoc documentation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-22 13:48:02 +00:00
Andrew Cooper 530f9aabab docs/sphinx: Skeleton setup
Sphinx is a documentation system, which is popular for technical writing.  It
uses ReStructuredText as its markup syntax, and is designed for whole-project
documentation, rather than the misc assortment of individual files that we
currently have.

This is a skeleton setup which just enough infrastructure to render an empty
set of pages.  It will become better integrated into Xen's docs system when it
becomes less WIP.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-22 13:48:02 +00:00
Andrew Cooper 74dadb8556 passthrough/vtd: Drop the "workaround_bios_bug" logic entirely
It turns out that this code was previously dead.

c/s dcf41790 " x86/mmcfg/drhd: Move acpi_mmcfg_init() call before calling
acpi_parse_dmar()" resulted in PCI segment 0 now having been initialised
enough for acpi_parse_one_drhd() to not take the

  /* Skip checking if segment is not accessible yet. */

path unconditionally.  However, some systems have DMAR tables which list
devices which are disabled by user choice (in particular, Dell PowerEdge R740
with I/O AT DMA disabled), and turning off all IOMMU functionality in this
case is entirely unhelpful behaviour.

Leave the warning which identifies the problematic devices, but drop the
remaining logic.  This leaves the system in better overall state, and working
in the same way that it did in previous releases.

Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-03-22 12:25:51 +00:00
Julien Grall 210eb89ed5 xen/drivers: char: Match #if CONFIG_DEBUG_TRACE and #endif comment
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-21 18:44:35 +00:00
Julien Grall 081491f8a8 xen/memory: Fix typo in the comment on top of check_get_page_from_gfn
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-21 18:39:12 +00:00
Julien Grall b28849443b x86/mm: Fix typo in comment on top of page_lock
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-21 18:37:40 +00:00
Wei Liu 59e9783ddf libxc: fix HVM core dump
f969bc9fc9 forbid get_address_size call on HVM guests, because that
didn't make sense. It broke core dump functionality on HVM because
libxc unconditionally asked for guest width.

Force guest_width to a sensible value.

Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2019-03-20 16:52:01 +00:00
Wei Liu a892f81dde x86: decouple xen alignment setting from EFI/ELF build
Introduce a new Kconfig option to pick the alignment for xen binary.
To retain original behaviour, the default pick for EFI build is 2M and
ELF build 4K.

Make the PVHSHIM build use 2M alignment for potentially better
performance.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-19 14:39:42 +00:00
Wei Liu 8ac7d80f8d x86: drop "depends on X86" for TBOOT Kconfig option
Given that this file already resides under arch/x86, there is no need
to have the dependency.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-19 14:39:25 +00:00
Andrew Cooper 17f74242cc x86/spec-ctrl: Extend repoline safey calcuations for eIBRS and Atom parts
All currently-released Atom processors are in practice retpoline-safe, because
they don't fall back to a BTB prediction on RSB underflow.

However, an additional meaning of Enhanced IRBS is that the processor may not
be retpoline-safe.  The Gemini Lake platform, based on the Goldmont Plus
microarchitecture is the first Atom processor to support eIBRS.

Until Xen gets full eIBRS support, Gemini Lake will still be safe using
regular IBRS.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-18 16:26:40 +00:00
Andrew Cooper ba27aaa885 x86/msr: Shorten ARCH_CAPABILITIES_* constants
They are unnecesserily verbose, and ARCH_CAPS_* is already the more common
version.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-18 16:26:40 +00:00
Igor Druzhinin 522a2f3c5c x86/hvm: finish IOREQs correctly on completion path
Since the introduction of linear_{read,write}() helpers in 3bdec530a5
(x86/HVM: split page straddling emulated accesses in more cases) the
completion path for IOREQs has been broken: if there is an IOREQ in
progress but hvm_copy_{to,from}_guest_linear() returns HVMTRANS_okay
(e.g. when P2M type of source/destination has been changed by IOREQ
handler) the execution will never re-enter hvmemul_do_io() where
IOREQs are completed. This usually results in a domain crash upon
the execution of the next IOREQ entering hvmemul_do_io() and finding
the remnants of the previous IOREQ in the state machine.

This particular issue has been discovered in relation to p2m_ioreq_server
type where an emulator changed the memory type between p2m_ioreq_server
and p2m_ram_rw in process of responding to IOREQ which made
hvm_copy_..() to behave differently on the way back.

Fix it for now by checking if IOREQ completion is required (which
can be identified by querying MMIO cache) before trying to finish
a memory access immediately through hvm_copy_..(), re-enter
hvmemul_do_io() otherwise. This change alone only addresses IOREQ
completion issue for P2M type changing from MMIO to RAM in the
middle of emulation but leaves a case where new IOREQs might be
introduced by P2M changes from RAM to MMIO (which is less likely
to find in practice) that requires more substantial changes in
MMIO emulation code.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
2019-03-18 16:29:21 +01:00
Igor Druzhinin 2d527ba310 x86/hvm: split all linear reads and writes at page boundary
Ruling out page straddling at linear level makes it easier to
distinguish chunks that require proper handling as MMIO access
and not complete them as page straddling memory transactions
prematurely. This doesn't change the general behavior.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-18 16:28:45 +01:00
Jan Beulich 4a8e684d29 x86/MCE: mcequirk stuff is AMD-specific
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-18 11:41:47 +01:00
Jan Beulich 39cbe00fad x86emul: no need to set fault_suppression to false for VMOVNT*
When evex.opmsk is required to be zero there's no need for this, as it
won't have been set to true in the first place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-18 11:41:10 +01:00
Juergen Gross fc5021c29a xen/debug: make debugtrace more clever regarding repeating entries
In case debugtrace is writing to memory and the last entry is repeated
don't fill up the trace buffer, but modify the count prefix to "x-y "
style instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2019-03-18 11:40:32 +01:00
Juergen Gross 528afe47e7 xen/debug: make debugtrace configurable via Kconfig
Instead of having to edit include/xen/lib.h for making debugtrace
available make it configurable via Kconfig.

Default is off, it is available only in expert mode or in debug builds.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-03-18 11:39:43 +01:00
Jan Beulich 22e2f8dddf x86/e820: fix build with gcc9
e820.c: In function ‘clip_to_limit’:
.../xen/include/asm/string.h:10:26: error: ‘__builtin_memmove’ offset [-16, -36] is out of the bounds [0, 20484] of object ‘e820’ with type ‘struct e820map’ [-Werror=array-bounds]
   10 | #define memmove(d, s, n) __builtin_memmove(d, s, n)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
e820.c:404:13: note: in expansion of macro ‘memmove’
  404 |             memmove(&e820.map[i], &e820.map[i+1],
      |             ^~~~~~~
e820.c:36:16: note: ‘e820’ declared here
   36 | struct e820map e820;
      |                ^~~~

While I can't see where the negative offsets would come from, converting
the loop index to unsigned type helps. Take the opportunity and also
convert several other local variables and copy_e820_map()'s second
parameter to unsigned int (and bool in one case).

Reported-by: Charles Arnold <carnold@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-18 11:38:36 +01:00
Andrew Cooper 1e780ef5a5 x86/svm: Improve code generation from cpu_has_svm_feature()
Taking svm_feature_flags by pointer and using test_bit() results in generated
code which loads svm_feature_flags into a 32bit register, then does a bitwise
operation.

The logic can be expressed in terms of a straight bitwise operation, resulting
in the following minor improvement.

  add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-136 (-136)
  Function                                     old     new   delta
  svm_nested_features_on_efer_update           281     273      -8
  svm_create_vmcb                             1404    1388     -16
  svm_vmexit_handler                          6271    6239     -32
  start_svm                                    818     738     -80
  Total: Before=3347569, After=3347433, chg -0.00%

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2019-03-15 17:53:25 +00:00
Andrew Cooper 356f437171 x86/pv: Fix construction of 32bit dom0's
dom0_construct_pv() has logic to transition dom0 into a compat domain when
booting an ELF32 image.

One aspect which is missing is the CPUID policy recalculation, meaning that a
32bit dom0 sees a 64bit policy, which differ by the Long Mode feature flag in
particular.  Another missing item is the x87_fip_width initialisation.

Update dom0_construct_pv() to use switch_compat(), rather than retaining the
opencoding.  Position the call to switch_compat() such that the compat32 local
variable can disappear entirely.

The 32bit monitor table is now created by setup_compat_l4(), avoiding the need
to for manual creation later.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-15 14:59:27 +00:00
Andrew Cooper cc56d87dc3 xen/x86: Fix cflush()'s parameter tracking
Forcing a register operand hides (from the compiler) the fact that clflush
behaves as a read from the memory operand (wrt memory order, faults, etc.).
It also reduces the compilers flexibility with register scheduling.

Re-implement clfush() (and wbinvd() for consistency) as a static inline rather
than a macro, and have it take a const void pointer.

In practice, the only generated code which gets modified by this is in
mwait_idle_with_hints(), where a disp8 encoding now gets used.

While here, I noticed that &mwait_wakeup(cpu) was being calculated twice.
This is caused by the memory clobber in mb(), so take the opportunity to help
the optimiser by calculating it once, ahead of time.  bloat-o-meter reports a
delta of -26 as a result of this change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-03-15 14:36:07 +00:00
Andrew Cooper 3d5adba2ff xen: drop the nop() macro
There isn't a plausible reason to insert nops into code in this manner.

The sole use is in do_debug_key(), and exists to prevent the compiler
optimising the tail of the function with 'jmp debugger_trap_fatal'

In practice, a compiler barrier suffices just as well to prevent the tailcall,
and doesn't involve inserting unnecessary instructions.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2019-03-15 14:36:07 +00:00
Wei Liu 75e383fa93 automation: enable building rombios with clang
Previously it is disabled because the embedded ipxe can't be built
with clang. Now that ipxe is split out we can use --with-system-ipxe
to work around the issue.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-03-15 12:40:24 +00:00
Juergen Gross 996980ef86 introduce a cpumask with all bits set
There are several places in Xen allocating a cpumask on the stack and
setting all bits in it just to use it as an initial mask for allowing
all cpus.

Save the stack space and omit the need for runtime initialization by
defining a globally accessible cpumask_all variable.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
2019-03-14 16:42:05 +01:00
Jan Beulich 2455983ac4 Arm/atomic: cosmetics
Drop redundant casts. Un-define no longer needed macros after use.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
2019-03-14 16:40:12 +01:00
Jan Beulich 9134c56eb3 Arm/atomic: unify generation of u64 read/write functions
By adding another suitable abstracting macro the need for explicit
inline function definitions in the 32-bit case goes away.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
2019-03-14 16:39:14 +01:00
Jan Beulich 787619a064 tools: re-sync CPUID leaf 7 tables
Bring libxl's in line with the public header, and update xen-cpuid's to
the latest information available in Intel's documentation (SDM ver 068
and ISA extensions ver 035), with (as before) the exception on MAWAU.

Some pre-existing strings get changed to match SDM naming. This should
be benign in xen-cpuid, and I hope it's also acceptable in libxl, where
people actually using the slightly wrong names would have to update
their guest config files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-14 16:38:39 +01:00
Wei Liu f67e6e904c Config.mk: update seabios to 1.12.1
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-03-14 15:00:52 +00:00
Wei Liu 7619745071 tools: bump library version numbers
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-03-14 12:31:54 +00:00
Wei Liu d2151152dd xen: make grant table support configurable
Introduce CONFIG_GRANT_TABLE. Provide stubs and make sure x86 and arm
hypervisors build with grant table disabled.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2019-03-13 15:44:52 +00:00
Wei Liu 38a85fe8d9 build/m4: fix python library detection on Ubuntu systems
16cc3362ae doesn't work on Ubuntu with gcc (but it does work with
clang). Work around it by manipulating LIBS.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 15:01:36 +00:00
Wei Liu 222fb80031 travis: use python-dev instead of python2.7-dev
Xen build should be using default python now.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 15:01:36 +00:00
Wei Liu 49704b8d23 automation: use python-dev python2.7-dev in Debian and Ubuntu
... instead of python2.7-dev.

We installed python2.7-dev because xen only worked with 2.7.

Installing python2.7-dev only gives python2.7-config, which causes
configure to fail because it wants python-config by default. Now xen
should work with 2.6 and above, we can install python-dev and let
distros pick the default python.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 15:01:36 +00:00
Wei Liu 85578ea686 Run autogen.sh for 4.13
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-03-13 13:40:23 +00:00
Juergen Gross bd61616e94 MAINTAINERS: add myself as maintainer for public I/O interfaces
The "PUBLIC I/O INTERFACES AND PV DRIVERS DESIGNS" section of the
MAINTAINERS file lists Konrad as the only maintainer. Add myself for
helping him to review patches.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2019-03-13 11:26:38 +01:00
Jan Beulich 3bf54c9dbf string: fix type use in strstr()
Using plain int for string lengths, while okay for all practical
purposes, is undesirable in a generic library function.

Take the opportunity and also move the function from being in the middle
of mem*() ones to the set of str*() ones, convert its loop from while()
to for(), and correct style.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 11:25:49 +01:00
Jan Beulich c07186ca66 string: remove memscan()
It has no users, so rather than fixing its use of types (first and
foremost c would need to be cast to unsigned char in the comparison
expression) drop it altogether. memchr() ought to be fine for all
purposes.

Take the opportunity and also do some stylistic adjustments to its
surviving sibling function memchr().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 11:25:04 +01:00
Jan Beulich 592b5fcb98 string: avoid undefined behavior in strrchr()
The pre-decrement would not only cause misbehavior when wrapping (benign
because there shouldn't be any NULL pointers passed in), but may also
create a pointer pointing outside the object that the passed in pointer
points to (it won't be de-referenced though).

Take the opportunity and also
- convert bogus space (partly 7 of them) indentation to Linux style tab
  one,
- add two blank lines.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-03-13 11:23:28 +01:00
Andrew Cooper fa6eba8d35 xen/gnttab: Minor improvements to arch header files
* Use XFREE() when appropriate
 * Drop stale comments and unnecessary brackets
 * Fold asm constraints

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
2019-03-12 18:40:24 +00:00