Commit Graph
40346 Commits
Author SHA1 Message Date
Jan Beulich a555d3363d x86emul: introduce CASE_SIMD_..._FP_VEX()
Since there are many AVX{,2} insns having legacy SIMD counterparts, have
macros covering both in one go. This (imo) improves readability and helps
prepare for optionally disabling SIMD support in the emulator.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-23 14:16:11 +01:00
Jan Beulich 053118f7ac x86emul: drop CASE_SIMD_DOUBLE_FP()
It's used only by CASE_SIMD_ALL_FP(), which can equally well be
implemented in terms of CASE_SIMD_{PACKED,SCALAR}_FP().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-23 14:15:17 +01:00
Jan Beulich 2520620266 x86emul: introduce CASE_SIMD_PACKED_INT_VEX()
Since there are many AVX{,2} insns having legacy MMX and SIMD
counterparts, have a macro covering all three in one go. This (imo)
improves readability (simply by the shrunk number of lines) and helps
prepare for optionally disabling MMX and SIMD support in the emulator.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-23 14:13:37 +01:00
Wei Liu 17f53645b2 x86/hyperv: change hv_tlb_flush_ex to fix clang build
Clang complains:

In file included from synic.c:15:
/builds/xen-project/xen/xen/include/asm/guest/hyperv-tlfs.h:900:18: error: field 'hv_vp_set' with variable sized type 'struct hv_vpset' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
        struct hv_vpset hv_vp_set;
                        ^
1 error generated.
/builds/xen-project/xen/xen/Rules.mk:198: recipe for target 'synic.o' failed
make[6]: *** [synic.o] Error 1

Comment out the last variable size array from hv_tlb_flush_ex to fix
clang builds.

Fixes: bbba482664 ("x86: import hyperv-tlfs.h from Linux")
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-23 12:21:01 +00:00
Wei Liu 25ae71fff0 x86/viridian: drop viridian_stimer_config_msr
Use hv_stimer_config instead. No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu 78f019b068 x86/viridian: drop virdian_sint_msr
Use hv_synic_sint in hyperv-tlfs.h instead.

This requires adding the missing "polling" member to hv_synic_sint.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu c9d9b5f4c9 x86/viridian: drop a wrong invalid value from reference TSC implementation
The only invalid value mentioned in Hyper-V TLFS 5.0c is 0. Michael
Kelley confirmed that 0xFFFFFFFF was never used [0].

[0] https://lists.xen.org/archives/html/xen-devel/2019-12/msg01564.html

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu 9520876662 x86: move viridian_guest_os_id_msr to hyperv-tlfs.h
Suggested-by: Paul Durrant <pdurrant@amazon.com>
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu bb2aa33c2a x86: provide and use hv_tsc_scale
The Hyper-V clock source and Xen's own viridian code need the same
functionality.

Move the function in viridian/time.c to hyperv.h and use it in both
places.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu f1c6ae95b1 x86/viridian: drop private copy of HV_REFERENCE_TSC_PAGE in time.c
Use the one defined in hyperv-tlfs.h instead. No functional change
intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu a846ac633a x86/viridian: drop duplicate defines from private.h and viridian.c
Also add HVCALL_EXT_CALL_QUERY_CAPABILITIES to hyperv-tlfs.h.
HvGetPartitionID was never used in code so just dropped it.

No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
2019-12-23 10:51:29 +00:00
Wei Liu dffe18cf81 x86: Hyper-V clock source's offset should be signed
Also drop the useless inline keyword.

Fixes: 685d16bd5 (x86: implement Hyper-V clock source)
Signed-off-by: Wei Liu <liuwe@microsoft.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-20 20:07:11 +00:00
Pawel Wieczorkiewicz 8e0f3e9482 livepatch: Fix typos and other errors in tests Makefile
There was a bunch of typos (s/actions/action/) as well as one missing
config.h target dependency. Also, xen_expectation target has
unnecessary cycle dependency.

Fixes: 25164571fc ('Merge branch 'livepatch.aws.v6' into staging')
Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Tested-by: Julien Grall <julien@xen.org>
2019-12-20 20:04:37 +00:00
Wei Liu 1b44fcbd95 x86/viridian: drop private copy of definitions from synic.c
Use hyperv-tlfs.h instead. No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <pdurrant@amazon.com>
2019-12-20 18:12:03 +00:00
Wei Liu 685d16bd56 x86: implement Hyper-V clock source
Implement a clock source using Hyper-V's reference TSC page.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 17:58:54 +00:00
Wei Liu 8b11ad3871 x86/hyperv: extract more information from Hyper-V
Provide a structure to store that information. The structure will be
accessed from other places later so make it public.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 17:58:54 +00:00
Wei Liu bbba482664 x86: import hyperv-tlfs.h from Linux
Take a pristine copy from Linux commit b2d8b167e15bb5ec2691d1119c025630a247f649.

Do the following to fix it up for Xen:

1. include xen/types.h and xen/bitops.h
2. fix up invocations of BIT macro

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 17:58:54 +00:00
Andrew Cooper f318635451 tools/libxc: Drop unused xc_compression_*()
There have been no users of the xc_compression_*() interface since Migration
v2 replaced legacy migration (2015, c/s b15bc4345).

It would need adjusting to fit into migration v2, and can be pulled out of git
history if someone wants to resurrect it in the future.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2019-12-20 16:08:00 +00:00
Andrew Cooper 31bf4f26aa tools/libxc: Drop other examples of the 'goto x; } else if' antipattern
None of these are buggy, but the resulting code is more robust.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2019-12-20 16:08:00 +00:00
Jan Beulich f71dbc2f4c x86emul: use CASE_SIMD_PACKED_INT() where possible
This (imo) improves readability (simply by the shrunk number of lines)
and helps prepare for optionally disabling MMX and SIMD support in the
emulator.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-20 16:46:20 +01:00
Sergey Kovalev f801b40d20 x86/vm_event: add short-circuit for breakpoints (aka "fast single step")
When using DRAKVUF (or another system using altp2m with shadow pages similar
to what is described in
https://xenproject.org/2016/04/13/stealthy-monitoring-with-xen-altp2m),
after a breakpoint is hit the system switches to the default
unrestricted altp2m view with singlestep enabled. When the singlestep
traps to Xen another vm_event is sent to the monitor agent, which then
normally disables singlestepping and switches the altp2m view back to
the restricted view.

This patch short-circuiting that last part so that it doesn't need to send the
vm_event out for the singlestep event and should switch back to the restricted
view in Xen automatically.

This optimization gains about 35% speed-up.

Was tested on Debian branch of Xen 4.12. See at:
https://github.com/skvl/xen/tree/debian/knorrie/4.12/fast-singlestep

Rebased on master:
https://github.com/skvl/xen/tree/fast-singlestep

Signed-off-by: Sergey Kovalev <valor@list.ru>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
2019-12-20 16:45:32 +01:00
Igor Druzhinin f9dee1f945 x86/time: update vtsc_last with cmpxchg and drop vtsc_lock
Now that vtsc_last is the only entity protected by vtsc_lock we can
simply update it using a single atomic operation and drop the spinlock
entirely. This is extremely important for the case of running nested
(e.g. shim instance with lots of vCPUs assigned) since if preemption
happens somewhere inside the critical section that would immediately
mean that other vCPU stop progressing (and probably being preempted
as well) waiting for the spinlock to be freed.

This fixes constant shim guest boot lockups with ~32 vCPUs if there is
vCPU overcommit present (which increases the likelihood of preemption).

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 16:44:38 +01:00
Jan Beulich 619a7119da x86: explicitly disallow guest access to PPIN
To fulfill the "protected" in its name, don't let the real hardware
values leak. While we could report a control register value expressing
this (which I would have preferred), unconditionally raise #GP for all
accesses (in the interest of getting this done).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-20 16:30:13 +01:00
Roger Pau Monné b1710040ca x86/apic: allow enabling x2APIC mode regardless of interrupt remapping
x2APIC mode doesn't mandate interrupt remapping, and hence can be
enabled independently. This patch enables x2APIC when available,
regardless of whether there's interrupt remapping support.

This is beneficial specially when running on virtualized environments,
since it reduces the amount of vmexits. For example when sending an
IPI in xAPIC mode Xen performs at least 3 different accesses to the
APIC MMIO region, while when using x2APIC mode a single wrmsr is used.

The following numbers are from a lock profiling of a Xen PV shim
running a Linux PV kernel with 32 vCPUs and xAPIC mode:

(XEN) Global lock flush_lock: addr=ffff82d0804af1c0, lockval=03190319, not locked
(XEN)   lock:656153(892606463454), block:602183(9495067321843)

Average lock time:   1360363ns
Average block time: 15767743ns

While the following are from the same configuration but with the shim
using x2APIC mode:

(XEN) Global lock flush_lock: addr=ffff82d0804b01c0, lockval=1adb1adb, not locked
(XEN)   lock:1841883(1375128998543), block:1658716(10193054890781)

Average lock time:   746588ns
Average block time: 6145147ns

Enabling x2APIC has halved the average lock time, thus reducing
contention.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 16:29:22 +01:00
Roger Pau Monné 3d05407025 x86/smp: check APIC ID on AP bringup
Check that the processor to be woken up APIC ID is addressable in the
current APIC mode.

Note that in practice systems with APIC IDs > 255 should already have
x2APIC enabled by the firmware, and hence this is mostly a safety
belt.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 16:28:27 +01:00
Roger Pau Monné c08cbf7fb8 x86/apic: force phys mode if interrupt remapping is disabled
Cluster mode can only be used with interrupt remapping support, since
the top 16bits of the APIC ID are filled with the cluster ID, and
hence on systems where the physical ID is still smaller than 255 the
cluster ID is not. Force x2APIC to use physical mode if there's no
interrupt remapping support.

Note that this requires a further patch in order to enable x2APIC
without interrupt remapping support.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 16:27:48 +01:00
Roger Pau Monné 9356f9de41 x86/ioapic: only use dest32 with x2apic and interrupt remapping enabled
The IO-APIC code assumes that x2apic being enabled also implies
interrupt remapping being enabled, and hence will use the 32bit
destination field in the IO-APIC entry.

This is safe now, but there's no reason to not enable x2APIC even
without interrupt remapping, and hence the IO-APIC code needs to use
the 32 bit destination field only when both interrupt remapping and
x2APIC are enabled.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-20 16:26:09 +01:00
Wei Liu d93630b18c tools: bump library version numbers
Signed-off-by: Wei Liu <wl@xen.org>
2019-12-20 14:21:25 +00:00
Andrew Cooper 2a62c22715 libxc/restore: Fix data auditing in handle_x86_pv_vcpu_blob()
The current logic only works by chance, in that XSAVE records also tend to be
a multiple of 128.  Implement the missing logic for XSAVE.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2019-12-20 12:12:00 +00:00
Andrew Cooper aafae0e800 libxc/restore: Fix data auditing in handle_x86_pv_info()
handle_x86_pv_info() has a subtle bug.  It uses an 'else if' chain with a
clause in the middle which doesn't exit unconditionally.  In practice, this
means that when restoring a 32bit PV guest, later sanity checks are skipped.

Rework the logic a little to be simpler.  There are exactly two valid
combinations of fields in X86_PV_INFO, so factor this out and check them all
in one go, before making adjustments to the current domain.

Once adjustments have been completed successfully, sanity check the result
against the X86_PV_INFO settings in one go, rather than piece-wise.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2019-12-20 12:11:29 +00:00
Andrew Cooper 1430c5a8ca tools/python: Python 3 compatibility
convert-legacy-stream is only used for incomming migration from pre Xen 4.7,
and verify-stream-v2 appears to only be used by me during migration
development - it is little surprise that they missed the main converstion
effort in Xen 4.13.

Fix it all up.

Move open_file_or_fd() into a new util.py to avoid duplication, making it a
more generic wrapper around open() or fdopen().

In libxc.py, drop all long() conversion.  Python 2 will DTRT with int => long
promotion, even on 32bit builds.

In convert-legacy-stream, don't pass empty strings to write_record().  Join on
the empty argl will do the right thing.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2019-12-20 11:19:56 +00:00
Konrad Rzeszutek Wilk 25164571fc Merge branch 'livepatch.aws.v6' into staging
* livepatch.aws.v6:
  livepatch: Add metadata runtime retrieval mechanism
  livepatch: Handle arbitrary size names with the list operation
  livepatch: Add support for modules .modinfo section metadata
  livepatch: Add support for inline asm livepatching expectations
  livepatch: Add per-function applied/reverted state tracking marker
  livepatch: Do not enforce ELF_LIVEPATCH_FUNC section presence
  livepatch: Add support for apply|revert action replacement hooks
  livepatch: Implement pre-|post- apply|revert hooks
  livepatch: Export payload structure via livepatch_payload.h
  livepatch: Allow to override inter-modules buildid dependency
  livepatch: Always check hypervisor build ID upon livepatch upload

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2019-12-19 20:16:43 -05:00
Andrew Cooper 0cd791c499 tools/python: Drop test.py
This file hasn't been touched since it was introduced in 2005 (c/s 0c6f36628)
and has a wildly obsolete shebang for Python 2.3.  Most importantly for us is
that it isn't Python 3 compatible.

Drop the file entirely.  Since the 2.3 days, automatic discovery of tests has
been included in standard functionality.  Rewrite the test rule to use
"$(PYTHON) -m unittest discover" which is equivelent.

Dropping test.py drops the only piece of ZPL-2.0 code in the tree.  Drop the
ancillary files, and adjust COPYING to match.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Reviewed-by: Lars Kurth <lars.kurth@citrix.com>
2019-12-19 18:48:00 +00:00
Tamas K Lengyel ca14eba3cc x86/mem_sharing: cleanup code and comments in various locations
No functional changes.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
[Further cleanup]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-19 18:05:11 +00:00
Tamas K Lengyel e09aa1dbf3 tools/libxc: clean up memory sharing files
No functional changes.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Acked-by: Wei Liu <wl@xen.org>
[Further cleanup]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-19 18:05:11 +00:00
Jan Beulich 5c13ed79f3 x86: provide Dom0 access to PPIN via XENPF_resource_op
It was requested that we provide a way independent of the MCE reporting
interface that Dom0 software could use to get hold of the values for
particular CPUs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-18 14:49:59 +01:00
Jan Beulich dea5d6dd05 x86: include the PPIN in MCE records when available
Quoting the respective Linux commit:

    Intel Xeons from Ivy Bridge onwards support a processor identification
    number set in the factory. To the user this is a handy unique number to
    identify a particular CPU. Intel can decode this to the fab/production
    run to track errors. On systems that have it, include it in the machine
    check record. I'm told that this would be helpful for users that run
    large data centers with multi-socket servers to keep track of which CPUs
    are seeing errors.

Newer AMD CPUs support this too, at different MSR numbers.

Take the opportunity and hide __MC_NMSRS from the public interface going
forward.

[Linux commit 3f5a7896a5096fd50030a04d4c3f28a7441e30a5]
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-12-18 14:49:10 +01:00
Steven Haigh 0e7c69bd3c tools/hotplug: Use ip on systems where brctl is not available
Newer distros like CentOS 8 do not have brctl available. As such, we
can't use it to configure networking anymore.

This patch will fall back to 'ip' or 'bridge' commands if brctl is not
available in the working PATH.

This would be a likely backport candidate to any version expected to be
built on CentOS 8 etc.

Signed-off-by: Steven Haigh <netwiz@crc.id.au>
Acked-by: Wei Liu <wl@xen.org>
2019-12-18 11:54:33 +00:00
Andrew Cooper 7a011e2b8b x86/S3: Expand macros in wakeup_prot.S
Most users have been dropped, and they do nothing but obfuscate the assembly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-18 11:42:54 +00:00
Andrew Cooper 581deaa829 x86/S3: Restore cr4 later during resume
Just like the BSP/AP paths, %cr4 is loaded with only PAE.  Defer restoring all
of %cr4 (MCE in particular) until all the system structures (IDT/TSS in
particular) have been loaded.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-18 11:42:54 +00:00
Andrew Cooper a8e9ac0a23 x86/S3: Don't save unnecessary GPRs
Only the callee-preserved registers need saving/restoring.  Spill them to the
stack like regular functions do.  %rsp is now the only GPR which gets stashed
in .data

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-18 11:42:54 +00:00
Andrew Cooper b3a32e2063 x86/S3: Don't bother saving %cr3, %ss or flags
The trampoline has already set up the idle pagetables (which are the correct
ones to use), and sanitised the flags state.

For %ss, __HYPERVISOR_DS64 is the correct descriptor to restore.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-18 11:42:54 +00:00
Andrew Cooper 62874a4df3 x86/S3: Clarify and improve the behaviour of do_suspend_lowlevel()
do_suspend_lowlevel() behaves as a function call, even when the trampoline
jumps back into the middle of it.  Discuss this property, while renaming the
far-too-generic __ret_point to s3_resume.

Optimise the calling logic for acpi_enter_sleep_state().  $3 doesn't require a
64bit write, and the function isn't variadic so doesn't need to specify zero
FPU registers in use.

In the case of an acpi_enter_sleep_state() error, we didn't actually lose
state so don't need to restore it.  Jump straight to the end.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2019-12-18 11:42:54 +00:00
Andrew Cooper 704fa15328 x86/mm: Simplify promote_l4_table()'s exit semantics
promote_l4_table() is different from its lower level helpers, by having an
extra return path out of the middle of the loop in the case of a failure.

Break from the loop, which is consistent with the other helpers, and
functionally equivalent.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
2019-12-17 20:40:57 +00:00
Hongyan Xia c61c1b4943 xen/page_alloc: statically allocate bootmem_region_list
The existing code assumes that the first mfn passed to the boot
allocator is mapped, which creates problems when, e.g., we do not have
a direct map, and may create other bootstrapping problems in the
future. Make it static. The size is kept the same as before (1 page).

Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
Reviewed-by: Julien Grall <julien@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2019-12-17 16:51:20 +00:00
Yangtao Li f796d92ac4 xen/arm: Basic support for sunxi/sun50i h6 platform.
adding compatible strings for h6 SoCs, Specifically orangepi3.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com
Tested-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Julien Grall <julien@xen.org>
2019-12-17 16:29:42 +00:00
Andrew Cooper f50a4f6e24 libxc/restore: Fix error message for unrecognised stream version
The Expected and Got values are rendered in the wrong order.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
2019-12-17 14:03:14 +00:00
Nick Rosbrook 21cb0bdcf4 golang/xenlight: implement keyed union C to Go marshaling
Switch over union key to determine how to populate 'union' in Go struct.

Since the unions of C types cannot be directly accessed in cgo, use a
typeof trick to typedef a struct in the cgo preamble that is analagous
to each inner struct of a keyed union. For example, to define a struct
for the hvm inner struct of libxl_domain_build_info, do:

  typedef typeof(((struct libxl_domain_build_info *)NULL)->u.hvm) libxl_domain_build_info_type_union_hvm;

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
2019-12-16 18:08:10 +00:00
Nick Rosbrook cc8e54a1a2 golang/xenlight: begin C to Go type marshaling
Begin implementation of fromC marshaling functions for generated struct
types. This includes support for converting fields that are basic
primitive types such as string and integer types, nested anonymous
structs, nested libxl structs, and libxl built-in types.

This patch does not implement conversion of arrays or keyed unions.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
2019-12-16 18:08:09 +00:00
Nick Rosbrook d916bf3f7e golang/xenlight: remove no-longer used type MemKB
Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
2019-12-16 18:08:08 +00:00