Re: [Xen-devel] [PATCH RFC 00/39] x86/KVM: Xen HVM guest support

2019-04-09 Thread Ankur Arora
On 2019-04-08 5:35 p.m., Stefano Stabellini wrote: On Mon, 8 Apr 2019, Joao Martins wrote: On 4/8/19 11:42 AM, Juergen Gross wrote: On 08/04/2019 12:36, Joao Martins wrote: On 4/8/19 7:44 AM, Juergen Gross wrote: On 12/03/2019 18:14, Joao Martins wrote: On 2/22/19 4:59 PM, Paolo Bonzini

[Xen-devel] [linux-4.4 test] 134523: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134523 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134523/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-pvops

[Xen-devel] [xen-unstable-smoke test] 134592: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134592 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134592/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xsm 4

[Xen-devel] [qemu-upstream-4.11-testing test] 134504: trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134504 qemu-upstream-4.11-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/134504/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken

Re: [Xen-devel] [PATCH] x86/HVM: correctly deal with benign exceptions when combining two

2019-04-09 Thread Andrew Cooper
On 06/02/2019 10:54, Jan Beulich wrote: On 06.02.19 at 10:57, wrote: >> On 06/02/2019 07:40, Jan Beulich wrote: >>> Benign exceptions, no matter whether they're first or second, will never >>> cause #DF (a benign exception being second can basically only be #AC, as >>> in the XSA-156

[Xen-devel] [xen-unstable-smoke test] 134590: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134590 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134590/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xsm 4

[Xen-devel] [xen-unstable-smoke test] 134583: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134583 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134583/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xsm 4

[Xen-devel] [freebsd-master test] 134521: all pass - PUSHED

2019-04-09 Thread osstest service owner
flight 134521 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/134521/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd 58aa509054ac8eaea95e3741132f5f7c7aab7f96 baseline version: freebsd

[Xen-devel] [ovmf baseline-only test] 83915: trouble: blocked/broken

2019-04-09 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 83915 ovmf real [real] http://osstest.xensource.com/osstest/logs/83915/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm

[Xen-devel] [libvirt test] 134491: trouble: blocked/broken/pass

2019-04-09 Thread osstest service owner
flight 134491 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/134491/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-xsm

[Xen-devel] [PATCH] x86/msr: Fix fallout from mostly c/s 832c180

2019-04-09 Thread Andrew Cooper
The series 832c1803^..f61685a6 was committed without adequate review. * Fix the shim build by providing a !CONFIG_HVM declaration for hvm_get_guest_bndcfgs() * Revert the bogus de-const'ing of the vcpu pointer in vmx_get_guest_bndcfgs(). vmx_vmcs_enter() really does mutate the vcpu, and

Re: [Xen-devel] [PATCH v3 1/3] tools: remove tmem code and commands

2019-04-09 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 1/3] tools: remove tmem code and commands"): > Remove all tmem related code in libxc. Acked-by: Ian Jackson For the whole series, provided no objections are heard within the next week. If there are objections we should evaluate them and maybe invite the objector to

[Xen-devel] [PATCH v3 1/3] tools: remove tmem code and commands

2019-04-09 Thread Wei Liu
Remove all tmem related code in libxc. Leave some stubs in libxl in case anyone has linked to those functions before the removal. Remove all tmem related commands in xl, all tmem related code in other utilities we ship. Signed-off-by: Wei Liu Acked-by: Konrad Rzeszutek Wilk --- Rebase and fix

[Xen-devel] [PATCH v3 0/3] Remove tmem

2019-04-09 Thread Wei Liu
Fold in acks and some changes, and rebase to staging. Having got a chance to test build each commit because the tree is broken at the momemnt. Wei Liu (3): tools: remove tmem code and commands xen: remove tmem from hypervisor docs: remove tmem related text MAINTAINERS

[Xen-devel] [PATCH v3 3/3] docs: remove tmem related text

2019-04-09 Thread Wei Liu
Signed-off-by: Wei Liu Acked-by: Daniel De Graaf Acked-by: Konrad Rzeszutek Wilk --- v3: Rebase and fix up conflicts --- docs/man/xl.1.pod.in | 68 --- docs/man/xl.conf.5.pod| 9 +- docs/misc/tmem-internals.html | 789 --

[Xen-devel] [PATCH 8/9] libxl_disk: Use ev_qmp in libxl_cdrom_insert

2019-04-09 Thread Anthony PERARD
libxl_cdrom_insert is now asynchronous when QEMU is involve. And the cdrom is now openned by libxl before sending a file descriptor to QEMU. The "opaque" parametre of the "add-fd" can help to figure out what a fdset in QEMU is used for. It can be queried by "query-fdsets". Signed-off-by: Anthony

[Xen-devel] [PATCH 4/9] libxl_internal: Create new lock for devices hotplug via QMP

2019-04-09 Thread Anthony PERARD
The current lock `domain_userdata_lock' can't be used when modification to a guest is done by sending command to QEMU, this is a slow process and requires to call CTX_UNLOCK, which is not possible while holding the `domain_userdata_lock'. To resolve this issue, we create a new lock which can take

[Xen-devel] [PATCH 3/9] libxl_internal: Split out userdata lock function

2019-04-09 Thread Anthony PERARD
We are going to create a new lock and want to reuse the same machinery. Also, hide the detail of struct libxl__domain_userdata_lock as this is only useful as a pointer by the rest of libxl. No functional changes. Signed-off-by: Anthony PERARD --- tools/libxl/libxl_internal.c | 50

[Xen-devel] [PATCH 1/9] libxl_internal: Remove lost comment

2019-04-09 Thread Anthony PERARD
That comment as been separated from the function it defines by 4197d3abbb3055d3798254eb7ba239bfb5824360, but then was not useful anymore when the libxl__device_disk_add() prototype was removed by 22ea8ad02e465e32cd40887c750b55c3a997a288. Signed-off-by: Anthony PERARD ---

[Xen-devel] [PATCH 2/9] libxl: Pointer on usage of libxl__domain_userdata_lock

2019-04-09 Thread Anthony PERARD
It is currently difficult to know how/when/why the userdata lock is supposed to be used. Add some pointers to the hotplug comments. Signed-off-by: Anthony PERARD --- tools/libxl/libxl_internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/libxl/libxl_internal.h

[Xen-devel] [PATCH 7/9] libxl: Move qmp_parameters_* prototypes to libxl_internal.h

2019-04-09 Thread Anthony PERARD
.. and rename them to libxl__qmp_param_*. This is to allow other files than libxl_qmp.c to make QMP calls with parameters. Signed-off-by: Anthony PERARD --- tools/libxl/libxl_internal.h | 15 tools/libxl/libxl_qmp.c | 75 +--- 2 files changed, 51

[Xen-devel] [PATCH 9/9] libxl_disk: Implement missing timeout for libxl_cdrom_insert

2019-04-09 Thread Anthony PERARD
Since the previous patch "libxl_disk: Use ev_qmp in libxl_cdrom_insert", there are no kind of timeout anymore, add one back. Signed-off-by: Anthony PERARD --- tools/libxl/libxl_disk.c | 21 + 1 file changed, 21 insertions(+) diff --git a/tools/libxl/libxl_disk.c

[Xen-devel] [PATCH 0/9] libxl: New slow lock + fix libxl_cdrom_insert with QEMU depriv

2019-04-09 Thread Anthony PERARD
Hi, This patch series fix libxl_cdrom_insert to work with a depriviledge QEMU. For that, we need to use libxl__ev_qmp. For that, we need a new lock because userdata_lock can't be used anymore. Patch series available in this git branch:

[Xen-devel] [PATCH 6/9] libxl_disk: Cut libxl_cdrom_insert into steps ..

2019-04-09 Thread Anthony PERARD
.. and use a new "slow" lock. This patch cut libxl_cdrom_insert into different step/function but there are still called synchronously. A later patch will call them asynchronously when QMP is involved. The json_lock has been replaced by the qmp_lock for protection against concurrent changes to

[Xen-devel] [PATCH 5/9] libxl_disk: Reorganise libxl_cdrom_insert

2019-04-09 Thread Anthony PERARD
This is in preparation of cutting libxl_cdrom_insert into several functions to allow asynchronous callbacks. No functional changes. Signed-off-by: Anthony PERARD --- tools/libxl/libxl_disk.c | 58 ++-- 1 file changed, 32 insertions(+), 26 deletions(-) diff

[Xen-devel] [PATCH] xen-block: support feature-large-sector-size

2019-04-09 Thread Paul Durrant
A recent Xen commit [1] clarified the semantics of sector based quantities used in the blkif protocol such that it is now safe to create a xen-block device with a logical_block_size != 512, as long as the device only connects to a frontend advertizing 'feature-large-block-size'. This patch

[Xen-devel] [xen-unstable-smoke test] 134571: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134571 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134571/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xsm 4

Re: [Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Julien Grall
On 09/04/2019 16:17, Jan Beulich wrote: On 09.04.19 at 15:38, wrote: On 09/04/2019 14:01, Jan Beulich wrote: @@ -463,9 +463,14 @@ static void timer_softirq_action(void) if ( unlikely(ts->list != NULL) ) { /* old_limit == (2^n)-1; new_limit == (2^(n+4))-1 */ -

Re: [Xen-devel] status of non-live migration of HVM with libvirt

2019-04-09 Thread Olaf Hering
Anthony, looks like this fix missed qemu-4.0. What is your opinion on this fix? I think there was zero reply... Olaf On Mon, Jan 07, Olaf Hering wrote: > Am Fri, 4 Jan 2019 17:48:31 +0100 > schrieb Olaf Hering : > > > Am Fri, 4 Jan 2019 16:57:55 +0100 > > schrieb Olaf Hering : > > > > >

[Xen-devel] [qemu-upstream-4.10-testing test] 134509: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134509 qemu-upstream-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/134509/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-pvops

Re: [Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Alexandru Stefan ISAILA
On 09.04.2019 18:26, Tamas K Lengyel wrote: > On Tue, Apr 9, 2019 at 8:48 AM Alexandru Stefan ISAILA > wrote: >> >> >> >> On 09.04.2019 17:37, Tamas K Lengyel wrote: >>> On Tue, Apr 9, 2019 at 8:03 AM Alexandru Stefan ISAILA >>> wrote: On 09.04.2019 16:48, Tamas K Lengyel

Re: [Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Tamas K Lengyel
On Tue, Apr 9, 2019 at 8:48 AM Alexandru Stefan ISAILA wrote: > > > > On 09.04.2019 17:37, Tamas K Lengyel wrote: > > On Tue, Apr 9, 2019 at 8:03 AM Alexandru Stefan ISAILA > > wrote: > >> > >> > >> > >> On 09.04.2019 16:48, Tamas K Lengyel wrote: > >>> On Tue, Apr 9, 2019 at 6:04 AM Alexandru

Re: [Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 15:38, wrote: > On 09/04/2019 14:01, Jan Beulich wrote: >> @@ -463,9 +463,14 @@ static void timer_softirq_action(void) >> if ( unlikely(ts->list != NULL) ) >> { >> /* old_limit == (2^n)-1; new_limit == (2^(n+4))-1 */ >> -int old_limit =

Re: [Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 16:18, wrote: > On Tue, Apr 09, 2019 at 07:01:55AM -0600, Jan Beulich wrote: >> @@ -544,7 +549,7 @@ static void dump_timerq(unsigned char ke >> struct timers *ts; >> unsigned long flags; >> s_time_t now = NOW(); >> -inti, j; >> +

Re: [Xen-devel] [PATCH v4 1/4] x86: stop handling MSR_IA32_BNDCFGS save/restore in implementation code

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 16:38, wrote: > On 14/03/2019 13:51, Paul Durrant wrote: >> @@ -1215,8 +1196,11 @@ static bool vmx_set_guest_bndcfgs(struct vcpu *v, u64 >> val) >> return true; >> } >> >> -static bool vmx_get_guest_bndcfgs(struct vcpu *v, u64 *val) >> +static bool

[Xen-devel] [PATCH] x86: fix build race when generating temporary object files

2019-04-09 Thread Jan Beulich
The rules to generate xen-syms and xen.efi may run in parallel, but both recursively invoke $(MAKE) to build symbol/relocation table temporary object files. These recursive builds would both re-generate the .*.d2 files (where needed). Both would in turn invoke the same rule, thus allowing for a

Re: [Xen-devel] [PATCH v4 1/4] x86: stop handling MSR_IA32_BNDCFGS save/restore in implementation code

2019-04-09 Thread Andrew Cooper
On 14/03/2019 13:51, Paul Durrant wrote: > @@ -1215,8 +1196,11 @@ static bool vmx_set_guest_bndcfgs(struct vcpu *v, u64 > val) > return true; > } > > -static bool vmx_get_guest_bndcfgs(struct vcpu *v, u64 *val) > +static bool vmx_get_guest_bndcfgs(const struct vcpu *cv, u64 *val) > { > +

Re: [Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Tamas K Lengyel
On Tue, Apr 9, 2019 at 8:03 AM Alexandru Stefan ISAILA wrote: > > > > On 09.04.2019 16:48, Tamas K Lengyel wrote: > > On Tue, Apr 9, 2019 at 6:04 AM Alexandru Stefan ISAILA > > wrote: > >> > >> This patch moves common code from p2m_set_altp2m_mem_access() and > >> p2m_change_altp2m_gfn() into

[Xen-devel] [ovmf test] 134515: all pass - PUSHED

2019-04-09 Thread osstest service owner
flight 134515 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/134515/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 7f33d4f22836226a6a86c3112ac6fcb2f1209152 baseline version: ovmf

[Xen-devel] [OSSTEST PATCH] production-config: Update HTTPS proxy certificate

2019-04-09 Thread Anthony PERARD
The previous certificate had expired, a new one have been generated. Signed-off-by: Anthony PERARD --- production-config | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/production-config b/production-config index 59c74cc..7da7822 100644 ---

Re: [Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Wei Liu
On Tue, Apr 09, 2019 at 07:01:55AM -0600, Jan Beulich wrote: > @@ -544,7 +549,7 @@ static void dump_timerq(unsigned char ke > struct timers *ts; > unsigned long flags; > s_time_t now = NOW(); > -inti, j; > +unsigned int i, j; A further possible

Re: [Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Alexandru Stefan ISAILA
On 09.04.2019 16:48, Tamas K Lengyel wrote: > On Tue, Apr 9, 2019 at 6:04 AM Alexandru Stefan ISAILA > wrote: >> >> This patch moves common code from p2m_set_altp2m_mem_access() and >> p2m_change_altp2m_gfn() into one function >> >> Signed-off-by: Alexandru Isaila >> >> --- >> Changes since

[Xen-devel] [linux-4.14 test] 134508: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134508 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134508/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken build-arm64

Re: [Xen-devel] [PATCH v2] x86/smt: Support for enabling/disabling SMT at runtime

2019-04-09 Thread Andrew Cooper
On 09/04/2019 13:14, Jan Beulich wrote: On 08.04.19 at 19:02, wrote: >> Currently, a user can in combine the output of `xl info -n`, the APCI tables, > Stray "in"? Oh yes.  I think I first phrased this as "can in principle combine", then changed my mind. > >> and some manual CPUID data to

Re: [Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Tamas K Lengyel
On Tue, Apr 9, 2019 at 6:04 AM Alexandru Stefan ISAILA wrote: > > This patch moves common code from p2m_set_altp2m_mem_access() and > p2m_change_altp2m_gfn() into one function > > Signed-off-by: Alexandru Isaila > > --- > Changes since V2: > - Change var name from found_in_hostp2m to

Re: [Xen-devel] [PATCH v3 2/3] x86/mm: Introduce altp2m_set_entry_by_page_order

2019-04-09 Thread Tamas K Lengyel
On Tue, Apr 9, 2019 at 6:04 AM Alexandru Stefan ISAILA wrote: > > This patch moves common code from p2m_set_altp2m_mem_access() and > p2m_change_altp2m_gfn() into one function > > Signed-off-by: Alexandru Isaila > --- > xen/arch/x86/mm/mem_access.c | 2 +- > xen/include/asm-x86/p2m.h| 11

Re: [Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Andrew Cooper
On 09/04/2019 14:01, Jan Beulich wrote: > @@ -463,9 +463,14 @@ static void timer_softirq_action(void) > if ( unlikely(ts->list != NULL) ) > { > /* old_limit == (2^n)-1; new_limit == (2^(n+4))-1 */ > -int old_limit = heap_metadata(heap)->limit; > -int new_limit =

Re: [Xen-devel] [PATCH] xen/cameraif: add ABI for para-virtual camera

2019-04-09 Thread Oleksandr Andrushchenko
On 4/9/19 12:46 PM, Juergen Gross wrote: On 09/04/2019 11:33, Oleksandr Andrushchenko wrote: On 4/9/19 12:28 PM, Juergen Gross wrote: On 09/04/2019 11:15, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko This is the ABI for the two halves of a para-virtualized camera driver

Re: [Xen-devel] [PATCH RFC 04/55] x86/mm: introduce l{1, 2}t local variables to map_pages_to_xen

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 14:59, wrote: > On Tue, Apr 09, 2019 at 06:49:34AM -0600, Jan Beulich wrote: >> >>> On 09.04.19 at 14:22, wrote: >> > On Fri, Mar 15, 2019 at 09:36:37AM -0600, Jan Beulich wrote: >> >> >>> On 07.02.19 at 17:44, wrote: >> >> > The pl2e and pl1e variables are heavily (ab)used

Re: [Xen-devel] [PATCH v2 1/1] treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively

2019-04-09 Thread Petr Mladek
On Wed 2019-04-03 14:28:14, Sakari Ailus wrote: > Ping. > > On Tue, Mar 26, 2019 at 02:35:10PM +0100, Petr Mladek wrote: > > Linus, > > > > On Mon 2019-03-25 21:32:28, Sakari Ailus wrote: > > > %pF and %pf are functionally equivalent to %pS and %ps conversion > > > specifiers. The former are

[Xen-devel] [PATCH] timers: limit heap size

2019-04-09 Thread Jan Beulich
First and foremost make timer_softirq_action() avoid growing the heap if its new size can't be stored without truncation. 64k entries is a lot, and I don't think we're at high risk of running into the issue, but I think it's better to not allow for hard to debug problems to occur in the first

Re: [Xen-devel] [PATCH RFC 32/55] efi: switch EFI L4 table to use new APIs

2019-04-09 Thread Wei Liu
On Tue, Apr 09, 2019 at 06:56:56AM -0600, Jan Beulich wrote: > >>> On 09.04.19 at 14:23, wrote: > > On Mon, Mar 18, 2019 at 09:14:44PM +, Nuernberger, Stefan wrote: > >> On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > >> > This requires storing the MFN instead of linear address of the L4

Re: [Xen-devel] [PATCH RFC 04/55] x86/mm: introduce l{1, 2}t local variables to map_pages_to_xen

2019-04-09 Thread Wei Liu
On Tue, Apr 09, 2019 at 06:49:34AM -0600, Jan Beulich wrote: > >>> On 09.04.19 at 14:22, wrote: > > On Fri, Mar 15, 2019 at 09:36:37AM -0600, Jan Beulich wrote: > >> >>> On 07.02.19 at 17:44, wrote: > >> > The pl2e and pl1e variables are heavily (ab)used in that function. It > >> > is fine at

Re: [Xen-devel] [PATCH RFC 32/55] efi: switch EFI L4 table to use new APIs

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 14:23, wrote: > On Mon, Mar 18, 2019 at 09:14:44PM +, Nuernberger, Stefan wrote: >> On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: >> > This requires storing the MFN instead of linear address of the L4 >> > table. Adjust code accordingly. >> > >> > Signed-off-by: Wei

Re: [Xen-devel] [PATCH RFC 13/55] x86/mm: rewrite virt_to_xen_l3e

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 14:27, wrote: > On Mon, Apr 08, 2019 at 09:55:47AM -0600, Jan Beulich wrote: >> >>> On 07.02.19 at 17:44, wrote: >> > @@ -4769,45 +4769,70 @@ void free_xen_pagetable_new(mfn_t mfn) >> > >> > static DEFINE_SPINLOCK(map_pgdir_lock); >> > >> > +/* >> > + * Given a virtual

Re: [Xen-devel] [PATCH RFC 07/55] x86/mm: add an end_of_loop label in map_pages_to_xen

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 14:22, wrote: > On Fri, Mar 15, 2019 at 09:40:39AM -0600, Jan Beulich wrote: >> >>> On 07.02.19 at 17:44, wrote: >> > We will soon need to clean up mappings whenever the out most loop is >> > ended. Add a new label and turn relevant continue's into goto's. >> >> To be honest,

Re: [Xen-devel] [PATCH RFC 04/55] x86/mm: introduce l{1, 2}t local variables to map_pages_to_xen

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 14:22, wrote: > On Fri, Mar 15, 2019 at 09:36:37AM -0600, Jan Beulich wrote: >> >>> On 07.02.19 at 17:44, wrote: >> > The pl2e and pl1e variables are heavily (ab)used in that function. It >> > is fine at the moment because all page tables are always mapped so >> > there is no

Re: [Xen-devel] [PATCH 3/3] libxl: Document device_add_domain_config

2019-04-09 Thread Wei Liu
On Fri, Apr 05, 2019 at 06:58:11PM +0100, Anthony PERARD wrote: > Commit 03e1a56d81c16eece735e4d0ef74bfb10eaaba07 replaced DEVICE_ADD() > calls by device_add_domain_config() calls but also removed the comment > of DEVICE_ADD(). Copy the useful part of that comment to > device_add_domain_config().

Re: [Xen-devel] [PATCH 1/3] libxl: Constify libxl_device_*_compare functions

2019-04-09 Thread Wei Liu
On Fri, Apr 05, 2019 at 06:58:09PM +0100, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 2/3] libxl: Constify src of device_compare_fn_t

2019-04-09 Thread Wei Liu
On Fri, Apr 05, 2019 at 06:58:10PM +0100, Anthony PERARD wrote: > All functions libxl_device_*_copy which implements device_compare_fn_t > already have the `src' parameter defined with const. > > Signed-off-by: Anthony PERARD Acked-by: Wei Liu ___

Re: [Xen-devel] [PATCH v2] tools/xl: use libxl_domain_info to get domain type for vcpu-pin

2019-04-09 Thread Wei Liu
On Tue, Apr 09, 2019 at 01:01:58PM +0100, Igor Druzhinin wrote: > Parsing the config seems to be an overkill for this particular task > and the config might simply be absent. Type returned from libxl_domain_info > should be either LIBXL_DOMAIN_TYPE_HVM or LIBXL_DOMAIN_TYPE_PV but in > that context

Re: [Xen-devel] [PATCH v2] x86/smt: Support for enabling/disabling SMT at runtime

2019-04-09 Thread Wei Liu
On Mon, Apr 08, 2019 at 06:02:19PM +0100, Andrew Cooper wrote: > Currently, a user can in combine the output of `xl info -n`, the APCI tables, > and some manual CPUID data to figure out which CPU numbers to feed into > `xen-hptool cpu-offline` to effectively disable SMT at runtime. > > A more

Re: [Xen-devel] [PATCH RFC 27/55] x86_64/mm: drop lXe_to_lYe invocations from setup_m2p_table

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:38PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > Signed-off-by: Wei Liu > > --- > >  xen/arch/x86/x86_64/mm.c | 16 > >  1 file changed, 12 insertions(+), 4 deletions(-) > > > > diff --git

Re: [Xen-devel] [PATCH RFC 13/55] x86/mm: rewrite virt_to_xen_l3e

2019-04-09 Thread Wei Liu
On Mon, Apr 08, 2019 at 09:55:47AM -0600, Jan Beulich wrote: > >>> On 07.02.19 at 17:44, wrote: > > @@ -4769,45 +4769,70 @@ void free_xen_pagetable_new(mfn_t mfn) > > > > static DEFINE_SPINLOCK(map_pgdir_lock); > > > > +/* > > + * Given a virtual address, return a pointer to xen's L3 entry.

Re: [Xen-devel] [PATCH RFC 14/55] x86/mm: rewrite xen_to_virt_l2e

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:19PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > Rewrite that function to use the new APIs. Modify its callers to > > unmap > > the pointer returned. > > > > Signed-off-by: Wei Liu > > --- > > nit: the commit title

Re: [Xen-devel] [PATCH RFC 32/55] efi: switch EFI L4 table to use new APIs

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:44PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > This requires storing the MFN instead of linear address of the L4 > > table. Adjust code accordingly. > > > > Signed-off-by: Wei Liu > > --- > >  

Re: [Xen-devel] [PATCH RFC 39/55] x86: switch root_pgt to mfn_t and use new APIs

2019-04-09 Thread Wei Liu
On Tue, Mar 19, 2019 at 04:45:24PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > This then requires moving declaration of root page table mfn into > > mm.h > > and modify setup_cpu_root_pgt to have a single exit path. > > > > We also need to force

Re: [Xen-devel] [PATCH RFC 18/55] x86/mm: switch to new APIs in modify_xen_mappings

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:28PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > Page tables allocated in that function should be mapped and unmapped > > now. > > > > Signed-off-by: Wei Liu > > --- > >  xen/arch/x86/mm.c | 31

Re: [Xen-devel] [PATCH RFC 07/55] x86/mm: add an end_of_loop label in map_pages_to_xen

2019-04-09 Thread Wei Liu
On Fri, Mar 15, 2019 at 09:40:39AM -0600, Jan Beulich wrote: > >>> On 07.02.19 at 17:44, wrote: > > We will soon need to clean up mappings whenever the out most loop is > > ended. Add a new label and turn relevant continue's into goto's. > > To be honest, I was on the edge of already suggesting

Re: [Xen-devel] [PATCH RFC 01/55] x86/mm: defer clearing page in virt_to_xen_lXe

2019-04-09 Thread Wei Liu
On Fri, Mar 15, 2019 at 08:38:38AM -0600, Jan Beulich wrote: > >>> On 07.02.19 at 17:44, wrote: > > --- a/xen/arch/x86/mm.c > > +++ b/xen/arch/x86/mm.c > > @@ -4752,13 +4752,13 @@ static l3_pgentry_t *virt_to_xen_l3e(unsigned long > > v) > > > > if ( !pl3e ) > > return

Re: [Xen-devel] [PATCH RFC 04/55] x86/mm: introduce l{1, 2}t local variables to map_pages_to_xen

2019-04-09 Thread Wei Liu
On Fri, Mar 15, 2019 at 09:36:37AM -0600, Jan Beulich wrote: > >>> On 07.02.19 at 17:44, wrote: > > The pl2e and pl1e variables are heavily (ab)used in that function. It > > is fine at the moment because all page tables are always mapped so > > there is no need to track the life time of each

Re: [Xen-devel] [PATCH RFC 06/55] x86/mm: map_pages_to_xen should have one exit path

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:14PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > We will soon rewrite the function to handle dynamically mapping and > > unmapping of page tables. > > > > No functional change. > > > > Signed-off-by: Wei Liu > > --- > >

Re: [Xen-devel] [PATCH RFC 31/55] efi: add emacs block to boot.c

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:41PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > Signed-off-by: Wei Liu > > --- > >  xen/common/efi/boot.c | 10 ++ > >  1 file changed, 10 insertions(+) > > > > diff --git a/xen/common/efi/boot.c

Re: [Xen-devel] [PATCH RFC 23/55] x86_64/mm: drop l4e_to_l3e invocation from paging_init

2019-04-09 Thread Wei Liu
On Mon, Mar 18, 2019 at 09:14:34PM +, Nuernberger, Stefan wrote: > On Thu, 2019-02-07 at 16:44 +, Wei Liu wrote: > > Signed-off-by: Wei Liu > > Any reason why this isn't squashed with the previous patch? Because of how I classified changes -- lXe_to_lYe belongs to their own group. I

Re: [Xen-devel] [PATCH 3/3] memory: restrict XENMEM_remove_from_physmap to translated guests

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 11:50, wrote: > On 08/04/2019 15:29, Jan Beulich wrote: > On 08.04.19 at 13:47, wrote: >>> de-allocation step aside, I am not really convinced you can reuse >>> guest_remove_page() here. On x86, the function will not work on certain >>> p2m types. Is it what we really

[Xen-devel] [distros-debian-snapshot test] 83913: trouble: blocked/broken

2019-04-09 Thread Platform Team regression test user
flight 83913 distros-debian-snapshot real [real] http://osstest.xensource.com/osstest/logs/83913/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-i386

Re: [Xen-devel] [PATCH v2] x86/smt: Support for enabling/disabling SMT at runtime

2019-04-09 Thread Jan Beulich
>>> On 08.04.19 at 19:02, wrote: > Currently, a user can in combine the output of `xl info -n`, the APCI tables, Stray "in"? > and some manual CPUID data to figure out which CPU numbers to feed into > `xen-hptool cpu-offline` to effectively disable SMT at runtime. > > A more convenient option

Re: [Xen-devel] [PATCH 10/12] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused

2019-04-09 Thread Julien Grall
Hi Andrew, On 27/03/2019 19:10, Andrew Cooper wrote: On 27/03/2019 18:45, Julien Grall wrote: Clang will throw an error if a function is unused unless you tell to ignore it. This can be done using __maybe_unused. Signed-off-by: Julien Grall --- xen/arch/arm/mm.c | 3 ++- 1 file changed, 2

[Xen-devel] [linux-4.9 test] 134507: trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134507 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134507/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-pvops

[Xen-devel] [PATCH v3 1/3] x86/mm: Introduce altp2m_get_gfn_type_access

2019-04-09 Thread Alexandru Stefan ISAILA
This patch moves common code from p2m_set_altp2m_mem_access() and p2m_change_altp2m_gfn() into one function Signed-off-by: Alexandru Isaila --- Changes since V2: - Change var name from found_in_hostp2m to copied_from_hostp2m - Move the type check from

[Xen-devel] [PATCH v3 2/3] x86/mm: Introduce altp2m_set_entry_by_page_order

2019-04-09 Thread Alexandru Stefan ISAILA
This patch moves common code from p2m_set_altp2m_mem_access() and p2m_change_altp2m_gfn() into one function Signed-off-by: Alexandru Isaila --- xen/arch/x86/mm/mem_access.c | 2 +- xen/include/asm-x86/p2m.h| 11 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH v3 3/3] x86/mm: Fix p2m_set_suppress_ve

2019-04-09 Thread Alexandru Stefan ISAILA
On a new altp2m view the p2m_set_suppress_ve() func will fail with invalid mfn from p2m->get_entry() if p2m->set_entry() was not called before. This patch solves the problem by getting the mfn from hostp2m. Signed-off-by: Alexandru Isaila --- xen/arch/x86/mm/p2m.c | 3 ++- 1 file changed, 2

[Xen-devel] [PATCH v2] tools/xl: use libxl_domain_info to get domain type for vcpu-pin

2019-04-09 Thread Igor Druzhinin
Parsing the config seems to be an overkill for this particular task and the config might simply be absent. Type returned from libxl_domain_info should be either LIBXL_DOMAIN_TYPE_HVM or LIBXL_DOMAIN_TYPE_PV but in that context distinction between PVH and HVM should be irrelevant. Signed-off-by:

[Xen-devel] [xen-unstable-smoke test] 134566: regressions - trouble: blocked/broken/fail/pass

2019-04-09 Thread osstest service owner
flight 134566 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134566/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xsm 4

Re: [Xen-devel] [PATCH 3/4] xen/public: Document HYPERCALL_console_io()

2019-04-09 Thread Jan Beulich
>>> On 09.04.19 at 13:26, wrote: > On 03/04/2019 14:04, Jan Beulich wrote: >> Also please note the quotation used by the mentioned >> existing doc comments, as well as a few other formal aspects >> (like them also making clear what the return type is). I think >> that's a model used elsewhere as

[edk2-devel] [PATCH v2 26/31] OvmfPkg/XenOvmf: Override PcdFSBClock to Xen vLAPIC timer frequency

2019-04-09 Thread Anthony PERARD
That value is used by SecPeiDxeTimerLibCpu, the TimerLib implementation. It will also be used by XenTimerDxe. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- Notes: new patch in v2. OvmfPkg/XenOvmf.dsc | 3 +++ 1 file changed, 3 insertions(+)

[edk2-devel] [PATCH v2 22/31] OvmfPkg/XenPlatformPei: Rework memory detection

2019-04-09 Thread Anthony PERARD
When running as a Xen PVH guest, there is no CMOS to read the memory size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can works without CMOS by reading the e820 table. Rework XenPublishRamRegions for PVH, handle the Reserve type and explain about the ACPI type. MTRR settings

[edk2-devel] [PATCH v2 12/31] OvmfPkg/XenPlatformPei: Grab RSDP from PVH guest start of day struct

2019-04-09 Thread Anthony PERARD
Check if there's a start of the day struct provided to PVH guest, save the ACPI RSDP address for later. This patch import import arch-x86/hvm/start_info.h from xen.git. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD ---

[Xen-devel] [PATCH v2 11/31] OvmfPkg/XenPlatformPei: Use mXenHvmloaderInfo to get E820

2019-04-09 Thread Anthony PERARD
Use the already checked pointer mXenHvmloaderInfo to retrieve the E820 table produced by hvmloader. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/XenPlatformPei/Xen.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-)

[Xen-devel] [PATCH v2 17/31] OvmfPkg/XenPlatformPei: Reserve hvmloader's memory only when it as runned

2019-04-09 Thread Anthony PERARD
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/XenPlatformPei/Xen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index 89933ec3e9..22c7a22c88 100644 ---

[edk2-devel] [PATCH v2 29/31] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-04-09 Thread Anthony PERARD
This "device" use XenIoMmioLib to reserve some space to be use by the Grant Tables. The call is only done if it is necessary, we simply detect if the guest is probably PVH, as in this case there is currently no PCI bus, and no PCI Xen platform device which would start the XenIoPciDxe and allocate

[edk2-devel] [PATCH v2 28/31] OvmfPkg/PlatformBootManagerLib: Use a Xen console for ConOut/ConIn

2019-04-09 Thread Anthony PERARD
On a Xen PVH guest, none of the existing serial or console interface works, so we add a new one, based on XenConsoleSerialPortLib, and implemeted via SerialDxe. That a simple console implementation that can works on both PVH guest and HVM guests, even if it rarely going to be use on HVM. Have

[edk2-devel] [PATCH v2 15/31] OvmfPkg/XenHypercallLib: Enable it in PEIM

2019-04-09 Thread Anthony PERARD
Allow to use Xen hypercalls earlier, during the PEIM stage, but XenHypercallLibReInit() must be called once the XenInfo HOB is created with the HyperPage setup. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD ---

[edk2-devel] [PATCH v2 23/31] OvmfPkg/XenPlatformPei: Reserve VGA memory region, to boot Linux

2019-04-09 Thread Anthony PERARD
Linux panic if this region isn't reserved. When Linux is booted on EFI system, it expects the memory at 0xa to _not_ be conventional memory. Otherwise a variable isn't initialised properly and Linux panic when a virtual console/terminal is asked to be created. See for more detail:

[edk2-devel] [PATCH v2 27/31] OvmfPkg/XenOvmf: Introduce XenTimerDxe

2019-04-09 Thread Anthony PERARD
"PcAtChipsetPkg/8254TimerDxe" is replaced with a Xen-specific EFI_TIMER_ARCH_PROTOCOL implementation. Also remove 8259InterruptControllerDxe as it is not used anymore. This Timer uses the local APIC timer as time source as it can work on both a Xen PVH guest and an HVM one. Based on the

[edk2-devel] [PATCH v2 31/31] OvmfPkg/XenOvmf: use RealTimeClockRuntimeDxe from EmbeddedPkg

2019-04-09 Thread Anthony PERARD
A Xen PVH guest doesn't have a RTC that OVMF would expect, so PcatRealTimeClockRuntimeDxe fails to initialize and prevent the firmware from finish to boot. To prevent that, we will use the XenRealTimeClockLib from ArmVirtPkg which simply always return the same time. This will work on both Xen PVH

[edk2-devel] [PATCH v2 30/31] OvmfPkg: Move XenRealTimeClockLib from ArmVirtPkg

2019-04-09 Thread Anthony PERARD
So it can be used from the OvmfPkg by the following patch, "OvmfPkg/XenOvmf: use RealTimeClockRuntimeDxe from EmbeddedPkg" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- ArmVirtPkg/ArmVirtXen.dsc | 2

[edk2-devel] [PATCH v2 16/31] OvmfPkg/XenPlatformPei: Introduce XenHvmloaderDetected

2019-04-09 Thread Anthony PERARD
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/XenPlatformPei/Platform.h | 5 + OvmfPkg/XenPlatformPei/Xen.c | 7 +++ 2 files changed, 12 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/Platform.h

[edk2-devel] [PATCH v2 20/31] OvmfPkg: Import XENMEM_memory_map hypercall to Xen/memory.h

2019-04-09 Thread Anthony PERARD
This is copied over from the public header of the Xen Project, with the type name modified to build on OVMF. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/Include/IndustryStandard/Xen/memory.h | 23 1 file changed, 23

Re: [Xen-devel] [PATCH 3/4] xen/public: Document HYPERCALL_console_io()

2019-04-09 Thread Julien Grall
Hi Jan, On 03/04/2019 14:04, Jan Beulich wrote: On 02.04.19 at 18:42, wrote: --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -97,6 +97,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t); #define __HYPERVISOR_set_timer_op 15 #define __HYPERVISOR_event_channel_op_compat 16

  1   2   >