Re: [Xen-devel] [PATCH 16/16] x86/monitor: fix: xc_monitor _write_ctrlreg w/o previous _enable must fail

2016-07-08 Thread Corneliu ZUZU
On 7/9/2016 7:23 AM, Corneliu ZUZU wrote: Enforce presence of a monitor vm-event subscriber when the toolstack user calls xc_monitor_write_ctrlreg() (XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG domctl). Without this change, "ASSERT(monitor_domain_initialised(v->domain));" @ hvm_set_cr0() and such woul

[Xen-devel] [PATCH 16/16] x86/monitor: fix: xc_monitor _write_ctrlreg w/o previous _enable must fail

2016-07-08 Thread Corneliu ZUZU
Enforce presence of a monitor vm-event subscriber when the toolstack user calls xc_monitor_write_ctrlreg() (XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG domctl). Without this change, "ASSERT(monitor_domain_initialised(v->domain));" @ hvm_set_cr0() and such would fail if the toolstack user calls xc_monito

[Xen-devel] [PATCH 15/16] x86/monitor: fix: don't compromise a monitor_write_data with pending CR writes

2016-07-08 Thread Corneliu ZUZU
The arch_vm_event.monitor structure is dynamically allocated and freed e.g. when the toolstack user calls xc_monitor_disable(), which in turn effectively discards any information that was in arch_vm_event.monitor->write_data. But this can yield unexpected behavior since if a CR-write was awaiting

[Xen-devel] [PATCH 14/16] x86/monitor: clarify separation between monitor subsys and vm-event as a whole

2016-07-08 Thread Corneliu ZUZU
Move fields in arch_vm_event in a structure called arch_vm_event_monitor and refactor arch_vm_event to only hold a pointer to an instance of the aforementioned. Done for a number of reasons: * to make the separation of monitor resources from other vm-event resources clearly visible * to be abl

[Xen-devel] [PATCH 13/16] x86/monitor: introduce writes_pending field in monitor_write_data

2016-07-08 Thread Corneliu ZUZU
Introduce writes_pending field in monitor_write_data structure to slightly optimize code @ monitor_write_data(): avoid having to check each bit when -all- bits are zero (which is likely). Signed-off-by: Corneliu ZUZU --- xen/arch/x86/monitor.c | 3 +++ xen/include/asm-x86/domain.h | 17 ++

[Xen-devel] [PATCH 12/16] x86/vm-event: fix: move cleanup of mem_access_emulate_each_rep to monitor stub

2016-07-08 Thread Corneliu ZUZU
Move cleanup of mem_access_emulate_each_rep to monitor_cleanup_domain() as the field is part of the monitor subsystem's resources. Signed-off-by: Corneliu ZUZU --- xen/arch/x86/monitor.c | 3 +++ xen/arch/x86/vm_event.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/

[Xen-devel] [PATCH 11/16] x86/monitor: fix: treat -monitor- properly, as a subsys of the vm-event subsys

2016-07-08 Thread Corneliu ZUZU
As it can be seen looking @ the vm_event_per_domain structure, there are 3 defined vm-event subsystems: share, paging and monitor. In a number of places in the codebase, the monitor vm-events subsystem is mistakenly confounded with the vm-event subsystem as a whole: i.e. it is wrongfully checked if

[Xen-devel] [PATCH 10/16] x86/vm-event: centralize vcpu-destroy cleanup in vm-events code

2016-07-08 Thread Corneliu ZUZU
Move vm-event cleanup sequence on vcpu destroyal to vm_event.h along with the other vm-event functions. Signed-off-by: Corneliu ZUZU --- xen/arch/x86/domain.c | 4 ++-- xen/arch/x86/vm_event.c| 5 + xen/include/asm-x86/vm_event.h | 10 ++ 3 files changed, 13 insert

[Xen-devel] [PATCH 09/16] arm/monitor: move d->monitor cleanup to monitor_cleanup_domain()

2016-07-08 Thread Corneliu ZUZU
d->monitor is a monitor subsystem resource, clean it up in the proper stub. Signed-off-by: Corneliu ZUZU --- xen/include/asm-arm/monitor.h | 2 +- xen/include/asm-arm/vm_event.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/include/asm-arm/monitor.h b/xen/include/asm

[Xen-devel] [PATCH 08/16] x86/vm-event: call monitor init & cleanup funcs from respective vm_event funcs

2016-07-08 Thread Corneliu ZUZU
For clarity: do init/cleanup of the vm-events subsystems (e.g. functions monitor_init,cleanup_domain()) from the vm-event_init,cleanup_domain() functions. Done by passing-on the ved param from vm_event_enable,disable() functions down to the vm_event_init,cleanup_domain() functions. This makes it ea

[Xen-devel] [PATCH 07/16] x86/vm-event: fix: call cleanup when init fails, to free partial allocs

2016-07-08 Thread Corneliu ZUZU
From vm_event_init_domain(d), call vm_event_cleanup_domain(d) if per-vcpu allocations failed -at some point- to cleanup partial allocations, if any were done along the way. Also minor adjustments: add unlikely in if's and add some comments. Signed-off-by: Corneliu ZUZU --- xen/arch/x86/vm_even

[Xen-devel] [PATCH 06/16] x86/monitor: fix: set msr_bitmap to NULL after xfree

2016-07-08 Thread Corneliu ZUZU
Fix: set d->arch.monitor.msr_bitmap to NULL after xfree, as the equivalence of it being NULL and xfreed is repeatedly presumed in the codebase. Along with this change, also properly reposition an 'if' targeting the aforementioned msr_bitmap when it is allocated and add likely/unlikely accordingly.

[Xen-devel] [PATCH 05/16] x86/monitor: relocate code more appropriately

2016-07-08 Thread Corneliu ZUZU
For readability: * Add function monitor_ctrlreg_write_data() (in x86/monitor.c) and separate handling of monitor_write_data there (previously done directly in hvm_do_resume()). * Separate enabling/disabling of CPU_BASED_CR3_LOAD_EXITING for CR3 monitor vm-events from CR0 node @ vmx_update_guest_c

[Xen-devel] [PATCH 04/16] x86/monitor: relocate vm_event_register_write_resume() function to monitor code

2016-07-08 Thread Corneliu ZUZU
vm_event_register_write_resume is part of the monitor subsystem, relocate and rename appropriately. Signed-off-by: Corneliu ZUZU --- xen/arch/x86/monitor.c | 38 ++ xen/arch/x86/vm_event.c| 37 - xen/common/v

[Xen-devel] [PATCH 03/16] x86/monitor: mechanical renames

2016-07-08 Thread Corneliu ZUZU
Arch-specific vm-event functions in x86/vm_event.h -e.g. vm_event_init_domain()- don't have an 'arch_' prefix. Apply the same rule for monitor functions - originally the only two monitor functions that had an 'arch_' prefix were arch_monitor_domctl_event() and arch_monitor_domctl_op(), but I gave t

[Xen-devel] [PATCH 02/16] x86: fix: make atomic_read() param const

2016-07-08 Thread Corneliu ZUZU
This wouldn't let me make a param of a function that used atomic_read() const. Signed-off-by: Corneliu ZUZU --- xen/include/asm-x86/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h index d246b70..0b250c8

[Xen-devel] [PATCH 01/16] x86/vmx_update_guest_cr: minor optimization

2016-07-08 Thread Corneliu ZUZU
Minor optimization @ vmx_update_guest_cr: checks if v->arch.hvm_vmx.exec_control was modified before actually calling vmx_update_cpu_exec_control(v). Signed-off-by: Corneliu ZUZU --- xen/arch/x86/hvm/vmx/vmx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/h

[Xen-devel] [PATCH 00/16] x86/vm-event: numerous adjustments & fixes

2016-07-08 Thread Corneliu ZUZU
Adjustments & fixes to the vm-events code, mostly monitor-related. As I hadn't got the time/proper context to test these changes on a real machine, for now please consider them only for review, I'll let you know when and how actual testing went. Thanks, Corneliu ZUZU (16): x86/vmx_update_guest_

[Xen-devel] [ovmf test] 96803: regressions - FAIL

2016-07-08 Thread osstest service owner
flight 96803 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/96803/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 17 guest-start/debianhvm.repeat fail REGR. vs. 94748 test-amd64-amd64-

Re: [Xen-devel] [PATCH] xen-kbdfront: correct return value checks on xenbus_scanf()

2016-07-08 Thread Dmitry Torokhov
On Thu, Jul 07, 2016 at 01:53:40AM -0600, Jan Beulich wrote: > Only a positive return value indicates success. If I am reading this correctly xenbus_scanf() guarantees that it will not return 0. From include/xen/xenbus.h: /* Single read and scanf: returns -errno or num scanned if > 0. */ __scanf(

[Xen-devel] [seabios baseline-only test] 66547: tolerable FAIL

2016-07-08 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 66547 seabios real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66547/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-stop

[Xen-devel] [xen-unstable test] 96795: regressions - FAIL

2016-07-08 Thread osstest service owner
flight 96795 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/96795/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-cubietruck 16 guest-start.2 fail REGR. vs. 96779 test-armhf-armhf-lib

[Xen-devel] [xen-unstable baseline-only test] 66545: tolerable FAIL

2016-07-08 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 66545 xen-unstable real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66545/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-i386-rumpuserxen6 xen-build

[Xen-devel] [qemu-mainline test] 96791: tolerable FAIL - PUSHED

2016-07-08 Thread osstest service owner
flight 96791 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/96791/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-rtds 9 debian-install fail blocked in 96732 test-amd64-amd64-xl-qemuu-wi

Re: [Xen-devel] [PATCH v6 03/14] xen: Use a typesafe to define INVALID_MFN

2016-07-08 Thread Elena Ufimtseva
On Fri, Jul 08, 2016 at 08:20:03PM +0100, Andrew Cooper wrote: > On 08/07/2016 23:01, Elena Ufimtseva wrote: > > > >>> @@ -838,7 +838,6 @@ mfn_t oos_snapshot_lookup(struct domain *d, mfn_t > >>> gmfn) > >>> > >>> SHADOW_ERROR("gmfn %lx was OOS but not in hash table\n", > >>> mfn_x(gmfn)); >

[Xen-devel] [ovmf test] 96787: regressions - FAIL

2016-07-08 Thread osstest service owner
flight 96787 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/96787/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 17 guest-start/debianhvm.repeat fail REGR. vs. 94748 test-amd64-amd64-

Re: [Xen-devel] [PATCH v6 03/14] xen: Use a typesafe to define INVALID_MFN

2016-07-08 Thread Julien Grall
Hi Elena, On 08/07/2016 23:01, Elena Ufimtseva wrote: On Wed, Jul 06, 2016 at 02:04:17PM +0100, Julien Grall wrote: @@ -3968,7 +3967,7 @@ void shadow_audit_tables(struct vcpu *v) } } -hash_vcpu_foreach(v, mask, callbacks, _mfn(INVALID_MFN)); +hash_vcpu_foreach(v, mask, ca

Re: [Xen-devel] [PATCH v6 03/14] xen: Use a typesafe to define INVALID_MFN

2016-07-08 Thread Andrew Cooper
On 08/07/2016 23:01, Elena Ufimtseva wrote: > >>> @@ -838,7 +838,6 @@ mfn_t oos_snapshot_lookup(struct domain *d, mfn_t gmfn) >>> >>> SHADOW_ERROR("gmfn %lx was OOS but not in hash table\n", mfn_x(gmfn)); >>> BUG(); >>> -return _mfn(INVALID_MFN); > Can compiler be unhappy about this?

Re: [Xen-devel] [PATCH v6 04/14] xen: Use a typesafe to define INVALID_GFN

2016-07-08 Thread Elena Ufimtseva
On Wed, Jul 06, 2016 at 02:05:24PM +0100, Julien Grall wrote: > (CC Elena) > Thanks Julien! > On 06/07/16 14:01, Julien Grall wrote: > >Also take the opportunity to convert arch/x86/debug.c to the typesafe gfn. > > > >Signed-off-by: Julien Grall > >Reviewed-by: Andrew Cooper > >Acked-by: Stefan

Re: [Xen-devel] [PATCH v6 03/14] xen: Use a typesafe to define INVALID_MFN

2016-07-08 Thread Elena Ufimtseva
On Wed, Jul 06, 2016 at 02:04:17PM +0100, Julien Grall wrote: > (CC Elena). > > On 06/07/16 14:01, Julien Grall wrote: > >Also take the opportunity to convert arch/x86/debug.c to the typesafe > >mfn and use proper printf format for MFN/GFN when the code around is > >modified. > > > >Signed-off-by:

[Xen-devel] [OSSTEST PATCH 07/33] invoke-daemon: Honour OSSTEST_DAEMON_TCLSH

2016-07-08 Thread Ian Jackson
It appears that tcl8.5 in wheezy has a serious bug which makes `after idle' not always work. tcl8.4 has been working well in wheezy but is not in jessie, where tcl8.5 works (and tcl8.6 has a serious event loop bug - Debian #826741). So we need to use different versions of Tcl on different hosts.

[Xen-devel] [OSSTEST PATCH 02/33] mg-allocate: Do not treat already-allocated resources as satisfactory

2016-07-08 Thread Ian Jackson
This was always rather odd for ./mg-allocate HOSTNAME but makes the more sophisticated uses like ./mg-allocate '{FLAG,FLAG,...}' very much less useful. Signed-off-by: Ian Jackson --- mg-allocate | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mg-allocate b/mg-allocate index

[Xen-devel] [OSSTEST PATCH 13/33] Database locking: Tcl: Use db-execute

2016-07-08 Thread Ian Jackson
Replace open-coded uses of pg_execute dbh STMT with jobdb::db-execute STMT. The only functional change is that if OSSTEST_TCL_JOBDB_DEBUG is set, there will be debugging output. But we are going to want to make db-execute do something more complicated involving pg_exec. Signed-off-by: Ian Jackso

[Xen-devel] [OSSTEST PATCH 18/33] ms-ownerdaemon: Break out db-reopen, and move it to JobDB-Executive

2016-07-08 Thread Ian Jackson
Also, change the `puts' to a `logputs'. No other functional change. Signed-off-by: Ian Jackson --- ms-ownerdaemon | 4 +--- tcl/JobDB-Executive.tcl | 6 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ms-ownerdaemon b/ms-ownerdaemon index 62ca645..31e6fdd 100755 -

[Xen-devel] [OSSTEST PATCH 19/33] tcl daemons: Move BEGIN within scope of transaction error trapping

2016-07-08 Thread Ian Jackson
If the db connection has failed, BEGIN will fail. We want to to handle this properly. Right now the effect is that we will now close the connection and it will then be reopened by the next command. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 2 +- 1 file changed, 1 insertion(+), 1

[Xen-devel] [OSSTEST PATCH 22/33] tcl daemons: Break out db-ensure-open and db-ensure-closed

2016-07-08 Thread Ian Jackson
To be able to deliberately reconnect to the database, in case of error, we need functions which actually work with dbh, rather than simply the refcount. No functional change as yet. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 18 -- 1 file changed, 12 insertions(+),

[Xen-devel] [OSSTEST PATCH 12/33] Database locking: Tcl: Use db-execute-array

2016-07-08 Thread Ian Jackson
Replace open-coded uses of pg_execute -array ARRAYVAR dbh STMT with jobdb::db-execute-array ARRAYVAR STMT. The only functional change is that if OSSTEST_TCL_JOBDB_DEBUG is set, there will be debugging output. But we are going to want to make db-execute-array do something more complicated involvin

[Xen-devel] [OSSTEST PATCH 27/33] tcl daemons: transaction: Properly match db-open and db-close

2016-07-08 Thread Ian Jackson
* Do the db-open inside the catch, so that if it fails we do the rest of the error handling. * Do the db-close before deconstructing the error, so that we necessarily get the db-open reference count right. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 4 ++-- 1 file changed, 2 in

[Xen-devel] [OSSTEST PATCH 24/33] tcl daemons: make db-reopen actually work

2016-07-08 Thread Ian Jackson
Even if the refcount is >0, we want to actually reconnect. Also, log something if the close fails. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 1763b69..6c

[Xen-devel] [OSSTEST PATCH 05/33] mg-schema-test-database: Make `daemons' be cleverer

2016-07-08 Thread Ian Jackson
Now you can tell it which daemons to run. This is helpful if you want to run them separately. Signed-off-by: Ian Jackson --- mg-schema-test-database | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/mg-schema-test-database b/mg-schema-test

[Xen-devel] [OSSTEST PATCH 03/33] mg-schema-test-database: Direct logs to local directory

2016-07-08 Thread Ian Jackson
Do not pollute a shared log area with logs of flights whose numbers are valid only in the context of our test database. Signed-off-by: Ian Jackson CC: Wei Liu --- mg-schema-test-database | 8 1 file changed, 8 insertions(+) diff --git a/mg-schema-test-database b/mg-schema-test-databas

[Xen-devel] [OSSTEST PATCH 08/33] Tcl: Use tclsh8.5

2016-07-08 Thread Ian Jackson
I have checked that tclsh8.5 and TclX work on osstest.test-lab (and also osstest.xs.citrite.net). TclX seems to be provided by tcl8.4 but work with tcl8.5 (at least on wheezy and jessie). Deployment note: hosts running Debian wheezy (including osstest.xs.citrite.net, the Citrix Cambridge instance

[Xen-devel] [OSSTEST PATCH 21/33] tcl daemons: Remove obsolete `global g'

2016-07-08 Thread Ian Jackson
The global g was removed in 2012 in beb4240a346e "wip reorg, testing..." but this instance seems to have escaped. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index c1e5c63..3ad3693 100

[Xen-devel] [OSSTEST PATCH 17/33] ms-ownerdaemon: Cope with db restart. Retry recording dead tasks.

2016-07-08 Thread Ian Jackson
In chan-destroy-stuff, instead of accessing the db directly, add the dead task(s) to a queue, and arrange to look at that queue. Errors are handled by setting an `after' handler which we cancel if we are successful. The after handler requeues a queue run attempt as the first thing (which will arr

[Xen-devel] [OSSTEST PATCH 06/33] mg-schema-test-database: Change default minflight to -100

2016-07-08 Thread Ian Jackson
It is tiresome to try to create a test db for playing with and have to wait for a big copy. Better to create a small one by default; if the user has forgotten to specify a minflight, they can always drop it and run it again. Signed-off-by: Ian Jackson --- mg-schema-test-database | 2 +- 1 file

[Xen-devel] [OSSTEST PATCH 30/33] tcl daemons: transaction: Support db autoreconnect

2016-07-08 Thread Ian Jackson
Provide an `autoreconnect' argument which will automatically reconnect to the db if the connection has been lost. It will make only one reconnection attempt. No functional change yet because no call sites have been changed. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 16 ++

[Xen-devel] [OSSTEST PATCH 15/33] Database locking: Tcl: for errorCode, use pg_exec, not pg_execute

2016-07-08 Thread Ian Jackson
We would like to be able to retry db transactions. To do this we need to know why they failed (if they did). But pg_execute does not set errorCode. (This is clearly a bug.) And since it immediately discards a failed statement, any error information has been lost by the time pg_execute returns.

[Xen-devel] [OSSTEST PATCH 29/33] tcl daemons: transaction: Only try ROLLBACK when necessary

2016-07-08 Thread Ian Jackson
In the deadlock case, we need to ROLLBACK. In other error cases we are going to close the connection. And in those other cases the ROLLBACK might fail, causing our error recovery to go wrong. So do ROLLBACK only on the single path where we might continue to use the connection. Signed-off-by: Ia

[Xen-devel] [OSSTEST PATCH 32/33] tcl daemons: Provide with-db

2016-07-08 Thread Ian Jackson
This makes it easier to get the matching of db-open and db-close right. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 16 1 file changed, 16 insertions(+) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 0fc0a6d..07a0438 100644 --- a/tcl/JobDB-Exe

[Xen-devel] [OSSTEST PATCH 33/33] tcl daemons: Use with-db

2016-07-08 Thread Ian Jackson
Fixes a number of latent bugs where the jobdb refcount might get out of step. Signed-off-by: Ian Jackson --- sg-execute-flight | 82 ++--- tcl/JobDB-Executive.tcl | 106 2 files changed, 93 insertions(+), 95

[Xen-devel] [OSSTEST PATCH 10/33] ms-planner: Support ClientNotes

2016-07-08 Thread Ian Jackson
No users yet. Signed-off-by: Ian Jackson CC: Wei Liu --- README.planner | 22 ++ ms-planner | 23 +++ 2 files changed, 45 insertions(+) diff --git a/README.planner b/README.planner index daccef5..80c2506 100644 --- a/README.planner +++ b/README.plann

[Xen-devel] [OSSTEST PATCH 31/33] tcl-daemons: ms-ownerdaemon: Use autoreconnect

2016-07-08 Thread Ian Jackson
When creating a job, we ask jobdb::transaction to retry on failure. This makes the error handling more effective. Signed-off-by: Ian Jackson --- ms-ownerdaemon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms-ownerdaemon b/ms-ownerdaemon index 31e6fdd..bf0b595 100755 --- a/

[Xen-devel] [OSSTEST PATCH 00/33] Database locking and retry

2016-07-08 Thread Ian Jackson
I've just pushed this to production pretest, since I'm not really expecting anyone else to review it. But it ought to have some visibility, I guess. This series contains: * Overhaul of database locking in Tcl daemons to improve concurrency and correctness * Overhaul of database error handlin

[Xen-devel] [OSSTEST PATCH 23/33] tcl daemons: db-ensure-open, -close: Make idempotent

2016-07-08 Thread Ian Jackson
Track whether we think the connection is open in dbopen. It is now therefore OK to call db-ensure-open and db-ensure-closed in other contexts. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tcl/JobDB-Executive.tcl b/tcl/Job

[Xen-devel] [OSSTEST PATCH 04/33] mg-schema-test-database: Prepare for `daemons' to be cleverer

2016-07-08 Thread Ian Jackson
We are going to want to be able to specify daemons individually. Replace the call to parse_only_suffix so that we have somewhere to parse extra arguments. No functional change yet. Signed-off-by: Ian Jackson --- mg-schema-test-database | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-

[Xen-devel] [OSSTEST PATCH 28/33] tcl daemons: if error occurs, ensure db is closed afterwards

2016-07-08 Thread Ian Jackson
When an error occurs which we are not handling, we want to unconditionally close the db connection. The next transaction will reopen it. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl i

[Xen-devel] [OSSTEST PATCH 20/33] tcl daemons: jobdb::transaction: Improve two message generation sites

2016-07-08 Thread Ian Jackson
* Use logputs rather than puts to report transaction deadlock retry * Use $ei and $ec rather than $errorInfo and $errorCode when calling error due to too many deadlock retries. This has no functional change but is less fragile in case of future addition of new calls to catch between the mai

[Xen-devel] [OSSTEST PATCH 01/33] mg-allocate: Fix "issteallable" call

2016-07-08 Thread Ian Jackson
81cac5a1656e "mg-allocate: Support --steal" introduced an erroneous call to the subref $issteallable, using { } instead of ( ), producing this error: Not a HASH reference at ./mg-allocate line 225. Signed-off-by: Ian Jackson --- mg-allocate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Xen-devel] [OSSTEST PATCH 25/33] tcl daemons: More info in db--exec-check error

2016-07-08 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 6c7e067..8f4ed98 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -170,7 +170,7 @@ proc db--exec-

[Xen-devel] [OSSTEST PATCH 26/33] tcl daemons: Recognise `SSL SYSCALL' errors with their own errorCode

2016-07-08 Thread Ian Jackson
This has no real effect right now but will be useful in a moment. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 8f4ed98..3c2b4db 100644 --- a/tcl/JobDB-Exe

[Xen-devel] [OSSTEST PATCH 16/33] Database locking: Tcl: Retry only on DEADLOCK DETECTED

2016-07-08 Thread Ian Jackson
Use the new errorCode coming out of db-execute* to tell when the error is that we got a database deadlock, which is the situation in which we should retry. This involves combining the two catch blocks, so that there is only one error handling strategy. Previously errors on COMMIT would be retried

[Xen-devel] [OSSTEST PATCH 11/33] Tcl database debugging: Actually work

2016-07-08 Thread Ian Jackson
Setting OSSTEST_TCL_JOBDB_DEBUG was ineffective (ever since it was introduced in 44dad3d8) because `env' wasn't imported from the global scope. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tcl/JobDB-Executive.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tcl/JobDB-Executive.t

[Xen-devel] [OSSTEST PATCH 09/33] ms-flights-summary: Remove spurious \ in keys \%{ something }

2016-07-08 Thread Ian Jackson
With some versions of Perl this generates a warning which causes ms-flights-summary to fail. Signed-off-by: Ian Jackson CC: Wei Liu --- ms-flights-summary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms-flights-summary b/ms-flights-summary index ea72088..c703d81 100755 --

[Xen-devel] [OSSTEST PATCH 14/33] Database locking: Tcl: Always use db-execute-array for SELECT

2016-07-08 Thread Ian Jackson
We are going to make it wrong to use db-execute for SELECT statements. Convert the two existing violation sites (providing a dummy arrayvar). Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- sg-execute-flight | 2 +- tcl/JobDB-Executive.tcl | 2 +- 2 files changed, 2 insertions(+),

[Xen-devel] [qemu-mainline baseline-only test] 66546: tolerable FAIL

2016-07-08 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 66546 qemu-mainline real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66546/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-qemuu-nested-intel 16 debian-hvm-insta

Re: [Xen-devel] [PATCH v3 2/8] x86/vm-event/monitor: relocate code-motion more appropriately

2016-07-08 Thread Corneliu ZUZU
On 7/8/2016 6:50 PM, Tamas K Lengyel wrote: diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c index 205df41..42f31bf 100644 --- a/xen/arch/x86/monitor.c +++ b/xen/arch/x86/monitor.c [snip] So with this code-portion appropriately being relocated here I think we should also rename..

Re: [Xen-devel] [PATCH v2 0/4] libxl: add framework for device types

2016-07-08 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2 0/4] libxl: add framework for device types"): > Instead of duplicate coding for each device type (vtpms, usbctrls, ...) > especially on domain creation introduce a framework for that purpose. > > I especially found it annoying that e.g. the vtpm callback issued the

Re: [Xen-devel] [PATCH v2 4/4] libxl: move DEFINE_DEVICE* macros to libxl_internal.h

2016-07-08 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2 4/4] libxl: move DEFINE_DEVICE* macros to libxl_internal.h"): > In order to be able to have all functions related to a device type in > a single source file move the macros used to generate device type > specific functions to libxl_internal.h. Rename the macros as

Re: [Xen-devel] [PATCH v2 3/4] libxl: refactor domcreate_attach_dtdev() to use device type framework

2016-07-08 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2 3/4] libxl: refactor domcreate_attach_dtdev() to use device type framework"): > Signed-off-by: Juergen Gross Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 1/4] libxl: add framework for device types

2016-07-08 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2 1/4] libxl: add framework for device types"): > Instead of duplicate coding for each device type (vtpms, usbctrls, ...) > especially on domain creation introduce a framework for that purpose. Acked-by: Ian Jackson How very pleasing to see so much code being delet

Re: [Xen-devel] [PATCH v2 2/4] libxl: refactor domcreate_attach_pci() to use device type framework

2016-07-08 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2 2/4] libxl: refactor domcreate_attach_pci() to use device type framework"): > Signed-off-by: Juergen Gross Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 5/5] libxl: only issue cpu-add call to QEMU for not present CPU

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 5/5] libxl: only issue cpu-add call to QEMU for not present CPU"): > Calculate the final bitmap for CPUs to add to avoid having annoying > error messages complaining those CPUs are already present. Can this be expanded a bit ? I think perhaps it would benefit from "Whe

Re: [Xen-devel] [PATCH v3 3/5] libxl: introduce libxl__qmp_query_cpus

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 3/5] libxl: introduce libxl__qmp_query_cpus"): > It interrogates QEMU for CPUs and update the bitmap accordingly. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 4/5] libxl: update vcpus bitmap in retrieved guest config

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 4/5] libxl: update vcpus bitmap in retrieved guest config"): > ... because the available vcpu bitmap can change during domain life time > due to cpu hotplug and unplug. > > For QEMU upstream, we interrogate QEMU for the number of vcpus. For > others, we look directly in

Re: [Xen-devel] [PATCH v3 2/5] libxl: factor out libxl__get_device_modlel_version

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 2/5] libxl: factor out libxl__get_device_modlel_version"): Typo in subject line. > Factor out the logic to determine device model version to a function. It > will be used later. Note that code now also checks if the stbudom field > is actually set before trying to extr

Re: [Xen-devel] [PATCH] vmx/monitor: CPUID events

2016-07-08 Thread Andrew Cooper
On 08/07/16 17:59, Tamas K Lengyel wrote: > On Fri, Jul 8, 2016 at 10:49 AM, Andrew Cooper > wrote: >> On 08/07/16 16:44, Tamas K Lengyel wrote: >>> On Fri, Jul 8, 2016 at 3:33 AM, Andrew Cooper >>> wrote: On 08/07/16 03:31, Tamas K Lengyel wrote: > This patch implements sending notific

Re: [Xen-devel] [DRAFT 1] XenSock protocol design document

2016-07-08 Thread Stefano Stabellini
On Fri, 8 Jul 2016, David Vrabel wrote: > On 08/07/16 17:52, Stefano Stabellini wrote: > > > >> c) My belief that most of the advantages of this proposal can be > >> achieved with smarts in the backend. > > > > By backend do you mean netfront/netback? If so, I have already pointed > > out why tha

Re: [Xen-devel] [PATCH v3 1/5] libxl: libxl_domain_need_memory shouldn't modify b_info

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 1/5] libxl: libxl_domain_need_memory shouldn't modify b_info"): > This function is used to return the memory needed for a guest. It's not > in a position to modify the b_info passed in (note the _setdefault > function). > > Use a copy of b_info to do the calculation. De

Re: [Xen-devel] [PATCH 7/7] oxenstored: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Ian Jackson writes ("Re: [PATCH 7/7] oxenstored: honour XEN_RUN_DIR"): > Wei Liu writes ("[PATCH 7/7] oxenstored: honour XEN_RUN_DIR"): > > Move default the pid file under XEN_RUN_DIR. Note that it changes the > > location from /var/run to /var/run/xen. > > Acked-by: Ian Jackson Actually, should

Re: [Xen-devel] [PATCH 6/7] libxenstat: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 6/7] libxenstat: honour XEN_RUN_DIR"): > This is because libxl uses XEN_RUN_DIR to generate the socket path for > libxenstat while libxenstat itself uses hard-coded path, which is not > necessary in sync with libxl. This commit message is confusing (and perhaps ungrammatica

Re: [Xen-devel] [PATCH 7/7] oxenstored: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 7/7] oxenstored: honour XEN_RUN_DIR"): > Move default the pid file under XEN_RUN_DIR. Note that it changes the > location from /var/run to /var/run/xen. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org ht

Re: [Xen-devel] [PATCH 5/7] hotplug/Linux: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 5/7] hotplug/Linux: honour XEN_RUN_DIR"): > Store various PID files under XEN_RUN_DIR. Note that this change the > default location from /var/run to /var/run/xen. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.

Re: [Xen-devel] [PATCH 3/7] hotplug/FreeBSD: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 3/7] hotplug/FreeBSD: honour XEN_RUN_DIR"): > Store xldevd.pid under XEN_RUN_DIR. Note that the default location would > change from /var/run to /var/run/xen. > > Signed-off-by: Wei Liu I see Roger has acked this already. Acked-by: Ian Jackson Ian. ___

Re: [Xen-devel] [PATCH 4/7] hotplug/NetBSD: honour XEN_RUN_DIR

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 4/7] hotplug/NetBSD: honour XEN_RUN_DIR"): > Store xldevd.pid under XEN_RUN_DIR. Note that this will change the > default location from /var/run to /var/run/xen. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.x

Re: [Xen-devel] [PATCH 2/7] tools/helper: honour XEN_RUN_DIR in init-xenstore-domain.c

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 2/7] tools/helper: honour XEN_RUN_DIR in init-xenstore-domain.c"): > Place the PID file under XEN_RUN_DIR. Note that this change the default > location from /var/run to /var/run/xen. > > Generate a _paths.h as that is required to make this change work. ... > -init-xenstore

Re: [Xen-devel] [PATCH 0/7] Honour more configure variables in various places (iteration 3)

2016-07-08 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH 0/7] Honour more configure variables in various places (iteration 3)"): > Ian, ping? You didn't actually send that ping mail to me, just to the list :-). I'll look at the patches ... Thanks, Ian. ___ Xen-devel

Re: [Xen-devel] [PATCH v1 20/20] libxl/acpi: Build ACPI tables for HVMlite guests

2016-07-08 Thread Boris Ostrovsky
On 07/08/2016 12:07 PM, Wei Liu wrote: > On Fri, Jul 08, 2016 at 10:48:52AM -0400, Boris Ostrovsky wrote: >> On 07/08/2016 06:55 AM, Wei Liu wrote: + +/* Map page that will hold RSDP */ +extent = RSDP_ADDRESS >> ctxt.page_shift; +rc = populate_acpi_pages(dom, &extent

[Xen-devel] [xen-unstable-smoke test] 96794: tolerable all pass - PUSHED

2016-07-08 Thread osstest service owner
flight 96794 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/96794/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 12 migrate-support-checkfail never pass test-armhf-armhf-xl 12

Re: [Xen-devel] [DRAFT 1] XenSock protocol design document

2016-07-08 Thread David Vrabel
On 08/07/16 17:52, Stefano Stabellini wrote: > >> c) My belief that most of the advantages of this proposal can be >> achieved with smarts in the backend. > > By backend do you mean netfront/netback? If so, I have already pointed > out why that is not the case in previous emails as well as in thi

Re: [Xen-devel] [PATCH v3] xen/arm: enable clocks used by the hypervisor

2016-07-08 Thread Michael Turquette
Quoting Julien Grall (2016-07-08 02:34:43) > Hi Dirk, > > On 08/07/16 08:44, Dirk Behme wrote: > > Xen hypervisor drivers might replace native OS drivers. The result is > > that some important clocks that are enabled by the OS in the non-Xen > > case are not properly enabled in the presence of Xen

Re: [Xen-devel] [DRAFT 1] XenSock protocol design document

2016-07-08 Thread David Vrabel
On 08/07/16 12:23, Stefano Stabellini wrote: > > XenSocks provides the following benefits: > * guest networking works out of the box with VPNs, wireless networks and > any other complex configurations on the host Only in the trivial case where the host only has one external network. Otherwise,

Re: [Xen-devel] [PATCH 6/6] xenconsoled: handle --log-backups 0 in logfile_rollover

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 6/6] xenconsoled: handle --log-backups 0 in logfile_rollover"): > We now allow user to configure the number of backups to keep. We need to > handle when the number is set to 0. > > Check if number of backup is 0. If so, just unlink the file. Move the > rotation to `else' b

Re: [Xen-devel] [PATCH 5/6] xenconsoled: options to control log rotation

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 5/6] xenconsoled: options to control log rotation"): > Provide two options: one to control the maximum number of copies kept > and the other to control the maximum length of each log file. Ah, OK, good. However, as I said, I think this makes the rotation loop wrong because

Re: [Xen-devel] [PATCH 4/6] xenconsoled: delete two now unused functions

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 4/6] xenconsoled: delete two now unused functions"): > Signed-off-by: Wei Liu Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] vmx/monitor: CPUID events

2016-07-08 Thread Tamas K Lengyel
On Fri, Jul 8, 2016 at 10:49 AM, Andrew Cooper wrote: > On 08/07/16 16:44, Tamas K Lengyel wrote: >> On Fri, Jul 8, 2016 at 3:33 AM, Andrew Cooper >> wrote: >>> On 08/07/16 03:31, Tamas K Lengyel wrote: This patch implements sending notification to a monitor subscriber when an x86/vmx

Re: [Xen-devel] [PATCH 3/6] xenconsoled: switch guest log to use logfile abstraction

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 3/6] xenconsoled: switch guest log to use logfile abstraction"): > Note that this causes write_with_timestamp to have no caller. Mark > it as unused for now to minimise code churn. This is plausible, although I think I would have structured this series differently. (1. pr

Re: [Xen-devel] [PATCH v3] xen/arm: enable clocks used by the hypervisor

2016-07-08 Thread Michael Turquette
Quoting Julien Grall (2016-07-08 03:49:33) > > > On 08/07/16 11:40, Dirk Behme wrote: > > Hi Michael and Julien, > > > > On 08.07.2016 11:34, Julien Grall wrote: > >> Hi Dirk, > >> > >> On 08/07/16 08:44, Dirk Behme wrote: > >>> Xen hypervisor drivers might replace native OS drivers. The result i

Re: [Xen-devel] [PATCH 1/6] xenconsoled: introduce log file abstraction

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 1/6] xenconsoled: introduce log file abstraction"): > It will be used to handle hypervsior log and guest console log. Thanks. > diff --git a/tools/console/daemon/logfile.h b/tools/console/daemon/logfile.h > new file mode 100644 > index 000..87f3c51 ... > +#define LOGFI

Re: [Xen-devel] [PATCH 2/6] xenconsoled: switch hypervisor log to use logfile abstraction

2016-07-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 2/6] xenconsoled: switch hypervisor log to use logfile abstraction"): > To minimise code churn, copy and paste a some existing functions and > adapt them to write to logfile. The functions to deal with fd directly > will go away eventually. ... > +static int write_logfile(s

Re: [Xen-devel] [DRAFT 1] XenSock protocol design document

2016-07-08 Thread Stefano Stabellini
On Fri, 8 Jul 2016, David Vrabel wrote: > On 08/07/16 15:16, Stefano Stabellini wrote: > > > > http://pubs.opengroup.org/onlinepubs/7908799/xns/connect.html > > Are you really guaranteeing full POSIX semantics for all these calls? > And not say, POSIX-like except where Linux decides to differ bec

  1   2   3   >