Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread Nick Rosbrook
On Thu, Apr 23, 2020 at 1:22 PM George Dunlap wrote: > > > > On Apr 23, 2020, at 12:49 PM, George Dunlap > > wrote: > > > > > > > >> On Apr 23, 2020, at 12:27 PM, Ian Jackson wrote: > >> > >> Ian Jackson writes ("Re: Golang Xen packages and the golang packaging > >> system"): > >>> This is

[linux-linus test] 149764: tolerable trouble: fail/pass/starved - PUSHED

2020-04-23 Thread osstest service owner
flight 149764 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/149764/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict 12 guest-start/debianhvm.repeat fail in 149743 pass in

[PATCH v2 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Nick Rosbrook
By default, if the go compiler is found by the configure script, build the golang tools. If the compiler is not found, and --enable-golang was not explicitly set, do not build to the golang tools. The corresponding make variable is CONFIG_GOLANG. Remove CONFIG_GOLANG from tools/Rules.mk since the

[PATCH v2 0/2] build golang tools

2020-04-23 Thread Nick Rosbrook
These patches add support for the golang tools in the build system. The behavior of configure with respect to the make variable, CONFIG_GOLANG is copied from other components, such as the Ocaml tools. Namely, build the tools by default if the go compiler is found. Changes in v2: - Change make

[PATCH v2 0/1] More wrappers for xenlight Go package

2020-04-23 Thread Nick Rosbrook
This series adds wrappers to the xenlight package for various libxl functions, which are now trivial to add with the generated types and marshaling helpers. In particular, these are functions that would allow redctl to begin making the transition to using the xenlight package. For reference, I

[PATCH v2 1/1] golang/xenlight: add NameToDomid and DomidToName util functions

2020-04-23 Thread Nick Rosbrook
Many exported functions in xenlight require a domid as an argument. Make it easier for package users to use these functions by adding wrappers for the libxl utility functions libxl_name_to_domid and libxl_domid_to_name. Signed-off-by: Nick Rosbrook --- tools/golang/xenlight/xenlight.go | 38

[ovmf test] 149766: all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149766 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/149766/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d5339c04d7cd47c061ec146a7b062052e3dc56ca baseline version: ovmf

[examine test] 149768: tolerable trouble: pass/starved

2020-04-23 Thread osstest service owner
flight 149768 examine real [real] http://logs.test-lab.xenproject.org/osstest/logs/149768/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: examine-laxton1 2 hosts-allocate starved n/a examine-fiano12

[xen-unstable test] 149752: regressions - trouble: blocked/fail/pass/starved

2020-04-23 Thread osstest service owner
flight 149752 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149752/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-prev 6 xen-buildfail REGR. vs. 149741 build-i386

Locking in xl

2020-04-23 Thread Neil Sikka
Hello, I see that in the xl binary in xen 4.13.0, the acquire_lock() and release_lock() functions are only called from create_domain() in xl_vmcontrol.c, so I assume the lock provides inter-PROCESS synchronization in the case that multiple instances of xl are running and creating multiple domains

[xen-unstable-smoke test] 149769: tolerable all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149769 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149769/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH 3/3] x86/pv: Don't use IST for NMI/#MC/#DB in !CONFIG_PV builds

2020-04-23 Thread Andrew Cooper
On 21/04/2020 08:48, Jan Beulich wrote: > On 20.04.2020 16:59, Andrew Cooper wrote: >> --- a/xen/include/asm-x86/processor.h >> +++ b/xen/include/asm-x86/processor.h >> @@ -441,12 +441,18 @@ struct tss_page { >> }; >> DECLARE_PER_CPU(struct tss_page, tss_page); >> >> +/* >> + * Interrupt Stack

Re: [PATCH 1/3] x86/S3: Use percpu_traps_init() rather than opencoding SYSCALL/SYSENTER restoration

2020-04-23 Thread Andrew Cooper
On 21/04/2020 08:24, Jan Beulich wrote: > On 20.04.2020 16:59, Andrew Cooper wrote: >> @@ -46,24 +36,13 @@ void restore_rest_processor_state(void) >> /* Restore full CR4 (inc MCE) now that the IDT is in place. */ >> write_cr4(mmu_cr4_features); >> >> -/* Recover syscall MSRs */ >>

[linux-5.4 test] 149749: tolerable trouble: fail/pass/starved - PUSHED

2020-04-23 Thread osstest service owner
flight 149749 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/149749/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 15 guest-saverestorefail like 149709 test-armhf-armhf-xl-rtds 16

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Nick Rosbrook
> The underscore thing though — I think it’s a bad idea to mix `-` and `_`; > —enable-golang_tools just isn’t a good idea IMHO. :-) > > Do you need _tools? Could it just be —enable-golang? I agree, I don't like mixing the '-' and '_'. From what I could tell, that was how the other options were

Re: [PATCH 1/3] x86/pv: Options to disable and/or compile out 32bit PV support

2020-04-23 Thread Andrew Cooper
On 21/04/2020 07:02, Jan Beulich wrote: > On 20.04.2020 20:05, Andrew Cooper wrote: >> On 20/04/2020 15:05, Jan Beulich wrote: >>> I'm in particular >>> concerned that we may gain a large number of such printk()s over >>> time, if we added them in such cases. >> The printk() was a bit of an

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread George Dunlap
> On Apr 23, 2020, at 5:03 PM, Nick Rosbrook wrote: > > On Thu, Apr 23, 2020 at 9:44 AM George Dunlap wrote: >> >> >> >> On Thu, Apr 23, 2020 at 1:51 AM Nick Rosbrook wrote: >>> >>> By default, if the go compiler is found by the configure script, build >>> the golang tools. If the

Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread George Dunlap
> On Apr 23, 2020, at 12:49 PM, George Dunlap wrote: > > > >> On Apr 23, 2020, at 12:27 PM, Ian Jackson wrote: >> >> Ian Jackson writes ("Re: Golang Xen packages and the golang packaging >> system"): >>> This is quite unpleasant. In particular, it makes a git tree out of >>> output

Re: [XEN PATCH v5 08/16] build: Introduce $(cpp_flags)

2020-04-23 Thread Jan Beulich
On 21.04.2020 18:12, Anthony PERARD wrote: > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -123,6 +123,7 @@ $(obj-bin-y): XEN_CFLAGS := $(filter-out > -flto,$(XEN_CFLAGS)) > > c_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) '-D__OBJECT_FILE__="$@"' > a_flags = -MMD -MP -MF $(@D)/.$(@F).d

Re: [XEN PATCH v5 04/16] xen/build: have the root Makefile generates the CFLAGS

2020-04-23 Thread Jan Beulich
On 21.04.2020 18:11, Anthony PERARD wrote: > Instead of generating the CFLAGS in Rules.mk everytime we enter a new > subdirectory, we are going to generate most of them a single time, and > export the result in the environment so that Rules.mk can use it. The > only flags left to be generated are

Re: [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Jan Beulich
On 23.04.2020 16:56, Roger Pau Monne wrote: > Introduce a specific flag to request a HVM guest linear TLB flush, > which is an ASID/VPID tickle that forces a guest linear to guest > physical TLB flush for all HVM guests. > > This was previously unconditionally done in each pre_flush call, but >

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Nick Rosbrook
On Thu, Apr 23, 2020 at 6:25 AM Wei Liu wrote: > > On Wed, Apr 22, 2020 at 08:25:25PM -0400, Nick Rosbrook wrote: > > By default, if the go compiler is found by the configure script, build > > the golang tools. If the compiler is not found, and > > --enable-golang_tools was not explicitly set, do

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Nick Rosbrook
On Thu, Apr 23, 2020 at 9:44 AM George Dunlap wrote: > > > > On Thu, Apr 23, 2020 at 1:51 AM Nick Rosbrook wrote: >> >> By default, if the go compiler is found by the configure script, build >> the golang tools. If the compiler is not found, and >> --enable-golang_tools was not explicitly set,

[PATCH v17 2/2] xen/tools: VM forking toolstack side

2020-04-23 Thread Tamas K Lengyel
Add necessary bits to implement "xl fork-vm" commands. The command allows the user to specify how to launch the device model allowing for a late-launch model in which the user can execute the fork without the device model and decide to only later launch it. Signed-off-by: Tamas K Lengyel ---

[PATCH v17 1/2] mem_sharing: fix sharability check during fork reset

2020-04-23 Thread Tamas K Lengyel
When resetting a VM fork we ought to only remove pages that were allocated for the fork during it's execution and the contents copied over from the parent. This can be determined if the page is sharable as special pages used by the fork for other purposes will not pass this test. Unfortunately

RE: [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-04-23 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 23 April 2020 12:09 > To: p...@xen.org; 'Varad Gautam' > Cc: xen-devel@lists.xenproject.org; 'Julien Grall' ; 'Roger > Pau Monné' > ; 'Andrew Cooper' > Subject: Re: [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for > shared

Re: [PATCH OSSTEST] examine/cpu: fix fetching number of threads

2020-04-23 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST] examine/cpu: fix fetching number of threads"): > The way to fetch the number of threads from the output of xl info is > wrong, as the result of =~ is either true or false, but will never be a > numeric value. > > Fix the regex to have a capture group in

[PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Roger Pau Monne
Introduce a specific flag to request a HVM guest linear TLB flush, which is an ASID/VPID tickle that forces a guest linear to guest physical TLB flush for all HVM guests. This was previously unconditionally done in each pre_flush call, but that's not required: HVM guests not using shadow don't

[PATCH v11 2/3] x86/tlb: allow disabling the TLB clock

2020-04-23 Thread Roger Pau Monne
The TLB clock is helpful when running Xen on bare metal because when doing a TLB flush each CPU is IPI'ed and can keep a timestamp of the last flush. This is not the case however when Xen is running virtualized, and the underlying hypervisor provides mechanism to assist in performing TLB flushes:

[PATCH v11 3/3] x86/tlb: use Xen L0 assisted TLB flush when available

2020-04-23 Thread Roger Pau Monne
Use Xen's L0 HVMOP_flush_tlbs hypercall in order to perform flushes. This greatly increases the performance of TLB flushes when running with a high amount of vCPUs as a Xen guest, and is specially important when running in shim mode. The following figures are from a PV guest running `make -j32

[PATCH v11 0/3] x86/guest: use assisted TLB flush in guest mode

2020-04-23 Thread Roger Pau Monne
Hello, This is the remaining of the assisted TLB flush series. This last set of patches enable the usage of the Xen assisted flush when running nested on Xen. Thanks, Roger. Roger Pau Monne (3): x86/tlb: introduce a flush HVM ASIDs flag x86/tlb: allow disabling the TLB clock x86/tlb: use

[PATCH OSSTEST] examine/cpu: fix fetching number of threads

2020-04-23 Thread Roger Pau Monne
The way to fetch the number of threads from the output of xl info is wrong, as the result of =~ is either true or false, but will never be a numeric value. Fix the regex to have a capture group in order to fetch the number of threads, and store the capture in the threads variable. Signed-off-by:

[ovmf test] 149747: all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149747 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/149747/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 3a3a3af4a29ee36b1db11842d40b74f2de892a35 baseline version: ovmf

[linux-linus test] 149743: regressions - trouble: fail/pass/starved

2020-04-23 Thread osstest service owner
flight 149743 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/149743/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict 12 guest-start/debianhvm.repeat fail REGR.

[qemu-mainline test] 149744: tolerable trouble: fail/pass/starved - PUSHED

2020-04-23 Thread osstest service owner
flight 149744 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/149744/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail like 149737

[xen-unstable-smoke test] 149760: tolerable all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149760 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149760/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread George Dunlap
On Thu, Apr 23, 2020 at 1:51 AM Nick Rosbrook wrote: > By default, if the go compiler is found by the configure script, build > the golang tools. If the compiler is not found, and > --enable-golang_tools was not explicitly set, do not build to the golang > tools. > > The new corresponding make

Re: [PATCH 3/4] golang/xenlight: add DevicePciAdd/Remove wrappers

2020-04-23 Thread Nick Rosbrook
On Thu, Apr 23, 2020 at 6:22 AM George Dunlap wrote: > > > > > On Apr 12, 2020, at 11:02 PM, Nick Rosbrook wrote: > > > > Add DevicePciAdd and DevicePciRemove as wrappers for > > libxl_device_pci_add and libxl_device_pci remove. > > > > Signed-off-by: Nick Rosbrook > > For 4.14, we should

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Wei Liu
On Thu, Apr 23, 2020 at 01:09:43PM +0100, George Dunlap wrote: > On Thu, Apr 23, 2020 at 11:25 AM Wei Liu wrote: > > > On Wed, Apr 22, 2020 at 08:25:25PM -0400, Nick Rosbrook wrote: > > > By default, if the go compiler is found by the configure script, build > > > the golang tools. If the

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Wei Liu
On Thu, Apr 23, 2020 at 12:57:44PM +0200, Roger Pau Monné wrote: > On Thu, Apr 23, 2020 at 12:41:49PM +0200, Jan Beulich wrote: > > On 23.04.2020 12:30, Wei Liu wrote: > > > On Wed, Apr 22, 2020 at 06:33:38PM +0200, Roger Pau Monné wrote: > > >> On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread George Dunlap
On Thu, Apr 23, 2020 at 11:25 AM Wei Liu wrote: > On Wed, Apr 22, 2020 at 08:25:25PM -0400, Nick Rosbrook wrote: > > By default, if the go compiler is found by the configure script, build > > the golang tools. If the compiler is not found, and > > --enable-golang_tools was not explicitly set, do

[xen-unstable-smoke test] 149748: tolerable all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149748 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149748/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread George Dunlap
> On Apr 23, 2020, at 12:27 PM, Ian Jackson wrote: > > Ian Jackson writes ("Re: Golang Xen packages and the golang packaging > system"): >> This is quite unpleasant. In particular, it makes a git tree out of >> output files. What will we do when someone sends us patches to the >> bindings

Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread Ian Jackson
Ian Jackson writes ("Re: Golang Xen packages and the golang packaging system"): > This is quite unpleasant. In particular, it makes a git tree out of > output files. What will we do when someone sends us patches to the > bindings ? Also, anyone who redistributes your proposed golang package is

Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread Ian Jackson
George Dunlap writes ("Golang Xen packages and the golang packaging system"): > So currently, our build system will install the xenlight package into > $PREFIX/share/gocode/src/golang.xenproject.org/xenlight. However, it > actually takes a bit of wrestling to get golang to use this location,

Re: Golang Xen packages and the golang packaging system

2020-04-23 Thread George Dunlap
> On Apr 22, 2020, at 7:55 PM, Nick Rosbrook wrote: > >> One question I have from the above is how the xen.git RELEASE-X.Y.Z should >> correspond to the vA.B.C in the golang package repo. >> >> The obvious answer, of course, is (A, B, C) = (X, Y, Z); that is, xen.git >> tag RELEASE-4.14.0

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Jan Beulich
On 23.04.2020 12:57, Roger Pau Monné wrote: > On Thu, Apr 23, 2020 at 12:41:49PM +0200, Jan Beulich wrote: >> On 23.04.2020 12:30, Wei Liu wrote: >>> On Wed, Apr 22, 2020 at 06:33:38PM +0200, Roger Pau Monné wrote: On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau Monne wrote: > @@

Re: [PATCH v4] x86: irq: Do not BUG_ON multiple unbind calls for shared pirqs

2020-04-23 Thread Jan Beulich
On 31.03.2020 13:51, Paul Durrant wrote: >> From: Jan Beulich >> Sent: 31 March 2020 08:41 >> >> On 17.03.2020 16:23, Paul Durrant wrote: >>> That looks like it will do the job. I'll see if I can get it tested. >> >> Any luck with this, yet? > > I have asked Varad to test it. He hopes to get to

Re: [XTF 0/4] Add strncmp(), strtol() and strtoul() functions

2020-04-23 Thread Julien Grall
On 23/04/2020 11:19, Pawel Wieczorkiewicz wrote: Add FreeBSD's implementation of strtol() and strtoul() functions from: https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtoul.c I would suggest to specify the baseline used in each commit. This will allows us to track any

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Roger Pau Monné
On Thu, Apr 23, 2020 at 12:41:49PM +0200, Jan Beulich wrote: > On 23.04.2020 12:30, Wei Liu wrote: > > On Wed, Apr 22, 2020 at 06:33:38PM +0200, Roger Pau Monné wrote: > >> On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau Monne wrote: > >>> @@ -254,3 +257,14 @@ unsigned int

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Jan Beulich
On 23.04.2020 12:30, Wei Liu wrote: > On Wed, Apr 22, 2020 at 06:33:38PM +0200, Roger Pau Monné wrote: >> On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau Monne wrote: >>> @@ -254,3 +257,14 @@ unsigned int flush_area_local(const void *va, unsigned >>> int flags) >>> >>> return flags;

[XTF v2 v2 4/4] setup: Detect and display Xen version on test startup

2020-04-23 Thread Pawel Wieczorkiewicz
In arch_setup() detect Xen version by issuing xen_version hypercall and optionally pass the version to main_xtf(). Signed-off-by: Pawel Wieczorkiewicz --- Changed since v1: * Do not limit setup_pv_console() to HVM only. It does not crash. It merely panics because the callbacks array wasn't

[XTF v2 v2 2/4] lib: always append CR after LF in vsnprintf()

2020-04-23 Thread Pawel Wieczorkiewicz
The explicit LFCR sequence guarantees proper line by line formatting in the output. The '\n' character alone on some terminals is not automatically converted to LFCR. Signed-off-by: Pawel Wieczorkiewicz --- Changed since v1: * Emit CRLF instead of LFCR common/libc/vsnprintf.c | 10 ++

[XTF v2 v2 3/4] Enabled serial writing for hvm guests

2020-04-23 Thread Pawel Wieczorkiewicz
From: Paul Semel setup.c: PV console writing is not working in Xen 4.2 for hvm guests, so we make xtf write to COM1 serial port to get its output Signed-off-by: Paul Semel Signed-off-by: Pawel Wieczorkiewicz --- Changed since v1: * Increase callbacks array arch/x86/setup.c | 14

[XTF v2 v2 0/4] Small fixes and improvements

2020-04-23 Thread Pawel Wieczorkiewicz
This is the first series of XTF patches I intend to send. It covers some relatively small changes displaying Xen version on test start, as well as adding serial consol support for HVM guests.. Paul Semel (1): Enabled serial writing for hvm guests Pawel Wieczorkiewicz (3): lib: Add

[XTF v2 v2 1/4] lib: Add XEN_MAJOR() and XEN_MINOR() macros

2020-04-23 Thread Pawel Wieczorkiewicz
These are just a simple macros obtaining major, minor values as returned by xen_version hypercall. Signed-off-by: Pawel Wieczorkiewicz --- include/xtf/lib.h| 3 +++ tests/xsa-213/main.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/xtf/lib.h

[XTF 3/4] libc, strtol: Add FreeBSD libc implementation of strtoul()

2020-04-23 Thread Pawel Wieczorkiewicz
The function was derived from: https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtoul.c Sligthly modified to use ctypes helpers and ignore locale. Signed-off-by: Pawel Wieczorkiewicz --- common/libc/strtol.c | 69

[XTF 2/4] libc, strtol: Add isspace(), isdigit(), isxdigit(), isascii()

2020-04-23 Thread Pawel Wieczorkiewicz
These ctype.h derived helper functions simplify strtol() code and will help simplify strtoul(). Signed-off-by: Pawel Wieczorkiewicz --- common/lib.c| 8 common/libc/strtol.c| 9 +++-- common/libc/vsnprintf.c | 8 include/xtf/libc.h | 29

[XTF 1/4] string: add freebds libc implementation of strtol()

2020-04-23 Thread Pawel Wieczorkiewicz
From: Paul Semel Added freebsd libc implementation of the strtol() function. Original can be found here : https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtol.c Signed-off-by: Paul Semel --- build/files.mk | 1 + common/libc/strtol.c | 135

[XTF 4/4] libc: add strncmp() function

2020-04-23 Thread Pawel Wieczorkiewicz
Signed-off-by: Pawel Wieczorkiewicz --- common/libc/string.c | 11 +++ include/xtf/libc.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/common/libc/string.c b/common/libc/string.c index 5c25e27..d81e324 100644 --- a/common/libc/string.c +++ b/common/libc/string.c @@ -56,6

[XTF 0/4] Add strncmp(), strtol() and strtoul() functions

2020-04-23 Thread Pawel Wieczorkiewicz
Add FreeBSD's implementation of strtol() and strtoul() functions from: https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtoul.c The FreeBSD code being added as a separate file (common/libc/strtol.c) is under the BSD 3-clause license. Modification to COPYING file might be needed.

Re: [PATCH 0/4] More wrappers for xenlight Go package

2020-04-23 Thread George Dunlap
> On Apr 12, 2020, at 11:02 PM, Nick Rosbrook wrote: > > This series adds wrappers to the xenlight package for various libxl > functions, which are now trivial to add with the generated types and > marshaling helpers. In particular, these are functions that would allow > redctl to begin

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Wei Liu
On Wed, Apr 22, 2020 at 06:33:38PM +0200, Roger Pau Monné wrote: > On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau Monne wrote: > > @@ -254,3 +257,14 @@ unsigned int flush_area_local(const void *va, unsigned > > int flags) > > > > return flags; > > } > > + > > +void

Re: [PATCH 2/2] golang/xenlight: stop tracking generated files

2020-04-23 Thread Wei Liu
On Wed, Apr 22, 2020 at 08:25:26PM -0400, Nick Rosbrook wrote: > The generated go files were tracked temporarily while the initial > implementation of gengotypes.py was in progress. They can now be removed > and ignored by git and hg. > > While here, make sure generated files are removed by make

Re: [PATCH 1/2] tools: build golang tools if go compiler is present

2020-04-23 Thread Wei Liu
On Wed, Apr 22, 2020 at 08:25:25PM -0400, Nick Rosbrook wrote: > By default, if the go compiler is found by the configure script, build > the golang tools. If the compiler is not found, and > --enable-golang_tools was not explicitly set, do not build to the golang --enable-golang-tools here. >

Re: [PATCH 4/4] golang/xenlight: add DeviceUsbdevAdd/Remove wrappers

2020-04-23 Thread George Dunlap
> On Apr 12, 2020, at 11:02 PM, Nick Rosbrook wrote: > > Add DeviceUsbdevAdd and DeviceUsbdevRemove as wrappers for > libxl_device_usbdev_add and libxl_device_usbdev_remove. > > Signed-off-by: Nick Rosbrook Reviewed-by: George Dunlap

Re: [PATCH 3/4] golang/xenlight: add DevicePciAdd/Remove wrappers

2020-04-23 Thread George Dunlap
> On Apr 12, 2020, at 11:02 PM, Nick Rosbrook wrote: > > Add DevicePciAdd and DevicePciRemove as wrappers for > libxl_device_pci_add and libxl_device_pci remove. > > Signed-off-by: Nick Rosbrook For 4.14, we should really look at adding functions to the IDL so that all this can be

Re: [PATCH 1/4] golang/xenlight: add NameToDomid and DomidToName util functions

2020-04-23 Thread George Dunlap
> On Apr 22, 2020, at 8:46 PM, Nick Rosbrook wrote: > >> libxl.h defines INVALID_DOMID — do we want to define an exported constant >> with the same name and use that here? (Although part of me wonders if >> DOMID_INVALID would be a better option.) > > Yeah, that makes sense. I'll add that.

[xen-unstable test] 149741: tolerable trouble: fail/pass/starved - PUSHED

2020-04-23 Thread osstest service owner
flight 149741 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149741/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail like 149705

[PATCH v2 6/6] x86/mem-paging: consistently use gfn_t

2020-04-23 Thread Jan Beulich
Where gprintk()s get touched anyway to switch to PRI_gfn, also switch to %pd for the domain logged. Signed-off-by: Jan Beulich --- v2: Use gfn_t for local var in mod_l1_entry(). Use PRI_gfn when printk() arg is gfn_x(). Re-base. --- a/xen/arch/x86/hvm/dm.c +++ b/xen/arch/x86/hvm/dm.c @@

[PATCH v2 5/6] x86/mem-paging: move code to its dedicated source file

2020-04-23 Thread Jan Beulich
Do a little bit of style adjustment along the way, and drop the "p2m_mem_paging_" prefixes from the now static functions. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/mem_paging.c +++ b/xen/arch/x86/mm/mem_paging.c @@ -25,6 +25,421 @@ #include #include +#include "mm-locks.h" + +/* + *

[PATCH v2 4/6] x86/mem-paging: add minimal lock order enforcement to p2m_mem_paging_prep()

2020-04-23 Thread Jan Beulich
While full checking is impossible (as the lock is being acquired/ released down the call tree), perform at least a lock level check. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1813,6 +1813,7 @@ int p2m_mem_paging_prep(struct domain *d

[PATCH v2 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep

2020-04-23 Thread Jan Beulich
While it should have been this way from the beginning, not doing so will become an actual problem with PVH Dom0. The interface change is binary compatible, but requires tools side producers to be re-built. Drop the bogus/unnecessary page alignment restriction on the input buffer at the same time.

[PATCH v2 2/6] x86/mem-paging: correct p2m_mem_paging_prep()'s error handling

2020-04-23 Thread Jan Beulich
Communicating errors from p2m_set_entry() to the caller is not enough: Neither the M2P nor the stats updates should occur in such a case. Instead the allocated page needs to be freed again; for cleanliness reasons also properly take into account _PGC_allocated there. Signed-off-by: Jan Beulich

[PATCH v2 1/6] x86/mem-paging: fold p2m_mem_paging_prep()'s main if()-s

2020-04-23 Thread Jan Beulich
The condition of the second can be true only if the condition of the first was met; the second half of the condition of the second then also is redundant with an earlier check. Combine them, drop a pointless local variable, and re-flow the affected gdprintk(). Signed-off-by: Jan Beulich ---

[PATCH v2 0/6] x86/mem-paging: misc cleanup

2020-04-23 Thread Jan Beulich
Repeatedly looking at varying parts of this code has lead to me accumulating a few adjustments. 1: fold p2m_mem_paging_prep()'s main if()-s 2: correct p2m_mem_paging_prep()'s error handling 3: use guest handle for XENMEM_paging_op_prep 4: add minimal lock order enforcement to

Re: [[PATCH v3]] xen/guest_access: Harden *copy_to_guest_offset() to prevent const dest operand

2020-04-23 Thread Julien Grall
On 23/04/2020 09:16, Jan Beulich wrote: On 23.04.2020 10:10, Julien Grall wrote: Hi, On 23/04/2020 08:38, Jan Beulich wrote: On 17.04.2020 19:16, Julien Grall wrote: On 16/04/2020 13:19, Jan Beulich wrote: On 16.04.2020 13:24, Julien Grall wrote: From: Julien Grall At the moment,

Re: [[PATCH v3]] xen/guest_access: Harden *copy_to_guest_offset() to prevent const dest operand

2020-04-23 Thread Jan Beulich
On 23.04.2020 10:10, Julien Grall wrote: > Hi, > > On 23/04/2020 08:38, Jan Beulich wrote: >> On 17.04.2020 19:16, Julien Grall wrote: >>> On 16/04/2020 13:19, Jan Beulich wrote: On 16.04.2020 13:24, Julien Grall wrote: > From: Julien Grall > > At the moment,

Re: [[PATCH v3]] xen/guest_access: Harden *copy_to_guest_offset() to prevent const dest operand

2020-04-23 Thread Julien Grall
Hi, On 23/04/2020 08:38, Jan Beulich wrote: On 17.04.2020 19:16, Julien Grall wrote: On 16/04/2020 13:19, Jan Beulich wrote: On 16.04.2020 13:24, Julien Grall wrote: From: Julien Grall At the moment, *copy_to_guest_offset() will allow the hypervisor to copy data to guest handle marked

[libvirt test] 149746: regressions - FAIL

2020-04-23 Thread osstest service owner
flight 149746 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/149746/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 146182 build-i386-libvirt

Re: [PATCH v10 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-23 Thread Jan Beulich
On 22.04.2020 18:33, Roger Pau Monné wrote: > On Thu, Apr 16, 2020 at 03:59:07PM +0200, Roger Pau Monne wrote: >> @@ -254,3 +257,14 @@ unsigned int flush_area_local(const void *va, unsigned >> int flags) >> >> return flags; >> } >> + >> +void guest_flush_tlb_mask(const struct domain *d,

Re: [[PATCH v3]] xen/guest_access: Harden *copy_to_guest_offset() to prevent const dest operand

2020-04-23 Thread Jan Beulich
On 17.04.2020 19:16, Julien Grall wrote: > On 16/04/2020 13:19, Jan Beulich wrote: >> On 16.04.2020 13:24, Julien Grall wrote: >>> From: Julien Grall >>> >>> At the moment, *copy_to_guest_offset() will allow the hypervisor to copy >>> data to guest handle marked const. >>> >>> Thankfully, no

[ovmf test] 149742: all pass - PUSHED

2020-04-23 Thread osstest service owner
flight 149742 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/149742/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 93f6df5f3b2553b8f5188d2a6ba70f3f5cfab0bb baseline version: ovmf

Re: [PATCH] xen/grants: fix hypercall continuation for GNTTABOP_cache_flush

2020-04-23 Thread Jan Beulich
On 22.04.2020 18:31, Stefano Stabellini wrote: > On Wed, 22 Apr 2020, Jan Beulich wrote: >> On 22.04.2020 15:07, Juergen Gross wrote: >>> --- a/xen/common/grant_table.c >>> +++ b/xen/common/grant_table.c >>> @@ -3626,12 +3626,12 @@ do_grant_table_op( >>> if (