Re: [Xen-devel] [PATCH 03/14 v4] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-21 Thread Bhupinder Thakur
Hi Andre, Thanks for your comments. >> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig >> index d46b98c..c1a0e7f 100644 >> --- a/xen/arch/arm/Kconfig >> +++ b/xen/arch/arm/Kconfig >> @@ -50,6 +50,11 @@ config HAS_ITS >> prompt "GICv3 ITS MSI controller support" if EXPERT = "y"

Re: [Xen-devel] [PATCH v3] VT-d PI: track the vcpu number in pi blocking list

2017-06-21 Thread Chao Gao
On Fri, Jun 16, 2017 at 08:34:20AM -0600, Jan Beulich wrote: On 24.05.17 at 08:56, wrote: >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -82,6 +82,7 @@ static int vmx_vmfunc_intercept(struct cpu_user_regs >> *regs); >> struct

[Xen-devel] [libvirt test] 110918: tolerable all pass - PUSHED

2017-06-21 Thread osstest service owner
flight 110918 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/110918/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 13 saverestore-support-checkfail like 110512 test-armhf-armhf-libvirt-raw 12

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

2017-06-21 Thread osstest service owner
flight 110910 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/110910/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 5 libvirt-buildfail REGR. vs. 110465 Regressions which

[Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-21 Thread Junxiao Bi
When ring buf full, hw queue will be stopped. While blkif interrupt consume request and make free space in ring buf, hw queue will be started again. But since start queue is protected by spin lock while stop not, that will cause a race. interrupt: process:

[Xen-devel] Is [PATCH for-4.9] Was:Re: [PATCH 1/2] xen/livepatch: Clean up arch relocation handling

2017-06-21 Thread Konrad Rzeszutek Wilk
On Tue, Jun 13, 2017 at 09:51:35PM +0100, Andrew Cooper wrote: > * Reduce symbol scope and initalisation as much as possible > * Annotate a fallthrough case in arm64 > * Fix switch statement style in arm32 > > No functional change. > > Signed-off-by: Andrew Cooper

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-21 Thread Konrad Rzeszutek Wilk
On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote: > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > legitimate in the ELF standard, its existance in a livepatch is questionable > at best. Until a plausible usecase presents itself, reject such a relocation >

Re: [Xen-devel] [PATCH v2 1/3] xen-disk: only advertize feature-persistent if grant copy is not available

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Paul Durrant wrote: > If grant copy is available then it will always be used in preference to > persistent maps. In this case feature-persistent should not be advertized > to the frontend, otherwise it may needlessly copy data into persistently > granted buffers. > >

Re: [Xen-devel] [PATCH v2 2/3] xen-disk: add support for multi-page shared rings

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Paul Durrant wrote: > The blkif protocol has had provision for negotiation of multi-page shared > rings for some time now and many guest OS have support in their frontend > drivers. > > This patch makes the necessary modifications to xen-disk support a shared > ring up to

[Xen-devel] [xen-4.5-testing test] 110906: tolerable FAIL - PUSHED

2017-06-21 Thread osstest service owner
flight 110906 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110906/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 6 xen-boot fail like 108183 test-xtf-amd64-amd64-2 55

Re: [Xen-devel] [PATCH v2 03/16] xen/arm: mm: Use typesafe mfn for xenheap_mfn_*

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Stefano Stabellini wrote: > On Mon, 19 Jun 2017, Julien Grall wrote: > > Add more safety when using xenheap_mfn_*. > > > > Signed-off-by: Julien Grall > > Reviewed-by: Stefano Stabellini > > > > --- > > > > I haven't

Re: [Xen-devel] [PATCH v2 16/16] xen/arm: mm: Use __func__ rather than plain name in format string

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > > Changes in v2: > - Patch added > --- > xen/arch/arm/mm.c | 14 +++--- > 1 file changed, 7 insertions(+), 7

Re: [Xen-devel] [PATCH v2 15/16] xen/arm: mm: Introduce temporary variable in create_xen_entries

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > This is improving the code readability and avoid to dereference the > table every single time we need to access the entry. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > >

Re: [Xen-devel] [PATCH v2 14/16] xen/arm: mm: Use lpae_valid and lpae_table in create_xen_entries

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > This newly introduced lpae_valid and lpae_table helpers will recude the > code and make more readable. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > > Changes in v2: >

Re: [Xen-devel] [PATCH v2 13/16] xen/arm: p2m: Move lpae_* helpers in lpae.h

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > lpae_* helpers can work on any LPAE translation tables. Move them in > lpae.h to allow other part of Xen to use them. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > > Cc:

Re: [Xen-devel] [PATCH v2 12/16] xen/arm: p2m: Rename p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > The helpers p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage are > not specific to the stage-2 translation tables. They can also work on > any LPAE translation tables. So rename then to lpae_* and use pte.walk > to look for the value of the field. >

Re: [Xen-devel] [PATCH v2 12/16] xen/arm: p2m: Rename p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Julien Grall wrote: > Hi Andrew, > > On 20/06/17 09:14, Andrew Cooper wrote: > > On 19/06/2017 17:57, Julien Grall wrote: > > > The helpers p2m_valid, p2m_table, p2m_mapping and p2m_is_superpage are > > > not specific to the stage-2 translation tables. They can also work on >

Re: [Xen-devel] [PATCH v2 11/16] xen/arm: lpae: Fix comments coding style

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > Also adding one missing full stop + fix description > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > > Cc: prosku...@sec.in.tum.de > > I haven't retained Stefano's reviewed-by

Re: [Xen-devel] [PATCH v2 02/16] xen/arm: setup: Remove bogus xenheap_mfn_end in setup_mm for arm64

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > xenheap_mfn_end is storing an MFN and not a physical address. Xen is not > currently using xenheap_mfn_end and the value will be reset after the > loop. So drop this bogus xenheap_mfn_end. > > Signed-off-by: Julien Grall I would

Re: [Xen-devel] [PATCH v2 05/16] xen/arm: mm: Redefine virt_to_mfn to support typesafe

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > The file xen/arch/arm/mm.c is using the typesafe MFN in most of the > place. This requires all caller of virt_to_mfn to prefixed by _mfn(...). > > To avoid the extra _mfn(...), re-defined virt_to_mfn within arch/arm/mm.c > to handle typesafe MFN. > >

Re: [Xen-devel] [PATCH v2 04/16] xen/arm: p2m: Redefine mfn_to_page and page_to_mfn to use typesafe

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > The file xen/arch/arm/p2m.c is using typesafe MFN in most of the place. > This requires caller to mfn_to_page and page_to_mfn to use _mfn/mfn_x. > > To avoid extra _mfn/mfn_x, re-define mfn_to_page and page_to_mfn within > xen/arch/arm/p2m.c to handle

Re: [Xen-devel] [PATCH v2 03/16] xen/arm: mm: Use typesafe mfn for xenheap_mfn_*

2017-06-21 Thread Stefano Stabellini
On Mon, 19 Jun 2017, Julien Grall wrote: > Add more safety when using xenheap_mfn_*. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > > I haven't introduced mfn_less_than() and mfn_greather_than() as > there would

Re: [Xen-devel] [PATCH 06/11] ARM: simplify page type handling

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Jan Beulich wrote: > There's no need to have anything here on ARM other than the distinction > between writable and non-writable pages (and even that could likely be > eliminated, but with a more intrusive change). Limit type to a single > bit and drop pinned and validated

Re: [Xen-devel] [PATCH v4 16/18] xen/pvcalls: implement read

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Boris Ostrovsky wrote: > On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > > When an active socket has data available, increment the io and read > > counters, and schedule the ioworker. > > > > Implement the read function by reading from the socket, writing the data > > to

Re: [Xen-devel] [osstest test] 110909: tolerable FAIL - PUSHED

2017-06-21 Thread Andrew Cooper
On 21/06/2017 23:59, Ian Jackson wrote: > osstest service owner writes ("[osstest test] 110909: tolerable FAIL - > PUSHED"): >> flight 110909 osstest real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/110909/ >> >> Failures :-/ but no regressions. > ... >> Tests which did not

Re: [Xen-devel] [osstest test] 110909: tolerable FAIL - PUSHED

2017-06-21 Thread Ian Jackson
osstest service owner writes ("[osstest test] 110909: tolerable FAIL - PUSHED"): > flight 110909 osstest real [real] > http://logs.test-lab.xenproject.org/osstest/logs/110909/ > > Failures :-/ but no regressions. ... > Tests which did not succeed, but are not blocking: ... >

Re: [Xen-devel] [PATCH v4 16/18] xen/pvcalls: implement read

2017-06-21 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > When an active socket has data available, increment the io and read > counters, and schedule the ioworker. > > Implement the read function by reading from the socket, writing the data > to the data ring. > > Set in_error on error. > >

[Xen-devel] [linux-linus test] 110908: regressions - FAIL

2017-06-21 Thread osstest service owner
flight 110908 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/110908/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 5 kernel-build fail REGR. vs. 110515

Re: [Xen-devel] [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Boris Ostrovsky wrote: > >>> + > >>> + mappass->reqcopy = *req; > >>> + icsk = inet_csk(mappass->sock->sk); > >>> + queue = >icsk_accept_queue; > >>> + spin_lock(>rskq_lock); > >>> + data = queue->rskq_accept_head != NULL; > >>> + spin_unlock(>rskq_lock); > >> What is the

Re: [Xen-devel] [PATCH v4 13/18] xen/pvcalls: implement release command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > > + > > +static int pvcalls_back_release_passive(struct xenbus_device *dev, > > + struct pvcalls_fedata *fedata, > > + struct sockpass_mapping *mappass) > > +{ > > + if

[Xen-devel] [xen-unstable-smoke test] 110948: tolerable trouble: broken/pass - PUSHED

2017-06-21 Thread osstest service owner
flight 110948 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/110948/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12

Re: [Xen-devel] [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-21 Thread Boris Ostrovsky
>>> + >>> + mappass->reqcopy = *req; >>> + icsk = inet_csk(mappass->sock->sk); >>> + queue = >icsk_accept_queue; >>> + spin_lock(>rskq_lock); >>> + data = queue->rskq_accept_head != NULL; >>> + spin_unlock(>rskq_lock); >> What is the purpose of the queue lock here? > It is only there

Re: [Xen-devel] [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > > @@ -499,6 +521,55 @@ static int pvcalls_back_accept(struct xenbus_device > > *dev, > > static int pvcalls_back_poll(struct xenbus_device *dev, > > struct xen_pvcalls_request *req) > > { > > + struct pvcalls_fedata

Re: [Xen-devel] [PATCH v4 11/18] xen/pvcalls: implement accept command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > > static void __pvcalls_back_accept(struct work_struct *work) > > { > > + struct sockpass_mapping *mappass = container_of( > > + work, struct sockpass_mapping, register_work); > > + struct sock_mapping *map; > > + struct

Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > >> + > >> static int pvcalls_back_connect(struct xenbus_device *dev, > >>struct xen_pvcalls_request *req) > >> { > >> + struct pvcalls_fedata *fedata; > >> + int ret = -EINVAL; > >> + struct socket *sock; > >> + struct

Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > > Allocate a socket. Keep track of socket <-> ring mappings with a new data > > structure, called sock_mapping. Implement the connect command by calling > > inet_stream_connect, and mapping the new

Re: [Xen-devel] [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Roger Pau Monné wrote: > On Thu, Jun 15, 2017 at 12:09:36PM -0700, Stefano Stabellini wrote: > > Just reply with success to the other end for now. Delay the allocation > > of the actual socket to bind and/or connect. > > > > Signed-off-by: Stefano Stabellini

Re: [Xen-devel] [PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-21 Thread Thomas Gleixner
On Wed, 21 Jun 2017, Tom Lendacky wrote: > On 6/21/2017 10:38 AM, Thomas Gleixner wrote: > > /* > > * Sanitize CPU configuration and retrieve the modifier > > * for the initial pgdir entry which will be programmed > > * into CR3. Depends on enabled SME encryption, normally 0. >

Re: [Xen-devel] [PATCH] xen/disk: don't leak stack data via response ring

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Jan Beulich wrote: > >>> On 20.06.17 at 23:48, wrote: > > On Tue, 20 Jun 2017, Jan Beulich wrote: > >> @@ -36,13 +33,7 @@ struct blkif_x86_32_request_discard { > >> blkif_sector_t sector_number;/* start sector idx on disk (r/w > >> only) */

[Xen-devel] [xen-unstable-smoke test] 110940: tolerable trouble: broken/pass - PUSHED

2017-06-21 Thread osstest service owner
flight 110940 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/110940/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12

Re: [Xen-devel] [PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-21 Thread Tom Lendacky
On 6/21/2017 10:38 AM, Thomas Gleixner wrote: On Wed, 21 Jun 2017, Tom Lendacky wrote: On 6/21/2017 2:16 AM, Thomas Gleixner wrote: Why is this an unconditional function? Isn't the mask simply 0 when the MEM ENCRYPT support is disabled? I made it unconditional because of the call from

[Xen-devel] [xen-4.8-testing test] 110904: regressions - FAIL

2017-06-21 Thread osstest service owner
flight 110904 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110904/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-4 45 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 110437 Tests which

[Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-21 Thread Andrew Cooper
A symndx of STN_UNDEF is special, and means a symbol value of 0. While legitimate in the ELF standard, its existance in a livepatch is questionable at best. Until a plausible usecase presents itself, reject such a relocation with -EOPNOTSUPP. Additionally, perform a safety check on

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-21 Thread Stefano Stabellini
On Wed, 21 Jun 2017, George Dunlap wrote: > On 21/06/17 16:54, Jan Beulich wrote: > On 21.06.17 at 17:44, wrote: > >> When you have a long series like this, could you name the files in a way > >> that makes it easier for a shell script to get their order? e.g., >

[Xen-devel] [xen-4.7-testing test] 110902: trouble: broken/fail/pass

2017-06-21 Thread osstest service owner
flight 110902 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110902/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 3 host-install(3)broken REGR. vs.

Re: [Xen-devel] [RFC 6/6] acpi:arm64: Add support for parsing IORT table

2017-06-21 Thread Robin Murphy
On 12/06/17 14:44, Jan Beulich wrote: On 12.06.17 at 15:36, wrote: >> On 09/06/17 12:15, Robin Murphy wrote: >>> On 08/06/17 20:30, Sameer Goel wrote: >>> [...] /** - * iort_iommu_configure - Set-up IOMMU configuration for a device. + *

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-21 Thread George Dunlap
On 21/06/17 16:54, Jan Beulich wrote: On 21.06.17 at 17:44, wrote: >> When you have a long series like this, could you name the files in a way >> that makes it easier for a shell script to get their order? e.g., >> 01-xsa217-doc.patch, 02-gnttab-xfer-xenheap.patch,

Re: [Xen-devel] [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch()

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 21 June 2017 17:15 > To: Paul Durrant ; Xen-devel de...@lists.xen.org> > Cc: Jan Beulich > Subject: Re: [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch() > > On 21/06/17 17:04, Paul Durrant

[Xen-devel] [PATCH V3] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru Reviewed-by: Andrew Cooper --- Changes since V2:

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-21 Thread George Dunlap
On 21/06/17 16:59, Jan Beulich wrote: On 21.06.17 at 16:38, wrote: >> On 21/06/17 11:08, Jan Beulich wrote: >>> So far callers of the libxc interface passed in a domain ID which was >>> then ignored in the hypervisor. Instead, make the hypervisor honor it >>>

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
(Re-sent with CCs preserved). On 06/21/2017 07:06 PM, Jan Beulich wrote: On 21.06.17 at 16:56, wrote: >> --- a/xen/arch/x86/monitor.c >> +++ b/xen/arch/x86/monitor.c >> @@ -133,7 +133,8 @@ int arch_monitor_domctl_event(struct domain *d, >> bool_t

[Xen-devel] [xen-4.9-testing test] 110903: regressions - FAIL

2017-06-21 Thread osstest service owner
flight 110903 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110903/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pygrub 9 debian-di-installfail REGR. vs. 110550 Tests which

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 07:06 PM, Jan Beulich wrote: On 21.06.17 at 16:56, wrote: >> --- a/xen/arch/x86/monitor.c >> +++ b/xen/arch/x86/monitor.c >> @@ -133,7 +133,8 @@ int arch_monitor_domctl_event(struct domain *d, >> bool_t old_status; >> >> /* sanity

Re: [Xen-devel] [PATCH 6/6] x86/hvm: Implement hvmemul_write() using real mappings

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 21 June 2017 16:13 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant ; Razvan > Cojocaru

Re: [Xen-devel] [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch()

2017-06-21 Thread Andrew Cooper
On 21/06/17 17:04, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: 21 June 2017 16:12 >> To: Xen-devel >> Cc: Andrew Cooper ; Jan Beulich >> ; Paul Durrant

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 16:56, wrote: > --- a/xen/arch/x86/monitor.c > +++ b/xen/arch/x86/monitor.c > @@ -133,7 +133,8 @@ int arch_monitor_domctl_event(struct domain *d, > bool_t old_status; > > /* sanity check: avoid left-shift undefined behavior */ > -

Re: [Xen-devel] [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch()

2017-06-21 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: 21 June 2017 16:12 > To: Xen-devel > Cc: Andrew Cooper ; Jan Beulich > ; Paul Durrant > Subject: [PATCH

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 16:38, wrote: > On 21/06/17 11:08, Jan Beulich wrote: >> So far callers of the libxc interface passed in a domain ID which was >> then ignored in the hypervisor. Instead, make the hypervisor honor it >> (accepting DOMID_INVALID to obtain original

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-21 Thread Jan Beulich
>>> On 21.06.17 at 17:44, wrote: > When you have a long series like this, could you name the files in a way > that makes it easier for a shell script to get their order? e.g., > 01-xsa217-doc.patch, 02-gnttab-xfer-xenheap.patch, ? > > Having to manually save-and-apply

Re: [Xen-devel] [PATCH v2] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 01:29:26AM +0800, Zhongze Liu wrote: > This is a preparation for the proposal "allow setting up shared memory areas > between VMs from xl config file". See: > V2: https://lists.xen.org/archives/html/xen-devel/2017-06/msg02256.html > V1:

Re: [Xen-devel] [PATCH 01/11] public: adjust documentation following XSA-217

2017-06-21 Thread George Dunlap
Jan, When you have a long series like this, could you name the files in a way that makes it easier for a shell script to get their order? e.g., 01-xsa217-doc.patch, 02-gnttab-xfer-xenheap.patch, ? Having to manually save-and-apply the name of each patch of an eleven-patch series separately is

Re: [Xen-devel] [PATCH] x86/mm: drop redundant domain parameter from get_page_from_gfn_p2m()

2017-06-21 Thread George Dunlap
On 21/06/17 11:12, Jan Beulich wrote: > It can always be read from the passed p2m. Take the opportunity and > also rename the function, making the "p2m" suffix a prefix, to match > other p2m functions, and convert the "gfn" parameter's type. > > Signed-off-by: Jan Beulich

Re: [Xen-devel] [PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-21 Thread Thomas Gleixner
On Wed, 21 Jun 2017, Tom Lendacky wrote: > On 6/21/2017 2:16 AM, Thomas Gleixner wrote: > > Why is this an unconditional function? Isn't the mask simply 0 when the MEM > > ENCRYPT support is disabled? > > I made it unconditional because of the call from head_64.S. I can't make > use of the C

Re: [Xen-devel] [PATCH v7 25/36] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-21 Thread Tom Lendacky
On 6/21/2017 5:50 AM, Borislav Petkov wrote: On Fri, Jun 16, 2017 at 01:54:36PM -0500, Tom Lendacky wrote: Add warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the

Re: [Xen-devel] [PATCH 2/2] x86/p2m: make p2m_alloc_ptp() return an MFN

2017-06-21 Thread George Dunlap
On 21/06/17 11:25, Jan Beulich wrote: > None of the callers really needs the struct page_info pointer. > > Signed-off-by: Jan Beulich Acked-by: George Dunlap > > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -569,7 +569,7 @@ int

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

2017-06-21 Thread osstest service owner
flight 110937 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/110937/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 3 host-install(3)broken REGR. vs. 110907

Re: [Xen-devel] [PATCH 1/2] x86/p2m: simplify p2m_next_level()

2017-06-21 Thread George Dunlap
On 21/06/17 11:25, Jan Beulich wrote: > Calculate entry PFN and flags just once, making the respective > variables (and also pg) function wide. Take the opportunity and also > make the induction variable unsigned. Hmm -- I'm a fan of keeping the scope of variables limited to where they're

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 06:12:47PM +0300, Razvan Cojocaru wrote: > On 06/21/2017 06:10 PM, Wei Liu wrote: > > On Wed, Jun 21, 2017 at 05:56:02PM +0300, Razvan Cojocaru wrote: > >> Fixed an issue where the maximum index allowed (31) goes beyond the > >> actual number of array elements (4) of

Re: [Xen-devel] [PATCH v3 4/9] xen/pci: split code to size BARs from pci_add_device

2017-06-21 Thread Roger Pau Monne
On Fri, May 19, 2017 at 07:56:55AM -0600, Jan Beulich wrote: > >>> On 27.04.17 at 16:35, wrote: > > @@ -663,38 +708,13 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, > > seg, bus, slot, func, i); > > continue; > >

Re: [Xen-devel] [PATCH v7 08/36] x86/mm: Add support to enable SME in early boot processing

2017-06-21 Thread Tom Lendacky
On 6/21/2017 2:16 AM, Thomas Gleixner wrote: On Fri, 16 Jun 2017, Tom Lendacky wrote: diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index a105796..988b336 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -15,16

[Xen-devel] [PATCH 3/6] x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest()

2017-06-21 Thread Andrew Cooper
sh_emulate_map_dest() predates the introduction of the generic ERR_PTR() infrasturcture, but take the opportunity to avoid opencoding it. The chosen error constants require need to be negative to work with IS_ERR(), but no other changes. Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH 4/6] [RFC] x86/hvm: Rename enum hvm_copy_result to hvm_translation_result

2017-06-21 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich Name definitely open to improvement. Perhaps better considered in the context of the following patch. --- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/hvm/emulate.c| 40

[Xen-devel] [PATCH 5/6] x86/hvm: Break out __hvm_copy()'s translation logic

2017-06-21 Thread Andrew Cooper
It will be reused by later changes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/hvm/hvm.c| 141 ++ xen/include/asm-x86/hvm/support.h | 12 2 files changed, 95

[Xen-devel] [PATCH 1/6] x86/hvm: Fixes to hvmemul_insn_fetch()

2017-06-21 Thread Andrew Cooper
Force insn_off to a single byte, as offset can wrap around or truncate with respect to sh_ctxt->insn_buf_eip under a number of normal circumstances. Furthermore, don't use an ASSERT() for bounds checking the write into hvmemul_ctxt->insn_buf[]. Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH 6/6] x86/hvm: Implement hvmemul_write() using real mappings

2017-06-21 Thread Andrew Cooper
An access which crosses a page boundary is performed atomically by x86 hardware, albeit with a severe performance penalty. An important corner case is when a straddled access hits two pages which differ in whether a translation exists, or in net access rights. The use of hvm_copy*() in

[Xen-devel] [PATCH 2/6] x86/shadow: Fixes to hvm_emulate_insn_fetch()

2017-06-21 Thread Andrew Cooper
Zero-legnth reads are jump-target segmentation checks; never serve them from the cache. Force insn_off to a single byte, as offset can wrap around or truncate with respect to sh_ctxt->insn_buf_eip under a number of normal circumstances. Signed-off-by: Andrew Cooper

[Xen-devel] [PATCH 0/6] Various XSA followups

2017-06-21 Thread Andrew Cooper
XSA-219 was discovered while trying to implement the bugfix in patch 6. Andrew Cooper (6): x86/hvm: Fixes to hvmemul_insn_fetch() x86/shadow: Fixes to hvm_emulate_insn_fetch() x86/shadow: Use ERR_PTR infrastructure for sh_emulate_map_dest() [RFC] x86/hvm: Rename enum hvm_copy_result to

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 06:10 PM, Wei Liu wrote: > On Wed, Jun 21, 2017 at 05:56:02PM +0300, Razvan Cojocaru wrote: >> Fixed an issue where the maximum index allowed (31) goes beyond the >> actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. >> Coverity-ID: 1412966 >> >> Signed-off-by:

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-21 Thread Julien Grall
On 21/06/17 16:09, Wei Liu wrote: On Wed, Jun 21, 2017 at 01:18:38AM +0800, Zhongze Liu wrote: For example: In xl config file of vm1: static_shared_mem = ["id = ID1, begin = gmfn1, end = gmfn2, granularity = 4k, prot = RO, master”, "id

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 05:56:02PM +0300, Razvan Cojocaru wrote: > Fixed an issue where the maximum index allowed (31) goes beyond the > actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. > Coverity-ID: 1412966 > > Signed-off-by: Razvan Cojocaru >

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 01:18:38AM +0800, Zhongze Liu wrote: > > 1. Motivation and Description > > Virtual machines use grant table hypercalls to setup a share page for > inter-VMs

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Andrew Cooper
On 21/06/17 15:56, Razvan Cojocaru wrote: > Fixed an issue where the maximum index allowed (31) goes beyond the > actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. > Coverity-ID: 1412966 > > Signed-off-by: Razvan Cojocaru Reviewed-by: Andrew Cooper

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type"): > On Wed, Jun 21, 2017 at 04:24:33PM +0200, Olaf Hering wrote: > > On Thu, Jun 15, Juergen Gross wrote: > > > +++ b/tools/misc/xen-detect.c > > > > > +asprintf(, "V%u.%u", > > > +

[Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru --- Changes since V1: - Changed '3' to 'ARRAY_SIZE(...)'. ---

Re: [Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Andrew Cooper
On 21/06/17 15:33, Andrew Cooper wrote: > On 21/06/17 15:28, Razvan Cojocaru wrote: >> Fixed an issue where the maximum index allowed (31) goes beyond the >> actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. >> Coverity-ID: 1412966 >> >> Signed-off-by: Razvan Cojocaru

Re: [Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 05:33 PM, Andrew Cooper wrote: > On 21/06/17 15:28, Razvan Cojocaru wrote: >> Fixed an issue where the maximum index allowed (31) goes beyond the >> actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. >> Coverity-ID: 1412966 >> >> Signed-off-by: Razvan Cojocaru

[Xen-devel] [PATCH] xen-detect: handle asprintf error

2017-06-21 Thread Wei Liu
Otherwise gcc with -Wunused will complain the return value is not used. Reported-by: Olaf Hering Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Olaf Hering Cc: Juergen Gross ---

Re: [Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Andrew Cooper
On 21/06/17 15:28, Razvan Cojocaru wrote: > Fixed an issue where the maximum index allowed (31) goes beyond the > actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. > Coverity-ID: 1412966 > > Signed-off-by: Razvan Cojocaru > --- >

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-21 Thread George Dunlap
On 21/06/17 11:08, Jan Beulich wrote: > So far callers of the libxc interface passed in a domain ID which was > then ignored in the hypervisor. Instead, make the hypervisor honor it > (accepting DOMID_INVALID to obtain original behavior), allowing to > query whether a device is assigned to a

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Olaf Hering
On Wed, Jun 21, Wei Liu wrote: > Hmm... your gcc seems to be rather strict. :-) Yes, all of them: https://build.opensuse.org/package/show/home:olh:xen-unstable/xen All red. :-) Olaf signature.asc Description: PGP signature ___ Xen-devel mailing

[Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru --- xen/arch/x86/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 04:24:33PM +0200, Olaf Hering wrote: > On Thu, Jun 15, Juergen Gross wrote: > > > +++ b/tools/misc/xen-detect.c > > > +asprintf(, "V%u.%u", > > + (uint16_t)(regs[0] >> 16), (uint16_t)regs[0]); > > > +asprintf(, "V%s.%s", str, tmp); > >

Re: [Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-21 Thread Olaf Hering
On Thu, Jun 15, Juergen Gross wrote: > +++ b/tools/misc/xen-detect.c > +asprintf(, "V%u.%u", > + (uint16_t)(regs[0] >> 16), (uint16_t)regs[0]); > +asprintf(, "V%s.%s", str, tmp); This fails to build: xen-detect.c:196:17: error: ignoring return value of

Re: [Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-21 Thread Wei Liu
On Wed, Jun 21, 2017 at 05:13:29PM +0300, Razvan Cojocaru wrote: > On 06/21/2017 04:58 PM, Wei Liu wrote: > > On Mon, Jun 19, 2017 at 03:24:38PM +0300, Petre Pircalabu wrote: > >> Add support for filtering out the write_ctrlreg monitor events if they > >> are generated only by changing certains

[Xen-devel] [OSSTEST PATCH 06/15] sg-run-job: Execute prep-job/RECIPE if it exists

2017-06-21 Thread Ian Jackson
This allows a job to do its own host allocation, for example. Signed-off-by: Ian Jackson --- v2: New patch --- sg-run-job | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sg-run-job b/sg-run-job index 8acb902..cfbc34b 100755 --- a/sg-run-job +++ b/sg-run-job @@

[Xen-devel] [OSSTEST PATCH 12/15] sg-run-job: Abolish `anyfailed'

2017-06-21 Thread Ian Jackson
This is very similar to !$ok. anyfailed is set to 1 only by catching-otherwise, which also then sets ok to 0. The differences are solely some sites which set ok to 0 without setting anyfailed to 1: (i) In run-job, if there are escaped steps (ii) In run-job, if any steps were not run due to the

[Xen-devel] [OSSTEST PATCH 10/15] sg-run-job: Spawn ts-syslog-server

2017-06-21 Thread Ian Jackson
Every job now gets a syslog server, which starts up after host allocation. The server's address and port are recorded by ts-syslog-server in a runvar and can be used by subsequent test steps. Signed-off-by: Ian Jackson --- v2: Change mistaken TESTID `.' to `='. `.'

[Xen-devel] [OSSTEST PATCH 15/15] sg-run-job: Logfiles: Suppress links to 0-length files

2017-06-21 Thread Ian Jackson
These are not really helpful. Making them not be links makes them easier to skip by eye. Signed-off-by: Ian Jackson --- v2: New patch. --- sg-report-flight | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sg-report-flight b/sg-report-flight

[Xen-devel] [OSSTEST PATCH 14/15] sg-report-flight: Make logfile list into table, with more info

2017-06-21 Thread Ian Jackson
Also print the mtime and the size. Signed-off-by: Ian Jackson --- v2: New patch. --- sg-report-flight | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index b7cd03a..f7150a0 100755 ---

[Xen-devel] [OSSTEST PATCH 09/15] sg-run-job: Break out allocate-build-host, and reorder

2017-06-21 Thread Ian Jackson
We're going to want to start the syslog server after host allocation but before installation, so we need to split these steps up. A side effect is that a build job becomes `running' when it starts its host install, not when it starts the actual build. Signed-off-by: Ian Jackson

  1   2   3   >